/* Open Technology Fund — redesign demonstration
   Royal Empire Multimedia LLC · light minimalist theme · single accent (OTF blue #2560B1)
   Type scale: h1 36 / h2 32 / h3 24, weight 700, tracking -.035em · buttons 16px · 2px/4px radii */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/montserrat-var.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/opensans-var.woff2") format("woff2"); }

:root {
  --bg: #06101f;
  --surface: #0c1a30;
  --ink: #eaf2ff;
  --muted: #9fb4d4;
  --line: #1b3358;
  --line-strong: #2a4d80;
  --accent: #4da3ff;
  --accent-hover: #7cc0ff;
  --accent-soft: #102745;
  --focus: #7cc0ff;
  --head: "Montserrat", Helvetica, Arial, sans-serif;
  --body: "Open Sans", Helvetica, Arial, sans-serif;
  --radius-btn: 2px;
  --radius-card: 4px;
  --max: 1160px;
  --gutter: 24px;
  --section: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
ul { padding-left: 1.2em; }

h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; letter-spacing: -.035em; line-height: 1.15; margin: 0 0 16px; color: var(--ink); }
h1 { font-size: 36px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; letter-spacing: -.02em; }
p { margin: 0 0 16px; }
.lede { font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 60ch; }
.eyebrow { font-family: var(--head); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.section-title { position: relative; padding-bottom: 14px; margin-bottom: 20px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; background: var(--accent); }
.section-title.center { text-align: center; }
.section-title.center::after { left: 50%; transform: translateX(-50%); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section.tight { padding: 64px 0; }
.section.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head p { margin: 0; color: var(--muted); max-width: 56ch; }
.grid { display: grid; gap: 24px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Skip link */
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--accent); color: #fff; padding: 12px 16px; border-radius: var(--radius-btn); z-index: 200; font-weight: 600; }
.skip-link:focus { top: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 16px; font-weight: 600; line-height: 1; padding: 14px 22px; border-radius: var(--radius-btn); border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.link-arrow { font-family: var(--head); font-weight: 600; font-size: 16px; text-decoration: none; }
.link-arrow::after { content: " \2192"; }
.link-arrow:hover { text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: #ffffff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a { font-family: var(--head); font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 10px 14px; border-radius: var(--radius-btn); position: relative; }
.nav a:hover { color: var(--accent); background: var(--accent-soft); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid transparent; background: transparent; border-radius: var(--radius-btn); cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn svg { width: 22px; height: 22px; }
.menu-toggle { display: none; }
.header-cta { padding: 12px 18px; }

/* Mobile nav panel */
.mobile-nav { display: none; }
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav { position: fixed; inset: 76px 0 0 0; background: var(--surface); z-index: 90; padding: 24px; overflow-y: auto; border-top: 1px solid var(--line); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 16px 4px; font-family: var(--head); font-size: 18px; font-weight: 600; color: var(--ink); text-decoration: none; }
.mobile-nav a:hover { color: var(--accent); }
.mobile-nav .btn { margin-top: 20px; width: 100%; justify-content: center; }

/* Search panel */
.search-panel { display: none; position: fixed; inset: 76px 0 auto 0; z-index: 95; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.08); }
.search-panel[data-open="true"] { display: block; }
.search-inner { max-width: 760px; margin: 0 auto; padding: 28px var(--gutter) 32px; }
.search-field { display: flex; gap: 8px; }
.search-field input { flex: 1; font: 17px var(--body); padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--surface); color: var(--ink); }
.search-field input:focus { border-color: var(--accent); }
.search-results { list-style: none; margin: 16px 0 0; padding: 0; }
.search-results li { border-top: 1px solid var(--line); }
.search-results a { display: block; padding: 12px 4px; text-decoration: none; color: var(--ink); }
.search-results a:hover { background: var(--accent-soft); }
.search-results .kind { font-family: var(--head); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); display: block; }
.search-results .empty { padding: 14px 4px; color: var(--muted); }
.search-hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f5f5f2 55%, #ebebe6 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; min-height: 560px; padding: 72px 0; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-bottom: 28px; }
.hero-art img { width: 100%; max-width: 560px; margin: 0 auto; }
.hero-note { margin-top: 28px; font-size: 15px; color: var(--muted); }
.hero-note a { color: var(--accent); }
.page-hero { background: radial-gradient(120% 100% at 50% 0%, #ffffff 0%, #f5f5f2 60%, #ebebe6 100%); border-bottom: 1px solid var(--line); }
.page-hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 56px 0; }
.page-hero-inner img { max-width: 380px; width: 100%; margin-left: auto; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 8px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 12px; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(37,96,177,.08); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); }
.card .card-foot { margin-top: auto; padding-top: 12px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
[data-finder="compact"] .card > p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-block; font-family: var(--head); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: var(--radius-btn); border: 1px solid var(--line-strong); color: var(--muted); background: var(--surface); }
.chip.open { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip.deadline { border-color: var(--ink); color: var(--ink); }
.chip.closed { color: var(--muted); }
.fact-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.fact-list li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; font-size: 15px; }
.fact-list dt, .fact-list .k { font-family: var(--head); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }

/* Finder / filters */
.filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; margin-bottom: 20px; }
.filters label { display: block; font-family: var(--head); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.filters input, .filters select { width: 100%; font: 16px var(--body); padding: 12px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--surface); color: var(--ink); min-height: 46px; }
.filters input:focus, .filters select:focus { border-color: var(--accent); }
.filters .btn { min-height: 46px; padding: 0 18px; }
.results-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.results-meta strong { color: var(--ink); }
.results-empty { background: var(--surface); border: 1px dashed var(--line-strong); padding: 40px; text-align: center; color: var(--muted); border-radius: var(--radius-card); }

/* Process steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; position: relative; }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--head); font-size: 32px; font-weight: 700; letter-spacing: -.035em; color: var(--accent); display: block; margin-bottom: 12px; }
.steps h3 { font-size: 20px; margin-bottom: 8px; }
.steps p { color: var(--muted); margin: 0; font-size: 16px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }
.stat .num { font-family: var(--head); font-size: 36px; font-weight: 700; letter-spacing: -.035em; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.stat p { margin: 0; color: var(--muted); font-size: 16px; }
.source-note { font-size: 14px; color: var(--muted); margin-top: 20px; }

/* Featured projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.project:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(37,96,177,.08); }
.project .mark { height: 120px; background: var(--accent); display: flex; align-items: flex-end; padding: 20px; color: #fff; font-family: var(--head); font-weight: 700; font-size: 28px; letter-spacing: -.035em; }
.project .body { padding: 20px; }
.project h3 { font-size: 20px; margin-bottom: 6px; }
.project p { margin: 0; color: var(--muted); font-size: 16px; }

/* News list */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-list li { border-bottom: 1px solid var(--line); }
.news-list a { display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: baseline; padding: 20px 8px; text-decoration: none; color: var(--ink); transition: background .18s ease; }
.news-list a:hover { background: var(--accent-soft); }
.news-list time { font-family: var(--head); font-size: 14px; font-weight: 600; color: var(--muted); }
.news-list .title { font-family: var(--head); font-weight: 600; font-size: 17px; }
.news-list .tag { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Report library */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.doc { display: grid; grid-template-columns: 88px 1fr auto; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px 20px; transition: border-color .18s ease; }
.doc:hover { border-color: var(--accent); }
.doc .year { font-family: var(--head); font-size: 24px; font-weight: 700; letter-spacing: -.035em; color: var(--accent); }
.doc .year small { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.doc h3 { font-size: 18px; margin: 0 0 4px; }
.doc p { margin: 0; color: var(--muted); font-size: 15px; }
.doc .doc-links { display: flex; gap: 14px; flex-wrap: wrap; }
.doc .doc-links a { font-family: var(--head); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.doc .doc-links a:hover { text-decoration: underline; }

/* Transparency preview */
.reports-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.report-tile { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; transition: border-color .18s ease, transform .18s ease; }
.report-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.report-tile .year { font-family: var(--head); font-size: 32px; font-weight: 700; letter-spacing: -.035em; color: var(--accent); line-height: 1; }
.report-tile .label { display: block; margin-top: 10px; font-family: var(--head); font-weight: 600; font-size: 15px; }
.report-tile .type { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }

/* Prose / statute */
.prose { max-width: 72ch; }
.prose h3 { margin-top: 32px; }
.prose blockquote { margin: 20px 0; padding: 16px 24px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--ink); font-size: 16px; }
.prose blockquote p:last-child { margin: 0; }
.prose cite { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); font-style: normal; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.key-facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }
.key-facts dl { margin: 0; display: grid; gap: 18px; }
.key-facts dt { font-family: var(--head); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.key-facts dd { margin: 4px 0 0; }
.key-facts dd strong { font-family: var(--head); font-size: 24px; font-weight: 700; letter-spacing: -.035em; color: var(--accent); display: block; }
details.acc { border-top: 1px solid var(--line); }
details.acc:last-of-type { border-bottom: 1px solid var(--line); }
details.acc summary { cursor: pointer; padding: 18px 4px; font-family: var(--head); font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; font-size: 22px; color: var(--accent); }
details.acc[open] summary::after { content: "\2212"; }
details.acc .acc-body { padding: 0 4px 20px; color: var(--muted); }
details.acc .acc-body p:last-child { margin: 0; }

/* Newsletter / CTA band */
.cta-band { background: var(--accent); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); }
.cta-band .btn-primary { background: #fff; color: var(--accent); border-color: #fff; }
.cta-band .btn-primary:hover { background: var(--accent-soft); color: var(--accent-hover); }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,.12); color: #fff; }
.cta-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 64px 0; }
.newsletter { display: flex; gap: 10px; }
.newsletter input { flex: 1; font: 16px var(--body); padding: 13px 14px; border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius-btn); background: rgba(255,255,255,.1); color: #fff; }
.newsletter input::placeholder { color: rgba(255,255,255,.7); }
.newsletter input:focus { outline-color: #fff; background: rgba(255,255,255,.18); }
.newsletter .btn { padding: 0 20px; }
.form-note { font-size: 14px; color: rgba(255,255,255,.8); margin: 10px 0 0; }
.form-status { font-family: var(--head); font-weight: 600; margin: 10px 0 0; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: 15px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer .pgp { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.footer-logo img { height: 36px; width: auto; margin-bottom: 16px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.footer-bottom ul { display: flex; gap: 20px; }
.social { display: flex; gap: 10px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); color: var(--ink); }
.social a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.social svg { width: 18px; height: 18px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .project, .report-tile, .btn { transition: none; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .grid.cols-4, .reports-preview { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .btn { grid-column: span 2; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; padding: 56px 0; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 420px; }
  .page-hero-inner { grid-template-columns: 1fr; }
  .page-hero-inner img { margin: 0; max-width: 300px; }
  .two-col, .cta-inner { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav, .header-cta, .menu-toggle { }
  .nav { display: none; }
  .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .grid.cols-3, .grid.cols-2, .projects, .stats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --section: 64px; --gutter: 20px; }
  body { font-size: 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
  .lede { font-size: 18px; }
  .header-inner { height: 68px; }
  .mobile-nav, .search-panel { inset-block-start: 68px; }
  .brand img { height: 34px; }
  .grid.cols-4, .reports-preview, .steps, .filters, .footer-grid { grid-template-columns: 1fr; }
  .filters .btn { grid-column: auto; }
  .news-list a { grid-template-columns: 1fr; gap: 6px; }
  .doc { grid-template-columns: 1fr; gap: 10px; }
  .doc .year { font-size: 20px; }
  .doc .year small { display: inline; margin-left: 8px; }
  .fact-list li { grid-template-columns: 1fr; gap: 2px; }
  .newsletter { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .btn-row .btn { width: auto; flex: 1 1 auto; }
  .card .card-foot .btn { width: auto; }
  .hero-inner { padding: 40px 0 48px; }
  .hero-art img { max-width: 300px; }
}
