/* ============================================================================
   Saint Drape — coming soon / waitlist
   Editorial "holding page" treatment: hairline frame, marquee strip, rotated
   edge metadata, underline field. Same tokens + fonts as the Shopify theme.
   ============================================================================ */

@font-face {
  font-family: 'SF Pro Display';
  src: url('assets/sf-pro-display-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display';
  src: url('assets/sf-pro-display-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro Display';
  src: url('assets/sf-pro-display-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Kode Mono';
  src: url('assets/kode-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #161616;
  --ink: #020108;
  --accent: #d4bc94;
  --grey-300: #d7d7d6;
  --grey-500: #818181;
  --grey-800: #313131;
  --hair: rgb(255 255 255 / 0.13);
  --font-primary: 'SF Pro Display', system-ui, -apple-system, sans-serif;
  --font-secondary: 'Kode Mono', ui-monospace, monospace;
  --pad: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100svh;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Soft light bloom behind the mark — keeps the black from going flat. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 42%, rgb(212 188 148 / 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Film grain (inline SVG noise — no image request). */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-2%, -3%);
  }
  30% {
    transform: translate(3%, -2%);
  }
  50% {
    transform: translate(-1%, 2%);
  }
  70% {
    transform: translate(2%, 3%);
  }
  90% {
    transform: translate(-3%, 1%);
  }
}

/* Blurred wordmark bleeding off the bottom (same device as the theme footer). */
.bg-wordmark {
  position: fixed;
  left: 50%;
  bottom: -8vh;
  transform: translateX(-50%);
  width: min(1500px, 140vw);
  height: auto; /* required — the width/height attrs on the <img> would otherwise pin it */
  opacity: 0.045;
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ---------- hairline frame ---------- */
.frame {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* ---------- top marquee strip ---------- */
.strip {
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
  padding: 12px 0;
}
.strip__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.strip__group {
  display: flex;
  align-items: center;
  flex: none;
}
.strip__item {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding-right: 18px;
  font-family: var(--font-secondary);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--grey-500);
  white-space: nowrap;
}
.strip__item::after {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  flex: none;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- rotated edge metadata ---------- */
.edge {
  position: fixed;
  top: 50%;
  font-family: var(--font-secondary);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey-500);
  white-space: nowrap;
  z-index: 3;
  pointer-events: none;
}
.edge--left {
  left: 14px;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
}
.edge--right {
  right: 14px;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
}

/* ---------- main ---------- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 40px;
  font-family: var(--font-secondary);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before,
.eyebrow::after {
  content: '';
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* Screen-reader-only: out of sight but still read by assistive tech and indexed.
   Not display:none, which would hide it from both. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* H1 wrapper around the wordmark — carries no visual weight of its own.
   (No font-size:0 here: it would apply to the .sr-only text inside, which some
   screen readers skip.) */
.mark-head {
  margin: 0;
}

.mark {
  display: block;
  width: min(560px, 78vw);
  height: auto;
  filter: brightness(0) invert(1);
}

/* Hairline that draws itself in under the mark */
.rule {
  width: min(560px, 78vw);
  height: 1px;
  background: var(--hair);
  margin: 44px 0 0;
  transform-origin: center;
}

.tagline {
  margin: 28px auto 0;
  max-width: 440px;
  font-size: 15px;
  line-height: 26px;
  color: var(--grey-300);
}
.tagline em {
  font-style: normal;
  color: var(--accent);
}

/* ---------- underline field ---------- */
.signup {
  width: min(440px, 100%);
  margin-top: 52px;
}
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--grey-800);
  transition: border-color 0.35s ease;
}
.field:focus-within {
  border-color: var(--accent);
}
.field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 15px;
  letter-spacing: 0.01em;
}
.field input::placeholder {
  color: var(--grey-500);
}

/* Browser autofill force-paints a light background + dark text, which wrecks the dark
   field. There's no property to disable it, so: the absurd transition delay stops that
   paint from ever landing, and -webkit-text-fill-color overrides the text colour. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  box-shadow: 0 0 0 1000px transparent inset;
  transition:
    background-color 100000s ease-in-out 0s,
    color 100000s ease-in-out 0s;
  font-family: var(--font-primary);
  font-size: 15px;
}
/* Firefox */
.field input:autofill {
  background: transparent;
  color: #fff;
}

/* Minimal arrow submit — no filled button. */
.submit {
  flex: none;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--grey-300);
  cursor: pointer;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}
.submit:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.note {
  margin: 16px 0 0;
  font-family: var(--font-secondary);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-500);
}

.success {
  display: none;
  font-size: 15px;
  line-height: 24px;
  color: var(--accent);
}
.signup.is-done .field,
.signup.is-done .note {
  display: none;
}
.signup.is-done .success {
  display: block;
}

/* Error — only shown when the signup actually failed. */
.error {
  margin: 14px 0 0;
  min-height: 0;
  font-family: var(--font-secondary);
  font-size: 10px;
  line-height: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c98b8b;
}
.error:empty {
  display: none;
}

/* Submitting */
.signup.is-loading .field {
  opacity: 0.55;
}
.submit:disabled {
  cursor: default;
  opacity: 0.5;
}
.signup.is-loading .submit {
  animation: pulse 0.9s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--hair);
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-secondary);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-500);
}
.socials {
  display: flex;
  gap: 26px;
}
.site-foot a {
  color: var(--grey-300);
  text-decoration: none;
  position: relative;
  transition: color 0.25s ease;
}
.site-foot a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.site-foot a:hover {
  color: var(--accent);
}
.site-foot a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- entrance ---------- */
.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.rise:nth-of-type(1) {
  animation-delay: 0.1s;
}
.d1 {
  animation-delay: 0.15s;
}
.d2 {
  animation-delay: 0.3s;
}
.d3 {
  animation-delay: 0.45s;
}
.d4 {
  animation-delay: 0.6s;
}
.d5 {
  animation-delay: 0.75s;
}
@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.draw {
  transform: scaleX(0);
  animation: draw 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}
@keyframes draw {
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .grain,
  .strip__track {
    animation: none;
  }
  .rise,
  .draw {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 780px) {
  .edge {
    display: none;
  }
}
@media (max-width: 600px) {
  :root {
    --pad: 20px;
  }
  main {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .eyebrow {
    margin-bottom: 32px;
    letter-spacing: 0.22em;
  }
  .eyebrow::before,
  .eyebrow::after {
    width: 16px;
  }
  .rule {
    margin-top: 34px;
  }
  .site-foot {
    justify-content: center;
    text-align: center;
  }
}
