/* Fremont Robotics Academy — styles
   Colors and sizes are tokens in :root. Change a token, not a component rule. */

:root {
  --navy: #0a1f38;
  --navy-2: #0f2d4c;
  --navy-3: #12395a;
  --teal: #087f83;
  --teal-soft: #e5f5f4;
  --mint: #61e0d5;
  --orange: #ff9a48;
  --orange-hover: #ff8a2e;
  --paper: #f4f8f9;
  --ink: #0f2438;
  --muted: #4a6175;
  --line: #dfe8ec;
  --white: #ffffff;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 31, 56, .06), 0 4px 14px rgba(10, 31, 56, .05);
  --shadow-md: 0 2px 4px rgba(10, 31, 56, .06), 0 16px 36px rgba(10, 31, 56, .10);
  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--white); color: var(--ink); font: 16px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; color: inherit; }
p { margin: 0 0 1em; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -10000px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--white); padding: 8px 14px; border-radius: 8px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.eyebrow { font: 700 12px/1.4 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.lead { max-width: 720px; color: var(--muted); font-size: 18px; margin: 0; }
.h-sm { font-size: 22px; margin-bottom: 18px; }

/* ---------- Buttons ---------- */
.button { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: 1px solid transparent; border-radius: 10px; background: var(--orange); color: var(--navy); font: 700 15px/1 var(--font-display); padding: 14px 22px; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.button:hover { background: var(--orange-hover); }
.button.small { font-size: 14px; padding: 10px 16px; }
.button.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.button.ghost:hover { border-color: var(--teal); color: var(--teal); }
.button.ghost-light { background: transparent; border-color: rgba(255, 255, 255, .35); color: var(--white); }
.button.ghost-light:hover { border-color: var(--mint); color: var(--mint); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; height: var(--header-h); display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter); background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; flex: none; }
.brand img { height: 54px; width: auto; display: block; }
#nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
#nav a { position: relative; padding: 8px 10px; border-radius: 8px; font: 600 14px/1 var(--font-display); text-decoration: none; color: var(--ink); white-space: nowrap; }
#nav a:hover { color: var(--teal); background: var(--teal-soft); }
#nav a.active { color: var(--teal); }
#nav a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -2px; height: 2px; border-radius: 2px; background: var(--teal); }
#nav a[data-mobile] { display: none; }
.header-actions { display: flex; gap: 10px; flex: none; }
.menu-button { display: none; margin-left: auto; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--white); background: radial-gradient(1100px 600px at 85% 30%, #17566a 0%, rgba(23, 86, 106, 0) 60%), linear-gradient(160deg, var(--navy-2) 0%, var(--navy) 70%); padding: clamp(56px, 8vw, 104px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero .eyebrow { color: var(--mint); }
.hero h1 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; margin: 18px 0 20px; }
.hero p { max-width: 540px; font-size: 19px; color: #d3e3ee; margin-bottom: 30px; }
.hero-photo { margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); outline: 1px solid rgba(255, 255, 255, .14); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }

/* ---------- Stats ---------- */
.stats { background: var(--navy-3); color: var(--white); padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { border-left: 1px solid rgba(255, 255, 255, .18); padding-left: 22px; }
.stat strong { display: block; font: 800 clamp(30px, 3.6vw, 48px)/1.1 var(--font-display); letter-spacing: -.02em; color: var(--mint); }
.stat span { font-size: 14px; color: #d3e3ee; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 7vw, 88px) 0; }
.section.muted { background: var(--paper); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; margin: 10px 0 14px; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.tile { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cfdde3; }
.tile-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 40%; display: block; }
.tile-logo { width: 100%; height: 190px; object-fit: contain; display: block; background: var(--white); padding: 18px; border-bottom: 1px solid var(--line); }
.icon-chip { display: inline-grid; place-items: center; width: 48px; height: 48px; margin: 26px 26px 0; border-radius: 12px; background: var(--teal-soft); color: var(--teal); }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tile-body { display: flex; flex-direction: column; flex: 1; padding: 20px 26px 24px; }
.tile.has-media .tile-body { padding-top: 22px; }
.tile-meta { font: 700 12px/1.4 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.tile h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.01em; font-weight: 700; margin-bottom: 8px; }
.tile p { color: var(--muted); font-size: 15.5px; }
.card-link { margin-top: auto; padding-top: 4px; font: 700 15px/1.4 var(--font-display); color: var(--teal); text-decoration: none; }
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Banners and call to action ---------- */
.banner { color: var(--white); background: radial-gradient(900px 400px at 90% 0%, #17566a 0%, rgba(23, 86, 106, 0) 60%), linear-gradient(160deg, var(--navy-2), var(--navy)); padding: clamp(48px, 7vw, 84px) 0; }
.banner .eyebrow { color: var(--mint); }
.banner h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; margin: 12px 0 16px; max-width: 900px; }
.banner p { max-width: 760px; color: #d3e3ee; font-size: 19px; margin: 0; }
.cta { color: var(--white); background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); padding: clamp(52px, 7vw, 80px) 0; }
.cta .eyebrow { color: var(--mint); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.02em; font-weight: 800; margin: 10px 0 12px; }
.cta p { color: #d3e3ee; font-size: 18px; max-width: 620px; margin: 0; }

/* ---------- Events ---------- */
.events-layout { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: start; }
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.event-item { display: flex; gap: 18px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--white); }
.event-item h3 { font-size: 17px; margin-bottom: 4px; }
.event-item p { margin: 0; color: var(--muted); font-size: 14.5px; }
.date-chip { flex: none; width: 64px; text-align: center; border-radius: 12px; background: var(--teal-soft); color: var(--teal); padding: 8px 0; }
.date-chip span { display: block; font: 700 12px/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .08em; }
.date-chip strong { display: block; font: 800 26px/1.1 var(--font-display); color: var(--ink); }
.calendar-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-head h3 { font-size: 19px; }
.cal-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.cal-btn:hover { border-color: var(--teal); color: var(--teal); }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow { font: 700 12px/1 var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: center; padding: 6px 0; }
.day { min-height: 74px; border-radius: 10px; background: var(--paper); padding: 7px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.day.blank { background: transparent; }
.day .num { font-weight: 600; color: var(--muted); }
.day.today { outline: 2px solid var(--teal); outline-offset: -2px; }
.day.event { background: var(--teal-soft); }
.day.event .num { color: var(--teal); }
.ev { font-size: 11.5px; line-height: 1.3; font-weight: 600; background: var(--teal); color: var(--white); border-radius: 6px; padding: 3px 6px; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; margin-bottom: 8px; }
.form-card, .info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow-sm); background: var(--white); }
.info-card { background: var(--paper); display: grid; gap: 22px; }
.info-row { display: flex; gap: 14px; align-items: flex-start; color: var(--teal); }
.info-row h3 { font-size: 16px; color: var(--ink); margin-bottom: 2px; }
.info-row p { color: var(--muted); margin: 0 0 4px; }
.info-row a { color: var(--teal); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.info-row a:hover { text-decoration: underline; }
.field { display: block; margin: 0 0 16px; font-weight: 600; font-size: 14.5px; }
.field input, .field textarea, .field select { display: block; width: 100%; margin-top: 6px; border: 1px solid #c9d7de; border-radius: var(--radius-sm); padding: 12px 14px; background: var(--white); font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 131, .15); outline: none; }
.field textarea { min-height: 140px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fine { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: #061526; color: #b8cbd7; padding: 56px 0 0; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 32px; }
.footer-brand img { width: 132px; height: auto; background: var(--white); border-radius: 10px; padding: 6px; display: block; margin-bottom: 14px; }
.footer-brand p { margin: 0 0 6px; max-width: 280px; }
.footer-brand .tagline { color: var(--mint); font-weight: 600; }
.site-footer h3 { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--white); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--mint); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; padding-bottom: 24px; font-size: 13.5px; color: #8ea5b4; }

/* ---------- Admin editor (admin.html shares this stylesheet) ---------- */
body > .banner, body > .section { padding-left: var(--gutter); padding-right: var(--gutter); }
details.tile { display: block; padding: 18px; margin-top: 14px; }
details.tile:hover { transform: none; }
details.tile .tile { display: block; padding: 18px; margin: 12px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .menu-button { display: block; }
  .header-actions { display: none; }
  #nav { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; padding: 16px var(--gutter) 32px; background: var(--white); overflow-y: auto; }
  #nav.open { display: flex; }
  #nav a { font-size: 17px; padding: 14px 12px; }
  #nav a.active::after { display: none; }
  #nav a.active { background: var(--teal-soft); }
  #nav a[data-mobile] { display: block; }
  #nav a[data-mobile]:last-child { margin-top: 10px; background: var(--orange); color: var(--navy); text-align: center; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 900px) {
  .hero-grid, .events-layout, .contact-layout { grid-template-columns: 1fr; }
  .hero-photo { aspect-ratio: 16 / 10; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  :root { --header-h: 66px; }
  .brand img { height: 44px; }
  .grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .day { min-height: 48px; padding: 4px; font-size: 11px; }
  .ev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero p, .banner p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .tile:hover { transform: none; }
}
