/* =====================================================
   KORO — homepage sections
   ===================================================== */

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--color-sumi);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}
.loader__count {
  position: absolute;
  left: var(--gutter);
  bottom: var(--gutter);
  font-family: var(--font-display);
  font-size: clamp(64px, 9vw, 140px);
  line-height: 1;
  color: var(--color-rust);
  font-variant-numeric: tabular-nums;
}
.loader__name {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 120px);
  letter-spacing: 0.12em;
  color: var(--color-cream-on-dark);
  opacity: 0;
  animation: loaderName 1.4s var(--ease-out-soft) forwards;
}
@keyframes loaderName { to { opacity: 1; } }
.loader__bar {
  position: absolute;
  left: 50%;
  bottom: calc(var(--gutter) + 8px);
  transform: translateX(-50%);
  width: 120px; height: 2px;
  background: rgba(243, 234, 219, 0.18);
  border-radius: 2px;
  overflow: hidden;
}
.loader__fill {
  display: block; height: 100%; width: 0;
  background: var(--color-rust);
  animation: loaderFill 1.6s var(--ease-out-soft) forwards;
}
@keyframes loaderFill { to { width: 100%; } }
.loader.is-done { opacity: 0; pointer-events: none; transition: opacity 600ms var(--ease-out-soft); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 8%, #2A2722 0%, var(--color-sumi) 48%, #141210 100%);
  color: var(--color-cream-on-dark);
  isolation: isolate;
  overflow: hidden;
  padding: 120px var(--gutter) 150px;
}

/* ---- layered background ---- */
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__backdrop {
  position: absolute;
  left: 50%; top: 48%;
  transform: translate(-50%, -50%);
  width: min(1500px, 130%);
  max-width: none;
  opacity: 0.10;
  /* invert the transparent line-art so dark ink reads as faint light linework on sumi */
  filter: invert(1) brightness(1.5) blur(1px);
  mix-blend-mode: screen;
}
.hero__glow {
  position: absolute; inset: -10%;
  /* warm firelight; position tracks the cursor via --gx/--gy */
  background: radial-gradient(
    420px 420px at var(--gx, 50%) var(--gy, 44%),
    rgba(214, 122, 54, 0.40) 0%,
    rgba(194, 98, 47, 0.18) 32%,
    transparent 62%);
  transition: background-position 200ms linear;
}
.hero__grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
}
.hero__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 46%, transparent 38%, rgba(0,0,0,0.55) 100%);
}
.hero__embers {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
}

/* ---- foreground composition ---- */
.hero__inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }

.hero__title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vw, 20px);
  line-height: 1;
}
.hero__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(96px, 21vw, 360px);
  line-height: 0.86;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #F6E7C4 0%, #E0A94E 42%, #C2622F 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.45));
}
.hero__title-a11y {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hero__medallion {
  position: relative;
  flex: 0 0 auto;
  width: clamp(140px, 21vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-paper);
  overflow: hidden;
  box-shadow:
    0 0 0 6px rgba(20,18,16,0.6),
    0 0 0 7px rgba(224,169,78,0.5),
    0 30px 70px -20px rgba(0,0,0,0.8),
    0 0 80px -10px rgba(214,122,54,0.5);
  margin-bottom: clamp(6px, 1vw, 14px);
}
.hero__medallion img { width: 100%; height: 100%; object-fit: cover; }
.hero__medallion-ring {
  position: absolute; inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(224,169,78,0.35);
  animation: ringPulse 3.6s var(--ease-out-soft) infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1);    opacity: 0.4; }
  50%      { transform: scale(1.06); opacity: 0.9; }
}

.hero__eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: clamp(20px, 3vw, 34px);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-gold);
}
.hero__eyebrow i { display: block; width: clamp(24px, 5vw, 56px); height: 1px; background: linear-gradient(90deg, transparent, rgba(224,169,78,0.7)); }
.hero__eyebrow i:last-child { background: linear-gradient(90deg, rgba(224,169,78,0.7), transparent); }

.hero__sub {
  margin-top: 16px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(17px, 1.8vw, 26px);
  letter-spacing: 0.01em;
  color: rgba(243, 234, 219, 0.9);
}

.hero__scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 234, 219, 0.7);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero__scroll-rule {
  width: 1px; height: 40px;
  background: linear-gradient(180deg, var(--color-gold), transparent);
  animation: scrollHint 2.4s var(--ease-out-soft) infinite;
  transform-origin: top center;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleY(0.5); opacity: 0.3; }
  50%      { transform: scaleY(1);   opacity: 0.9; }
}

/* Stack the wordmark vertically on small screens so the medallion sits between lines */
@media (max-width: 600px) {
  .hero__title-wrap { gap: 4px; }
  .hero__word { font-size: 26vw; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__medallion-ring, .hero__scroll-rule { animation: none; }
}

/* ---------- Story ---------- */
.story {
  position: relative;
  padding: clamp(80px, 12vw, 160px) var(--gutter) clamp(64px, 8vw, 120px);
  background: var(--color-bg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 110px);
  align-items: center;
}
.story__art { position: relative; }
.story__art .art-card { width: 100%; aspect-ratio: 1 / 1; }
.story__copy { display: flex; flex-direction: column; gap: 20px; max-width: 56ch; }
.story__eyebrow {
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--color-rust);
}
.story__lede {
  grid-column: 1 / -1;
  max-width: 22ch;
  margin: clamp(48px, 6vw, 96px) auto 0;
  text-align: center;
  font-size: clamp(40px, 6vw, 104px);
  color: var(--color-ink);
  line-height: 1.04;
}
.story__lede em { font-style: italic; color: var(--color-rust); }

@media (max-width: 920px) {
  .story { grid-template-columns: 1fr; }
}

/* ---------- Spotlight: How to Help ---------- */
.spotlight {
  position: relative;
  padding: clamp(80px, 12vw, 150px) var(--gutter);
  background: var(--color-bg-alt);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(40px, 6vw, 110px);
  align-items: center;
}
.spotlight__art .art-card { width: 100%; aspect-ratio: 4 / 4.2; }
.spotlight__text { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 40ch; }
.spotlight__eyebrow {
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--color-rust);
}
.spotlight__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 92px);
  line-height: 1.02;
  color: var(--color-ink);
  font-weight: 500;
}
.spotlight__body { font-size: var(--fs-body-lg); color: var(--color-ink-soft); }
@media (max-width: 920px) {
  .spotlight { grid-template-columns: 1fr; }
  .spotlight__art { order: 2; }
}

/* ---------- Support band (the coin) ---------- */
.support {
  position: relative;
  padding: clamp(80px, 12vw, 150px) var(--gutter);
  background: var(--color-sumi);
  color: var(--color-cream-on-dark);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  isolation: isolate;
}
.support::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 18% 50%, rgba(194, 98, 47, 0.22), transparent 45%);
  z-index: 0;
}
.support__coin {
  position: relative; z-index: 1;
  width: clamp(160px, 18vw, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-paper);
  overflow: hidden;
  box-shadow: 0 0 0 6px rgba(207, 162, 75, 0.35), 0 30px 60px -30px rgba(0,0,0,0.7);
}
.support__coin img { width: 100%; height: 100%; object-fit: cover; }
.support__text { position: relative; z-index: 1; max-width: 56ch; display: flex; flex-direction: column; gap: 20px; }
.support__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 88px);
  line-height: 1.02;
  color: var(--color-cream-on-dark);
  font-weight: 500;
}
.support__body { font-size: var(--fs-body-lg); color: rgba(243, 234, 219, 0.82); }
.support__meta {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  font-family: var(--font-body); font-size: 14px;
  align-items: center;
  padding-top: 8px;
}
.support__meta dt { color: var(--color-rust); letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px; }
.support__meta dd {
  margin: 0; color: var(--color-cream-on-dark);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.support__pair { display: flex; flex-direction: column; gap: 4px; }
.support__cta { margin-top: 8px; }
@media (max-width: 820px) {
  .support { grid-template-columns: 1fr; justify-items: start; }
}

/* ---------- Art display bands ---------- */
.display-band {
  position: relative;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  background: var(--color-bg);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: clamp(32px, 5vw, 64px);
}
.display-band--alt { background: var(--color-bg-alt); }
.display-band__caption {
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--color-rust);
}
.display-band__text {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 150px);
  line-height: 1.0;
  color: var(--color-ink);
  font-weight: 500;
  max-width: 18ch;
  letter-spacing: -0.01em;
}
.display-band__text .muted { color: rgba(33, 30, 26, 0.34); }
.display-band__body { font-size: var(--fs-body-lg); color: var(--color-ink-soft); max-width: 56ch; }
.display-band__art {
  width: 100%;
  max-width: 1080px;
}
.display-band__art .art-card { width: 100%; }
.display-band__art--wide .art-card { width: 100%; }
.display-band__art--wide .art-card + .art-card { margin-top: 18px; }
.display-band__art--feature .art-card { aspect-ratio: 16 / 11; max-width: 760px; margin: 0 auto; }

/* ---------- Gallery deck ---------- */
.gallery {
  position: relative;
  padding: clamp(80px, 12vw, 150px) var(--gutter) clamp(96px, 14vw, 180px);
  background: var(--color-bg);
  display: grid;
  place-items: center;
  gap: 14px;
}
.gallery__eyebrow {
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--color-rust);
}
.gallery__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 110px);
  font-weight: 500;
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.deck {
  position: relative;
  width: min(380px, 84vw);
  aspect-ratio: 3 / 4.1;
  margin: 0 auto;
}
.deck__card {
  position: absolute;
  inset: 0;
  background: var(--color-paper);
  border-radius: var(--radius-lg);
  padding: 18px 18px 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  text-align: center;
  box-shadow: var(--art-shadow);
  transform-origin: center bottom;
  transition: transform 600ms var(--ease-out-snappy), opacity 400ms var(--ease-out-snappy);
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  pointer-events: none;
  z-index: 0;
}
.deck__card:not(.is-front) > * { visibility: hidden; }
.deck__card.is-front  { opacity: 1; transform: translateY(0) rotate(0deg) scale(1);     z-index: 4; pointer-events: auto; }
.deck__card.is-back-1 { opacity: 1; transform: translate(10px, 10px)  rotate(-2.2deg) scale(0.975); z-index: 3; }
.deck__card.is-back-2 { opacity: 1; transform: translate(-12px, 18px) rotate(2.6deg)  scale(0.95);  z-index: 2; }
.deck__card.is-back-3 { opacity: 1; transform: translate(16px, 26px)  rotate(-4deg)   scale(0.925); z-index: 1; }

.deck__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.0;
  color: var(--color-ink);
  padding-top: 6px;
}
.deck__art { width: 100%; height: 100%; border-radius: 8px; overflow: hidden; background: var(--color-bg-alt); }
.deck__art img { width: 100%; height: 100%; object-fit: cover; }
.deck__meta {
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: 0.02em;
  color: var(--color-ink-soft);
  line-height: 1.4;
}

.deck-pager {
  display: inline-flex; align-items: center; gap: 18px;
  margin-top: clamp(28px, 4vw, 44px);
  font-family: var(--font-body); font-size: 13px; letter-spacing: 0.04em;
  color: var(--color-ink);
}
.deck-pager__btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-line);
  transition: background var(--dur-fast) var(--ease-out-soft), border-color var(--dur-fast) var(--ease-out-soft);
}
.deck-pager__btn:hover { background: var(--color-rust); color: var(--color-paper); border-color: var(--color-rust); }

/* ---------- Closing ribbon ---------- */
.closing {
  position: relative;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  background: var(--color-bg-alt);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.closing__art .art-card { width: 100%; aspect-ratio: 3 / 2; }
.closing__text { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; max-width: 22ch; }
.closing__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 104px);
  line-height: 1.02;
  color: var(--color-ink);
  font-weight: 500;
}
@media (max-width: 920px) {
  .closing { grid-template-columns: 1fr; }
  .closing__art { order: 2; }
}

/* ---------- Cutout art: transparent PNGs that float on the page ----------
   Used where the artwork has been background-removed. No white mat;
   a soft drop-shadow on the ink itself gives gentle depth.
*/
.art-card.art-card--cut {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  aspect-ratio: auto;
  overflow: visible;
}
.art-card.art-card--cut img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 26px rgba(33, 30, 26, 0.18));
}
/* Gallery thumbnails: show the whole cutout on the cream well, don't crop */
.deck__art { display: flex; align-items: center; justify-content: center; }
.deck__art img { object-fit: contain; padding: 6px; }
