/* Venturoo — shared site styles (every marketing page). Page-specific styles live in the page or in home.css.
 *
 * Brand: Cobalt + Ice Blue, the SAME palette as the app (lib/core/app_colors.dart). test/palette_parity_test.dart fails if the two drift.
 * Every colour below comes from these variables, so changing the look means changing them here and in app_colors.dart, nowhere else.
 */

:root {
  /* brand */
  --brand: #2457d6;            /* Primary Cobalt: actions, selected states, links */
  --brand-2: #4f8cff;          /* Secondary Blue: small highlights */
  --brand-deep: #2457d6;       /* brand-coloured TEXT on light backgrounds (6.2:1 on white) */
  --brand-btn: #2457d6;        /* filled buttons with white text (6.2:1) */
  --on-brand: #ffffff;         /* text on the brand colour */
  --brand-50: #eaf1ff;         /* Ice Blue: selected backgrounds, informational cards */
  --brand-100: #d6e4ff;
  --brand-200: #b0cbff;
  --brand-glow: rgba(36, 87, 214, .22);

  /* surfaces and text */
  --midnight: #0f172a;         /* Midnight Navy: dark sections */
  --midnight-2: #111827;
  --paper: #ffffff;
  --paper-2: #f8fafc;          /* app background */
  --paper-3: #f1f5f9;          /* secondary background */
  --ink: #0f172a;              /* primary text */
  --muted: #475569;            /* secondary text */
  --faint: #64748b;            /* muted text */
  --rule: #e2e8f0;             /* borders */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #dc2626;
  /* Community member card (the same warm orange as AppColors.member* in the app; palette_parity_test.dart checks they agree) */
  --member-accent: #db8324;
  --member-accent-light: #ffbb6b;
  --member-ink: #9a4f0c;
  --member-wave: #fddfc1;
  --member-tile: #fef1e7;
  --member-tint: #fff9f6;
  --member-border: #fbe3d3;
  --radius: 24px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .05);
  --shadow-2: 0 2px 4px rgba(15, 23, 42, .05), 0 24px 60px rgba(15, 23, 42, .10);

  /* type */
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: var(--sans);

  /* names older page CSS (events, support, privacy, challenges) still uses */
  --accent: var(--brand);
  --accent-text: var(--brand-deep);
  --accent-ink: var(--on-brand);
  --violet: var(--brand-deep);
  --lav: var(--brand-200);
  --serif: var(--display);
  --bg-body: var(--paper);
  --bg-card: var(--paper-2);
  --bg-card-hover: var(--paper-3);
  --bg-input: var(--paper);
  --bg-subtle: var(--paper-2);
  --bg-subtle-2: var(--paper-2);
  --border-card: var(--rule);
  --border-subtle: var(--rule);
  --border-input: #cbd5e1;
  --text-primary: var(--ink);
  --text-secondary: var(--muted);
  --text-muted: var(--muted);
  --text-faint: var(--faint);
  --btn-solid-bg: var(--ink);
  --btn-solid-text: var(--paper);
  --btn-ghost-border: var(--rule);
  --btn-ghost-text: var(--ink);
  --accent-muted: var(--brand-50);
  --accent-border: var(--brand-200);
  --shadow-card: none;
  --shadow-hover: none;
}
[data-theme="dark"] {
  --paper: #0b1220;
  --paper-2: #111827;
  --paper-3: #1e293b;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --faint: #94a3b8;
  --rule: #334155;
  --brand: #4f8cff;            /* the brand colour on dark surfaces */
  --brand-deep: #7fa8ff;       /* brand text on dark backgrounds (8:1) */
  --brand-50: #172b50;         /* selected backgrounds */
  --brand-100: #1e3a6b;
  --brand-200: #2b4f94;
  --brand-glow: rgba(79, 140, 255, .22);
  --midnight: #070d19;
  --midnight-2: #0b1220;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .5);
  --border-input: #475569;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.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; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* One wide frame for every page: header, content and footer share it. */
.wrap, .container, .header-container { max-width: 1240px; margin: 0 auto; padding-left: clamp(20px, 3vw, 40px); padding-right: clamp(20px, 3vw, 40px); }

h1, h2, h3, .serif { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }

/* ── Announcement line ── */
.promo-banner, .notice {
  background: var(--midnight); color: #fff;
  text-align: center; font-size: 13.5px; padding: 9px 20px; position: static; font-weight: 500; letter-spacing: .005em;
}
.promo-banner strong { font-weight: 600; }
.banner-break { display: none; }

/* ── Header (sticky) ── */
header {
  position: sticky; top: 0; z-index: 60;
  /* Opaque on purpose: a blurred, see-through sticky header (backdrop-filter) re-blurs the page under it on every scroll frame,
     which made scrolling stutter on laptops and phones. */
  background: var(--paper);
  border-bottom: 1px solid transparent; padding: 0;
  transition: border-color .2s, box-shadow .2s;
}
header.scrolled { border-bottom-color: var(--rule); box-shadow: 0 6px 24px rgba(15, 23, 42, .05); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo-section { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { width: 32px; height: 32px; border-radius: 8px; }
.logo-text { font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); }
.nav-tabs { display: flex; align-items: center; gap: 6px; }
.tab-btn {
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--muted);
  background: none; border: none; padding: 8px 13px; cursor: pointer; font-family: inherit; border-radius: 10px;
  transition: color .15s, background .15s;
}
.tab-btn:hover { color: var(--ink); background: var(--paper-3); }
.tab-btn.active { color: var(--ink); background: var(--paper-3); }
.nav-brand { display: flex; align-items: center; gap: 32px; min-width: 0; }
.nav-login {
  font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--ink);
  padding: 9px 16px; border-radius: 999px; margin-left: 8px;
}
.nav-login:hover, .nav-login.active { background: var(--paper-3); }
.nav-cta {
  font-size: 14.5px; font-weight: 600; text-decoration: none;
  background: var(--brand-btn); color: #fff; padding: 10px 20px; border-radius: 999px;
  box-shadow: 0 6px 18px var(--brand-glow); transition: transform .15s, box-shadow .15s, background .15s;
}
.nav-cta:hover { background: var(--brand); color: var(--on-brand); transform: translateY(-1px); box-shadow: 0 10px 26px var(--brand-glow); }
.theme-toggle {
  background: none; border: 1px solid var(--rule); color: var(--muted);
  font: 500 13px var(--sans); padding: 7px 12px; border-radius: 999px; cursor: pointer; width: auto; height: auto; margin-left: 6px;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle span { display: none !important; }
.theme-toggle::before { content: 'Dark'; }
[data-theme="dark"] .theme-toggle::before { content: 'Light'; }
.hamburger { display: none; background: none; border: none; cursor: pointer; min-width: 44px; min-height: 44px; padding: 8px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); transition: .2s; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons & links ── */
.btn, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand-btn); color: #fff;
  font: 600 16px var(--sans); text-decoration: none; line-height: 1.2;
  padding: 15px 28px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  box-shadow: 0 8px 24px var(--brand-glow);
  transition: background .15s, color .15s, transform .15s, box-shadow .15s;
}
.btn:hover, .btn-primary:hover { background: var(--brand); color: var(--on-brand); transform: translateY(-1px); box-shadow: 0 14px 32px var(--brand-glow); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--rule); box-shadow: none; }
.btn-line:hover { background: var(--paper-3); border-color: var(--ink); color: var(--ink); box-shadow: none; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { color: var(--brand-deep); }

/* ── Layout helpers ── */
.label {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--brand-deep); background: var(--brand-50); border: 1px solid var(--brand-100);
  padding: 5px 12px; border-radius: 999px;
}
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.6; color: var(--muted); max-width: 36em; }
.rule-section { padding: 56px 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.split > h2 { font-size: clamp(30px, 4vw, 48px); max-width: 14em; }

/* ── Footer ── */
footer { border-top: 1px solid var(--rule); margin-top: 40px; padding: 40px 0 48px; font-size: 14px; color: var(--muted); }
.footer-content { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: baseline; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--ink); }
.footer-links a:hover { color: var(--brand-deep); }

footer.site-footer { background: var(--midnight); color: #c7c7cf; border-top: 0; margin-top: 0; padding: 72px 0 36px; font-size: 14.5px; }
.site-footer .foot-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 40px; }
.site-footer .foot-brand p { margin: 14px 0 0; max-width: 24em; color: #a1a1aa; line-height: 1.6; }
.site-footer .logo-text { color: #fff; }
.site-footer h3 { font: 600 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: #c7c7cf; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.site-footer .foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); color: #8b8b95; font-size: 13.5px; }

/* ── Page hero for inner pages ── */
.page-head { padding: 72px 0 48px; }
.page-head h1 { font-size: clamp(38px, 6vw, 72px); max-width: 14em; margin: 14px 0 22px; }

@media (max-width: 980px) {
  .site-footer .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .wrap, .container, .header-container { padding-left: 20px; padding-right: 20px; }
  .hamburger { display: flex; }
  .nav-tabs {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: 0 24px 40px rgba(15, 23, 42, .12);
    padding: 8px 20px 20px;
  }
  .nav-tabs.active { display: flex; }
  .nav-tabs > * { padding: 13px 8px; }
  .nav-tabs .nav-cta { margin-top: 8px; text-align: center; padding: 14px 20px; }
  .nav-tabs .nav-login { text-align: center; margin: 8px 0 0; border: 1px solid var(--rule); }
  .theme-toggle { margin: 8px 0 0; align-self: flex-start; }
  .nav-brand { gap: 18px; }
  header { position: sticky; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .split .sticky { position: static; }
  .rule-section { padding: 44px 0; }
  .page-head { padding: 44px 0 32px; }
  .site-footer .foot-base { margin-top: 40px; }
}
@media (max-width: 520px) { .site-footer .foot-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
