/* ==========================================================================
   NIPPON · A Journal of Japan — shared design system
   Every page links this file. Pages add no <style> blocks of their own.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@400;500;600&family=Noto+Serif+JP:wght@400;600&display=swap");

:root {
  --paper: #f6f2ea;
  --paper-deep: #ece5d8;
  --ink: #1b1815;
  --ink-soft: #4a443d;
  --ink-mute: #857c70;
  --rule: #d6ccbb;
  --vermilion: #b4321e;
  --gold: #a88443;
  --night: #121110;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --jp: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;

  --measure: 38rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 82rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--vermilion); color: var(--paper); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Small-caps label used everywhere ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vermilion);
}
.jp { font-family: var(--jp); font-weight: 400; letter-spacing: 0.08em; }

/* ==========================================================================
   Masthead
   ========================================================================== */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 242, 234, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  max-width: var(--max); margin: 0 auto; padding: 0.85rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 0.7rem; }
.brand__name {
  font-family: var(--serif); font-weight: 600; font-size: 1.6rem;
  letter-spacing: 0.32em; text-transform: uppercase;
}
.brand__seal {
  display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem; border-radius: 3px;
  background: var(--vermilion); color: var(--paper);
  font-family: var(--jp); font-size: 0.9rem; transform: translateY(0.25rem);
}
.brand__tag {
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-mute);
}
.nav { display: flex; gap: 1.6rem; font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; }
.nav a { text-decoration: none; color: var(--ink-soft); padding: 0.3rem 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-color: var(--vermilion); }
@media (max-width: 720px) { .brand__tag { display: none; } .nav { gap: 1rem; } }

/* ==========================================================================
   PLACE PAGE — hero
   ========================================================================== */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: flex-end;
  color: #fff; background: var(--night); overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: hero-drift 24s ease-out both;
}
@keyframes hero-drift { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 28%),
    linear-gradient(0deg, rgba(10,8,6,0.88) 0%, rgba(10,8,6,0.45) 38%, rgba(10,8,6,0) 65%);
}
.hero__content {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(2.5rem, 7vh, 5rem);
  animation: rise 1.2s .2s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero__issue {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.hero__issue::before { content: ""; width: 3rem; height: 1px; background: var(--vermilion); }
.hero__title {
  margin: 0.6rem 0 0; font-weight: 500;
  font-size: clamp(3.2rem, 9vw, 8.5rem); line-height: 0.95; letter-spacing: -0.015em;
}
.hero__jp { display: block; margin-top: 0.9rem; font-family: var(--jp); font-size: clamp(1rem, 1.8vw, 1.35rem); letter-spacing: 0.3em; color: rgba(255,255,255,0.8); }
.hero__dek {
  max-width: 40rem; margin: 1.4rem 0 0;
  font-style: italic; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.4; color: rgba(255,255,255,0.92);
}

/* Photo credit — REQUIRED on every page that shows a photo (CC licences) */
.credit {
  max-width: var(--max); margin: 0 auto; padding: 0.7rem var(--gutter) 0;
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--ink-mute);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
}
.credit a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 2px; }
.credit a:hover { text-decoration-color: var(--vermilion); }
.credit__caption { font-style: normal; color: var(--ink-soft); }

/* ==========================================================================
   PLACE PAGE — article layout
   ========================================================================== */
.article {
  max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 6.5rem) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: clamp(2.5rem, 6vw, 6rem);
}
@media (max-width: 960px) { .article { grid-template-columns: 1fr; } }
.article__body { max-width: var(--measure); }
.article__body > * + * { margin-top: 1.2em; }
.article__body p { margin: 0; hyphens: auto; color: var(--ink); }
.article__body p + p { margin-top: 1em; }

.lede { font-size: 1.55rem; line-height: 1.5; color: var(--ink); }
.lede::first-letter {
  float: left; font-size: 5.4em; line-height: 0.78; font-weight: 500;
  margin: 0.06em 0.09em 0 -0.02em; color: var(--vermilion);
}

.article__body h2 {
  margin: 2.6em 0 0.2em; font-weight: 500; font-size: 2.2rem; line-height: 1.1; letter-spacing: -0.01em;
}
.article__body h2 .kicker { display: block; margin-bottom: 0.65rem; }

.pullquote {
  margin: 2.4em 0 !important; padding: 1.8rem 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.25; font-style: italic; font-weight: 500;
}
.pullquote cite { display: block; margin-top: 1rem; font-family: var(--sans); font-style: normal; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); }

/* "Know before you go" list */
.tips { list-style: none; padding: 0; margin: 1.4em 0 0; counter-reset: tip; }
.tips li {
  counter-increment: tip; position: relative; padding: 1.1rem 0 1.1rem 3.2rem;
  border-top: 1px solid var(--rule); line-height: 1.5;
}
.tips li:last-child { border-bottom: 1px solid var(--rule); }
.tips li::before {
  content: counter(tip, decimal-leading-zero); position: absolute; left: 0; top: 1.2rem;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; color: var(--vermilion);
}
.tips strong { font-weight: 600; }

/* Sidebar — At a glance */
.aside { align-self: start; position: sticky; top: 6rem; }
@media (max-width: 960px) { .aside { position: static; } }
.glance { border-top: 3px solid var(--ink); padding-top: 1.2rem; }
.glance__title { margin: 0 0 1.2rem; font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.glance dl { margin: 0; }
.glance dt { font-family: var(--sans); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); }
.glance dd { margin: 0.25rem 0 1.15rem; font-size: 1.12rem; line-height: 1.4; padding-bottom: 1.1rem; border-bottom: 1px solid var(--rule); }
.glance dd:last-of-type { border-bottom: 0; }
.aside__note {
  margin-top: 1.5rem; padding: 1.4rem; background: var(--paper-deep);
  font-size: 1.05rem; line-height: 1.5; font-style: italic;
}
.aside__note .kicker { display: block; font-style: normal; margin-bottom: 0.5rem; }

/* Full-bleed ink band (e.g. "The moment" / best time) */
.band { background: var(--night); color: var(--paper); }
.band__inner {
  max-width: var(--max); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 6vw, 6rem); align-items: start;
}
@media (max-width: 860px) { .band__inner { grid-template-columns: 1fr; } }
.band .kicker { color: #e0735f; }
.band h2 { margin: 0.6rem 0 0; font-weight: 500; font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.02; }
.band p { margin: 0; font-size: 1.3rem; line-height: 1.6; color: rgba(246,242,234,0.86); }
.band p + p { margin-top: 1em; }

/* Seasons strip */
.seasons { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); margin-top: 1.6em; }
@media (max-width: 640px) { .seasons { grid-template-columns: repeat(2, 1fr); } }
.season { padding: 1.1rem 1rem 1.2rem 0; border-bottom: 1px solid var(--rule); }
.season + .season { padding-left: 1rem; border-left: 1px solid var(--rule); }
@media (max-width: 640px) { .season:nth-child(3) { border-left: 0; padding-left: 0; } }
.season h3 { margin: 0 0 0.35rem; font-family: var(--sans); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--vermilion); }
.season p { margin: 0 !important; font-size: 1.02rem; line-height: 1.45; color: var(--ink-soft); }

/* Prev / next */
.pager { border-top: 1px solid var(--ink); }
.pager__inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 1fr; }
.pager a { display: block; padding: 2.2rem 0; text-decoration: none; transition: color .2s; }
.pager a:hover .pager__name { color: var(--vermilion); }
.pager a + a { text-align: right; border-left: 1px solid var(--rule); padding-left: 2rem; }
.pager__label { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute); }
.pager__name { display: block; margin-top: 0.4rem; font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.1; font-weight: 500; transition: color .2s; }

/* ==========================================================================
   HOME PAGE
   ========================================================================== */
.cover { position: relative; min-height: 100vh; display: grid; align-items: end; color: #fff; background: var(--night); overflow: hidden; }
.cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-drift 30s ease-out both; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,7,6,0.9) 0%, rgba(8,7,6,0.35) 45%, rgba(8,7,6,0.15) 100%); }
.cover__content { position: relative; z-index: 2; max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--gutter) clamp(3rem, 9vh, 6rem); animation: rise 1.3s .2s cubic-bezier(.2,.7,.2,1) both; }
.cover__issue { font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: rgba(255,255,255,0.85); display: flex; gap: 1.2rem; flex-wrap: wrap; }
.cover__title { margin: 0.8rem 0 0; font-weight: 500; font-size: clamp(3.6rem, 11vw, 10.5rem); line-height: 0.9; letter-spacing: -0.02em; }
.cover__title em { color: #f0b9a8; }
.cover__dek { max-width: 42rem; margin: 1.6rem 0 0; font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.4; font-style: italic; color: rgba(255,255,255,0.9); }

.intro { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) var(--gutter); display: grid; grid-template-columns: 1fr 2fr; gap: clamp(2rem, 6vw, 6rem); }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } }
.intro h2 { margin: 0.6rem 0 0; font-weight: 500; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.05; }
.intro__text { columns: 2 18rem; column-gap: 3rem; }
.intro__text p { margin: 0 0 1em; break-inside: avoid-column; }
.intro__text p:first-child::first-letter { float: left; font-size: 4.6em; line-height: 0.8; margin: 0.05em 0.08em 0 0; color: var(--vermilion); font-weight: 500; }

.section-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; justify-content: space-between; align-items: end; gap: 2rem; border-top: 3px solid var(--ink); padding-top: 1.3rem; }
.section-head h2 { margin: 0.4rem 0 0; font-weight: 500; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.section-head__count { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); white-space: nowrap; }
.region { margin-top: clamp(4rem, 8vw, 6rem); }
.region__blurb { max-width: var(--max); margin: 1rem auto 0; padding: 0 var(--gutter); }
.region__blurb p { max-width: 44rem; margin: 0; font-style: italic; color: var(--ink-soft); font-size: 1.25rem; }

/* Story cards grid */
.grid { max-width: var(--max); margin: 2.2rem auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(12, 1fr); gap: 2.6rem 2rem; }
.card { grid-column: span 4; text-decoration: none; display: block; }
.card--wide { grid-column: span 8; }
.card--half { grid-column: span 6; }
@media (max-width: 960px) { .card, .card--wide, .card--half { grid-column: span 6; } }
@media (max-width: 600px) { .card, .card--wide, .card--half { grid-column: span 12; } }
.card__media { overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-deep); }
.card--wide .card__media, .card--half .card__media { aspect-ratio: 16 / 10; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s; filter: saturate(0.95); }
.card:hover .card__media img { transform: scale(1.045); filter: saturate(1.08); }
.card__meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.card__num { font-family: var(--sans); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; color: var(--ink-mute); }
.card__title { margin: 0.35rem 0 0; font-weight: 500; font-size: 1.9rem; line-height: 1.05; transition: color .2s; }
.card--wide .card__title { font-size: 2.5rem; }
.card:hover .card__title { color: var(--vermilion); }
.card__dek { margin: 0.5rem 0 0; font-size: 1.1rem; line-height: 1.45; color: var(--ink-soft); }

/* Index / table of contents */
.index { max-width: var(--max); margin: clamp(5rem, 10vw, 8rem) auto 0; padding: 0 var(--gutter); }
.index ol { list-style: none; margin: 2rem 0 0; padding: 0; columns: 3 16rem; column-gap: 3rem; }
.index li { break-inside: avoid; border-top: 1px solid var(--rule); }
.index a { display: flex; gap: 1rem; align-items: baseline; padding: 0.7rem 0; text-decoration: none; font-size: 1.2rem; transition: color .2s; }
.index a:hover { color: var(--vermilion); }
.index__n { font-family: var(--sans); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; color: var(--ink-mute); width: 1.8rem; flex: none; }
.index__pref { margin-left: auto; font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }

/* Photo credits list (home) */
.credits { max-width: var(--max); margin: clamp(5rem, 10vw, 8rem) auto 0; padding: 0 var(--gutter); }
.credits ol { margin: 1.5rem 0 0; padding: 0; list-style: none; columns: 3 16rem; column-gap: 3rem; font-family: var(--sans); font-size: 0.72rem; line-height: 1.5; color: var(--ink-mute); }
.credits li { break-inside: avoid; margin-bottom: 0.7rem; }
.credits a { color: var(--ink-soft); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { margin-top: clamp(5rem, 10vw, 8rem); background: var(--night); color: rgba(246,242,234,0.75); }
.footer__inner { max-width: var(--max); margin: 0 auto; padding: 3.5rem var(--gutter) 2.5rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer__inner { grid-template-columns: 1fr; } }
.footer .brand__name { color: var(--paper); }
.footer p { margin: 0.8rem 0 0; font-size: 1.05rem; font-style: italic; max-width: 28rem; }
.footer__links { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; display: flex; flex-direction: column; gap: 0.7rem; align-items: flex-start; }
.footer__links a { text-decoration: none; color: rgba(246,242,234,0.75); }
.footer__links a:hover { color: #fff; }
.footer__base { max-width: var(--max); margin: 0 auto; padding: 1.2rem var(--gutter) 2rem; border-top: 1px solid rgba(246,242,234,0.12); font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.08em; color: rgba(246,242,234,0.45); }
.pager + .footer { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
