/*
Theme Name: Starhills Magazine
Theme URI: https://the-starhills.co.kr/
Author: Starhills
Description: Photography-first editorial magazine theme for The Starhills.
Version: 1.1.0
Text Domain: starhills-magazine
*/

:root {
  --ink: #111111;
  --muted: #757575;
  --line: #dedede;
  --soft: #f5f5f3;
  --paper: #ffffff;
  --accent: #e44b2b;
  --content: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(0,0,0,.1);
  backdrop-filter: blur(14px);
}
.header-inner {
  max-width: var(--content);
  height: 78px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 800; letter-spacing: .13em; }
.brand-mark { width: 13px; height: 13px; background: var(--ink); transform: rotate(45deg); }
.primary-nav { display: flex; align-items: center; gap: 34px; font-size: 14px; font-weight: 650; }
.primary-nav a { position: relative; }
.primary-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; background: var(--ink); transition: right .25s ease; }
.primary-nav a:hover::after { right: 0; }

.hero { max-width: var(--content); margin: 0 auto; padding: 94px 28px 56px; }
.hero-kicker { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(50px, 7.6vw, 112px); line-height: .94; letter-spacing: -.065em; font-weight: 850; }
.hero h1 span { display: block; margin-top: 18px; color: var(--muted); font-size: .25em; line-height: 1.35; letter-spacing: -.02em; font-weight: 500; }

.tools-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tools { max-width: var(--content); min-height: 84px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.filter-pill { display: inline-flex; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; color: #555; font-size: 13px; transition: .2s ease; }
.filter-pill:hover, .filter-pill.is-active { color: white; background: var(--ink); border-color: var(--ink); }
.search-form { min-width: min(330px, 100%); display: flex; align-items: center; border-bottom: 1px solid var(--ink); }
.search-form input { width: 100%; padding: 10px 4px; border: 0; outline: 0; background: transparent; }
.search-form button { width: 40px; border: 0; background: transparent; cursor: pointer; font-size: 18px; }

.magazine-grid { max-width: var(--content); margin: 0 auto; padding: 64px 28px 120px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 66px 28px; }
.card { min-width: 0; }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e8e8e6; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.035); }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg,#e9e9e6,#cfcfca); }
.placeholder::after { content: "THE STARHILLS"; color: rgba(0,0,0,.24); font-size: clamp(13px,1.5vw,20px); font-weight: 800; letter-spacing: .18em; }
.card-index { position: absolute; left: 14px; top: 14px; width: 34px; height: 34px; display: grid; place-items: center; color: white; background: rgba(0,0,0,.82); font-size: 11px; }
.card-meta { margin-top: 21px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.card-category { color: var(--accent); font-weight: 750; }
.card h2 { margin: 12px 0 12px; font-size: clamp(20px, 2vw, 27px); line-height: 1.34; letter-spacing: -.035em; }
.card-excerpt { margin: 0; color: #666; font-size: 14px; line-height: 1.75; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-link { display: inline-flex; margin-top: 18px; padding-bottom: 3px; border-bottom: 1px solid var(--ink); font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.card:first-child { grid-column: span 2; }
.card:first-child .card-media { aspect-ratio: 16 / 9; }
.card:first-child h2 { font-size: clamp(28px, 3vw, 43px); }
.empty-state { grid-column: 1 / -1; padding: 100px 0; text-align: center; color: var(--muted); }
.pagination { grid-column: 1 / -1; padding-top: 18px; display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 13px; }
.pagination .current { color: white; background: var(--ink); border-color: var(--ink); }

.site-footer { color: white; background: var(--ink); }
.footer-inner { max-width: var(--content); margin: 0 auto; padding: 58px 28px 42px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; padding-bottom: 55px; }
.footer-title { max-width: 620px; margin: 0; font-size: clamp(30px,4vw,56px); line-height: 1.08; letter-spacing: -.04em; }
.footer-meta { align-self: flex-end; color: #aaa; font-size: 13px; line-height: 1.8; text-align: right; }
.footer-bottom { padding-top: 22px; border-top: 1px solid #333; display: flex; justify-content: space-between; color: #777; font-size: 11px; letter-spacing: .08em; }

.article-shell { max-width: 980px; margin: 0 auto; padding: 88px 28px 120px; }
.article-header { padding-bottom: 42px; border-bottom: 1px solid var(--line); }
.article-header h1 { margin: 16px 0 20px; font-size: clamp(38px,6vw,72px); line-height: 1.14; letter-spacing: -.055em; }
.article-date { color: var(--muted); font-size: 13px; }
.article-featured { margin: 50px 0; }
.article-content { font-size: 18px; line-height: 1.95; }
.article-content > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.article-content > figure, .article-content > .wp-block-image { max-width: 980px; }
.article-content h2 { margin-top: 2.4em; font-size: 32px; letter-spacing: -.03em; }
.article-content a { text-decoration: underline; }
.back-link { display: inline-flex; margin-top: 70px; padding-bottom: 4px; border-bottom: 1px solid; font-weight: 700; }

body.story-is-open { overflow: hidden; }
.story-overlay[hidden] { display: none; }
.story-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  color: var(--ink);
  background: var(--paper);
}
.story-overlay-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 66px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: rgba(17,17,17,.97);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
}
.story-close {
  padding: 10px 0 10px 20px;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero { padding-top: 70px; }
  .tools { align-items: flex-start; flex-direction: column; }
  .search-form { width: 100%; }
  .magazine-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card:first-child { grid-column: span 2; }
}
@media (max-width: 620px) {
  .header-inner { height: 66px; padding: 0 18px; }
  .brand { font-size: 15px; }
  .primary-nav { gap: 16px; font-size: 12px; }
  .primary-nav a:nth-child(2) { display: none; }
  .hero { padding: 58px 18px 38px; }
  .tools { padding: 16px 18px; }
  .magazine-grid { padding: 40px 18px 80px; grid-template-columns: 1fr; gap: 50px; }
  .card:first-child { grid-column: auto; }
  .card:first-child h2 { font-size: 27px; }
  .footer-inner { padding-left: 18px; padding-right: 18px; }
  .footer-top, .footer-bottom { flex-direction: column; }
  .footer-meta { align-self: flex-start; text-align: left; }
  .article-shell { padding: 60px 18px 90px; }
  .article-content { font-size: 16px; }
}
