
/* ============================================================
   Quayside Cambridge — Shared Stylesheet
   Art direction: historic river-trade quarter, present-day punting hub
   Palette: deep slate-river blue (primary) + warm brass accent, cool stone neutrals
   Typography: Erode (serif, display) for headings — inspired by old shipping ledgers
               Switzer (sans, body) — clean, contemporary, highly legible
   Density: editorial, generous vertical rhythm
   ============================================================ */

:root, [data-theme="light"] {
  --color-bg: #f4f5f3;
  --color-surface: #ffffff;
  --color-surface-2: #fbfbfa;
  --color-surface-offset: #eceeec;
  --color-surface-offset-2: #e2e5e2;
  --color-surface-dynamic: #d6dad6;
  --color-divider: #dde0dd;
  --color-border: #cfd3cf;

  --color-text: #1c2422;
  --color-text-muted: #5c6663;
  --color-text-faint: #97a09c;
  --color-text-inverse: #f4f5f3;

  --color-primary: #23415c;
  --color-primary-hover: #1a3147;
  --color-primary-active: #12222f;
  --color-primary-highlight: #d9e1e8;

  --color-brass: #a97a2f;
  --color-brass-hover: #8a6224;
  --color-brass-highlight: #ecdfc4;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 220 / 0.08);
  --shadow-md: 0 4px 14px oklch(0.2 0.02 220 / 0.10);
  --shadow-lg: 0 18px 44px oklch(0.2 0.02 220 / 0.16);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1180px;

  --font-display: 'Erode', Georgia, serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
}

[data-theme="dark"] {
  --color-bg: #101412;
  --color-surface: #161b19;
  --color-surface-2: #191f1c;
  --color-surface-offset: #1c2220;
  --color-surface-offset-2: #212824;
  --color-surface-dynamic: #2a322e;
  --color-divider: #232a27;
  --color-border: #313a35;
  --color-text: #e4e8e5;
  --color-text-muted: #97a09c;
  --color-text-faint: #5c6663;
  --color-text-inverse: #14201c;
  --color-primary: #7fa3c2;
  --color-primary-hover: #9cb9d2;
  --color-primary-active: #628aae;
  --color-primary-highlight: #232f3a;
  --color-brass: #d6a457;
  --color-brass-hover: #e3b877;
  --color-brass-highlight: #3a3120;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 18px 44px oklch(0 0 0 / 0.5);
}

:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-hero: clamp(2.75rem, 1rem + 5vw, 5.25rem);
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-20);
}
body {
  min-height: 100dvh;
  line-height: 1.65;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
}
img, svg.illustration { display: block; max-width: 100%; height: auto; }
ul[role="list"] { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; line-height: 1.15; font-weight: 600; }
p, li, figcaption { text-wrap: pretty; max-width: 70ch; }
::selection { background: oklch(from var(--color-primary) l c h / 0.22); }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: var(--radius-sm); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--color-primary); color: var(--color-text-inverse); padding: var(--space-3) var(--space-5); z-index: 100; border-radius: var(--radius-md); }
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

.container { max-width: var(--content-default); margin-inline: auto; padding-inline: var(--space-5); }
.container-wide { max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-5); }
.container-narrow { max-width: var(--content-narrow); margin-inline: auto; padding-inline: var(--space-5); }

/* Header */
header.site { position: sticky; top: 0; z-index: 50; background: oklch(from var(--color-bg) l c h / 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08); }
.nav-row { display: flex; align-items: center; justify-content: space-between; padding-block: var(--space-4); gap: var(--space-4); }
.logo { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; color: var(--color-text); flex-shrink: 0; }
.logo svg { color: var(--color-primary); flex-shrink: 0; }
nav.links { display: flex; gap: var(--space-6); align-items: center; }
nav.links a { color: var(--color-text-muted); font-size: var(--text-sm); font-weight: 500; padding-block: var(--space-2); }
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--color-primary); text-decoration: none; }
nav.links a[aria-current="page"] { border-bottom: 2px solid var(--color-primary); }
.theme-toggle { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); color: var(--color-text-muted); transition: background var(--transition-interactive), color var(--transition-interactive); flex-shrink: 0; }
.theme-toggle:hover { background: var(--color-surface-offset); color: var(--color-text); }
.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--color-text); flex-shrink: 0; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: var(--space-16) var(--space-12); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-12); align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-brass); font-weight: 600; margin-bottom: var(--space-4); }
.hero h1 { font-size: var(--text-2xl); margin-bottom: var(--space-5); color: var(--color-text); }
.hero p.lede { font-size: var(--text-lg); color: var(--color-text-muted); font-weight: 400; margin-bottom: var(--space-8); max-width: 52ch; }
.hero-cta { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.hero-illustration-wrap { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-active) 100%); }

.page-hero { padding-block: var(--space-12) var(--space-10); border-bottom: 1px solid var(--color-divider); }
.page-hero h1 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.page-hero p.lede { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 60ch; }

.btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-6); border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 600; transition: background var(--transition-interactive), color var(--transition-interactive), box-shadow var(--transition-interactive); min-height: 44px; }
.btn-primary { background: var(--color-primary); color: var(--color-text-inverse); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-primary-hover); text-decoration: none; box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-ghost:hover { background: var(--color-surface-offset); text-decoration: none; }

section { padding-block: clamp(var(--space-12), 6vw, var(--space-20)); }
.section-label { font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary); font-weight: 600; margin-bottom: var(--space-3); }
.section-title { font-size: var(--text-xl); margin-bottom: var(--space-5); color: var(--color-text); }
.section-title.narrow { max-width: 36ch; }
.divider { height: 1px; background: var(--color-divider); border: none; }
.surface-section { background: var(--color-surface); }

/* Timeline */
.timeline { position: relative; padding-left: var(--space-8); border-left: 1px solid var(--color-divider); }
.timeline-item { position: relative; padding-bottom: var(--space-8); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: calc(-1 * var(--space-8) - 5px); top: 0.4em; width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--color-primary); border: 2px solid var(--color-bg); }
.timeline-year { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-primary); margin-bottom: var(--space-1); }
.timeline-item p { color: var(--color-text-muted); }

.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: start; }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-surface); box-shadow: var(--shadow-sm); }
table { font-size: var(--text-sm); }
th, td { text-align: left; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-divider); }
th { font-family: var(--font-display); font-weight: 600; color: var(--color-text); background: var(--color-surface-offset); font-size: var(--text-base); }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }
td strong { color: var(--color-text); font-weight: 600; }

.info-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-6); }
.info-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.info-card h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); color: var(--color-text); }
.info-card p { color: var(--color-text-muted); font-size: var(--text-sm); }
.info-card.accent { background: var(--color-primary-highlight); border-color: transparent; }
.stat-row { display: flex; gap: var(--space-8); margin-top: var(--space-5); flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-primary); }
.stat-label { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.operators-panel { background: var(--color-surface-offset); border-radius: var(--radius-xl); padding: var(--space-8); }
.operators-list { display: grid; grid-template-columns: 1fr; gap: var(--space-3); margin-top: var(--space-5); }
.operators-list li { display: flex; align-items: baseline; gap: var(--space-3); padding-block: var(--space-2); border-bottom: 1px solid var(--color-divider); font-size: var(--text-sm); color: var(--color-text-muted); }
.operators-list li:last-child { border-bottom: none; }
.operators-list li span.tag { font-size: var(--text-xs); color: var(--color-brass); font-weight: 600; flex-shrink: 0; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--color-divider); }
.faq-item:first-child { border-top: 1px solid var(--color-divider); }
.faq-q { display: flex; justify-content: space-between; align-items: center; width: 100%; padding-block: var(--space-5); text-align: left; font-family: var(--font-display); font-size: var(--text-base); font-weight: 600; color: var(--color-text); gap: var(--space-4); }
.faq-q svg { flex-shrink: 0; transition: transform var(--transition-interactive); color: var(--color-text-muted); }
.faq-item[data-open="true"] .faq-q svg { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 260ms cubic-bezier(0.16,1,0.3,1); }
.faq-item[data-open="true"] .faq-a { max-height: 400px; }
.faq-a p { padding-bottom: var(--space-5); color: var(--color-text-muted); font-size: var(--text-sm); }

.practical-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.practical-item { padding: var(--space-5); border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--color-border); }
.practical-item svg { color: var(--color-primary); margin-bottom: var(--space-3); }
.practical-item h4 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); margin-bottom: var(--space-2); color: var(--color-text); }
.practical-item p { font-size: var(--text-xs); color: var(--color-text-muted); }

.cta-band { background: var(--color-primary); border-radius: var(--radius-xl); padding: var(--space-12); color: var(--color-text-inverse); display: flex; justify-content: space-between; align-items: center; gap: var(--space-8); flex-wrap: wrap; }
.cta-band h2 { color: var(--color-text-inverse); font-size: var(--text-xl); margin-bottom: var(--space-2); }
.cta-band p { color: oklch(from var(--color-text-inverse) l c h / 0.8); max-width: 44ch; }
.cta-band .btn-primary { background: var(--color-text-inverse); color: var(--color-primary); }
.cta-band .btn-primary:hover { background: oklch(from var(--color-text-inverse) l c h / 0.9); }

.card-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.simple-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.simple-card h3 { font-size: var(--text-base); margin-bottom: var(--space-2); }
.simple-card p { font-size: var(--text-sm); color: var(--color-text-muted); }

footer.site { border-top: 1px solid var(--color-divider); padding-block: var(--space-12); margin-top: var(--space-12); }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
footer.site p { color: var(--color-text-faint); font-size: var(--text-xs); }
.footer-links { display: flex; gap: var(--space-5); }
.footer-links a { color: var(--color-text-muted); font-size: var(--text-xs); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-illustration-wrap { order: -1; }
  .feature-split { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; }
  .practical-grid { grid-template-columns: 1fr; }
  .card-row { grid-template-columns: 1fr; }
  nav.links { display: none; }
  nav.links.mobile-open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-bg); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-divider); }
  .nav-toggle { display: flex; }
  .cta-band { flex-direction: column; text-align: center; }
  .cta-band p { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
</content>
