:root {
  --paper: #f3efe6;
  --ink: #1b1915;
  --muted: #7b756a;
  --rule: #d6cfc0;
  --faint: #b9b2a3;
  --accent: #ef1f7a;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Xanh Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11100e;
    --ink: #e9e3d5;
    --muted: #8d8778;
    --rule: #2e2b25;
    --faint: #4a463d;
    --accent: #ff3d94;
  }
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
p { margin: 0; }

:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* ── top and bottom bars ─────────────────────────────── */

.bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 22px clamp(20px, 4vw, 56px);
  letter-spacing: 0.04em;
}

.mark { display: block; line-height: 0; }
.mark svg { display: block; height: 30px; width: auto; aspect-ratio: 838 / 524; }
.foot { color: var(--muted); font-size: 13px; align-items: center; }

/* ── layout ──────────────────────────────────────────── */

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px clamp(20px, 4vw, 56px) 40px;
}

/* phones and tablets: one centred column — logo, watch, copy, form */
@media (max-width: 939px) {
  header.bar { display: none; }
  main { gap: 0; max-width: 560px; justify-items: center; text-align: center; padding-top: 36px; }
  .copy { display: contents; }
  .copy > * { order: 2; }
  .copy > h1 { order: 0; margin: 0 0 12px; }
  .copy > h1 svg { width: clamp(104px, 30vw, 136px); }
  main > .figure { order: 1; margin: 0 0 28px; }
  .copy > .lede { max-width: none; }
  .copy > .signup { width: 100%; max-width: 400px; margin-top: 28px; }
  .status { text-align: center; }
  .foot { flex-direction: column-reverse; align-items: center; gap: 18px; padding-top: 8px; padding-bottom: 28px; }
}

@media (min-width: 940px) {
  main {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(32px, 6vw, 96px);
    padding-bottom: 24px;
  }
}

/* ── copy column ─────────────────────────────────────── */

.copy { max-width: 440px; }

h1 { margin: 0 0 32px; line-height: 0; }
h1 svg { display: block; width: clamp(150px, 20vw, 260px); height: auto; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lede {
  max-width: 36ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.signup { margin-top: 36px; }

.signup label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.field {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--ink);
}

.field input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
}
.field input::placeholder { color: var(--faint); }
.field:focus-within { border-bottom-color: var(--accent); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field button {
  padding: 0 0 0 16px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.field button::after {
  content: "\2192";
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.25s ease;
}
.field button:hover::after { transform: translateX(4px); }
.field button:active { transform: translateY(1px); }
.field button:disabled { color: var(--muted); cursor: default; }

.status { min-height: 1.6em; margin-top: 10px; color: var(--muted); }
.status.is-error { color: var(--accent); }

.ig { display: block; margin: -8px; padding: 8px; color: var(--muted); line-height: 0; transition: color 0.2s ease; }
.ig:hover { color: var(--ink); }
.ig svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.2; }

/* ── figure ──────────────────────────────────────────── */

.figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.stage {
  position: relative;
  width: min(74vw, 320px);
  min-width: 250px;
}
@media (min-width: 940px) {
  .stage { width: min(100%, 520px, calc((100dvh - 240px) * 500 / 900)); }
}

.watch {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.watch * { vector-effect: non-scaling-stroke; }

.watch path, .watch circle, .watch rect, .watch line, .watch polygon {
  fill: var(--paper);
  stroke: currentColor;
  stroke-width: 1;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.watch .nf { fill: none; }
.watch .fine { stroke-width: 0.6; }
.watch .soft { stroke: var(--muted); }
.watch .faint { stroke: var(--faint); stroke-width: 0.6; }
.watch .acc { stroke: var(--accent); }

.watch text {
  fill: currentColor;
  stroke: none;
  font-family: var(--mono);
  text-anchor: middle;
  user-select: none;
}
.watch .brand { font-family: var(--serif); font-style: italic; font-size: 17px; }
.watch .tiny { font-size: 6px; letter-spacing: 0.22em; }
.watch .tiny.red { fill: var(--accent); }
.watch .engrave { font-size: 5.6px; letter-spacing: 0.24em; fill: var(--muted); }
.watch .bezel-num { font-size: 19px; font-weight: 400; fill: none; stroke: currentColor; stroke-width: 0.8; }

/* digital watch */
.watch .ta-s { text-anchor: start; }
.watch .ta-e { text-anchor: end; }
.watch .face { font-size: 9px; letter-spacing: 0.16em; }
.watch .face.small { font-size: 7px; fill: var(--muted); }
.watch .lcd-text { font-size: 17px; letter-spacing: 0.08em; }
.watch .lcd-text.tiny { font-size: 8px; }
.watch .seg { fill: none; stroke: var(--faint); stroke-width: 0.5; }
.watch .seg.on, .watch .dot { fill: currentColor; stroke: currentColor; stroke-width: 0.5; }
.watch #glow { fill: var(--accent); stroke: var(--accent); opacity: 0; transition: opacity 0.9s ease; pointer-events: none; }
.watch.is-lit #glow { opacity: 0.32; transition-duration: 0.12s; }

/* two watches share the stage; only the chosen one shows */
.stage { display: grid; }
.stage > .watch { grid-area: 1 / 1; transition: opacity 0.5s ease, visibility 0s; }
.figure:not([data-watch="mechanical"]) #watch,
.figure:not([data-watch="digital"]) #watch-digital,
.figure:not([data-watch="star"]) #watch-star {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s 0.5s;
}

/* star watch */
.watch .roman { font-family: var(--serif); font-size: 21px; }
.watch .stitch { stroke: var(--muted); stroke-width: 0.7; stroke-dasharray: 5 4; }

.switch { display: flex; justify-content: center; gap: 22px; margin-top: 14px; }
.switch button {
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.switch button:hover { color: var(--ink); }
.switch button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* entrance */
.watch .layer { opacity: 0; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.watch .l1 { animation-delay: 0.05s; }
.watch .l2 { animation-delay: 0.2s; }
.watch .l3 { animation-delay: 0.38s; }
.watch .l4 { animation-delay: 0.55s; }
@keyframes rise { from { opacity: 0; } to { opacity: 1; } }

/* dial ↔ movement */
.watch #dial, .watch #hands { transition: opacity 0.7s cubic-bezier(0.3, 0, 0.2, 1); }
.figure.is-open .watch #dial { opacity: 0; }
.figure.is-open .watch #hands { opacity: 0.16; }

@media (prefers-reduced-motion: reduce) {
  .watch .layer { animation: none; opacity: 1; }
  .watch #dial, .watch #hands, .watch #glow, .stage > .watch { transition: none; }
}
