/* Tokens live in theme.css */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--container) + 48px);
  height: 60px;
  margin: 0 auto;
  /* Brand and Register sit centred in the bar (9.5px above and below the button), and the
     hero frame starts right under the nav, so the gaps match whether the nav is floating or not */
  padding: 0 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 18px/1 var(--font-heading);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  /* Turns very slowly, and every so often swells for a moment. Two animations on separate
     properties so neither interrupts the other; the pulses fall at uneven gaps (~10s, ~9s). */
  animation: mark-spin 90s linear infinite, mark-pulse 20s ease-in-out 4s infinite;
}
@keyframes mark-spin { to { rotate: 360deg; } }
@keyframes mark-pulse {
  0%, 30%, 35.5%, 80%, 85.5%, 100% { scale: 1; }
  32.75% { scale: 1.08; }
  82.75% { scale: 1.06; }
}
.nav-cta {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--color-primary-hover); }

/* ---------- Stage: rounded hero panel the form window overlaps ---------- */
.stage {
  position: relative;
  isolation: isolate;
  flex: 1;
  width: 100%;
  padding: 72px 24px 0;
}
.stage::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  bottom: 200px;
  z-index: -1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-3);
  /* Tan rice paper under the ink-wash scene */
  background: #f6f2ed;
  box-shadow: var(--shadow-2);
}
/* Under the nav the frame starts flush with its bottom edge; the 404 page has no nav and keeps its 8px */
.nav + .stage::before { top: 0; }
.nav + .stage .scene { top: 1px; }
/* ---------- Ink-wash scene ----------
   sant.ai's landscape on its own rice paper, with the painted sun lifted out so it can move: on page
   load the sun rises from behind the mountains on the left and arcs over to its place in the painting. */
.stage {
  --sun-run: 2.4s;
  --sun-delay: 0.2s;
}
.scene {
  --art-h: max(600px, 56.2vw);
  position: absolute;
  top: 9px;
  left: 13px;
  right: 13px;
  bottom: 201px;
  z-index: -1;
  overflow: hidden;
  border-radius: calc(var(--radius-3) - 1px);
  pointer-events: none;
  user-select: none;
}
.scene-art {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--art-h);
  max-height: 100%;
  container-type: size;
  /* The painting's paper: the ink layer's sky is keyed against it */
  background: #f8f4ee;
  -webkit-mask-image: linear-gradient(to bottom, #000 64%, transparent);
  mask-image: linear-gradient(to bottom, #000 64%, transparent);
}
/* A cover-fit box with the painting's proportions, so the sun can be placed in the art's own coordinates */
.scene-frame {
  --frame-w: max(100cqw, 175.11cqh);
  position: absolute;
  left: calc((100cqw - var(--frame-w)) * var(--frame-x, 0.82));
  top: calc((100cqh - var(--frame-w) / 1.7511) * 0.3);
  width: var(--frame-w);
  aspect-ratio: 1660 / 948;
}
.scene-ink {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
/* One circular arc, like the real thing: .sun-orbit is a sun-sized box centred on the arc's pivot,
   (1153, 1066) on the 1660×948 canvas, and swings 88.4° up to rest; .sun-body sits one radius out,
   at sant.ai's sun (1435, 205), and turns back the same amount so the leaf stays upright. */
.sun-orbit {
  position: absolute;
  left: 61.145%;
  top: 97.89%;
  width: 16.627%;
  aspect-ratio: 1;
  animation: sun-orbit var(--sun-run) cubic-bezier(0.4, 0.1, 0.3, 1) var(--sun-delay) both;
}
.sun-body {
  position: absolute;
  inset: 0;
  translate: 102.17% -311.96%;
  animation: sun-upright var(--sun-run) cubic-bezier(0.4, 0.1, 0.3, 1) var(--sun-delay) both;
}
/* sant.ai's own gold-leaf sun, its lower half dissolving into mist, with the painting's faint warm
   halo baked in (the image is twice the sun's box). The ink layer was built around it at rest, so
   where it stops is sant.ai's painting. */
.scene-sun {
  position: absolute;
  left: -50%;
  top: -50%;
  display: block;
  width: 200%;
  height: 200%;
}
/* Starts at (300, 760), behind the left mountains; crests at y 160 just before it settles */
@keyframes sun-orbit { from { transform: rotate(-88.41deg); } to { transform: none; } }
@keyframes sun-upright { from { transform: rotate(88.41deg); } to { transform: none; } }

/* ---------- Hero ---------- */
.hero { text-align: center; }
/* Same build as sant.ai's hero pill: mint tag on the left, label, arrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  min-height: 48px;
  margin: 0 0 30px;
  padding: 6px 20px 6px 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-surface) 80%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px -16px rgba(0, 0, 0, 0.3);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.eyebrow:hover { border-color: var(--color-border-strong); background: var(--color-surface); }
.eyebrow-tag {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  height: 36px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  background: var(--color-mint);
  box-shadow: inset 0 0 0 1px var(--color-mint-border);
  color: var(--color-on-mint);
  font-size: 14px;
  font-weight: 600;
}
/* Event window, the badge's headline */
.eyebrow-label strong { color: var(--color-text); font-weight: 650; }
.eyebrow-label time { white-space: nowrap; }
.eyebrow-x { color: var(--color-text-2); }
.eyebrow-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
  transition: transform 0.2s var(--ease);
}
.eyebrow:hover .eyebrow-arrow { transform: translateX(2px); }

h1 {
  max-width: 980px;
  margin: 0 auto;
  font: 500 clamp(44px, 8.6vw, 88px)/0.98 var(--font-heading);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hl { color: var(--color-primary-display); }

/* The pitch as a macOS notification banner: app icon, title and time, then the message */
.lede {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 3px;
  width: fit-content;
  max-width: 39rem;
  margin: 28px auto 48px;
  padding: 14px 20px 16px 14px;
  border-radius: 22px;
  /* Light vibrancy: heavy blur and saturation, the same frost as macOS banners */
  background: rgba(246, 246, 246, 0.74);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.7),
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.05),
    0 12px 32px -10px rgba(0, 0, 0, 0.2);
  text-align: left;
  /* Slides in from the right like a fresh notification, once the page has settled */
  animation: notify 0.65s cubic-bezier(0.2, 0.9, 0.25, 1.1) 0.7s both;
}
.lede-icon {
  grid-row: span 2;
  align-self: start;
  width: 42px;
  height: 42px;
  padding: 7px;
  /* App-icon squircle */
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #eef5f1 100%);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.1);
}
.lede-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.lede-time { color: #6e6e6e; font-size: 13px; font-weight: 400; }
.lede-text {
  margin: 0;
  color: var(--color-text-2);
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
@keyframes notify {
  from { opacity: 0; transform: translateX(36px); }
}

.perks {
  display: grid;
  gap: 12px;
  width: fit-content;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
}
@media (min-width: 760px) {
  .perks { display: flex; gap: 14px; }
}
/* Frosted cards so the perks read clearly over the mountains in the hero art */
.perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--color-surface) 86%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -18px rgba(0, 0, 0, 0.28);
  position: relative;
  /* Only transform and opacity are animated (compositor-only); animating box-shadow or the
     blur behind the card repaints every frame and made the float stutter */
  will-change: transform;
  animation: float 5s ease-in-out infinite;
}
/* The deeper "lifted" shadow lives on its own layer and fades in, instead of tweening box-shadow */
.perks li::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 22px 40px -20px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  animation: float-shadow 5s ease-in-out infinite;
}
/* Staggered so the three cards drift independently, like they're hanging in the mist */
.perks li:nth-child(2),
.perks li:nth-child(2)::after { animation-delay: -1.7s; animation-duration: 5.6s; }
.perks li:nth-child(3),
.perks li:nth-child(3)::after { animation-delay: -3.4s; animation-duration: 5.2s; }
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -7px, 0); }
}
@keyframes float-shadow {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
.perks strong { display: block; color: var(--color-text); font-size: 15px; font-weight: 600; line-height: 1.3; }
.perks span { color: var(--color-text-2); font-size: 14px; }
.perk-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  /* No tile behind the glyph: the tint colours the icon itself */
  color: var(--tint);
}
.perks li:nth-child(1) .perk-icon { --tint: #008551; }
.perks li:nth-child(2) .perk-icon { --tint: #d9530f; }
.perks li:nth-child(3) .perk-icon { --tint: #6d4ae0; }
.perk-icon svg {
  width: 28px;
  height: 28px;
  /* Solar Bold Duotone glyphs are filled shapes */
  fill: currentColor;
}

/* ---------- Window: form beside the team steps ---------- */
/* The form lives in a macOS Safari window */
.window {
  position: relative; /* holds the confetti */
  display: grid;
  max-width: 1080px;
  margin: 56px auto 0;
  border-radius: 14px;
  background: var(--color-surface);
  /* The original depth and softness, but dropped less far: the darkness stays close under the
     window instead of reaching the judging text 72px below, and the tones are a touch lighter */
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 16px 64px -24px rgba(0, 0, 0, 0.3),
    0 30px 110px -60px rgba(40, 60, 50, 0.28);
  overflow: hidden;
  /* Clip rather than hidden where supported, so the team steps can stick while you scroll */
  overflow: clip;
}
@media (min-width: 900px) {
  .window { grid-template-columns: minmax(0, 1fr) 380px; }
  /* After registering the team steps are gone, so the card takes the whole window */
  .window:has(> .team-note[hidden]) { grid-template-columns: minmax(0, 1fr); }
}

.window-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 18px;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid #dcdcdc;
  background: linear-gradient(180deg, #f6f6f6, #ececec);
  color: #6e6e6e;
  user-select: none;
}
.window-bar svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.window-bar .dim { opacity: 0.35; }

.lights { display: flex; gap: 8px; }
.light {
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}
.light-close { background: #ff5f57; color: #820005; }
.light-min { background: #febc2e; color: #985700; }
.light-max { background: #28c840; color: #006500; }
.window-bar .light svg {
  width: 8px;
  height: 8px;
  stroke-width: 1.6;
  opacity: 0;
  transition: opacity 0.12s;
}
.light-max svg path { fill: currentColor; stroke: none; }
/* Like macOS: the glyphs appear when you hover the lights */
.lights:hover .light svg { opacity: 1; }

.bar-nav, .bar-tools { display: flex; align-items: center; gap: 14px; }

.address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  justify-self: center;
  width: min(100%, 440px);
  height: 32px;
  padding: 0 10px 0 12px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.055);
  color: #262626;
  font-size: 13px;
  font-weight: 500;
}
.address span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.window-bar .address svg { flex-shrink: 0; width: 13px; height: 13px; color: #8a8a8a; }
/* Auto margins on both icons keep the host centered with reload pinned right, as in Safari */
.window-bar .address svg:first-child,
.window-bar .address .reload { margin-left: auto; }
@media (max-width: 720px) {
  .window-bar { grid-template-columns: auto 1fr; gap: 14px; height: 46px; padding: 0 12px; }
  .bar-nav, .bar-tools { display: none; }
}

.card {
  padding: 32px 22px;
  /* Leaves room for the nav and the window toolbar above the card */
  scroll-margin-top: 140px;
}
@media (min-width: 560px) { .card { padding: 44px 48px; } }

/* Title centred on a mint ticket tile, the subtitle tucked under the title */
.card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 16px;
  row-gap: 4px;
  margin: 0 0 18px;
}
.card-head > div { display: contents; }
.card-head .card-sub { grid-column: 2; }
/* Flat tint, no border or shadow: the same treatment as the perk icons in the hero */
.card-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e3f5ec;
  color: #008551;
}
.card-tile svg {
  width: 22px;
  height: 22px;
  /* Solar duotone glyph: filled shapes in the tile's green, not a stroked outline */
  fill: currentColor;
}
.card h2 {
  margin: 0;
  font: 500 32px/1.1 var(--font-heading);
  letter-spacing: -0.035em;
}
/* Lowercase text sits below its line box's centre, so centring the box alone leaves the title
   looking lower than the ticket tile; lift it ~2.5px to line up with the tile's middle */
#signup-title { margin-top: -5px; }
.card-sub { margin: 0; color: var(--color-muted); font-size: 15px; }
/* The event window, repeated where people actually sign up */
.card-dates {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 11px 14px;
  border: 1px solid #c9ecd9;
  border-radius: 12px;
  background: #eef9f3;
  color: var(--color-text-2);
  font-size: 14.5px;
  line-height: 1.4;
}
.card-dates svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #008551;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-dates strong { color: var(--color-text); font-weight: 600; }
.card-dates time { white-space: nowrap; }

.banner {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid #f6c6c8;
  border-radius: 12px;
  background: #fef3f3;
  color: #b3000a;
  font-size: 14px;
}

/* Team steps, styled as a sidebar */
.team-note {
  padding: 32px 22px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
@media (min-width: 560px) { .team-note { padding: 44px 36px; } }
/* Beside the form, the steps are a compact box that follows you down the page, instead of a
   full-height panel left mostly empty below them */
@media (min-width: 900px) {
  .team-note {
    align-self: start;
    position: sticky;
    top: 84px; /* clears the 60px nav */
    margin: 24px 24px 24px 0;
    padding: 32px 28px 16px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
  }
}
.team-note h2 {
  margin: 0 0 20px;
  font: 500 22px/1.3 var(--font-heading);
  letter-spacing: -0.02em;
}
.team-note ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.team-note li {
  position: relative;
  padding: 16px 0 16px 40px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.5;
  counter-increment: step;
}
.team-note li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  color: var(--color-muted);
  font: 500 13px/1.5 var(--font-mono);
}
.team-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--color-text);
  font-weight: 500;
}

/* ---------- Fields ---------- */
.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-weight: 500;
  font-size: 14px;
}
input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
/* Each text field leads with an icon that turns green while you type in it */
.control { position: relative; }
.control input, .control textarea { display: block; padding-left: 44px; }
.control-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 19px;
  height: 19px;
  margin-top: -9.5px;
  fill: none;
  stroke: #8f8f8f;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke 0.15s, transform 0.25s var(--ease);
}
.control-area .control-icon { top: 15.5px; margin-top: 0; }
.control:focus-within .control-icon { stroke: var(--color-primary); transform: scale(1.08); }
.control:has([aria-invalid="true"]) .control-icon { stroke: var(--color-danger); }
input::placeholder, textarea::placeholder { color: #8f8f8f; }
input[type="text"]:hover, input[type="email"]:hover, textarea:hover { border-color: var(--color-border-strong); }
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 133, 81, 0.14);
}
[aria-invalid="true"] { border-color: var(--color-danger) !important; }
[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(212, 0, 10, 0.12); }

.optional {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: #f1f1f0;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 500;
  vertical-align: 1px;
}

.hint { margin: 8px 0 0; color: var(--color-muted); font-size: 13px; }
.hint strong { color: var(--color-text-2); font-weight: 600; }
.error { margin: 6px 0 0; color: var(--color-danger); font-size: 13px; }
.error:empty { display: none; }

/* Pill-style radio buttons; the picked one goes solid black */
/* Pills size to their label and wrap onto as many rows as fit */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: flex; margin: 0 !important; cursor: pointer; }
/* The radio covers the whole chip and sits above the pill, so a click on the option lands on
   the input itself (test tools click the element's centre). The scroll margin keeps an option
   scrolled into view clear of the sticky nav. */
.chip input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  scroll-margin: 84px 0 24px;
}
.chip span {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}
.chip svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.15s;
}
.chip input[value="other"] + span svg { stroke-width: 3.2; }
.chip:hover span { background: #f5f5f4; border-color: var(--color-border-strong); }
.chip input:checked + span svg { stroke: #5fe0a6; }
.chip input:active + span { transform: scale(0.97); }
.chip input:checked + span {
  border-color: var(--color-text);
  background: var(--color-text);
  color: var(--color-surface);
}
.chip input:focus-visible + span { outline: 2px solid var(--color-primary); outline-offset: 3px; }
#source-field.invalid .chip span { border-color: #f1a3a7; }

.other { margin-top: 12px; animation: reveal 0.2s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Progress: one segment per required answer ---------- */
.progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 12px;
  color: var(--color-muted);
  font-size: 13.5px;
  font-weight: 500;
}
.progress-text { display: inline-flex; align-items: center; gap: 7px; transition: color 0.2s; }
.progress-text svg {
  width: 16px;
  height: 16px;
  padding: 2px;
  border-radius: 50%;
  background: #e8e8e6;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: background 0.25s;
}
.progress-segs { display: flex; gap: 5px; }
.seg {
  position: relative;
  width: 30px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: #e8e8e6;
  overflow: hidden;
}
.seg::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #00b16c, #008551);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.seg.done::after { transform: none; }
.progress.complete .progress-text { color: var(--color-on-mint); }
.progress.complete .progress-text svg { background: var(--color-primary); }

/* ---------- Submit: see-through green pill whose outline loads up on hover ---------- */
.submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 10px 64px;
  border: 0;
  border-radius: var(--radius-pill);
  /* A wash of green, so the card shows through and the outline does the talking */
  background: color-mix(in srgb, var(--color-primary) 7%, transparent);
  color: var(--color-on-mint);
  font: 600 17px/1 var(--font-body);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.submit:hover { background: color-mix(in srgb, var(--color-primary) 12%, transparent); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 3px solid var(--color-primary-display); outline-offset: 3px; }
/* app.js fits the rects to the button's edge and sizes the two fills, each half the edge long.
   At rest only the faint track shows; on hover the fills snake out from opposite corners and
   meet, and on leaving they draw back. */
.submit-trace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.trace-track {
  stroke: color-mix(in srgb, var(--color-primary) 24%, transparent);
  transition: stroke 0.4s;
}
.trace-fill {
  display: none;
  stroke: var(--color-primary);
  stroke-dashoffset: var(--half);
  transition: stroke-dashoffset 0.35s cubic-bezier(0.4, 0, 1, 1);
}
.submit-trace.sized .trace-fill { display: inline; }
.submit:is(:hover, :focus-visible, [aria-busy="true"]) .trace-fill {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
/* Once every required answer is in, the resting edge firms up */
form.ready .trace-track { stroke: color-mix(in srgb, var(--color-primary) 40%, transparent); }
.submit-icon {
  flex: none;
  width: 21px;
  height: 21px;
  /* Filled duotone glyph, not a stroked outline */
  fill: currentColor;
  transition: transform 0.35s var(--ease);
}
.submit:hover .submit-icon { transform: translate(2px, -2px) rotate(-6deg); }
.submit .arrow {
  position: absolute;
  right: 9px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  border-radius: 50%;
  background: var(--color-primary);
  transition: background 0.2s, transform 0.3s var(--ease);
}
.submit .arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--color-on-primary);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.submit:hover .arrow { background: var(--color-primary-hover); transform: translateX(3px); }
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.submit[aria-busy="true"] { cursor: progress; transform: none; }
.submit[aria-busy="true"] .spinner { display: block; }
.submit[aria-busy="true"] .submit-icon,
.submit[aria-busy="true"] .arrow { display: none; }
.submit:disabled:not([aria-busy="true"]) {
  cursor: not-allowed;
  background: var(--color-surface-2);
  /* The outline is hidden, so a plain grey edge stands in */
  box-shadow: inset 0 0 0 1px var(--color-border-strong);
  color: var(--color-muted);
  transform: none;
}
.submit:disabled:not([aria-busy="true"]) .submit-trace { display: none; }
.submit:disabled:not([aria-busy="true"]) .arrow { background: var(--color-border-strong); transform: none; }
.submit:disabled:not([aria-busy="true"]) .submit-icon { transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.help a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--color-mint-border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.help a:hover { text-decoration-color: currentColor; }

/* ---------- Success ---------- */
/* Laid over the window's page area by app.js (below the toolbar), never in the way of a click */
.confetti { position: absolute; left: 0; z-index: 5; pointer-events: none; }
/* Same width as beside the team steps, centred once the card has the whole window */
.success { max-width: 38rem; margin: 0 auto; text-align: center; padding: 24px 0 8px; animation: reveal 0.35s ease-out; }
.success h2 { outline: none; }
.success p { max-width: 26rem; margin: 10px auto 24px; color: var(--color-muted); }
/* An email moves to the next line whole; it only breaks if it's too long for a line on its own */
.success strong { color: var(--color-text); font-weight: 600; overflow-wrap: anywhere; }
/* One line on desktop, two even lines on phones */
.success .success-lede { max-width: 35rem; margin: 12px auto 0; text-wrap: balance; }
/* Straight on from the sentence above, same size, with the email on a line of its own */
.inbox { margin: 0 auto 28px; }
.success .inbox p { max-width: none; margin: 0; }
.check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border: 1px solid var(--color-mint-border);
  border-radius: 50%;
  background: var(--color-mint);
  box-shadow: 0 0 0 8px rgba(0, 177, 108, 0.07);
}
.check svg {
  width: 30px; height: 30px; fill: none; stroke: var(--color-primary); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.45s 0.15s ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
/* Account prompt: the one call to action after signing up */
.next-step {
  margin: 0 0 20px;
  padding: 22px 20px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-1);
  background: var(--color-surface);
  box-shadow: var(--shadow-2);
  text-align: left;
}
.next-step .next-label {
  margin: 0 0 12px;
  color: var(--color-on-mint);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.next-head { display: flex; align-items: center; gap: 12px; }
.next-head img { flex-shrink: 0; }
.next-head h3 { margin: 0; font: 600 18px/1.25 var(--font-heading); letter-spacing: -0.01em; }
.next-step p { max-width: none; margin: 12px 0 16px; color: var(--color-text-2); font-size: 14px; }
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  transition: background 0.2s;
}
.account-btn:hover { background: var(--color-primary-hover); }
.account-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.account-btn svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--ease);
}
.account-btn:hover svg { transform: translate(2px, -2px); }
.account-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
/* Sign in: same pill, outlined, so it reads as the other way in rather than an afterthought */
.account-btn-alt {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px var(--color-border-strong);
}
.account-btn-alt:hover { background: var(--color-surface-2); }

.team-reminder {
  margin: 0 0 20px;
  padding: 20px;
  border: 1px solid var(--color-mint-border);
  border-radius: var(--radius-1);
  background: var(--color-mint);
  text-align: left;
}
.team-reminder p { max-width: none; margin: 0 0 14px; color: var(--color-text-2); font-size: 14px; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font: 500 14px var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.copy-btn:hover { border-color: var(--color-border-strong); background: #fafafa; }
.copy-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.copy-fallback { margin-top: 10px; font-size: 14px !important; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--color-primary);
  font: 500 15px var(--font-body);
  text-underline-offset: 4px;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Judging: rubric and prizes below the signup window ---------- */
.judging {
  width: 100%;
  max-width: 1128px; /* the window's 1080px plus the page gutters */
  margin: 72px auto 0;
  padding: 0 24px;
}
.judging-head { margin: 0 0 24px; }
.judging-head h2 {
  margin: 0 0 6px;
  font: 500 32px/1.1 var(--font-heading);
  letter-spacing: -0.035em;
}
.judging-head p { margin: 0; color: var(--color-muted); font-size: 15px; }
.criteria {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) { .criteria { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.criteria > li {
  position: relative;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -18px rgba(0, 0, 0, 0.28);
  /* The same drift as the hero perks: transform only, with the lifted shadow fading in on ::after */
  will-change: transform;
  animation: float 5s ease-in-out infinite;
}
.criteria > li::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 22px 40px -20px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  animation: float-shadow 5s ease-in-out infinite;
}
/* Staggered so the three cards drift independently */
.criteria > li:nth-child(2),
.criteria > li:nth-child(2)::after { animation-delay: -1.7s; animation-duration: 5.6s; }
.criteria > li:nth-child(3),
.criteria > li:nth-child(3)::after { animation-delay: -3.4s; animation-duration: 5.2s; }
.criteria > li:nth-child(1) { --tint: #d9530f; }
.criteria > li:nth-child(2) { --tint: #008551; }
.criteria > li:nth-child(3) { --tint: #6d4ae0; }
/* Laid over the card's 1px border; app.js fits the rects and sizes the fills, as for Register */
.criteria-trace {
  position: absolute;
  top: -1px;
  left: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  overflow: visible;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.criteria-trace.sized .trace-fill { display: inline; }
/* Each card's outline takes its icon's tint: orange, green, purple */
.criteria-trace .trace-fill { stroke: var(--tint); }
.criteria > li:hover .trace-fill {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
/* Tinted glyph with no tile behind it, like the perk icons in the hero */
.criteria-icon { display: block; margin: 0 0 14px; color: var(--tint); }
.criteria-icon svg,
.prizes-icon svg { display: block; width: 28px; height: 28px; fill: currentColor; }
.criteria h3,
.prizes h3 {
  margin: 0 0 6px;
  font: 600 17px/1.3 var(--font-heading);
  letter-spacing: -0.01em;
}
.criteria ul { margin: 0; padding: 0 0 0 18px; list-style: disc; color: var(--color-text-2); font-size: 14.5px; line-height: 1.55; }
.criteria ul li { padding-left: 2px; }
.criteria ul li + li { margin-top: 6px; }
.criteria ul li::marker { color: var(--tint); }
.criteria ul strong { font-weight: 600; color: var(--color-text); }

/* Same mint as the dates box in the signup card */
.prizes {
  display: grid;
  gap: 20px;
  margin-top: 14px;
  padding: 24px;
  border: 1px solid #c9ecd9;
  border-radius: 18px;
  background: #eef9f3;
}
@media (min-width: 760px) {
  .prizes { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; column-gap: 32px; }
}
.prizes-head { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 14px; }
.prizes-icon { color: #008551; }
.prizes-head p { margin: 0; color: var(--color-text-2); font-size: 14.5px; line-height: 1.55; }
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.podium li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #c9ecd9;
  border-radius: 14px;
  background: var(--color-surface);
}
.podium span {
  /* A muted green, a step off the grey body text and in key with the mint panel (4.9:1 on white) */
  color: #4f7a64;
  font: 500 12px/1.4 var(--font-heading);
  letter-spacing: -0.01em;
}
.podium strong { font: 500 30px/1.1 var(--font-heading); letter-spacing: -0.035em; }
.podium small { color: var(--color-text-2); font-size: 12.5px; line-height: 1.4; }
.podium small b { color: var(--color-text); font-weight: 600; }
/* The feedback prize spans the whole row under the podium */
.podium .feedback { grid-column: 1 / -1; }
.podium .first { border-color: #008551; background: #008551; }
.podium .first span,
.podium .first strong,
.podium .first small { color: #fff; }

/* Entrance: when the panel scrolls into view the head fades up and the prize tiles rise in turn,
   then a soft sheen sweeps across the 1st-place tile once. app.js adds .reveal (so it stays
   visible without JS) and then .in. Reduced-motion users get the global near-zero durations. */
.prizes.reveal .prizes-head,
.prizes.reveal .podium li { opacity: 0; transform: translateY(16px); }
.prizes.reveal.in .prizes-head,
.prizes.reveal.in .podium li {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.prizes.reveal.in .podium li:nth-child(1) { transition-delay: 0.15s; }
.prizes.reveal.in .podium li:nth-child(2) { transition-delay: 0.27s; }
.prizes.reveal.in .podium li:nth-child(3) { transition-delay: 0.39s; }
.prizes.reveal.in .podium li:nth-child(4) { transition-delay: 0.51s; }
.podium .first { position: relative; overflow: hidden; }
.podium .first::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.32) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
.prizes.reveal.in .podium .first::after { animation: prize-sheen 1.2s 0.9s ease-out forwards; }
@keyframes prize-sheen { to { transform: translateX(120%); } }

/* ---------- Footer ---------- */
.footer {
  /* Close enough under the window that scrolling to the bottom can't push the sticky team
     steps up under the nav */
  margin-top: 48px;
  padding: 28px 24px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 14px;
  text-align: center;
}
.footer p { margin: 0; }
.footer p + p { margin-top: 6px; }
/* A quiet pointer to sant.ai, kept out of the way of the signup button */
.footer .learn-more { color: var(--color-muted); text-decoration: underline; text-underline-offset: 3px; }
.footer .learn-more:hover { color: var(--color-text); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .stage { padding: 56px 16px 0; }
  .stage::before { left: 8px; right: 8px; bottom: 120px; border-radius: 24px; }
  .scene {
    left: 9px;
    right: 9px;
    bottom: 121px;
    border-radius: 23px;
  }
  /* Keep the pine and sun in frame */
  .scene-frame { --frame-x: 0.95; }
  .eyebrow { gap: 9px; min-height: 42px; margin-bottom: 22px; padding: 5px 14px 5px 5px; font-size: 14.5px; }
  .eyebrow-tag { height: 32px; padding: 0 12px; font-size: 13px; }
  .eyebrow-arrow { width: 14px; height: 14px; }
  .eyebrow-x { display: none; }
  .lede { column-gap: 12px; margin: 20px auto 40px; padding: 12px 16px 14px 12px; border-radius: 20px; }
  .lede-icon { width: 36px; height: 36px; padding: 6px; border-radius: 9px; }
  .window { margin-top: 40px; border-radius: 12px; }
  .card-head { gap: 14px; }
  .card-tile { width: 40px; height: 40px; }
  .card-tile svg { width: 20px; height: 20px; }
  .submit { padding: 10px 56px; }
  .judging { margin-top: 56px; padding: 0 16px; }
  .judging-head h2 { font-size: 26px; }
  .criteria > li, .prizes { padding: 20px; }
  .podium { gap: 8px; }
  .podium li { padding: 12px; }
  .podium span { font-size: 11px; }
  .podium strong { font-size: 24px; }
}

/* ---------- 404 ---------- */
.notfound { display: grid; place-items: center; padding-bottom: 24px; }
.notfound::before { bottom: 0; }
.notfound .scene { bottom: 1px; }
.notfound .hero { padding: 64px 0 72px; }
.notfound .lede { margin-bottom: 40px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
