:root {
  --cream: #ece0c9;
  --cream-light: #f3ece0;
  --ink: #3b2c24;
  --brown: #5e4e43;
  --muted: #6c5c50;
  --rule: #d9cfc0;
  --thread: #a8322a;
  --logo-red: #6e0606;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  /* Fallbacks for when Google Fonts can't load: Kohinoor on Mac, Nirmala UI / Mangal on Windows. */
  --deva: "Tiro Devanagari Sanskrit", "Kohinoor Devanagari", "Nirmala UI", "Mangal", serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }

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

:focus-visible { outline: 2px solid var(--thread); outline-offset: 4px; }

/* ---------- Page 1: hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: #d8d2c8;
  display: grid;
  place-items: start;
}

.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 34% 50%;   /* when a narrower window crops it, keep both hands in view */
}

/* The needle and tagline sit centred near the bottom, over the softly blurred cloth on
   the loom, below the hands joining the thread. */
.hero__lockup {
  position: absolute;
  left: 50%;
  bottom: clamp(36px, 7vh, 72px);
  width: max-content;
  transform: translateX(-50%);
  text-align: center;
}

.hero__logo { margin: 0; }

/* The needle and thread standing in for the logo until it is revealed: in off-white cream,
   with a soft shadow so it holds on lighter parts of the video. The shadow is baked into the
   image (64px of padding around a 343×604 needle): a CSS filter on an image over a playing
   video sometimes draws as a solid white box in Safari. */
.hero__mark {
  --needle: clamp(70px, 10.5vh, 104px);   /* height of the needle itself */
  width: auto;
  height: calc(var(--needle) * 732 / 604);
  margin: 0 auto calc(var(--needle) * -64 / 604);
  animation: logo-in 2s cubic-bezier(.2, .7, .2, 1) both;
}

/* The tagline, split across the hands in Cormorant italic cream, on the line of the thread
   they are joining: "A legacy" and "in every thread." sit the same distance in from the left
   and right edges, mirrored about the centre line the needle stands on. */
.hero__tagline {
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.7vw, 28px);
  line-height: 1.2;
  letter-spacing: 0.015em;
  color: #fbf6ec;
  text-shadow: 0 1px 12px rgba(20, 10, 5, 0.6);
  animation: fade-in 1.6s 0.6s ease both;
}
.hero__tagline span { position: absolute; top: 46%; white-space: nowrap; }
.hero__tagline span:first-child { left: 12%; }
.hero__tagline span:last-child { right: 12%; }

@media (max-width: 520px) {
  /* Phones: framed on both hands, with the woven cloth below. */
  .hero__video { object-position: 25% 50%; }
  .hero__lockup { bottom: 8%; }
  /* The hands fill the width, so the halves sit left and right just beneath them,
     either side of the hanging thread. */
  .hero__tagline span { top: 58.5%; }
  .hero__tagline span:first-child { left: 20px; }
  .hero__tagline span:last-child { right: 20px; }
}

@keyframes logo-in {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Page 2: fibre to fabric ---------- */

/* Tall section; the stage sticks while scrolling drives the six steps. */
.journey {
  position: relative;
  height: 760vh;
  background: var(--cream);
}

.journey__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(28px, 6vh, 64px) 0 clamp(24px, 5vh, 56px);
}

.journey__head { text-align: center; padding: 0 16px; }

/* Ota and Otai sit on top of one another; the current word is shown. */
.journey__words { display: grid; }
.journey__word {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1);
}
.journey__word.is-current { opacity: 1; transform: none; }

.journey__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 62px);
  line-height: 1.1;
  color: var(--ink);
}
.journey__deva {
  margin-right: 0.35em;
  font-family: var(--deva);
  font-size: 0.86em;
  color: var(--logo-red);
}

.journey__gloss {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brown);
}

.journey__art { position: relative; min-height: 0; }

.journey__svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none;
  overflow: hidden;
  /* Neighbouring steps fade out towards the edges. */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}

.journey__shuttle { transition: opacity 0.45s ease; }

.journey__foot {
  display: grid;
  justify-items: center;
  gap: clamp(16px, 3vh, 28px);
  padding: 0 16px;
}

/* The six captions sit on top of one another; the current one is shown. */
.journey__steps {
  display: grid;
  width: min(620px, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.journey__step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(.2, .7, .2, 1);
}
.journey__step.is-current { opacity: 1; transform: none; }

.journey__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.5vw, 38px);
  line-height: 1.1;
  color: var(--ink);
}
.journey__num {
  margin-right: 0.5em;
  font-family: var(--sans);
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0.2em;
  vertical-align: 0.45em;
  color: var(--thread);
}

/* Six numbered stops on a line that fills as you go. */
.journey__progress {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: min(420px, 82vw);
}
.journey__bar {
  position: absolute;
  left: 11px; right: 11px; top: 50%;
  height: 1px;
  background: var(--rule);
}
.journey__fill {
  position: absolute; inset: 0;
  background: var(--thread);
  transform-origin: left;
  transform: scaleX(0);
}
.journey__dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--cream);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}
.journey__dot.is-done { border-color: var(--thread); color: var(--thread); }
.journey__dot.is-current { border-color: var(--thread); background: var(--thread); color: var(--cream); }
/* Steps kept sealed until launch: small wax-red dots. */
.journey__dot.is-sealed { border-color: #6f1a12; background: radial-gradient(circle at 40% 35%, #b9402f, #6f1a12); }
.journey__dot[hidden] { display: none; }

@media (max-width: 759.98px) {
  .journey__gloss { font-size: 11px; letter-spacing: 0.22em; }
  .journey__svg {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  }
}

/* ---------- Page 3: launch ---------- */

.launch {
  position: relative;
  min-height: 100vh;
  padding: 112px 16px 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--cream);
}

.launch__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6.6vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.005em;
  color: var(--ink);
}

/* Reveal: each heading line rises slightly out of a soft blur, one after the
   other, then the lede settles in with its letters drawing together. */
.launch__line { display: inline-block; }
.launch.is-ready .launch__line,
.launch.is-ready .launch__lede { opacity: 0; }
.launch.is-in .launch__line {
  animation: rise-in 1.4s cubic-bezier(.2, .7, .2, 1) both;
}
.launch.is-in .launch__line:nth-of-type(2) { animation-delay: 0.22s; }
.launch.is-in .launch__lede {
  animation: settle-in 1.5s 0.95s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(0.28em); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes settle-in {
  from { opacity: 0; letter-spacing: 0.16em; }
  to   { opacity: 1; letter-spacing: 0.01em; }
}

.launch__lede {
  margin: 28px 0 0;
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--brown);
  letter-spacing: 0.01em;
}

/* A minimal clock: fine ticks, no rim, hair-thin hands; red for the second hand. */
.clock {
  width: min(280px, 64vw);
  margin-top: clamp(32px, 6vh, 72px);
}
.clock svg { width: 100%; height: auto; overflow: visible; }

.clock__ticks { fill: none; stroke: var(--ink); stroke-width: 0.9; stroke-linecap: square; }
.clock__hour, .clock__minute { stroke: var(--ink); stroke-linecap: square; }
.clock__hour { stroke-width: 1.1; }
.clock__minute { stroke-width: 0.8; }
.clock__second { stroke: #a8322a; stroke-width: 0.6; }
.clock__pin { fill: var(--cream); stroke: var(--ink); stroke-width: 0.6; }


/* Instagram call to action: an ink outline that fills on hover. */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(44px, 7vh, 80px);
  padding: 20px 40px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font: 500 14px/1 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.cta:hover, .cta:focus-visible { background: var(--ink); color: var(--cream); }
.cta__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cta__icon .cta__dot { fill: currentColor; stroke: none; }

/* Waitlist: name and country side by side, email beneath, underlined fields. */
.waitlist {
  width: min(560px, 100%);
  margin-top: clamp(56px, 9vh, 96px);
  text-align: left;
}
.waitlist__title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brown);
}
.waitlist__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
  margin-top: 28px;
}
.waitlist__field--wide { grid-column: 1 / -1; }
.waitlist__label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.waitlist__input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 0 9px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font: 400 17px/1.3 var(--sans);
  color: var(--ink);
}
.waitlist__input:focus { outline: none; border-bottom-color: var(--thread); }
/* The country dropdown, styled like the other fields with a small arrow. */
.waitlist__select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 24px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233b2c24' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 4px center;
  cursor: pointer;
}
.waitlist__select:invalid { color: #9a8b7b; }
.waitlist__select option { color: var(--ink); }
.waitlist__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist__error { min-height: 1.4em; margin: 18px 0 0; font-size: 14px; color: var(--thread); }
.waitlist__button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font: 500 14px/1 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.waitlist__button:hover { background: #2c201a; }
.waitlist__button:disabled { opacity: 0.6; cursor: progress; }
.waitlist__done {
  margin: clamp(56px, 9vh, 96px) 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 30px);
  color: var(--ink);
}
.waitlist__done:focus { outline: none; }

/* Footer: a full-width strip in a deeper cream, with the logo and the tagline beside it on the left. */
.site-foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(20px, 2.6vw, 36px);
  padding: clamp(26px, 4.5vh, 44px) clamp(20px, 6vw, 96px);
  background: #e3d3b4;
  border-top: 1px solid #d6c3a0;
}
.site-foot img { width: auto; height: clamp(72px, 10vh, 96px); }
.site-foot__tagline {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.9vw, 24px);
  color: var(--ink);
}

@media (max-width: 520px) {
  .launch { padding-top: 120px; }
  .cta { padding: 18px 28px; font-size: 13px; letter-spacing: 0.22em; }
  .waitlist__fields { grid-template-columns: 1fr; gap: 24px; }
}

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