/* Foundations: tokens, type, layout and the editorial home. */

@font-face {
  font-family: 'Cormorant';
  src: url('../assets/fonts/cormorant-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../assets/fonts/cormorant-500-italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-var.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #1C1A18;
  --graphite: #3A3734;
  --stone: #6E6A64;
  --stone-light: #A39E96;
  --ivory: #F2ECE2;
  --paper: #FAF7F2;
  --white: #FFFDF9;
  --line: rgba(28, 26, 24, 0.12);
  --line-strong: rgba(28, 26, 24, 0.28);
  --ok: #3F6B4F;
  --warn: #8A5A1E;

  /* Personal color, injected from the result */
  --accent: #B65F3C;
  --accent-ink: #FAF7F2;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--paper));

  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --gutter: 20px;
  --radius: 3px;
  --max: 1180px;
  --topbar: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 56px);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.02;
}
.display em { font-style: italic; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
}

.section-title { font-size: clamp(2.1rem, 8.4vw, 3.6rem); }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--xl { width: 44px; height: 44px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px; text-decoration: none;
}
.skip-link:focus { top: calc(12px + var(--safe-top)); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.screen--dark :focus-visible { outline-color: var(--paper); }
[tabindex='-1']:focus { outline: none; }

/* Topbar ----------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  height: calc(var(--topbar) + var(--safe-top));
  padding: var(--safe-top) calc(var(--gutter) - 12px) 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar.is-dark { background: #141312; color: var(--paper); border-bottom-color: transparent; }

.wordmark {
  grid-column: 2;
  justify-self: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.42em;
  text-decoration: none;
  padding: 10px 0 10px 0.42em;
}
.topbar__back {
  grid-column: 1;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; background: none;
}
.topbar__step {
  grid-column: 3;
  justify-self: end;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--stone);
  padding-right: 8px;
}
.topbar.is-dark .topbar__step { color: var(--stone-light); }

/* Screens ---------------------------------------------------------------- */

main { outline: none; }

.screen {
  min-height: calc(100dvh - var(--topbar) - var(--safe-top));
  animation: screen-in 0.5s var(--ease) both;
}
.screen[hidden] { display: none; }
.screen--dark { background: #141312; color: var(--paper); }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Home ------------------------------------------------------------------- */

.hero {
  min-height: calc(100dvh - var(--topbar) - var(--safe-top));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px var(--gutter) calc(28px + var(--safe-bottom));
  position: relative;
  overflow: hidden;
}

.hero__swatches {
  position: absolute;
  inset: 4% -10% auto auto;
  width: 82%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  transform: rotate(-8deg);
  opacity: 0.95;
}
.hero__swatches span {
  background: var(--c);
  transform-origin: bottom;
  animation: swatch-rise 1.1s var(--ease) both;
}
.hero__swatches span:nth-child(2) { animation-delay: 0.08s; transform: translateY(18%); }
.hero__swatches span:nth-child(3) { animation-delay: 0.16s; }
.hero__swatches span:nth-child(4) { animation-delay: 0.24s; transform: translateY(18%); }
.hero__swatches span:nth-child(5) { animation-delay: 0.32s; transform: translateY(36%); }
.hero__swatches span:nth-child(6) { animation-delay: 0.4s; transform: translateY(18%); }

@keyframes swatch-rise {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 18%, var(--paper) 62%);
  pointer-events: none;
}
.hero > *:not(.hero__swatches) { position: relative; z-index: 1; }

.hero__title {
  font-size: clamp(3rem, 14vw, 6.6rem);
  max-width: 11ch;
  text-transform: none;
}
.hero__lede {
  margin-top: 18px;
  font-size: 1.05rem;
  color: var(--graphite);
  max-width: 30ch;
}
.hero__pillars {
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.hero__actions {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.hero__trust {
  margin-top: 18px;
  font-size: 0.75rem;
  color: var(--stone);
  text-align: center;
}

.returning {
  padding: 36px var(--gutter) 20px;
  border-bottom: 1px solid var(--line);
}
.returning__label { margin-top: 18px; color: var(--stone); font-size: 0.9rem; }
.returning__season { font-size: clamp(2.6rem, 12vw, 4.4rem); margin-top: 2px; }
.returning__strip { display: flex; height: 56px; margin: 22px 0 26px; }
.returning__strip span { flex: 1; background: var(--c); }
.returning:not([hidden]) + .hero { min-height: auto; padding-top: 56px; }
.returning:not([hidden]) + .hero .hero__swatches { display: none; }
.returning:not([hidden]) + .hero::after { display: none; }

.intro, .privacy {
  padding: 72px var(--gutter);
  border-top: 1px solid var(--line);
}
.intro__lede, .privacy__lede {
  margin-top: 18px;
  font-size: 1.05rem;
  color: var(--graphite);
  max-width: 38ch;
}

.pillars {
  margin-top: 40px;
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.pillar {
  background: var(--paper);
  padding: 24px 0;
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-rows: auto auto;
  column-gap: 18px;
  align-items: center;
}
.pillar__visual {
  grid-row: span 2;
  width: 76px; height: 76px;
  color: var(--graphite);
}
.pillar__visual--color { display: grid; grid-template-columns: 1fr 1fr; }
.pillar__visual--color span:nth-child(1) { background: #C07A5C; }
.pillar__visual--color span:nth-child(2) { background: #7D93A8; }
.pillar__visual--color span:nth-child(3) { background: #E8D2A6; }
.pillar__visual--color span:nth-child(4) { background: #3D4659; }
.pillar__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1;
}
.pillar__text { font-size: 0.88rem; color: var(--stone); margin-top: 4px; }

.privacy { background: var(--ivory); }
.privacy__list { margin-top: 28px; display: grid; gap: 12px; }
.privacy__list li { display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.privacy__list .icon { color: var(--ok); }
.privacy__note { margin-top: 24px; font-size: 0.85rem; color: var(--stone); }
.privacy .btn--link { margin-top: 8px; padding-inline: 0; }

.method {
  padding: 56px var(--gutter) calc(48px + var(--safe-bottom));
  background: var(--ink);
  color: var(--paper);
}
.method .eyebrow { color: var(--stone-light); }
.method__grid {
  margin: 26px 0 0;
  display: grid;
  gap: 18px;
}
.method__grid dt { font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; }
.method__grid dd { margin: 2px 0 0; font-size: 0.86rem; color: var(--stone-light); }
.method__disclaimer {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(250, 247, 242, 0.16);
  font-size: 0.82rem;
  color: var(--stone-light);
  max-width: 60ch;
}
.method__brand { margin-top: 28px; font-size: 0.7rem; letter-spacing: 0.42em; color: var(--stone); }

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