/* RunDucks landing · A Obra.
   Cores e fontes do tema escuro do app (tri-app/constants/tokens.ts e obraMaterials.ts).
   Animações no padrão da landing do Ziggur: só transform, opacity e filter. */

:root {
  --bg: #1c1917;
  --bg-2: #221d19;
  --surface: #262119;
  --frame: #3a2e28;
  --text: #f5ead8;
  --muted: rgba(245, 234, 216, .72);
  --faint: rgba(245, 234, 216, .48);
  --line: rgba(245, 234, 216, .12);
  --accent: #e08a6b;
  --coral: #dd6d52;
  --success: #6fae82;
  --gold-top: #f7d77e;
  --gold-mid: #dba640;
  --gold-bottom: #a8741c;
  --swim: #3f93b4;
  --bike: #b5523b;
  --run: #8d918b;
  --transition: rgba(245, 234, 216, .35);
  --slot: rgba(245, 234, 216, .2);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --sans: Figtree, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 24px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* The fan spreads past the viewport: clip sideways without making a scroll container. */
  overflow-x: hidden;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .6); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-sm { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-lg { height: 56px; padding: 0 26px; font-size: 17px; }
.btn-light { background: var(--text); color: var(--bg); }
.btn-accent { background: var(--accent); color: var(--bg); }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1240px; margin: 0 auto; padding: 18px var(--gutter);
}
.brand { display: block; height: 32px; }
.brand img { height: 100%; width: auto; }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* Language picker: a <details> that also works without JS (js/i18n.js closes it on outside click / Esc). */
.lang { position: relative; z-index: 70; }
.lang summary {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 14px;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; list-style: none;
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--text);
  transition: border-color .2s ease, background-color .2s ease;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: rgba(245, 234, 216, .32); background: rgba(245, 234, 216, .05); }
.lang summary svg { flex: none; }
.lang-globe { width: 17px; height: 17px; color: var(--muted); }
.lang-chevron { width: 14px; height: 14px; color: var(--faint); transition: transform .2s ease; }
.lang[open] .lang-chevron { transform: rotate(180deg); }
.lang-list {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 184px; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .7);
}
.lang-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 12px;
  border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none;
}
.lang-list a:hover { background: rgba(245, 234, 216, .06); color: var(--text); }
.lang-list a[aria-current="page"] { color: var(--text); }
.lang-list a[aria-current="page"] .lang-code { color: var(--accent); }
.lang-code { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--faint); }

/* Reading progress */
.progress { position: fixed; inset: 0 0 auto; z-index: 60; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.no-js .progress { display: none; }

/* ---------- Load-time rise (CSS, as in Ziggur) ---------- */
.rise { animation: rise 1s var(--ease) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .3s; } .d4 { animation-delay: .42s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; max-width: 1240px; margin: 0 auto;
  padding: clamp(12px, 2.5vw, 36px) var(--gutter) clamp(48px, 6vw, 80px);
  display: grid; gap: clamp(20px, 3vw, 36px);
}
.hero::before {
  content: ""; position: absolute; inset: 10% 5% auto; height: 70%; pointer-events: none; z-index: -1;
  background: radial-gradient(50% 50% at 50% 60%, rgba(217, 119, 87, .22), transparent 70%);
}
.hero-title {
  text-align: center; margin: 0 auto; max-width: 20ch;
  font-size: clamp(44px, 5.2vw, 78px); line-height: .96; letter-spacing: -.035em;
}
.hero-title em { font-style: normal; color: var(--accent); }
.hero-copy { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.hero-sub { max-width: 46ch; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); }
.hero-sub b { color: var(--gold-top); font-weight: 600; }
.hero-note { font-size: 14px; color: var(--faint); }

.obra {
  display: grid; grid-template-columns: minmax(190px, 240px) minmax(380px, 660px) minmax(210px, 260px);
  justify-content: center; align-items: center; gap: clamp(20px, 3vw, 40px);
}
.monument { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.monument-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--faint); }
.monument-head strong { color: var(--text); font-weight: 600; }
.countdown { font-size: 17px; color: var(--muted); white-space: nowrap; }
.countdown .mono { color: var(--text); font-size: 22px; font-weight: 700; }

.stage { position: relative; aspect-ratio: 20 / 8; }
.no-js .stage { aspect-ratio: auto; display: flex; justify-content: center; }
/* Antes do JS montar as vagas, o palco já mostra a silhueta de Gizé (as mesmas vagas, desenhadas). */
.js .stage:not(.is-built) { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 80'%3E%3Cg fill='none' stroke='rgba(245,234,216,.2)' stroke-width='.35' stroke-dasharray='1 .7'%3E%3Crect x='60.75' y='0.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='50.75' y='8.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='60.75' y='8.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='70.75' y='8.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='40.75' y='16.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='50.75' y='16.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='60.75' y='16.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='70.75' y='16.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='80.75' y='16.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='30.75' y='24.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='40.75' y='24.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='50.75' y='24.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='60.75' y='24.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='70.75' y='24.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='80.75' y='24.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='90.75' y='24.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='160.75' y='24.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='20.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='30.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='40.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='50.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='60.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='70.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='80.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='90.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='100.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='150.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='160.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='170.75' y='32.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='10.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='20.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='30.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='40.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='50.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='60.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='70.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='80.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='90.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='100.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='110.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='140.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='150.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='160.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='170.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='180.75' y='40.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='0.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='10.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='20.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='30.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='40.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='50.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='60.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='70.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='80.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='90.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='100.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='110.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='120.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='140.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='150.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='160.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='170.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='180.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='190.75' y='48.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='0.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='10.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='20.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='30.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='40.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='50.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='60.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='70.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='80.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='90.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='100.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='110.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='120.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='130.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='140.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='150.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='160.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='170.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='180.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='190.75' y='56.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='0.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='10.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='20.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='30.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='40.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='50.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='60.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='70.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='80.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='90.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='100.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='110.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='120.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='130.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='140.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='150.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='160.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='170.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='180.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='190.75' y='64.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='0.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='10.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='20.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='30.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='40.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='50.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='60.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='70.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='80.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='90.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='100.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='110.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='120.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='130.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='140.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='150.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='160.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='170.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='180.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3Crect x='190.75' y='72.75' width='8.5' height='6.5' rx='.6'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.cell { position: absolute; padding: 1.5px; }
.slot { width: 100%; height: 100%; border: 1px dashed var(--slot); border-radius: 3px; }
.brick-face {
  display: block; position: relative; width: 100%; height: 100%; border-radius: 3px; background-color: var(--c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 0 rgba(0, 0, 0, .28);
  background-image:
    radial-gradient(circle at 24% 38%, rgba(0, 0, 0, .22) 0 7%, transparent 8%),
    radial-gradient(circle at 70% 66%, rgba(0, 0, 0, .18) 0 6%, transparent 7%),
    radial-gradient(circle at 55% 24%, rgba(255, 255, 255, .22) 0 5%, transparent 6%),
    linear-gradient(to bottom, rgba(255, 255, 255, .18), transparent 45%, rgba(0, 0, 0, .22));
}
.swim .brick-face, .brick-face.swim { outline: 1px solid rgba(238, 243, 244, .35); outline-offset: -1px; }
.run .brick-face, .brick-face.run { border-radius: 5px; }
.gold .brick-face, .brick-face.gold {
  background-color: var(--gold-mid);
  background-image: linear-gradient(to bottom, var(--gold-top), var(--gold-mid) 55%, var(--gold-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 16px rgba(247, 215, 126, .55);
}
.dust { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #d6c4a8; pointer-events: none; }
.spark { position: absolute; width: 22px; height: 22px; pointer-events: none; fill: #fff8e0; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: rgba(245, 234, 216, .55); animation: twinkle 3.6s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .2; } }
.ground { height: 1px; margin-top: -12px; background: linear-gradient(90deg, transparent, rgba(245, 234, 216, .28), transparent); }

.progress-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pct { display: flex; flex-direction: column; }
.pct .mono { font-size: clamp(40px, 4vw, 56px); font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.pct .mono small { font-size: .5em; color: var(--accent); }
.pct > span:last-child { font-size: 14px; color: var(--muted); margin-top: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: flex-end; font-size: 13px; color: var(--muted); max-width: 300px; }
.legend i, .split i, .plan-leg i { display: inline-block; flex: none; width: 14px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw-swim { background: var(--swim); }
.sw-bike { background: var(--bike); }
.sw-run { background: var(--run); }
.sw-gold { background: linear-gradient(var(--gold-top), var(--gold-bottom)); }
.sw-transition { background: var(--transition); }
.equation { font-size: 13px; color: var(--faint); text-align: center; letter-spacing: .02em; }
.equation b { color: var(--text); font-weight: 600; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.card-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); font-weight: 700; }
.feed { margin-top: 12px; }
.treino { display: flex; gap: 12px; align-items: center; }
.swatch { width: 38px; height: 30px; flex: none; }
.swatch .brick-face { border-radius: 6px; }
.treino-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.treino-meta { font-size: 13px; color: var(--muted); line-height: 1.35; }
.plus { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.2; background: rgba(245, 234, 216, .08); }
.chip-gold { background: var(--gold-mid); color: #2a1d08; }
.chip-delta { background: rgba(111, 174, 130, .14); color: var(--success); font-family: var(--mono); }
.source { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); margin-top: 12px; }
.source i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(111, 174, 130, .2); animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 6px rgba(111, 174, 130, 0); } }

.pred-card .race { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pred-card .total { font-size: clamp(34px, 3.2vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin-top: 10px; }
.goal { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin: 8px 0 14px; }
.goal .mono { color: var(--accent); }
.bar { display: flex; gap: 3px; height: 6px; border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.bar span { display: block; height: 100%; }
.splits { display: grid; gap: 6px; }
.split { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 4px 8px; margin: 0 -8px; border-radius: 8px; transition: background-color .5s; }
.split.flash { background: rgba(111, 174, 130, .14); }
.split > span:first-child { display: flex; align-items: center; color: var(--muted); }

@media (max-width: 960px) {
  .hero { display: flex; flex-direction: column; }
  .obra { display: contents; }
  .hero-title { order: 1; }
  .feed-card { order: 2; }
  .monument { order: 3; }
  .hero-copy { order: 4; }
  .pred-card { order: 5; }
  .feed-card, .monument, .pred-card { width: 100%; max-width: 560px; margin-inline: auto; }
  .legend { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .brand { height: 26px; }
  /* Room for "Descargar" next to the picker on 360 px phones. */
  .header-actions { gap: 8px; }
  .lang summary { gap: 5px; padding: 0 10px; }
  .lang-chevron { display: none; }
  .site-header .btn-sm { padding: 0 16px; gap: 6px; }
  .progress-row { flex-direction: column; align-items: flex-start; }
  .monument-head { flex-direction: column; gap: 2px; }
}

/* ---------- Phone frame (as Ziggur's PhoneFrame) ---------- */
.phone { aspect-ratio: 600 / 1304; padding: 6px; border-radius: 30px; background: var(--frame); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
.phone-md { width: clamp(180px, 15vw, 230px); padding: 7px; border-radius: 34px; }
.phone-md img { border-radius: 27px; }
.phone-sm { width: clamp(150px, 12vw, 190px); padding: 5px; border-radius: 28px; }
.phone-sm img { border-radius: 23px; }
.phone-noscript { width: 220px; }
.phone-fan { width: 100%; border-radius: 36px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); }
.phone-fan img { border-radius: 30px; }
.phone-center { padding: 7px; border-radius: 40px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8); }
.phone-center img { border-radius: 33px; }

/* ---------- Marquee ---------- */
.marquee { position: relative; z-index: 1; overflow: hidden; background: var(--accent); color: var(--bg); padding: 18px 0; }
.marq { display: flex; width: max-content; animation: marq 32s linear infinite; }
.marquee:hover .marq { animation-play-state: paused; }
.marq-row { display: flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap; font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.01em; }
.marq-row i { font-style: normal; font-size: .8em; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- Section heads ---------- */
.section-head { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; display: flex; flex-direction: column; gap: 16px; }
.section-head h2 { font-size: clamp(36px, 4.6vw, 62px); line-height: 1.02; }
.section-head p { font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); }

/* ---------- Fan (Ziggur HeroFan) ---------- */
.fan-section { padding: clamp(64px, 8vw, 110px) 0 0; overflow: hidden; overflow: clip; border-bottom: 1px solid var(--line); }
/* Desktop: the section fills the screen while pinned, phones rising from its bottom edge. */
@media (min-width: 768px) {
  .fan-section { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
  .fan-section .fan { margin-top: auto; }
}
.fan {
  --w: clamp(150px, 16vw, 240px);
  --wc: calc(var(--w) * 1.12);
  --hc: calc(var(--wc) * 1304 / 600);
  position: relative; width: 100%; max-width: 1300px; margin: clamp(20px, 3vw, 40px) auto 0;
  height: calc(var(--hc) * .62 + 24px);
  perspective: 1200px;
  /* Clip only the bottom edge: phones rise and spread freely above/sideways. */
  clip-path: inset(-100vh -100vw 0 -100vw);
}
.fan-group { position: absolute; inset: 0; }
.fan-slot { position: absolute; top: 24px; left: 50%; width: var(--w); margin-left: calc(var(--w) / -2); }
.fan-slot[data-pos="0"] { width: var(--wc); margin-left: calc(var(--wc) / -2); }
/* Layers, outside in: slot (CSS rise) > pose (GSAP phase 1) > open (GSAP phase 2) >
   float (breathing) > hit (hover/focus). Pose and open share the pivot below the phone.
   Resting pose for no JS / reduced motion; GSAP overrides it inline. */
.fan-slot[data-pos="-2"] > .fan-pose { transform: translate(calc(var(--w) * -1.45), 46px) rotate(-14deg); }
.fan-slot[data-pos="-1"] > .fan-pose { transform: translate(calc(var(--w) * -.75), 14px) rotate(-7deg); }
.fan-slot[data-pos="1"] > .fan-pose { transform: translate(calc(var(--w) * .75), 14px) rotate(7deg); }
.fan-slot[data-pos="2"] > .fan-pose { transform: translate(calc(var(--w) * 1.45), 46px) rotate(14deg); }
.fan-pose, .fan-open { transform-origin: 50% 135%; }
.fan-hit { position: relative; outline-offset: 6px; border-radius: 40px; }
.fan-glow { position: absolute; inset: 0; border-radius: 40px; box-shadow: 0 60px 110px -20px rgba(0, 0, 0, .9); opacity: 0; pointer-events: none; }
@media (max-width: 767px) {
  .fan { --w: 150px; --wc: 170px; }
  .fan-slot[data-pos="-2"], .fan-slot[data-pos="2"] { display: none; }
  .fan-slot[data-pos="-1"] > .fan-pose { transform: translate(calc(var(--w) * -.62), 18px) rotate(-9deg); }
  .fan-slot[data-pos="1"] > .fan-pose { transform: translate(calc(var(--w) * .62), 18px) rotate(9deg); }
}
/* The phones wait stacked and hidden until the section comes into view (fan.js adds .fan-in),
   then rise in CSS; GSAP opens them. GSAP never touches the slot itself. */
@media (prefers-reduced-motion: no-preference) {
  .js .fan .fan-slot > .fan-pose { transform: none; }
  .js .fan .fan-slot { opacity: 0; }
  .js .fan.fan-in .fan-slot { animation: fan-rise .5s cubic-bezier(.215, .61, .355, 1) .15s forwards; }
  .js .fan.fan-in .fan-slot[data-pos="0"] { animation-duration: .7s; animation-delay: 0s; }
}
@keyframes fan-rise {
  from { opacity: 0; translate: 0 160px; scale: .9; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

/* ---------- Features (Ziggur FeatureSection, compact) ---------- */
.feature { padding: clamp(36px, 4vw, 56px) var(--gutter); }
.feature-alt { background: var(--bg-2); }
.feature-inner {
  max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 28px clamp(40px, 6vw, 96px);
}
.feature-reverse .feature-inner { flex-direction: row-reverse; }
.feature-text { flex: 1 1 360px; max-width: 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.feature-text h2 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.04; }
.feature-text p { font-size: 18px; color: var(--muted); }
.feature-note { color: var(--gold-top) !important; font-weight: 600; font-size: 16px !important; }
.feature-media { flex: 1 1 280px; min-width: 0; display: flex; justify-content: center; }
.phones { position: relative; display: flex; }
.phones-pair { gap: clamp(14px, 1.6vw, 24px); }
.phone-offset { translate: 0 24px; }
.kicker { align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--bg); }
.kicker-gold { background: var(--gold-top); }
.kicker-accent { background: var(--accent); }
.kicker-coral { background: var(--coral); }
.kicker-green { background: var(--success); }
.kicker-blue { background: #6fb4cf; }
.kicker-light { background: var(--text); }
/* Atalhos do chat do treino, como no app */
.asks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.asks li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(245, 234, 216, .05); font-size: 14px; color: var(--text); }
.asks li:first-child { border-color: rgba(224, 138, 107, .45); background: rgba(224, 138, 107, .14); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 16px; color: var(--muted); }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 11px; border-radius: 2px; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }

/* Plano de prova card (no screenshot of this screen) */
.plan-card {
  width: min(340px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 20px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); display: flex; flex-direction: column; gap: 14px;
}
.plan-head { display: flex; flex-direction: column; gap: 2px; }
.plan-race { font-size: 13px; color: var(--muted); }
.plan-legs { display: grid; gap: 8px; }
.plan-leg { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; font-size: 14px; padding: 8px 10px; border-radius: 12px; background: rgba(245, 234, 216, .05); }
.plan-leg i { margin: 0; }
.plan-leg span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; }
.plan-leg small { font-weight: 400; color: var(--faint); font-size: 12px; }
.plan-leg .mono:nth-child(3) { color: var(--muted); font-size: 13px; }
.plan-leg .mono:last-child { font-weight: 700; }
.plan-sub { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.plan-fuel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 120px; }
.plan-fuel > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 12px; }
.fuel-bar { width: 100%; height: calc(64px * var(--v)); border-radius: 6px 6px 3px 3px; background: linear-gradient(var(--accent), var(--coral)); }
.plan-fuel small { color: var(--faint); font-size: 11px; }
.plan-b { font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(224, 138, 107, .45); }
.plan-b b { color: var(--accent); }
.plan-pdf { align-self: stretch; text-align: center; padding: 11px; border-radius: 999px; background: var(--accent); color: var(--bg); font-weight: 700; font-size: 14px; }

/* ---------- Mural ---------- */
.mural { padding: clamp(72px, 8vw, 120px) 0 clamp(48px, 6vw, 80px); }
.mural-grid {
  list-style: none; margin: clamp(32px, 4vw, 56px) auto 0; padding: 0 var(--gutter); max-width: 1100px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px);
}
.mural-grid li { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; font-size: 14px; color: var(--muted); }
/* Tallest mask is 16 rows: every art box has room for 16, monument sits on the bottom. */
.mural-art { position: relative; width: 100%; aspect-ratio: 20 / 12.8; border-bottom: 1px solid var(--line); contain: layout paint; }
.no-js .mural-art { display: none; }
.mural-art .grid { position: absolute; left: 0; right: 0; bottom: 0; }
.mslot, .mbrick { position: absolute; }
.mslot { border: 1px dashed var(--slot); border-radius: 2px; }
.mural-art .mbrick { border-radius: 2px; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .28); }
.mural-art .mbrick.gold { box-shadow: 0 0 8px rgba(247, 215, 126, .5); }
@media (max-width: 860px) { .mural-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .mural-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Steps ---------- */
.steps { padding: clamp(56px, 7vw, 100px) 0; background: var(--bg-2); }
.step-list {
  list-style: none; margin: clamp(28px, 4vw, 48px) auto 0; padding: 0 var(--gutter); max-width: 1100px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px);
}
.step-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.step-n { font-size: 14px; font-weight: 700; color: var(--accent); }
.step-list h3 { font-size: 22px; line-height: 1.15; }
.step-list p { color: var(--muted); font-size: 16px; }
@media (max-width: 860px) { .step-list { grid-template-columns: 1fr; max-width: 560px; } }

/* ---------- FAQ ---------- */
.faq { padding: clamp(64px, 8vw, 110px) 0; }
.faq-list { max-width: 780px; margin: clamp(28px, 4vw, 48px) auto 0; padding: 0 var(--gutter); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 0; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 600; font-size: clamp(18px, 1.8vw, 21px); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); font-family: var(--mono); transition: transform .3s var(--ease); }
.faq details[open] summary span { transform: rotate(45deg); }
.faq details p { padding: 0 48px 22px 0; color: var(--muted); }

/* ---------- Final ---------- */
.final {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center;
  padding: clamp(64px, 8vw, 110px) var(--gutter) clamp(48px, 6vw, 72px);
  background: radial-gradient(60% 50% at 50% 30%, rgba(217, 119, 87, .2), transparent 70%);
}
.final-mark { width: clamp(150px, 16vw, 200px); }
.final-mark svg { display: block; width: 100%; height: auto; overflow: visible; }
.final h2 { max-width: 14ch; font-size: clamp(40px, 5.4vw, 76px); line-height: 1.02; }
.final > p { font-size: 18px; color: var(--muted); }
.final-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer { max-width: 1240px; margin: 0 auto; padding: 32px var(--gutter) 40px; border-top: 1px solid var(--line); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-top p { margin-top: 10px; font-size: 14px; color: var(--faint); }
.footer-top nav { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; }
.footer-top nav a { text-decoration: none; color: var(--muted); }
.footer-top nav a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 28px; font-size: 13px; color: var(--faint); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rise, .marq, .star, .source i { animation: none; }
  .btn, .split, .faq summary span, .lang summary, .lang-chevron { transition: none; }
}
