:root {
  --background: #080b0d;
  --background-alt: #0d1215;
  --foreground: #f5f3eb;
  --muted: #141a1e;
  --muted-foreground: #9ba4a8;
  --accent: #ffc629;
  --accent-hot: #ff9d00;
  --accent-muted: rgba(255, 198, 41, .12);
  --border: rgba(255, 255, 255, .1);
  --border-hover: rgba(255, 198, 41, .48);
  --card: rgba(17, 23, 27, .82);
  --card-solid: #11171b;
  --ring: #ffc629;
}

html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  background:
    radial-gradient(circle at 8% 14%, rgba(255, 198, 41, .08), transparent 25rem),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px), #080b0d;
  background-size: auto, 64px 64px, 64px 64px, auto;
  color: var(--foreground);
}
body::before { background: rgba(255, 198, 41, .09); }
body::after { background: rgba(41, 184, 255, .045); }
::selection { background: var(--accent); color: #090b0d; }

header {
  position: sticky; top: 0; z-index: 100;
  max-width: none; min-height: 88px; padding: .8rem clamp(1rem, 4vw, 4.5rem);
  background: rgba(8, 11, 13, .78); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(140%);
}
.logo { display: inline-flex; flex: 0 0 auto; }
.logo img { height: 56px !important; width: auto; object-fit: contain; }
.site-nav { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); margin-left: auto; margin-right: 1.25rem; }
.site-nav a { color: #c2c8ca; font-size: .86rem; font-weight: 600; letter-spacing: .02em; }
.site-nav a:hover { color: var(--foreground); }
header .header-actions { gap: .55rem; }
header .header-actions .btn { min-height: 40px; padding: .55rem .9rem; font-size: .8rem; margin: 0; }
header .header-actions a:first-child { display: none; }

.btn { border-radius: 4px; text-transform: uppercase; letter-spacing: .055em; font-size: .82rem; }
.btn-primary, .btn-login {
  background: linear-gradient(135deg, #ffda4d, var(--accent)); color: #0a0d0f;
  box-shadow: 0 8px 28px rgba(255, 198, 41, .14);
}
.btn-primary:hover, .btn-login:hover { color: #050607; box-shadow: 0 10px 34px rgba(255, 198, 41, .3); }
.btn-secondary { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.035); margin-left: 0; }

main { overflow: hidden; }
#hero {
  min-height: calc(100vh - 88px); max-width: none; margin: 0; padding: clamp(5rem, 10vh, 8rem) clamp(1.25rem, 8vw, 8rem);
  display: flex; align-items: center; text-align: left;
  background:
    linear-gradient(90deg, rgba(8,11,13,.98) 0%, rgba(8,11,13,.88) 42%, rgba(8,11,13,.28) 78%, rgba(8,11,13,.54) 100%),
    linear-gradient(0deg, #080b0d 0%, transparent 28%), url('../images/Hero.jpg') 68% center/cover no-repeat;
  border-bottom: 1px solid var(--border);
}
#hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(255,255,255,.035) 25%); }
.hero-content { position: relative; z-index: 1; width: min(790px, 67vw); }
#hero .badge { margin-bottom: 2rem; background: rgba(8,11,13,.66); border-color: rgba(255,198,41,.48); color: #ffe489; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(255,198,41,.11); }
.hero-kicker { margin: 0 0 .55rem !important; color: var(--accent) !important; font: 600 .78rem/1 'JetBrains Mono', monospace !important; letter-spacing: .16em; text-transform: uppercase; }
#hero h1 { max-width: 800px; font-size: clamp(3.2rem, 7.2vw, 7rem); line-height: .91; letter-spacing: -.06em; margin-bottom: 1.7rem; }
#hero h1 em { display: block; color: var(--accent); font-style: normal; }
#hero .hero-lede { max-width: 660px; margin: 0 0 2.1rem; color: #c8cdcf; font-size: clamp(1rem, 1.5vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-actions .btn { min-height: 52px; padding: .85rem 1.4rem; margin: 0; }
.hero-proof { display: flex; gap: 0; margin-top: 3.5rem; color: #8d969a; font: 500 .7rem/1 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
.hero-proof span { padding: 0 1.5rem; border-left: 1px solid var(--border); }
.hero-proof span:first-child { padding-left: 0; border: 0; }
.hero-proof strong { color: var(--foreground); font: 700 1.3rem/1 'Space Grotesk', sans-serif; display: block; margin-bottom: .35rem; }
.hero-scroll { position: absolute; right: 2rem; bottom: 2rem; z-index: 2; color: #9aa1a4; font: 500 .67rem 'JetBrains Mono', monospace; letter-spacing: .1em; text-transform: uppercase; writing-mode: vertical-rl; }
.hero-scroll span { color: var(--accent); margin-top: .65rem; }

section { position: relative; padding: clamp(5rem, 10vw, 8rem) clamp(1rem, 4vw, 2rem); max-width: 1200px; }
section:nth-child(odd):not(#hero) { max-width: none; padding-left: max(calc((100vw - 1200px)/2), 1rem); padding-right: max(calc((100vw - 1200px)/2), 1rem); background: rgba(255,255,255,.018); border-block: 1px solid rgba(255,255,255,.04); }
h2.section-title { text-align: left; font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1; letter-spacing: -.05em; margin-bottom: 3rem; }
h2.section-title::before { content: 'PROTO-DASH / ' attr(data-label); display: block; color: var(--accent); font: 600 .68rem/1 'JetBrains Mono', monospace; letter-spacing: .16em; margin-bottom: 1rem; }
#why .section-title::before { content: '01 / WHY PROTO-DASH'; } #numbers .section-title::before { content: '02 / THE NUMBERS'; }
#how .section-title::before { content: '03 / THE SPRINT'; } #competitions-current .section-title::before { content: '04 / LIVE NOW'; }
#competitions-past .section-title::before { content: '05 / THE ARCHIVE'; } #rubric .section-title::before { content: '06 / WHAT WINS'; }
#faq .section-title::before { content: '07 / NEED TO KNOW'; } #gallery .section-title::before { content: '08 / BUILT HERE'; }
#sponsors .section-title::before { content: '09 / BACKED BY'; }

.why-grid { grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.why-card, .step, .timeline-item, .milestone, .portal-card, details, table, .competition-card, .card {
  border-radius: 3px !important; background: var(--card) !important; border-color: var(--border) !important; box-shadow: none !important;
}
.why-card { min-height: 180px; display: flex; flex-direction: column; justify-content: flex-end; border: 0; position: relative; }
.why-card::before { content: '0' counter(why); counter-increment: why; position: absolute; top: 1.2rem; left: 1.4rem; color: #626b6f; font: 500 .7rem 'JetBrains Mono', monospace; }
.why-grid { counter-reset: why; }
.why-card h3 { color: var(--foreground); font-size: 1.15rem; }
.why-card p, .step p { color: var(--muted-foreground); font-size: .9rem; }
.why-card:hover, .step:hover, .timeline-item:hover, .milestone:hover, details:hover { transform: translateY(-4px); border-color: var(--border-hover) !important; background: #151c20 !important; }

.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.numbers div { min-width: 0; text-align: left; background: #0d1215; padding: 2.5rem 1.5rem; color: #929a9d; font: 500 .72rem 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
.numbers div span { text-align: left; color: var(--foreground); font-size: clamp(1.25rem, 2.2vw, 1.8rem); line-height: 1.35; letter-spacing: -.02em; text-transform: none; margin-bottom: .75rem; }
.numbers div:last-child span { color: var(--accent); }
.numbers .number-duration span { display:flex; align-items:baseline; gap:.5rem; white-space:nowrap; }
.numbers .number-duration span strong { font:inherit; }
.numbers .number-duration span small { color:var(--accent); font:600 clamp(.8rem,1.4vw,1.05rem) 'JetBrains Mono',monospace; letter-spacing:.04em; text-transform:uppercase; }

.section-intro { max-width:720px; margin:-1.5rem 0 2.25rem; color:var(--muted-foreground); }
.steps { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1rem; }
.step { min-height: 240px; padding-top: 5.2rem; position: relative; }
.step::before { content: attr(data-step); position: absolute; top: 1.2rem; right: 1.2rem; color: rgba(255,198,41,.18); font: 700 3.5rem/1 'Space Grotesk', sans-serif; }
.step h3 { color: var(--accent); }
.competition-grid { gap: 1rem !important; }
.competition-card { padding: 1.6rem !important; }
.competition-empty { padding: 2rem; border: 1px dashed rgba(255,255,255,.18); background: rgba(255,255,255,.02); }
th { background: rgba(255,198,41,.08); color: var(--accent); font: 600 .72rem 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
td { color: #bec4c6; }
/* Keep wide rendered Markdown rubrics contained within their content panel. */
.markdown-block { min-width:0; max-width:100%; overflow-x:auto; }
.markdown-block :is(ul, ol) { margin:.65rem 0 1rem; padding-left:1.75rem; list-style-position:outside; }
.markdown-block li + li { margin-top:.3rem; }
/* Agreement content can be injected into its scrollbox after page load. Keep its
   list indentation independent of surrounding modal and form styles. */
.agreement-scrollbox :is(ul, ol),
.preview-faux-modal :is(ul, ol) { margin:.65rem 0 1rem; padding-left:1.75rem; list-style-position:outside; }
.agreement-scrollbox li + li,
.preview-faux-modal li + li { margin-top:.3rem; }
.markdown-block table { width:100%; max-width:100%; table-layout:fixed; }
.markdown-block th, .markdown-block td { min-width:0; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
details { padding: 1.25rem 1.4rem; }
summary { display: flex; justify-content: space-between; } summary::after { content: '+'; color: var(--accent); font-size: 1.2rem; } details[open] summary::after { content: '−'; }
.gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; align-items:stretch; }
.gallery-item { border-radius: 3px; aspect-ratio:4 / 3; min-width:0; overflow:hidden; transform:none; }
.gallery-item img { width:100%; height:100%; object-fit:cover; filter:saturate(.72) contrast(1.08); }
.gallery-item:nth-child(2n) { transform:none; }
.gallery-item:hover { transform:none !important; border-color:var(--accent); }
.sponsors { width:100%; justify-content:space-evenly; align-items:center; column-gap:clamp(1.5rem,5vw,5rem); row-gap:2rem; }
.sponsors a { padding: 1rem; background: #fff; border-radius: 6px; flex:1 1 170px; max-width:220px; min-height:110px; display:flex; align-items:center; justify-content:center; }
.sponsors img { display:block; width:auto; height:auto; max-width:180px; max-height:90px; object-fit:contain; filter:none; opacity:1; }

.modal { backdrop-filter: blur(14px); }
.modal-content { border-radius: 4px; background: rgba(13,18,21,.96); border-color: rgba(255,198,41,.28); }
footer { margin-top: 0; padding: 3rem 1rem; background: #060809; border-top-color: var(--border); }
footer::before { content: 'PROTO—DASH'; display: block; color: var(--foreground); font: 700 clamp(2rem, 7vw, 6rem)/1 'Space Grotesk', sans-serif; letter-spacing: -.06em; margin-bottom: 2rem; opacity: .07; }

@media (max-width: 1000px) {
  .site-nav { display: none; } header { flex-direction: row; align-items: center; }
  .why-grid { grid-template-columns: repeat(2, 1fr); } .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  header { min-height: 72px; padding: .6rem 1rem; } .logo img { height: 44px !important; }
  header .header-actions a { display: none; } header .header-actions .btn { min-height: 38px; }
  #hero { min-height: calc(100svh - 72px); padding: 4.5rem 1.15rem; background-position: 62% center; }
  .hero-content { width: 100%; } #hero h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .hero-proof { margin-top: 2.7rem; } .hero-proof span { padding: 0 .8rem; } .hero-scroll { display: none; }
  .why-grid, .numbers, .steps { grid-template-columns: 1fr; }
  .why-card { min-height: 0; padding: 1rem 1.25rem; justify-content: flex-start; } .why-card::before { display: none; } .why-card h3 { margin-bottom: .35rem; } .why-card p { margin: 0; } .step { min-height: 0; padding: 1.25rem 3.5rem 1.25rem 1.25rem; } .step::before { font-size: 2rem; } section { padding-block: 3rem; } h2.section-title { margin-bottom: 1.5rem; } .numbers div { padding: 1.25rem; } .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item img { height:100%; } .gallery-item:nth-child(2n) { transform:none; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Accessibility: preserve a strong keyboard focus indicator across custom controls. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--ring) !important;
  outline-offset: 3px;
}
.gallery-item { appearance: none; padding: 0; color: inherit; text-align: inherit; width: 100%; }
.lightbox-panel { position: relative; max-width: min(92vw, 1100px); max-height: 92vh; }
.lightbox-close { position: absolute; z-index: 2; top: .5rem; right: .5rem; min-width: 44px; min-height: 44px; border: 2px solid currentColor; border-radius: 50%; background: #080b0d; color: #fff; font-size: 1.75rem; cursor: pointer; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .gallery-item:nth-child(2n), .gallery-item:hover, .why-card:hover, .step:hover,
  .timeline-item:hover, .milestone:hover, details:hover { transform: none !important; }
}

@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr; }
  .modal-content, .agreement-modal-panel { width: calc(100vw - 1rem); max-height: calc(100svh - 1rem); overflow-y: auto; padding: 1rem; }
  .hero-proof { flex-direction: column; gap: 1rem; }
  .hero-proof span { padding: 0; border-left: 0; }
}

/* Public hints use an even reading weight rather than promotional emphasis. */
.competition-project-hint strong { font-weight: 400; }
.sponsors a:is(:hover, :focus-visible) img { filter: none; opacity: 1; transform: none; }
.policy-page h2 { font-size: 1.4rem; text-align: left; margin-bottom: .65rem; }
.policy-page p + p, .policy-page ul { margin-top: .85rem; }
.policy-page ul { padding-left: 1.5rem; }

.numbers h3 { color: var(--muted-foreground); font: 600 .85rem/1.5 Inter, sans-serif; letter-spacing: 0; text-transform: none; margin-bottom: .75rem; }
