/* iyagikkun.com -- restored from the legacy static-html-v1 source's own
   assets/css/site.css (main @ 309b20c), mapped onto this Astro source's
   current component class names. Values below are copied, not reinvented:
   where legacy has no rule for something (blockquote, table), this file has
   none either, rather than a plausible-looking guess. Layout order matches
   legacy's own: tokens, reset, chrome, hero, sections, grids, cards,
   newsletter, footer, article, then one responsive ladder at the end. */

/* ------------------------------------------------------------------ font */

/* Self-hosted (Phase 2 Lighthouse fix -- was Google Fonts, see SeoHead.astro).
   Google's own file for this exact family/weight/style, unmodified --
   DM Serif Display is licensed under the SIL Open Font License, which
   permits redistribution. Regular/400 only: the site never sets italic
   (the footer wordmark's <em> is forced back to font-style: normal), and
   this display font has no other weight to begin with. Latin subset only
   (unicode-range U+0000-00FF and a handful of punctuation/symbol
   codepoints) -- every character DM Serif Display actually renders on this
   site (the "IYAGI.KKUN" wordmark, the mobile nav's Latin-script category
   labels, accented characters like fr's "é" all sit at or under U+00FF) is
   covered; the "latin-ext" subset Google also serves is for codepoints
   nothing here uses. */
@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/fonts/dm-serif-display.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* ---------------------------------------------------------------- tokens */

:root {
  --paper: #f5efe4;
  --paper-soft: #fffaf1;
  --card: #fffaf3;
  --shell: #f8f4ec;
  --ink: #171714;
  --muted: rgba(23, 23, 20, .66);
  --line: rgba(23, 23, 20, .16);
  --red: #a61d22;
  --accent: #c83c2f;
  --serif: "DM Serif Display", Georgia, serif;
  /* No Korean webfont is loaded (Phase 1 Lighthouse fix -- see SeoHead.astro):
     these are the real OS UI fonts that already carry Korean glyphs, named
     the same way the ja/zh/th/ar overrides below already name theirs. */
  --sans: "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;

  /* The hero photo itself is now a real <img> (HomeMain.astro), not a
     background -- only the scrim above it is still a CSS custom property. */
  --hero-scrim: linear-gradient(90deg, rgba(248, 244, 236, .98) 0%, rgba(248, 244, 236, .88) 31%, rgba(248, 244, 236, .22) 54%, rgba(248, 244, 236, 0) 72%);

  --gutter: 68px;
  --band-gap: 20px;
}

/* ----------------------------------------------------------------- reset */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 28px;
  background: #ebe7dc;
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

html[data-locale="ja"] body { font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", YuGothic, sans-serif; }
html[data-locale="zh-hans"] body { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
html[data-locale="zh-hant"] body { font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; }
html[data-locale="th"] body { font-family: "Noto Sans Thai", Tahoma, sans-serif; line-height: 1.78; }
html[data-locale="ar"] body { font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif; line-height: 1.78; text-align: start; }

/* ---------------------------------------------------------------- chrome */

.shell {
  max-width: 1390px;
  min-height: 100vh;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--shell);
  box-shadow: 0 14px 38px rgba(18, 18, 16, .18);
  overflow: hidden;
}

.header {
  min-height: 90px;
  padding: 0 46px;
  display: flex;
  align-items: center;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(23, 23, 20, .12);
  background: rgba(255, 253, 248, .9);
  backdrop-filter: blur(14px);
}

.brand {
  height: 52px;
  /* Legacy's header is [logo] .......... [nav] [utils], not DOM order left
     to right -- the logo pins to the front of the row and everything after
     it (nav, then utils) is pushed to the far end by the auto margin. */
  order: -1;
  margin-inline-end: auto;
  display: flex;
  align-items: center;
  /* Yield rather than shove .menu-btn off screen: mobile leaves only 12-21px
     of slack, so a wider language pill would otherwise push the hamburger
     out of reach. */
  flex: 0 1 auto;
  min-width: 0;
}
.brand-mark { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }

.nav,
.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.header-tools { flex: 0 1 auto; justify-content: flex-end; }

/* Language menu ---------------------------------------------------------- */

.language-menu { position: relative; }
.language-switch {
  min-width: 64px;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}
.language-options {
  position: absolute;
  top: calc(100% + 12px);
  inset-inline-end: 0;
  width: 210px;
  max-height: min(440px, 72vh);
  overflow: auto;
  padding: 8px;
  z-index: 80;
  border: 1px solid var(--ink);
  background: var(--paper-soft);
  box-shadow: 0 18px 38px rgba(23, 23, 20, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: .2s ease;
}
.language-menu.is-open .language-options { opacity: 1; visibility: visible; transform: translateY(0); }
.language-option {
  width: 100%;
  padding: 11px 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: start;
  cursor: pointer;
}
.language-option:hover,
.language-option.is-active { background: var(--ink); color: var(--paper-soft); }
.language-option span:last-child { font-size: 11px; font-weight: 900; letter-spacing: .08em; }

/* Mobile navigation ------------------------------------------------------ */

.menu-btn {
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.menu-btn__icon { position: relative; width: 16px; height: 12px; }
.menu-btn__icon span,
.menu-btn__icon::before,
.menu-btn__icon::after { content: ""; position: absolute; left: 0; width: 16px; height: 1px; background: var(--ink); }
.menu-btn__icon::before { top: 0; }
.menu-btn__icon span { top: 50%; margin-block-start: -.5px; }
.menu-btn__icon::after { bottom: 0; }

.mobile-panel {
  position: fixed;
  inset: 76px 0 0;
  z-index: 45;
  padding: 34px 6vw;
  overflow: auto;
  background: var(--paper-soft);
  transform: translateX(100%);
  transition: .28s ease;
}
.mobile-panel.is-open { transform: translateX(0); }
.mobile-panel a {
  display: block;
  padding: 15px 0;
  font-family: var(--serif);
  font-size: clamp(34px, 12vw, 58px);
  line-height: .95;
}

/* ------------------------------------------------------------------ hero */

.home-hero {
  min-height: 512px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(18, 18, 16, .12);
}
/* The photo used to be `--hero-photo` inside this rule's own `background`,
   discoverable only after CSS parses -- now it is a real <img> in the
   initial HTML so the browser can start fetching it before CSS even loads.
   The scrim is still the exact same `--hero-scrim` custom property (and
   every breakpoint/RTL override of it, below and further down this file),
   just painted on its own layer above the photo instead of composited into
   one `background` shorthand with it. */
.home-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 73% 50%;
}
.home-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--hero-scrim);
}
.home-hero__copy {
  width: 610px;
  max-width: 100%;
  min-height: 512px;
  padding: 92px 0 48px var(--gutter);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.home-hero .eyebrow { display: none; }
.home-hero h1 {
  max-width: 520px;
  margin: 0 0 28px;
  font-family: var(--sans);
  font-size: clamp(42px, 4.8vw, 62px);
  font-weight: 900;
  line-height: 1.18;
}
.home-hero__copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(18, 18, 16, .78);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.65;
}
.hero-actions { margin-top: 42px; display: flex; flex-wrap: wrap; gap: 18px; }

.hero-cta {
  min-width: 188px;
  min-height: 54px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--red);
  border-radius: 2px;
  background: var(--red);
  color: var(--card);
  font-size: 15px;
  font-weight: 900;
}
.hero-cta--outline {
  border-color: rgba(18, 18, 16, .72);
  background: rgba(255, 253, 248, .58);
  color: var(--ink);
}

/* -------------------------------------------------------------- sections */

.section { background: var(--shell) url("/assets/paper.jpg") center top / cover fixed; }
.section-head {
  padding: 48px var(--gutter) 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.section-head h2 { margin: 0; font-family: var(--sans); font-size: 31px; font-weight: 900; line-height: 1; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }

/* ------------------------------------------------------------------ grids */

.language-grid,
.story-grid {
  display: grid;
  gap: var(--band-gap);
  padding: 0 var(--gutter) 58px;
}
.language-grid { grid-template-columns: repeat(4, 1fr); }
.story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }

/* ------------------------------------------------------------------ cards */

.language-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  overflow: hidden;
}
.language-card:hover { background: #fffdf8; border-color: rgba(169, 31, 36, .36); box-shadow: 0 12px 30px rgba(23, 23, 20, .08); }
.language-card span { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.language-card strong { display: block; font-family: var(--sans); font-size: clamp(20px, 1.8vw, 27px); font-weight: 900; line-height: 1.2; }
.language-card p { margin: 14px 0 0; color: var(--muted); line-height: 1.58; }

/* Publication card: a square picture and a headline, nothing else -- legacy
   never shows a description or a date on a grid card. */
.publication-story-card {
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  background: none;
  color: var(--ink);
}
.publication-story-card:hover { background-color: var(--paper-soft); }
/* The square is this wrapper's box, not the <img>'s own -- an <img> that
   carries its real (often portrait or landscape) width/height attributes
   alongside an aspect-ratio:1/1 rule renders at its intrinsic ratio in
   production, not the cropped square below. The wrapper owns the geometry;
   object-fit on the img just fills whatever box it's given. */
.publication-card-thumb,
.post-thumb-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(233, 67, 50, .14), transparent 46%) #f2eadf;
}
.publication-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.publication-story-card strong {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category tile fallback: a post without its own image yet falls back to
   its category's own photo, so a still-filling section reads as a real
   magazine section rather than empty boxes. */
[data-publication-slot="k-pop"] .post-thumb-placeholder { background: url("/assets/tiles/k-pop.webp") center / cover no-repeat; }
[data-publication-slot="drama-film"] .post-thumb-placeholder { background: url("/assets/tiles/drama-film.webp") center / cover no-repeat; }
[data-publication-slot="entertainment-issues"] .post-thumb-placeholder { background: url("/assets/tiles/entertainment-issues.webp") center / cover no-repeat; }
[data-publication-slot="k-memes"] .post-thumb-placeholder { background: url("/assets/tiles/k-memes.webp") center / cover no-repeat; }
[data-publication-slot="life"] .post-thumb-placeholder { background: url("/assets/tiles/life.webp") center / cover no-repeat; }

.publication-slot:not(:has(.publication-story-card)) { display: none; }

.category-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  line-height: 1.75;
}

/* Category intro band -- flat, on the same paper as the sections below it;
   legacy has no static category-listing page to copy, so this stays close
   kin to .section-head rather than inventing a new card treatment. */
.category-intro { padding: 48px var(--gutter) 0; }
.category-intro .eyebrow { color: var(--accent); }
.category-intro h1 { max-width: 780px; margin: 14px 0 12px; font-family: var(--sans); font-size: clamp(34px, 4.5vw, 48px); font-weight: 900; line-height: 1.2; }
.category-intro p { max-width: 640px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.65; }

/* ------------------------------------------------------------ newsletter */

.newsletter {
  margin: 0 var(--gutter) 58px;
  padding: 44px 60px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 58px;
  border-radius: 4px;
  background: rgba(232, 223, 210, .86);
  color: var(--ink);
}
.newsletter h2 { margin: 0; font-family: var(--sans); font-size: 34px; font-weight: 900; line-height: 1.28; }
.newsletter > div > p { max-width: 580px; color: rgba(18, 18, 16, .68); line-height: 1.7; }
.newsletter .eyebrow { color: var(--accent); }
.subscribe {
  margin-top: 26px;
  display: flex;
  border: 1px solid rgba(18, 18, 16, .26);
  border-bottom: 2px solid var(--paper-soft);
  background: rgba(255, 253, 248, .76);
}
.subscribe input { flex: 1; min-width: 0; padding: 0 22px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.subscribe input::placeholder { color: rgba(23, 23, 20, .48); }
.subscribe button { min-width: 150px; padding: 0 24px; border: 0; background: var(--red); color: var(--card); font-weight: 900; cursor: pointer; }

/* ---------------------------------------------------------------- footer */

.footer { padding: 42px var(--gutter) 30px; background: rgba(255, 253, 248, .94); color: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.1fr .9fr .9fr; gap: 40px; }
.footer-logo { margin: 0; font-family: var(--serif); font-size: clamp(42px, 6vw, 78px); line-height: .9; }
.footer-logo em { color: inherit; font-style: normal; }
.footer-note { max-width: 360px; margin: 18px 0 0; color: rgba(23, 23, 20, .58); line-height: 1.6; }
.footer-col strong { display: block; margin-bottom: 16px; color: rgba(23, 23, 20, .48); font-size: 11px; letter-spacing: .14em; }
.footer-col a { display: block; margin: 10px 0; }
.copyright {
  margin-top: 48px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: rgba(23, 23, 20, .52);
  font-size: 11px;
}

/* --------------------------------------------------------------- article */

/* The article page paints its own ground: the shell is lighter than a
   homepage's so body text sits on near-white rather than on the paper tone. */
body.post-detail-page { background: #f3eee5; }
.post-detail-page .shell { background: rgba(255, 253, 248, .94); }
.post-detail { padding: 48px var(--gutter) 0; }
.post-meta { display: flex; align-items: center; gap: 14px; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.post-meta time { color: var(--muted); }
.post-hero h1 { max-width: 940px; margin: 14px 0 12px; font-size: clamp(32px, 3.4vw, 48px); font-weight: 900; line-height: 1.2; }
.post-dek { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.post-cover { margin: 30px 0 0; }
.post-cover img { border-radius: 4px; }
.post-cover figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; }

.post-body { margin: 34px 0 0; font-size: 17px; line-height: 1.8; }
.post-body h2 { margin: 44px 0 12px; font-size: 26px; font-weight: 900; }
.post-body h3 { margin: 32px 0 10px; font-size: 20px; font-weight: 900; }
.post-body img { margin: 26px 0; border-radius: 4px; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.post-qa { margin: 44px 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
.post-qa h2 { margin: 0 0 18px; font-size: 24px; font-weight: 900; }
.post-qa__item + .post-qa__item { margin-top: 22px; }
.post-qa__item h3 { margin: 22px 0 6px; font-size: 18px; font-weight: 900; }
.post-qa__item:first-child h3 { margin-top: 0; }
.post-qa__item p { margin: 0; color: var(--muted); line-height: 1.72; }

/* ------------------------------------------------------- responsive ladder
 *
 * Three breakpoints, each stated once, descending width so the narrower one
 * always wins -- legacy's own ladder, unmodified.
 */

@media (max-width: 1080px) {
  :root { --gutter: 40px; --band-gap: 16px; }
  .nav { display: none; }
  .menu-btn { display: grid; }
  .brand { height: 42px; }
  .header { min-height: 76px; padding: 0 24px; gap: 16px; }
  .home-hero,
  .home-hero__copy { min-height: 380px; }
  .home-hero__copy { width: 100%; padding: 56px var(--gutter) 40px; }
  .language-grid,
  .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .newsletter { padding: 34px; gap: 28px; }
}

@media (max-width: 900px) {
  :root {
    --gutter: 22px;
    /* Below this width the copy spans the full page, so a left-to-right
       fade leaves the last lines sitting on the photograph. The scrim
       becomes a top-down one that clears the text and lets the picture
       show under it. */
    --hero-scrim: linear-gradient(180deg, rgba(248, 244, 236, .97) 0%, rgba(248, 244, 236, .92) 58%, rgba(248, 244, 236, .55) 100%);
  }
  body { padding: 0; }
  .shell { border-radius: 0; border-inline-start: 0; border-inline-end: 0; }
  .mobile-panel { inset: 76px 0 0; }
  .language-grid,
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newsletter { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .header { min-height: 66px; padding: 0 20px; gap: 12px; }
  .header-tools { gap: 10px; }
  /* The bar does not fit on a phone by wrapping -- it fails by overlapping.
     The newsletter link is the piece that goes: the drawer behind the
     hamburger carries the same link, so on a phone it was printed twice,
     and the copy in the bar is the one breaking the row. */
  .newsletter-link { display: none; }
  .brand { height: 34px; }
  .language-switch { min-width: 54px; padding: 7px 9px; font-size: 11px; }
  .language-options { position: fixed; top: 66px; left: 0; right: 0; width: 100%; border-inline-start: 0; border-inline-end: 0; }
  .mobile-panel { inset: 66px 0 0; }
  .home-hero,
  .home-hero__copy { min-height: auto; }
  .home-hero__copy { padding: 44px var(--gutter) 34px; }
  .home-hero__copy p { font-size: 17px; }
  .hero-actions { margin-top: 28px; gap: 12px; }
  .hero-cta { flex: 1 1 100%; min-width: 0; min-height: 48px; }
  /* The paper texture is a >=680px enhancement, not the design's floor: a
     non-matching media query's background-image is never fetched, so this
     is a real 108KB removed from every mobile page's initial load, not a
     CSS-only no-op. Solid --shell is the same base color the image sits on
     top of at desktop, so there is no color jump at the 680px boundary. */
  .section { background: var(--shell); }
  .section-head { padding-top: 40px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-head h2 { font-size: 24px; }
  .language-grid,
  .story-grid { grid-template-columns: 1fr; }
  .newsletter { padding: 26px 22px; gap: 20px; }
  .newsletter h2 { font-size: 24px; }
  .subscribe { flex-direction: column; gap: 8px; border: 0; background: transparent; }
  .subscribe input,
  .subscribe button { width: 100%; min-height: 44px; border: 1px solid rgba(23, 23, 20, .24); }
  .subscribe input { background: rgba(255, 253, 248, .72); }
  .post-hero h1 { font-size: 28px; }
  .post-body { font-size: 16px; }
  .footer-grid,
  .copyright { grid-template-columns: 1fr; flex-direction: column; }
}

html[dir="rtl"] .post-meta,
html[dir="rtl"] .section-head,
html[dir="rtl"] .footer,
html[dir="rtl"] .header-tools { direction: rtl; }

/* The hero copy sits at the inline-start edge either way (plain block flow
   already puts it on the right under dir="rtl"), but the scrim is a literal
   90deg gradient, not a logical one -- unflipped, it fades out exactly
   where the RTL text sits instead of behind it. */
html[dir="rtl"] { --hero-scrim: linear-gradient(270deg, rgba(248, 244, 236, .98) 0%, rgba(248, 244, 236, .88) 31%, rgba(248, 244, 236, .22) 54%, rgba(248, 244, 236, 0) 72%); }
/* Below 900px both directions already use the same top-down scrim (see the
   ladder above) -- this only exists so that rule, same specificity but
   earlier in source, isn't the one silently overridden by the RTL rule
   just above it. */
@media (max-width: 900px) {
  html[dir="rtl"] { --hero-scrim: linear-gradient(180deg, rgba(248, 244, 236, .97) 0%, rgba(248, 244, 236, .92) 58%, rgba(248, 244, 236, .55) 100%); }
}

.menu-btn:focus-visible,
.language-switch:focus-visible,
.language-option:focus-visible,
a:focus-visible { outline: 3px solid rgba(166, 29, 34, .3); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
