/* FRESH SET - the night wash. Linen white, one ink-navy night band. */

:root {
  --linen: #faf7f1;
  --flax: #efe9dc;
  --ink: #16223d;
  --ink-70: rgba(22, 34, 61, 0.7);
  --ink-40: rgba(22, 34, 61, 0.4);
  --ink-12: rgba(22, 34, 61, 0.12);
  --night: #101a30;
  --moon: #f4f1e8;
  --moon-60: rgba(244, 241, 232, 0.6);
  --peg: #e8a03f; /* clothesline-peg amber, small marks only */
  --display: "Fraunces", serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--linen);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---- type scale ---- */
h1, h2, .display {
  font-family: var(--display);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 5.6vw, 5.8rem); }
p, li, figcaption { text-wrap: pretty; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-70);
}
.lede { font-size: clamp(1.1rem, 1.9vw, 1.3rem); max-width: var(--measure); }
.small { font-size: 0.9rem; color: var(--ink-70); }

/* ---- buttons: press-in physics ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 1rem 1.9rem;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), background 0.2s;
}
.btn-solid {
  background: var(--ink);
  color: var(--linen);
  box-shadow: 0 2px 0 rgba(22, 34, 61, 0.35), 0 10px 24px -12px rgba(22, 34, 61, 0.45);
}
.btn-solid:hover { transform: translateY(-1px); }
.btn-solid:active { transform: translateY(1px) scale(0.99); box-shadow: 0 0 0 rgba(0,0,0,0.2); }
.btn-moon { background: var(--moon); color: var(--night); box-shadow: 0 2px 0 rgba(0,0,0,0.4); }
.btn-moon:active { transform: translateY(1px) scale(0.99); box-shadow: none; }
.textlink {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--ink-40);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.textlink:hover { border-color: var(--peg); }

/* ---- nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem var(--gutter);
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(250, 247, 241, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--ink-12);
}
.wordmark {
  font-family: var(--display);
  font-style: italic;
  font-weight: 620;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}
.wordmark .tag {
  font-family: var(--body);
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-70);
  border: 1px dashed var(--ink-40);
  border-radius: 3px;
  padding: 0.18rem 0.4rem;
  transform: translateY(-2px);
}
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.btn) {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-70);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav .btn { padding: 0.65rem 1.3rem; font-size: 0.9rem; }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ---- hero ---- */
.hero {
  position: relative;
  padding: clamp(4rem, 11vh, 7.5rem) var(--gutter) clamp(3rem, 7vh, 5rem);
  isolation: isolate;
}
/* hero content sits one visible tier deeper than the nav */
@media (min-width: 880px) {
  .hero { padding-inline: calc(var(--gutter) + 48px); }
}
.hero::before {
  /* faint pressed-linen weave under the type */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--weave-url);
  background-size: cover;
  background-position: center;
  opacity: 0.34;
  mask-image: linear-gradient(to bottom, black 20%, transparent 96%);
}
.hero .eyebrow { margin-bottom: 1.4rem; }
.hero h1 { max-width: none; }
.hero h1 .l2 { display: block; }
.hero .lede { margin-top: 1.6rem; max-width: 46rem; }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
}

/* masked line-rise for the two hero lines (desktop only) */
@media (min-width: 721px) {
  .js .hero h1 .line { display: block; overflow: hidden; }
  .js .hero h1 .line > span { display: inline-block; transform: translateY(110%); animation: rise 0.9s var(--ease) forwards; }
  .js .hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
}
@keyframes rise { to { transform: translateY(0); } }

/* ---- entrance rhythm: ONE rule, staggered by --i ---- */
.js .cho { opacity: 0; transform: translateY(18px); }
.js .cho.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ---- full-bleed plate ---- */
.plate {
  position: relative;
  overflow: clip;
  height: clamp(300px, 52vh, 560px);
}
.plate img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  will-change: transform;
}
.js .plate img { transform: translateY(calc(var(--drift, 0) * -14%)); }
.plate figcaption {
  position: absolute;
  left: var(--gutter);
  bottom: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--linen);
  background: rgba(16, 26, 48, 0.55);
  backdrop-filter: blur(4px);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

/* ---- sections ---- */
.section { padding: clamp(4rem, 10vh, 7rem) var(--gutter); }
.section-flax { background: var(--flax); }
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 70rem;
  margin-inline: auto;
}
@media (min-width: 880px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); align-items: start; }
}
.split .copy p + p { margin-top: 1rem; }
.split .copy p { max-width: var(--measure); }
.split h2 { margin-bottom: 1.4rem; }

/* marker sweep on a key phrase */
.sweep {
  background-image: linear-gradient(105deg, rgba(232, 160, 63, 0.38), rgba(232, 160, 63, 0.38));
  background-repeat: no-repeat;
  background-size: 0% 42%;
  background-position: 0 78%;
}
.sweep.in { background-size: 100% 42%; transition: background-size 0.9s var(--ease) 0.25s; }

/* ---- night band ---- */
.night {
  background: linear-gradient(to bottom, var(--night), #0c1425 60%, var(--night));
  color: var(--moon);
  padding: clamp(4.5rem, 12vh, 8rem) var(--gutter);
}
.night .eyebrow { color: var(--moon-60); }
.night h2 { color: var(--moon); }
.night .lede, .night p { color: var(--moon-60); }
.night .grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 70rem;
  margin-inline: auto;
  align-items: center;
}
@media (min-width: 880px) {
  .night .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* the swap loop - signature: draws once */
.loop-svg { width: 100%; max-width: 560px; height: auto; margin-inline: auto; display: block; }
@media (min-width: 1440px) { .loop-svg { max-width: 660px; } }
.loop-svg .ring, .loop-svg .tick { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
.loop-svg.drawn .ring { animation: draw 2.2s var(--ease) forwards; }
.loop-svg.drawn .tick { animation: draw 0.8s var(--ease) forwards; animation-delay: 1.6s; }
/* the amber quarter-arc = the one swap stop in the cycle; sweeps into place */
.loop-svg .arc { stroke-dasharray: 330 1070; stroke-dashoffset: 990; opacity: 0; }
.loop-svg.drawn .arc { animation: arcin 1.1s var(--ease) forwards; animation-delay: 1.4s; }
@keyframes arcin { from { stroke-dashoffset: 990; opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
/* ambient beat, earned by the story: the night shift runs like a clock */
.loop-svg .hand { transform-origin: 320px 230px; transform-box: view-box; opacity: 0; }
.loop-svg.drawn .hand { opacity: 1; transition: opacity 0.6s ease 2.4s; animation: orbit 26s linear infinite; animation-delay: 2.4s; }
@keyframes orbit { to { transform: rotate(360deg); } }
.loop-svg .lbl { font-family: var(--body); font-size: 13.5px; font-weight: 600; fill: var(--moon); opacity: 0; }
.loop-svg .lbl.sub { fill: var(--moon-60); font-weight: 400; font-size: 12px; }
.loop-svg.drawn .lbl { animation: appear 0.6s ease forwards; }
.loop-svg.drawn .lbl:nth-of-type(1) { animation-delay: 0.3s; }
.loop-svg.drawn .lbl:nth-of-type(2) { animation-delay: 0.65s; }
.loop-svg.drawn .lbl:nth-of-type(3) { animation-delay: 1.0s; }
.loop-svg.drawn .lbl:nth-of-type(4) { animation-delay: 1.35s; }
.loop-svg.drawn .lbl:nth-of-type(5) { animation-delay: 1.7s; }
.loop-svg.drawn .lbl.sub { animation-delay: 2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

.night-steps { list-style: none; display: grid; gap: 1.1rem; margin-top: 2rem; max-width: var(--measure); }
.night-steps li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.8rem; }
.night-steps .n {
  font-family: var(--display);
  font-style: italic;
  color: var(--peg);
  font-size: 1.1rem;
  line-height: 1.5;
}
.night-steps b { color: var(--moon); font-weight: 700; }

/* ---- package section ---- */
.package-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 70rem;
  margin-inline: auto;
  align-items: center;
}
@media (min-width: 880px) {
  .package-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); }
  .package-grid .media { order: -1; }
}
.package-grid .media { position: relative; }
.package-grid .media img { border-radius: 14px; box-shadow: 0 30px 60px -30px rgba(22, 34, 61, 0.5); }
.media-badge {
  position: absolute;
  right: -0.6rem;
  bottom: 1.6rem;
  background: var(--linen);
  border: 1px dashed var(--ink-40);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 12px 28px -14px rgba(22, 34, 61, 0.4);
  rotate: 2deg;
}
.set-list { list-style: none; margin-top: 1.6rem; display: grid; gap: 0.65rem; max-width: var(--measure); }
.set-list li { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.6rem; }
.set-list .dot { color: var(--peg); font-weight: 700; }

/* ---- operator section ---- */
.opsheet {
  background: var(--linen);
  border: 1px solid var(--ink-12);
  border-radius: 16px;
  box-shadow: 0 30px 60px -34px rgba(22, 34, 61, 0.45);
  overflow: hidden;
  font-size: 0.92rem;
  max-width: 26rem;
}
.opsheet header {
  background: var(--ink);
  color: var(--linen);
  padding: 0.9rem 1.2rem;
  font-weight: 700;
}
.opsheet header .small { color: rgba(250, 247, 241, 0.65); font-weight: 400; }
.opsheet .row { padding: 0.95rem 1.2rem; border-top: 1px solid var(--ink-12); }
.opsheet .row b { display: block; }
.opsheet .chip {
  float: right;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--peg);
  border: 1px solid rgba(232, 160, 63, 0.5);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

/* ---- flow invite: two columns so the lede owns its run ---- */
.invite { text-align: left; max-width: 70rem; margin-inline: auto; display: grid; gap: clamp(1.5rem, 4vw, 4rem); }
@media (min-width: 880px) {
  .invite { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); align-items: start; }
}
.invite .big-cta { margin-top: 1.4rem; display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }

/* ---- footer curtain ---- */
.footer {
  background: var(--night);
  color: var(--moon-60);
  padding: clamp(4.5rem, 14vh, 9rem) var(--gutter) 2.5rem;
}
.footer .signoff {
  font-family: var(--display);
  font-style: italic;
  font-weight: 560;
  color: var(--moon);
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.05;
}
.footer .ridgeline { margin: 3rem 0 2.5rem; width: 100%; height: auto; opacity: 0.5; }
.footer .ridgeline path { stroke-dasharray: 2400; stroke-dashoffset: 2400; }
.footer .ridgeline.drawn path { animation: draw 3s var(--ease) forwards; }
.footer-meta {
  display: grid;
  gap: 2rem;
  font-size: 0.9rem;
  max-width: 70rem;
}
@media (min-width: 880px) {
  .footer-meta { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-meta h3 {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--moon);
  margin-bottom: 0.7rem;
}
.footer-meta a { color: var(--moon-60); text-decoration: none; border-bottom: 1px solid rgba(244, 241, 232, 0.25); }
.footer-meta a:hover { color: var(--moon); }
.footer .legal {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(244, 241, 232, 0.14);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- reduced motion: everything visible, nothing moves ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .cho { opacity: 1; transform: none; transition: none; }
  .js .hero h1 .line > span { transform: none; animation: none; }
  .js .plate img { transform: none; }
  .loop-svg .ring, .loop-svg .tick { stroke-dashoffset: 0; animation: none; }
  .loop-svg .arc { stroke-dashoffset: 0; opacity: 1; animation: none; }
  .loop-svg .hand { opacity: 1; animation: none; transition: none; }
  .loop-svg .lbl { opacity: 1; animation: none; }
  .footer .ridgeline path { stroke-dashoffset: 0; animation: none; }
  .sweep { background-size: 100% 42%; transition: none; }
}
