/* SZAn Studio coming soon. Pearl cloth behind, aubergine type in front, copper as the thread. */
:root {
  --bg: #fef6ec;
  --ink: #4a1245;
  --ink-soft: rgba(74, 18, 69, 0.82);
  --ink-faint: rgba(74, 18, 69, 0.32);
  --copper: #b8501f;
  --copper-soft: #cf5f27;
  --display: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --gutter: clamp(16px, 3vw, 40px);
  --panel: 254, 246, 236;
  --glint: 207, 95, 39;
  --thread: 207, 95, 39;
  --error: #9b2c2c;
  --logo-shadow: rgba(74, 18, 69, 0.18);
  --grain: 0.07;
  --veil: rgba(254, 246, 236, 0.55);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }

/* ---------- background layers ---------- */
#silk, #thread, .veil, .grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#silk { z-index: 0; opacity: 0; transition: opacity 2.2s var(--ease) 0.1s; }
body.silk-on #silk { opacity: 1; }
/* shown when WebGL is missing */
html.no-gl body {
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, #fffaf3, transparent 60%),
    radial-gradient(ellipse 70% 60% at 80% 90%, #f1dfd0, transparent 60%),
    var(--bg);
}
.veil {
  z-index: 1;
  background: radial-gradient(ellipse 60% 55% at 50% 48%, var(--veil), transparent 70%);
}
.grain {
  z-index: 2;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
#thread { z-index: 4; }


/* ---------- custom cursor (fine pointers only) ---------- */
.cursor { position: fixed; inset: 0; z-index: 9; pointer-events: none; display: none; }
html.has-cursor .cursor { display: block; }
html.has-cursor body, html.has-cursor a, html.has-cursor button { cursor: none; }
html.has-cursor input { cursor: text; }
.c-dot, .c-ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.c-dot { display: none; }
.c-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid var(--ink-faint);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.35s, border-color 0.35s;
}
.cursor.hot .c-ring { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: rgba(207, 95, 39, 0.12); border-color: var(--copper); }

/* ---------- layout ---------- */
.stage {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--gutter) var(--gutter) 0;
}
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.audiences { display: flex; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-soft); }
.audiences li + li::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 12px; vertical-align: middle; background: var(--copper); transform: rotate(45deg); }
.status-pill { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--copper-soft); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 0 rgba(207, 95, 39, 0.6); animation: pulse 2.4s ease-out infinite; }

.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: clamp(14px, 2.4svh, 26px);
  padding-block: clamp(20px, 4svh, 56px);
  perspective: 1200px;
}
.logo-wrap {
  position: relative;
  width: min(640px, 86vw, 56svh);
  aspect-ratio: 1198 / 449;
  transform-style: preserve-3d;
  will-change: transform;
}
.logo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: drop-shadow(0 12px 40px var(--logo-shadow)); }

.rule { width: clamp(80px, 12vw, 140px); height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, transparent, var(--copper), transparent); transform-origin: center; }

h1 {
  margin: 0;
  max-width: 17ch;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, min(6.4vw, 9.5svh), 84px);
  line-height: 1;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
h1 .w { display: inline-block; overflow: hidden; padding: 0.06em 0.04em 0.12em; margin: -0.06em -0.04em -0.12em; vertical-align: top; }
h1 .w > span { display: inline-block; }
h1 em { font-style: italic; color: var(--copper-soft); }
.intro { margin: 0; max-width: 54ch; color: var(--ink-soft); font-size: clamp(15px, 1.6vw, 18px); }

.countdown { display: flex; gap: clamp(20px, 4vw, 40px); margin: 4px 0 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.countdown li { display: flex; flex-direction: column; gap: 4px; min-width: 56px; }
.countdown strong { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 5vw, 54px); line-height: 1; }
.countdown span { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); }

.notify { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(480px, 100%); margin-top: 4px; }
.notify label { font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-soft); }
.notify .row { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.notify input {
  flex: 1 1 220px; min-width: 0; padding: 15px 18px; font: inherit; color: var(--ink);
  background: rgba(var(--panel), 0.55); border: 1px solid var(--ink-faint); border-radius: 2px;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s;
}
.notify input::placeholder { color: var(--ink-faint); }
.notify input:hover { border-color: var(--ink-soft); }
.notify button {
  position: relative; overflow: hidden; flex: 0 0 auto; padding: 15px 34px;
  font: 500 13px/16px var(--sans); letter-spacing: 0.18em; text-transform: uppercase;
  color: #fff; background: var(--copper); border: 1px solid var(--copper); border-radius: 2px;
  transition: transform 0.25s var(--ease), background 0.3s;
}
.notify button:hover { background: var(--ink); border-color: var(--ink); }
.notify button:disabled { opacity: 0.6; }
.notify :focus-visible, .links a:focus-visible { outline: 2px solid var(--copper-soft); outline-offset: 3px; }
.status { min-height: 1.6em; margin: 0; font-size: 14px; color: var(--copper-soft); }
.status.error { color: var(--error); }

/* ---------- footer ---------- */
.foot { display: grid; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-block: 8px calc(var(--gutter) + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--ink-soft); }
.meaning { margin: 0; font-family: var(--display); font-style: italic; font-size: 18px; }
.links { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.links a {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 42px; height: 42px; color: var(--ink); text-decoration: none;
  border: 1px solid var(--ink-faint); border-radius: 999px; background: rgba(var(--panel), 0.35);
  backdrop-filter: blur(6px);
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.links a.pill { padding: 0 18px 0 14px; font-size: 13px; letter-spacing: 0.14em; font-variant-numeric: tabular-nums; }
.links a:hover { color: var(--copper-soft); border-color: var(--copper); background: rgba(207, 95, 39, 0.1); transform: translateY(-2px); }
.copy { margin: 0; }

/* ---------- load choreography (only when JS is running) ---------- */
.js .logo-wrap { opacity: 0; filter: blur(14px); transform: scale(0.94); }
.js .rule { transform: scaleX(0); }
.js h1 .w > span { transform: translateY(115%); }
.js .intro, .js .links, .js .countdown, .js .notify, .js .top, .js .foot-row { opacity: 0; transform: translateY(14px); }

.js.ready .logo-wrap { opacity: 1; filter: none; transform: none; transition: opacity 1.6s var(--ease) 0.2s, filter 1.6s var(--ease) 0.2s, transform 1.8s var(--ease) 0.2s; }
.js.ready .rule { transform: none; transition: transform 1.4s var(--ease) 0.9s; }
.js.ready h1 .w > span { transform: none; transition: transform 1.2s var(--ease); transition-delay: calc(1.1s + var(--i) * 90ms); }
.js.ready .intro, .js.ready .links, .js.ready .countdown, .js.ready .notify { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) 1.8s, transform 1.2s var(--ease) 1.8s; }
.js.ready .top { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) 1.2s, transform 1.2s var(--ease) 1.2s; }
.js.ready .foot-row { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) 2.2s, transform 1.2s var(--ease) 2.2s; }

@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(207, 95, 39, 0.55); }
  70%, 100% { box-shadow: 0 0 0 12px rgba(207, 95, 39, 0); }
}

@media (max-width: 640px) {
  .top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .foot-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .js .logo-wrap, .js .rule, .js h1 .w > span, .js .intro, .js .links, .js .countdown, .js .notify, .js .top, .js .foot-row { opacity: 1; transform: none; filter: none; transition: none; }
  .pulse { animation: none; }
  #silk { transition: none; }
}
