/* =====================================================================
   ROYAL CLOSET — Coming Soon
   Mobile-first. Breakpoints: 768px (tablet), 1024px (desktop), 1280px (wide)
   ===================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Palette (from the logo and photography) */
  --cream: #FAF7F0;
  --cream-deep: #F1EBDF;
  --ink: #1A1A1A;
  --greige: #B8AFA3;        /* decorative lines / borders only */
  --taupe: #8C7F72;         /* large or decorative type only (3.6:1 on cream) */
  --taupe-deep: #6B5F53;    /* small text: passes WCAG AA on both creams */
  --white: #FFFFFF;

  /* Type */
  --font-serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;

  /* Fluid sizes */
  --fs-body: 1.0625rem;                                  /* 17px */
  --fs-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-h2: clamp(2.1rem, 1.6rem + 2.2vw, 3.4rem);
  --fs-display: clamp(2.4rem, 1.6rem + 3.6vw, 4.6rem);

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 3rem + 7vw, 9rem);
  --max: 1200px;
  --max-narrow: 760px;

  /* Set by script.js from the real header height */
  --header-h: 72px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px); /* anchor offset for the fixed header */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: italic; }

a { color: inherit; text-underline-offset: 4px; }

/* Visible, on-brand focus ring */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: .75rem 1.25rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--max-narrow) + 2 * var(--gutter)); }

section { padding-block: var(--section-y); }
.section--alt { background: var(--cream-deep); }

/* ---------- 4. Typography components ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--taupe-deep);
}

.section-title {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.005em;
  margin-top: .9rem;
}
/* Thin rule under section titles */
.section-title::after {
  content: "";
  display: block;
  width: 56px; height: 1px;
  background: var(--ink);
  margin-top: 1.5rem;
}

.prose > * + * { margin-top: 1.15em; }
.lead {
  font-family: var(--font-serif);
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.45;
}
.pull {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  line-height: 1.2;
  padding-left: 1.25rem;
  border-left: 1px solid var(--ink);
}
.pull--small { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.7rem); }

/* ---------- 5. Buttons & icon links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: 1rem 2rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.button:hover { background: transparent; color: var(--ink); transform: translateY(-2px); }
.button svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.button svg .fill, .icon-link svg .fill { fill: currentColor; }

.icon-link {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;           /* comfortable touch target */
  border-radius: 50%;
  color: var(--ink);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.icon-link svg { fill: none; stroke: currentColor; stroke-width: 1.4; }
.icon-link:hover { background: var(--ink); color: var(--cream); }

/* ---------- 6. Decorative double-circle motif (echoes the logo border) ---------- */
.motif {
  position: relative;
  display: block;
  width: 64px; height: 64px;
  margin: 0 auto 2rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.motif::after {
  content: "";
  position: absolute; inset: 5px;
  border: 1px solid var(--greige);
  border-radius: 50%;
}
.motif--small { width: 44px; height: 44px; }
.motif--small::after { inset: 4px; }

/* Framed photo: thin offset line, like a mat around a print */
.framed { position: relative; isolation: isolate; } /* keeps the offset line above section backgrounds */
.framed img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 25%;
}
.framed::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--greige);
  z-index: -1;
  pointer-events: none;
}
.framed--arch img { border-radius: 999px 999px 0 0; }
.framed--arch::before { border-radius: 999px 999px 0 0; }

/* =====================================================================
   7. HEADER / NAV
   ===================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled,
.site-header.is-open {
  background: var(--cream);
  border-bottom-color: rgba(26, 26, 26, .12);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: .25rem;
  max-width: 1320px;
  margin-inline: auto;
  padding: .75rem var(--gutter);
}

.site-header__brand { margin-right: auto; border-radius: 50%; }
.site-header__brand img { width: 44px; height: 44px; }

/* Visual order matches DOM order (brand → menu → Instagram) for a logical tab sequence */

/* Hamburger */
.site-nav__toggle {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.site-nav__toggle-bars,
.site-nav__toggle-bars::before,
.site-nav__toggle-bars::after {
  display: block;
  width: 22px; height: 1px;
  background: currentColor;
  transition: transform .35s var(--ease), opacity .2s;
}
.site-nav__toggle-bars { position: relative; }
.site-nav__toggle-bars::before,
.site-nav__toggle-bars::after { content: ""; position: absolute; left: 0; }
.site-nav__toggle-bars::before { top: -7px; }
.site-nav__toggle-bars::after  { top: 7px; }
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bars { background: transparent; }
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bars::after  { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown panel (hidden = not focusable) */
.site-nav__list {
  position: absolute;
  top: 100%; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: 1.25rem var(--gutter) 2rem;
  background: var(--cream);
  border-bottom: 1px solid rgba(26, 26, 26, .12);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
}
.site-header.is-open .site-nav__list {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.site-nav__list a {
  display: block;
  padding: .7rem 1rem;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  text-decoration: none;
}

/* Underline-grow hover for nav links */
.site-nav__list a,
.site-footer a:not(.icon-link) {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 50% calc(100% - .45rem);
  transition: background-size .35s var(--ease);
}
.site-nav__list a:hover { background-size: calc(100% - 2rem) 1px; }

@media (min-width: 900px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding-block: 1rem;
  }
  .site-header__brand { justify-self: start; margin: 0; }
  .site-header__ig { justify-self: end; }
  .site-nav__toggle { display: none; }
  .site-nav__list {
    position: static;
    flex-direction: row;
    gap: 1.5rem;
    padding: 0;
    background: none;
    border: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  .site-nav__list a {
    font-family: var(--font-sans);
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .24em;
    text-transform: uppercase;
    padding: .6rem .25rem;
    background-position: 50% calc(100% - .25rem);
  }
  .site-nav__list a:hover { background-size: calc(100% - .5rem) 1px; }
}

/* =====================================================================
   8. HERO
   ===================================================================== */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 5.5rem;
  text-align: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 560px;
  margin-inline: auto;
}

.hero__logo img {
  width: clamp(230px, 64vw, 340px);
  height: auto;
}

.hero__tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2rem);
  line-height: 1.3;
  max-width: 30ch;
}

.hero .button { margin-top: .5rem; }

/* Photo only appears on desktop (see breakpoint) */
.hero__media { display: none; }

/* Scroll cue: a fine line that draws downward */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 44px; height: 60px;
}
.hero__scroll span {
  position: relative;
  width: 1px; height: 44px;
  background: rgba(26, 26, 26, .2);
  overflow: hidden;
}
.hero__scroll span::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 100%;
  background: var(--ink);
  animation: scroll-cue 2.4s var(--ease) infinite;
}
@keyframes scroll-cue {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(2rem, 5vw, 6rem);
    max-width: 1320px;
    margin-inline: auto;
    padding-bottom: 4rem;
  }
  .hero__logo img { width: clamp(300px, 26vw, 380px); }

  .hero__media {
    display: block;
    position: relative;
    justify-self: center;
    width: 100%;
    max-width: 480px;
  }
  .hero__media img {
    width: 100%;
    height: min(74vh, 640px);
    object-fit: cover;
    object-position: 50% 22%;   /* keeps Sandra's face in frame */
    border-radius: 999px 999px 0 0;
  }
  /* Double-arch outline echoing the logo's double circle */
  .hero__media::before {
    content: "";
    position: absolute;
    inset: -14px;
    border: 1px solid var(--greige);
    border-radius: 999px 999px 0 0;
    border-bottom: 0;
    pointer-events: none;
  }
}

/* =====================================================================
   9. MANIFESTO
   ===================================================================== */
.manifesto {
  text-align: center;
  border-top: 1px solid rgba(26, 26, 26, .12);
}
.manifesto__title {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.01em;
}
.manifesto__text {
  max-width: 34ch;
  margin: 2rem auto 0;
  font-family: var(--font-serif);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--taupe-deep);
}
.manifesto__text em { color: var(--ink); }

/* =====================================================================
   10. THE EXPERIENCE
   ===================================================================== */
.experience__grid {
  display: grid;
  gap: 3.5rem;
}
.experience__media { max-width: 480px; margin-inline: auto 14px; width: calc(100% - 14px); }
.experience__media img { object-position: 50% 30%; }

.pillars {
  display: grid;
  gap: 2.25rem;
  margin-top: 2.75rem;
}
.pillar {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1.25rem;
  padding-top: 2.25rem;
  border-top: 1px solid rgba(26, 26, 26, .15);
}
.pillar:first-child { padding-top: 0; border-top: 0; }
.pillar__icon {
  width: 48px; height: 48px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillar__title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: .5rem;
}

@media (min-width: 768px) {
  .experience__media { margin-inline: auto; }
}
@media (min-width: 1024px) {
  .experience__grid {
    grid-template-columns: 5fr 6fr;
    align-items: center;
    gap: clamp(3rem, 7vw, 7rem);
  }
  .experience__media { max-width: none; width: calc(100% - 14px); margin: 0; }
}

/* =====================================================================
   11. MEET SANDRA
   ===================================================================== */
.sandra__grid {
  display: grid;
  gap: 3.5rem;
}
.sandra__media .framed { max-width: 440px; margin-inline: auto; width: calc(100% - 14px); }
.sandra__media img { aspect-ratio: 4 / 5; object-position: 48% 32%; }

@media (min-width: 1024px) {
  .sandra__grid {
    grid-template-columns: 6fr 5fr;
    align-items: start;
    gap: clamp(3rem, 7vw, 7rem);
  }
  .sandra__body { order: -1; padding-top: 2rem; }
  .sandra__media { position: sticky; top: calc(var(--header-h) + 2rem); }
  .sandra__media .framed { max-width: none; margin: 0; }
}

/* =====================================================================
   12. OUR STORY — TIMELINE
   ===================================================================== */
.story__head { text-align: center; margin-bottom: 3.5rem; }
.story__head .section-title::after { margin-inline: auto; }

.timeline {
  position: relative;
  padding-left: 2.75rem;
}
/* the vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 11px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--ink);
  opacity: .35;
}
.timeline__item { position: relative; }
.timeline__item + .timeline__item { margin-top: 3.25rem; }
/* double-circle marker */
.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-2.75rem + 3px);
  top: .45rem;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--cream-deep);
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--cream-deep), inset 0 0 0 4px var(--greige);
}
.timeline__label {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.timeline__num {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--taupe-deep);
  min-width: 1.6rem;
}

@media (min-width: 768px) {
  .timeline { padding-left: 4rem; }
  .timeline::before { left: 15px; }
  .timeline__item::before { left: calc(-4rem + 7px); }
}

/* Beyond the Algorithm closing */
.beyond {
  display: grid;
  gap: 3.5rem;
  margin-top: clamp(4.5rem, 3rem + 6vw, 8rem);
}
.beyond__media { max-width: 440px; width: calc(100% - 14px); margin-inline: auto; }
.beyond__media img { object-position: 55% 30%; }
.beyond__title {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-style: italic;
  font-weight: 400;
  line-height: 1.08;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .beyond {
    grid-template-columns: 5fr 6fr;
    align-items: center;
    gap: clamp(3rem, 7vw, 7rem);
  }
  .beyond__media { max-width: none; margin: 0; }
}

/* =====================================================================
   13. CLOSING LETTER
   ===================================================================== */
.letter__card {
  position: relative;
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(2.75rem, 2rem + 4vw, 4.5rem) clamp(1.5rem, 1rem + 4vw, 4rem);
  background: var(--white);
  text-align: center;
  box-shadow: 0 1px 0 rgba(26, 26, 26, .04), 0 30px 60px -40px rgba(60, 45, 30, .35);
}
/* inner hairline border, like letterpress stationery */
.letter__card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--greige);
  pointer-events: none;
}
.letter__text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
  line-height: 1.4;
}
.letter__text + .letter__text { margin-top: 1rem; }
.letter__closing {
  margin-top: 2.5rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}
.letter__signature {
  font-family: var(--font-script);
  font-size: clamp(3.2rem, 2.6rem + 2.5vw, 4.4rem);
  line-height: 1.1;
  margin-top: .25rem;
}
.letter__role {
  margin-top: .5rem;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--taupe-deep);
}

/* =====================================================================
   14. COMING SOON CTA
   ===================================================================== */
.cta {
  background: var(--cream-deep);
  text-align: center;
  border-top: 1px solid rgba(26, 26, 26, .08);
}
.cta__title {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 1.05;
}
.cta__text {
  margin: 1.25rem auto 2.25rem;
  font-size: 1.1rem;
  color: var(--taupe-deep);
}
/* keep long handle from overflowing on very narrow screens */
.cta .button { max-width: 100%; letter-spacing: .14em; text-transform: none; font-size: .9rem; }

/* =====================================================================
   15. FOOTER
   ===================================================================== */
.site-footer {
  padding-block: 3.5rem;
  border-top: 1px solid rgba(26, 26, 26, .12);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.site-footer__inner img { width: 72px; height: 72px; }
.site-footer__copy { font-size: .85rem; color: var(--taupe-deep); }

/* =====================================================================
   16. MOTION — scroll reveal (only when JS is running)
   ===================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .button:hover { transform: none; }
}
