@import url("app-ui.css");
/* Robotics Club — theme follows Seven Oaks Classical (navy + gold, classical serif),
   with a workshop/blueprint layer for the robotics side. */

:root {
  --navy: #141a43;
  --navy-2: #1d2560;
  --navy-3: #2a3478;
  --gold: #edbc67;
  --gold-soft: #f6dca9;
  --maroon: #7d1d2c;
  --maroon-2: #9e2536;

  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f1f2f6;
  --text: #141a43;
  --muted: #4a5464;
  --line: #e2e4ea;
  --accent: #8b1e2d;          /* maroon for links/kickers on light bg */
  --live: #d93a3f;
  --ok: #2f8f5b;

  --hero-bg: var(--navy);
  --hero-text: #ffffff;
  --btn2-bg: var(--maroon);
  --btn2-fg: #ffffff;
  --btn2-border: var(--maroon);
  --btn2-hover: var(--maroon-2);
  --grid: rgba(237, 188, 103, 0.10);

  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Pontano Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 26, 67, .06), 0 6px 20px rgba(20, 26, 67, .06);
}

:root[data-theme="dark"] {
  --bg: #0c1030;
  --surface: #141a43;
  --surface-2: #1b2254;
  --text: #eef0f8;
  --muted: #a9b0c7;
  --line: #283170;
  --accent: #edbc67;
  --hero-bg: #0a0d28;
  --shadow: none;
  --btn2-bg: var(--maroon);
  --btn2-border: var(--maroon-2);
  --btn2-hover: var(--maroon-2);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}
img, svg, iframe { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.mono, .kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.kicker { color: var(--accent); margin: 0 0 .6em; display: flex; align-items: center; gap: .5em; }
.kicker::before { content: ""; width: 18px; height: 2px; background: currentColor; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--gold); color: var(--navy); padding: 8px 12px; border-radius: 6px; }

/* ---------- Header + tab bar ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 3px solid var(--maroon); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; line-height: 1.1; }
.brand-sub { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--gold); text-transform: uppercase; }
.header-cta { flex: none; }
.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.theme-toggle {
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff;
}
.theme-toggle:hover { background: rgba(255,255,255,.1); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* Tab bar with dropdown menus.
   Desktop: menus open on hover or keyboard focus, or with the chevron button.
   Phone: the bar scrolls sideways; the chevron opens the menu as a full-width sheet. */
.tabs { margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav-item { position: relative; flex: none; display: flex; align-items: stretch; }
.nav-link {
  color: rgba(255,255,255,.78); text-decoration: none;
  padding: 10px 12px 12px; font-size: .95rem; border-bottom: 3px solid transparent;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.has-menu .nav-link { padding-right: 2px; }
.nav-link:hover { color: #fff; }
.nav-link[aria-current="page"] { color: #fff; border-bottom-color: var(--gold); }
.nav-toggle {
  background: none; border: 0; color: rgba(255,255,255,.6); cursor: pointer;
  padding: 0 8px 3px 4px; display: grid; place-items: center; border-bottom: 3px solid transparent;
}
.nav-toggle svg { width: 12px; height: 12px; transition: transform .15s; }
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { color: var(--gold); }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-toggle:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: 4px; }

.nav-menu {
  display: none; z-index: 60; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-top: 3px solid var(--maroon); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 18px 40px rgba(10, 13, 40, .25); padding: 8px;
}
.nav-menu a { display: grid; gap: 1px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.nav-menu a:hover, .nav-menu a:focus-visible { background: var(--surface-2); outline: none; }
.nav-menu strong { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; }
.nav-menu span { font-size: .85rem; color: var(--muted); }
.nav-item.open .nav-menu { display: block; }

/* Small phones: the bar can scroll, so menus open as a full-width sheet under the header. */
@media (max-width: 599px) {
  .nav-menu { position: fixed; left: 0; right: 0; top: var(--header-h, 120px); border-radius: 0; max-height: 70vh; overflow-y: auto; }
}
/* Everything wider: menus hang below their tab. */
@media (min-width: 600px) {
  .tabs { overflow: visible; }
  .nav-menu { position: absolute; top: 100%; left: 0; min-width: 270px; }
  .nav-menu-end { left: auto; right: 0; }
}
/* Mouse or trackpad: hovering the tab opens its menu (no need to click the arrow). */
@media (hover: hover) {
  .has-menu:hover .nav-menu, .has-menu:focus-within .nav-menu { display: block; }
  .has-menu:hover .nav-toggle svg { transform: rotate(180deg); }
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(217,58,63,.6); animation: pulse 1.6s infinite; display: none; }
.is-live .live-dot { display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(217,58,63,0); } 100% { box-shadow: 0 0 0 0 rgba(217,58,63,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: 600 .95rem/1 var(--sans); padding: 13px 20px; border-radius: 8px; border: 1px solid transparent;
  background: var(--gold); color: var(--navy);
}
.btn:hover { background: var(--gold-soft); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn.small { padding: 9px 14px; font-size: .85rem; }
.btn.dark { background: var(--btn2-bg); color: var(--btn2-fg); border-color: var(--btn2-border); }
.btn.dark:hover { background: var(--btn2-hover); }
a.btn[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }

.copy-email {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin-left: 10px;
  font: 600 .8rem/1 var(--sans); padding: 7px 10px; border-radius: 6px; cursor: pointer;
  background: transparent; color: inherit; border: 1px solid currentColor; opacity: .8;
}
.copy-email:hover { opacity: 1; }
.copy-email:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.copy-email svg { width: 14px; height: 14px; }
.copy-email.copied { color: var(--ok); opacity: 1; }
.site-footer .copy-email.copied { color: var(--gold); }
.btn + .copy-email { padding: 11px 14px; margin-top: 8px; }

/* ---------- Hero (blueprint) ---------- */
.hero, .page-hero {
  background-color: var(--hero-bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--hero-text);
}
.hero { padding: 56px 0 64px; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; right: -80px; top: 0; bottom: 0; width: 38%; background: linear-gradient(180deg, rgba(125,29,44,.55), rgba(125,29,44,.15)); clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
@media (max-width: 899px) { .hero::after { width: 60%; opacity: .6; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } .hero { padding: 80px 0 88px; } }
.hero h1 { color: #fff; }
.hero h1 em { color: var(--gold); font-style: italic; }
.hero .lede { font-size: 1.15rem; max-width: 34em; color: rgba(255,255,255,.88); margin-bottom: 28px; }
.hero .kicker { color: var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.page-hero { padding: 44px 0 40px; box-shadow: inset 6px 0 0 var(--maroon); }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 40em; margin: 12px 0 0; font-size: 1.08rem; }
.page-hero .kicker { color: var(--gold); }

/* Console panel in the hero */
.console {
  background: rgba(10, 13, 40, .72); border: 1px solid rgba(237,188,103,.35);
  border-radius: var(--radius); padding: 20px; font-family: var(--mono); font-size: .85rem;
  backdrop-filter: blur(4px);
}
.console-head { display: flex; justify-content: space-between; color: var(--gold); letter-spacing: .1em; font-size: .72rem; margin-bottom: 14px; }
.console-head span:last-child { color: rgba(255,255,255,.5); }
.console dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.console dt { color: rgba(255,255,255,.55); text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; padding-top: 2px; }
.console dd { margin: 0; color: #fff; }
.console .robot { width: 100%; max-width: 260px; margin: 0 auto 16px; color: var(--gold); }

/* ---------- Sections ---------- */
section.block { padding: 56px 0; }
section.block.alt { background: var(--surface-2); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; }

/* ---------- Dashboard tiles ---------- */
.dash { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: -36px; position: relative; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.tile-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile-value { font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.tile-note { color: var(--muted); font-size: .92rem; margin: 0; }
.tile .btn { align-self: flex-start; margin-top: auto; }
.badge { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.badge.live { background: var(--live); color: #fff; }
.badge.ok { background: rgba(47,143,91,.14); color: var(--ok); }

.meter { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--maroon), var(--maroon-2) 60%, var(--gold)); border-radius: 999px; transition: width .8s ease; }

.countdown { display: flex; gap: 14px; font-family: var(--mono); }
.countdown div { text-align: center; }
.countdown b { display: block; font-size: 1.6rem; font-weight: 500; font-family: var(--serif); }
.countdown small { color: var(--muted); font-size: .66rem; letter-spacing: .08em; }

/* ---------- Feature cards (Rose-Hulman style) ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card-art { border-bottom: 4px solid var(--maroon); }
.card-art { aspect-ratio: 16 / 9; background: var(--navy); color: var(--gold); display: grid; place-items: center;
  background-image: linear-gradient(rgba(237,188,103,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(237,188,103,.12) 1px, transparent 1px);
  background-size: 20px 20px; }
.card-art svg { width: 38%; height: auto; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body p { color: var(--muted); margin: 0; }
.card-body a { margin-top: auto; padding-top: 8px; font-weight: 600; text-decoration: none; }

/* ---------- Updates list ---------- */
.updates { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.updates li { background: var(--surface); padding: 18px 20px; display: grid; gap: 4px; }
@media (min-width: 720px) { .updates li { grid-template-columns: 130px 1fr; gap: 20px; } }
.updates time { font-family: var(--mono); font-size: .78rem; color: var(--muted); padding-top: 4px; }
.updates h3 { margin: 0 0 4px; font-size: 1.15rem; }
.updates p { margin: 0; color: var(--muted); }

/* ---------- Watch page ---------- */
.player-shell { background: #05071a; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.player { position: relative; aspect-ratio: 16 / 9; background: #05071a; color: #fff; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-idle { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  background-image: linear-gradient(rgba(237,188,103,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(237,188,103,.08) 1px, transparent 1px);
  background-size: 28px 28px; }
.player-idle h2 { color: #fff; margin-bottom: 8px; }
.player-idle p { color: rgba(255,255,255,.75); margin: 0 0 16px; }
.player-idle .mono { color: var(--gold); margin-bottom: 10px; display: block; }
.player-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--navy); color: #fff; }
.player-bar strong { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; }

.watch-layout { display: grid; gap: 28px; }
@media (min-width: 960px) { .watch-layout { grid-template-columns: 1fr 320px; } }
.playlist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.playlist li + li { border-top: 1px solid var(--line); }
.playlist button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; padding: 14px 16px; display: grid; gap: 2px; }
.playlist button:hover, .playlist button:focus-visible { background: var(--surface-2); }
.playlist button[aria-current="true"] { box-shadow: inset 3px 0 0 var(--gold); background: var(--surface-2); }
.playlist .t { font-weight: 600; }
.playlist .d { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.empty { padding: 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }

/* ---------- Events ---------- */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.event { display: grid; grid-template-columns: 74px 1fr; gap: 18px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.date-chip { background: var(--maroon); color: #fff; border-radius: 10px; text-align: center; padding: 8px 4px; font-family: var(--mono); }
.date-chip .m { display: block; font-size: .7rem; color: var(--gold); letter-spacing: .1em; }
.date-chip .dd { display: block; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.date-chip.tba .dd { font-size: 1rem; padding: 6px 0; }
.event h3 { margin: 0 0 4px; }
.event p { margin: 0; color: var(--muted); }
.event .badge { margin-left: 8px; vertical-align: middle; }

/* ---------- Two-column prose ---------- */
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }
.values { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); list-style: none; margin: 0; padding: 0; }
.values li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.values b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; display: block; }
.values span { color: var(--muted); font-size: .9rem; }

.tiers { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; border-top: 4px solid var(--maroon); }
.tier:nth-child(2) { border-top-color: var(--gold); }
.tier .amt { font-family: var(--serif); font-size: 1.8rem; }
.tier p { color: var(--muted); margin: 6px 0 0; }
.sponsor-wall { display: flex; flex-wrap: wrap; gap: 12px; }
.sponsor-wall span { padding: 12px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-family: var(--serif); }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 40px 0; margin-top: 56px; font-size: .95rem; border-top: 4px solid var(--maroon); }
.site-footer a { color: var(--gold); }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer ul a { color: rgba(255,255,255,.8); text-decoration: none; }
.site-footer ul a:hover { color: var(--gold); }
.fine { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: rgba(255,255,255,.5); }

.prose { max-width: 42em; }
.lead-text { font-size: 1.12rem; }

/* ---------- Donor documents ---------- */
.doc-list { list-style: none; margin: 20px 0 16px; padding: 0; display: grid; gap: 12px; }
.doc {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
}
.doc:hover { border-color: var(--maroon); }
.doc:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.doc-step { width: 44px; height: 44px; border-radius: 10px; background: var(--maroon); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 1.3rem; }
.doc-text { display: grid; gap: 2px; min-width: 0; }
.doc-text strong { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.doc-text span { color: var(--muted); font-size: .93rem; }
.doc-meta { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
@media (max-width: 560px) { .doc { grid-template-columns: 44px 1fr; } .doc-meta { grid-column: 2; } }
