/* The unveiling: a new lamp hidden under a satin cloth. The cloth is a canvas over the page; its colours are read
   from here by the script, so changing them here repaints the cloth too. */
:root {
  --paper: #efe7da;          /* the page behind the cloth */
  --ink: #1f2328;            /* the words of the page */
  --muted: #64625c;          /* the small words */
  --line: #d6cab6;           /* the thin rules */
  --glaze-hi: #6f8c88;       /* the glaze of the lamp, where the light hits */
  --glaze: #3f5d5c;
  --glaze-lo: #1f3233;
  --moon: #ece4d1;           /* the pale moon on the belly of the lamp */
  --shade: #efe2c8;          /* the linen shade, off */
  --glow: #ffcf7a;           /* the light of the lamp */
  --plinth: #ddd1bd;
  --plinth-top: #e9dfcf;

  --cloth: #7c2232;          /* the satin, front */
  --cloth-dark: #2a0910;     /* the satin in its deepest folds */
  --cloth-sheen: #f2b0a8;    /* the sheen of the satin */
  --lining: #c79c64;         /* the lining, seen when the cloth turns over */
  --lining-dark: #3d2711;
  --hem: #e3c28d;            /* the gold thread along the hem */

  --button: #f3e8d4;         /* the button on the cloth */
  --button-ink: #3a0d16;
  --button-open: #1f2328;    /* the button on the page */
  --button-open-ink: #f3e8d4;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); overflow: hidden; }
body {
  font-family: 'Hanken Grotesk Variable', system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--paper);
  -webkit-tap-highlight-color: transparent;
}
.stage.is-covered { cursor: pointer; }

/* ------------------------------------------------------------------ the page */
.page { position: absolute; inset: 0; display: flex; flex-direction: column; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 3vw, 30px) clamp(20px, 5vw, 64px);
}
.brand { font-family: 'Newsreader Variable', Georgia, serif; font-size: 20px; font-weight: 520; letter-spacing: -0.01em; }
.links { display: flex; gap: 4px; }
.links a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 520;
  padding: 7px 12px;
  border-radius: 999px;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 4vw, 64px);
  padding: 0 clamp(20px, 6vw, 96px) clamp(80px, 11vh, 120px);
  min-height: 0;
}
.copy { max-width: 500px; }
.kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glaze);
}
.title {
  margin: 0;
  font-family: 'Newsreader Variable', Georgia, serif;
  font-weight: 460;
  font-size: clamp(56px, 8vw, 118px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.04em 0.04em 0.12em 0;
}
.title .ch { display: inline-block; will-change: transform; }
.lede { margin: 18px 0 0; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; color: var(--muted); max-width: 44ch; }
.rule { display: block; height: 1px; margin-top: 26px; background: var(--line); }
.specs { display: flex; gap: clamp(18px, 3vw, 40px); margin: 0; padding: 18px 0 0; }
.specs dt { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 4px 0 0; font-size: 16px; font-weight: 600; }
.buy { display: flex; align-items: center; gap: 22px; margin-top: 28px; }
.price { font-family: 'Newsreader Variable', Georgia, serif; font-size: 30px; font-weight: 500; }

.reserve, .toggle {
  position: relative;
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  isolation: isolate;
}
.reserve { height: 48px; padding: 0 24px; color: var(--paper); font-size: 15px; font-weight: 620; }
.reserve__bg, .toggle__bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  transition: transform 0.55s cubic-bezier(0.34, 1.8, 0.5, 1);
}
.reserve__bg { background: var(--ink); }
.reserve__label, .toggle__label {
  display: inline-block;
  transition: letter-spacing 0.45s cubic-bezier(0.34, 1.6, 0.5, 1);
}

.art { margin: 0; height: 100%; max-height: 640px; display: flex; align-items: center; justify-content: center; min-height: 0; }
.art svg { width: 100%; height: 100%; max-width: 460px; overflow: visible; }
.glow-a { stop-color: var(--glow); stop-opacity: 0.55; }
.glow-b { stop-color: var(--glow); stop-opacity: 0; }
.pool-a { stop-color: var(--glow); stop-opacity: 0.7; }
.pool-b { stop-color: var(--glow); stop-opacity: 0; }
.glaze-hi { stop-color: var(--glaze-hi); }
.glaze-mid { stop-color: var(--glaze); }
.glaze-lo { stop-color: var(--glaze-lo); }
.lit-a { stop-color: #fff3d6; }
.lit-b { stop-color: var(--glow); }
.plinth { fill: var(--plinth); }
.plinth-top { fill: var(--plinth-top); }
.lamp { transform-box: fill-box; transform-origin: 50% 100%; }
.lamp__shadow { fill: var(--glaze-lo); opacity: 0.25; }
.lamp__rim { fill: none; stroke: var(--glaze-hi); stroke-width: 3; stroke-linecap: round; opacity: 0.7; }
.lamp__moon { fill: var(--moon); }
.lamp__crater { fill: #d6ccb4; }
.lamp__neck { fill: #b48a4c; }
.lamp__shade { fill: var(--shade); }
.lamp__seam { fill: none; stroke: #c9b48f; stroke-width: 2; stroke-dasharray: 5 5; }

/* ------------------------------------------------------------------ the cloth and its button */
.cloth { position: absolute; inset: 0; pointer-events: none; }
.cloth canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.toggle {
  position: absolute;
  left: 50%;
  bottom: max(26px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 2;
  height: 50px;
  padding: 0 30px;
  font-size: 15px;
  font-weight: 640;
  letter-spacing: 0.02em;
  color: var(--button-ink);
}
.toggle__bg { background: var(--button); box-shadow: 0 10px 30px -12px rgba(20, 3, 6, 0.6); }
.stage:not(.is-covered) .toggle { color: var(--button-open-ink); }
.stage:not(.is-covered) .toggle__bg { background: var(--button-open); box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.5); }
.toggle:focus-visible, .reserve:focus-visible, .links a:focus-visible { outline: 2px solid var(--glaze); outline-offset: 3px; }

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

@media (hover: hover) {
  .links a { transition: background-color 0.3s, color 0.3s; }
  .links a:hover { background: rgba(63, 93, 92, 0.12); color: var(--glaze); }
  .reserve:hover .reserve__bg, .toggle:hover .toggle__bg { transform: scale(1.08, 1.14); }
  .reserve:hover .reserve__label, .toggle:hover .toggle__label { letter-spacing: 0.06em; }
  .art:hover { cursor: default; }
}
.reserve:active .reserve__bg, .toggle:active .toggle__bg { transform: scale(0.94); transition-duration: 0.12s; }

/* ------------------------------------------------------------------ the phone: the copy above, the lamp below */
@media (max-width: 760px) {
  .links a:not(:first-child) { display: none; }
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 4px 22px 96px;
  }
  .kicker { font-size: 11px; margin-bottom: 8px; }
  .title { font-size: clamp(50px, 15vw, 76px); }
  .lede { margin-top: 10px; font-size: 14px; line-height: 1.5; }
  .rule { margin-top: 16px; }
  .specs { padding-top: 12px; gap: 18px; }
  .specs dd { font-size: 14px; }
  .buy { margin-top: 16px; gap: 16px; }
  .price { font-size: 24px; }
  .reserve { height: 42px; padding: 0 18px; font-size: 14px; }
  .art { max-height: none; }
  .toggle { height: 46px; padding: 0 26px; font-size: 14px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .lede { display: none; }
}
