/* Greenwin website. Colours are the app's (apps/greenwin/src/theme.ts); the one loud element is
   the sample Green in the hero, everything else stays quiet. */
:root {
  --ink: #080e11;
  --ridge: #0f181c;
  --ridge-2: #15232a;
  --line: rgba(150, 181, 194, 0.16);
  --line-strong: rgba(150, 181, 194, 0.28);
  --snow: #edf1f4;
  --mist: #c8d3dc;
  --slate: #8299ac;
  --green: #00e3a0;
  --green-soft: rgba(0, 227, 160, 0.12);
  --red: #ff503b;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --text: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --measure: 64ch;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--mist);
  font: 400 1.0625rem/1.6 var(--text);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--snow); text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--snow); font-family: var(--display); margin: 0; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 650; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; z-index: 10; background: var(--snow); color: var(--ink); padding: 8px 12px; }

/* Top bar */
.bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.25rem var(--display); color: var(--snow); }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a, .lang { color: var(--slate); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .lang:hover { color: var(--snow); }
.lang { margin-left: auto; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.nav + .lang { margin-left: 0; }

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(24px, 6vw, 72px) var(--gutter) clamp(64px, 9vw, 120px);
  isolation: isolate;
}
.home .bar + main .hero::before {
  /* The app's mountains, faded into the page. */
  content: '';
  position: absolute;
  inset: -90px 0 0 0;
  z-index: -1;
  background: url('mountains.png') center 0 / cover no-repeat;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 92%);
}
.hero h1 {
  font-size: clamp(3.4rem, 10vw, 7.5rem);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 96;
}
.lead { margin-top: 28px; max-width: 46ch; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--mist); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 36px; }
.store {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--snow);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.store-soon { background: transparent; color: var(--snow); border: 1px solid var(--line-strong); }
.quiet { color: var(--slate); }

/* The sample Green */
.ticket {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(21, 35, 42, 0.92), rgba(15, 24, 28, 0.96));
  box-shadow: 0 30px 80px -30px rgba(0, 227, 160, 0.25);
  max-width: 420px;
  justify-self: end;
  width: 100%;
}
.ticket-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ticket-sym { font: 800 1.9rem/1 var(--display); color: var(--snow); letter-spacing: 0.01em; }
.ticket-kind { margin-top: 6px; color: var(--slate); font-size: 0.9rem; }
.timer { display: flex; align-items: center; gap: 10px; }
.timer svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 4; }
.timer-track { stroke: var(--line); }
.timer-arc { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: var(--spent, 0); }
.timer p { display: grid; text-align: right; line-height: 1.25; }
.timer-state { color: var(--green); font-weight: 600; font-size: 0.9rem; }
.timer-state::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.timer-left { color: var(--slate); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.ticket.is-expired .timer-state { color: var(--slate); }
.ticket.is-expired .timer-arc { stroke: var(--slate); }

.ladder { position: relative; height: 280px; margin: 26px 0 18px; }
.ridge { position: absolute; inset: 0; width: 100%; height: 100%; }
.ridge path { fill: var(--green-soft); }
.ridge polyline { fill: none; stroke: var(--green); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.rung {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--at);
  transform: translateY(-50%);
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 10px;
  border-top: 1px dashed var(--line-strong);
  background: linear-gradient(90deg, rgba(15, 24, 28, 0.9), rgba(15, 24, 28, 0));
  font-size: 0.9rem;
}
.rung span { color: var(--slate); min-width: 4.5em; }
.rung b { color: var(--snow); font: 600 1.05rem var(--text); font-variant-numeric: tabular-nums; }
.rung em { font-style: normal; font-variant-numeric: tabular-nums; }
.rung-target { transform: translateY(0); }
.rung-target em { color: var(--green); }
.rung-stop { transform: translateY(-100%); border-top: 0; border-bottom: 1px dashed var(--line-strong); }
.rung-stop em { color: var(--red); }
.rung-entry { border-top-style: solid; border-top-color: var(--snow); }
.ticket-rr { display: flex; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.ticket-rr span { color: var(--slate); }
.ticket-rr b { color: var(--snow); font-weight: 600; }
.ticket figcaption { margin-top: 14px; color: var(--slate); font-size: 0.8rem; }

@media (prefers-reduced-motion: no-preference) {
  /* The one orchestrated moment: the ridge climbs from the stop side up to the target. */
  .ridge { animation: climb 2.2s cubic-bezier(0.3, 0.6, 0.2, 1) 0.2s backwards; }
  @keyframes climb { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .timer-arc { transition: stroke-dashoffset 1s linear; }
}

/* Sections */
main > section { padding: clamp(56px, 8vw, 104px) var(--gutter); }
main > section + section { border-top: 1px solid var(--line); }

.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 44px 0 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-top: 56px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  font: 800 2.6rem/1 var(--display);
  color: var(--green);
}
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 20px; left: 48px; right: -24px; height: 1px; background: var(--line-strong); }
.steps p, .nots p { margin-top: 10px; max-width: 38ch; }

.week { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: baseline; }
.week p { max-width: var(--measure); font-size: 1.15rem; }

.nots ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 56px; margin: 44px 0 0; padding: 0; }
.nots li { padding-left: 36px; position: relative; }
.nots li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--slate);
  background: linear-gradient(45deg, transparent calc(50% - 1px), var(--slate) calc(50% - 1px), var(--slate) calc(50% + 1px), transparent calc(50% + 1px));
}

.price { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px 40px; }
.price h2 { grid-row: span 4; }
.price-amount b { font: 800 clamp(3.5rem, 8vw, 5.5rem)/1 var(--display); color: var(--snow); letter-spacing: -0.03em; }
.price-amount span { color: var(--slate); font-size: 1.1rem; }
.price ul { margin: 8px 0 0; padding-left: 1.2em; }
.price li + li { margin-top: 6px; }
.price li::marker { color: var(--green); }
.price-note { color: var(--slate); max-width: var(--measure); }

.faq > * { max-width: var(--measure); }
.faq h2 { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; color: var(--snow); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--green); font: 400 1.4rem/1 var(--display); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 20px; max-width: var(--measure); }

/* Text pages */
.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); padding: clamp(32px, 6vw, 72px) var(--gutter) 80px; }
.prose h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1; font-weight: 800; letter-spacing: -0.025em; }
.prose h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--green); }
.prose strong { color: var(--snow); font-weight: 600; }
.updated { color: var(--slate); margin: 14px 0 36px !important; }
.back { margin-top: 48px !important; }
.todo { color: var(--ink); background: #e6dd00; padding: 0 4px; border-radius: 3px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 40px var(--gutter) 48px; display: grid; gap: 20px; color: var(--slate); font-size: 0.9rem; }
.foot-risk { max-width: 80ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { color: var(--mist); }

@media (max-width: 860px) {
  .nav { display: none; }
  .hero, .week, .price { grid-template-columns: 1fr; }
  .ticket { justify-self: stretch; max-width: none; }
  .price h2 { grid-row: auto; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps li:not(:last-child)::after { display: none; }
  .nots ul { grid-template-columns: 1fr; }
}
