/* ==========================================================================
   Home page (and shared chrome). Dark, cover-styled. Fonts from fonts.css.
   ========================================================================== */
:root{
  --ground-1:#3b3a3c; --ground-2:#0c0c0d;
  --ink:#e9e7e3; --muted:#9d9b98; --line:#39383a;
  --panel:#191919; --panel-2:#212123; --accent:#7fb8d4;
  --gov:#2f88ad; --con:#b9683c; --ver:#3aa564; --ops:#c0474d; /* lightened Function hues for dark bg */
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:'Lato',system-ui,sans-serif; color:var(--ink); line-height:1.55;
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(255,255,255,.05), transparent 62%),
    linear-gradient(180deg,var(--ground-1) 0%, var(--ground-2) 40%, #000 100%);
  background-attachment:fixed; min-height:100vh;
}
a{ color:var(--accent); text-decoration:none; } a:hover{ text-decoration:underline; }
h1,h2,h3{ font-family:'Lora',serif; font-weight:700; }

/* header / footer (shared with guide pages) */
.site-header{ position:sticky; top:0; z-index:40; display:flex; align-items:center;
  justify-content:space-between; gap:16px; height:52px; padding:0 22px; box-sizing:border-box;
  background:rgba(12,12,13,.82); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
.brand{ display:flex; align-items:center; gap:11px; }
.logo2x2{ display:grid; grid-template-columns:1fr 1fr; gap:2px; width:34px; flex:none; }
.logo2x2 img{ width:100%; display:block; }
.brand .mark{ font-family:'Lora',serif; font-size:20px; color:#fff; font-weight:700; }
.brand .sub{ font-size:11px; color:var(--muted); letter-spacing:.14em; text-transform:uppercase; }
.brand .brandfull{ font-family:'Lato',sans-serif; font-size:14px; font-weight:700;
  letter-spacing:.14em; text-transform:uppercase; color:#fff; line-height:1.15; white-space:nowrap; }
.site-nav a{ color:var(--ink); font-size:13px; margin-left:20px; letter-spacing:.03em; }
.site-nav a:hover{ color:#fff; text-decoration:none; }
.navtoggle{ display:none; background:none; border:0; color:#fff; font-size:22px; line-height:1;
  cursor:pointer; padding:6px 4px; margin-left:8px; }
.site-footer{ border-top:1px solid var(--line); padding:30px 22px 48px; color:var(--muted);
  font-size:12.5px; line-height:1.7; text-align:center; background:rgba(0,0,0,.35); }
.site-footer a{ color:var(--ink); }
.site-footer .fnote{ max-width:680px; margin:8px auto 0; }
.site-footer .cc{ color:var(--muted); }
.site-footer .cc:hover{ color:var(--ink); text-decoration:none; }
.site-footer .cc svg{ display:inline-block; vertical-align:middle; width:20px; height:20px; margin:0 2px; }

.wrap{ max-width:1120px; margin:0 auto; padding:0 22px; }

/* hero */
.hero{ position:relative; overflow:hidden; padding:78px 0 60px; }
.hero::before{ content:''; position:absolute; inset:0; z-index:0;
  background:url(../img/hero-bg.jpg) center 42%/cover no-repeat; }
.hero::after{ content:''; position:absolute; inset:0; z-index:1;
  background:
    linear-gradient(90deg, rgba(8,8,9,.92) 0%, rgba(8,8,9,.74) 46%, rgba(8,8,9,.42) 100%),
    linear-gradient(180deg, rgba(8,8,9,.35) 0%, rgba(8,8,9,.12) 38%, var(--ground-2) 100%); }
.hero > .wrap{ position:relative; z-index:2; }
/* Larger translucent 2x2 Function badge, upper-right of the hero image. */
/* Inside .wrap: top aligns with the first line of hero text, and the right edge
   (right:22px = the .wrap side padding) tracks the content column's right edge —
   the same edge the domain cards / Operations box align to — at any width. */
.hero-badge{ position:absolute; z-index:3; top:0; right:22px; width:184px;
  display:grid; grid-template-columns:1fr 1fr; gap:7px; opacity:.85; pointer-events:none; }
.hero-badge img{ width:100%; display:block; }
.eyebrow{ color:var(--muted); letter-spacing:.16em; text-transform:uppercase; font-size:12px;
  font-weight:700; margin:0 0 18px; }
.hero h1{ font-size:clamp(30px,5vw,54px); line-height:1.08; margin:0 0 22px; color:#fff; max-width:16ch; }
.hero h1 em{ font-style:italic; color:var(--accent); }
.hero .lede{ font-size:clamp(16px,2vw,20px); color:#d7d4cf; max-width:60ch; margin:0 0 30px; }
.cta{ display:flex; gap:14px; flex-wrap:wrap; }
.btn{ display:inline-flex; align-items:center; font-weight:700; font-size:15px; padding:12px 20px;
  border-radius:9px; }
.btn.primary{ background:var(--accent); color:#0b0b0c; } .btn.primary:hover{ background:#a6d2e6; text-decoration:none; }
.btn.ghost{ border:1px solid #55565a; color:var(--ink); } .btn.ghost:hover{ border-color:var(--accent); color:#fff; text-decoration:none; }

/* bands */
.band{ padding:52px 0; border-top:1px solid var(--line); }
.band h2{ font-size:clamp(23px,3.2vw,34px); color:#fff; margin:0 0 14px; }
.band > .wrap > p{ color:#cfccc7; max-width:70ch; font-size:16.5px; }

.stance-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:28px; }
.stance-card{ background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:20px; }
.stance-card h3{ color:#fff; font-size:18px; margin:0 0 6px; }
.stance-card p{ color:var(--muted); font-size:14px; margin:0; }

/* model: domains */
.model-sub{ margin-bottom:26px; }
.domains{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.domain{ display:flex; gap:13px; align-items:flex-start; background:var(--panel);
  border:1px solid var(--line); border-radius:12px; padding:16px; transition:transform .12s, border-color .12s; }
.domain:hover{ transform:translateY(-3px); border-color:#5a5b5e; text-decoration:none; }
.domain img{ width:46px; height:46px; flex:none; }
.domain > span{ display:block; }
.domain .dn{ display:block; font-family:'Lora',serif; font-weight:700; color:#fff; font-size:18px; }
.domain .da{ display:block; color:var(--muted); font-size:12.5px; line-height:1.45; margin-top:4px; }

/* model: the 4x3 matrix */
.matrix{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:30px; }
.mcol{ background:var(--panel); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.mhead{ display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:9px 10px 9px 14px; color:#fff; font-weight:700; font-size:15px; letter-spacing:.02em;
  background:var(--fn); }
.mhead small{ display:block; font-weight:400; font-size:11px; opacity:.85; letter-spacing:.12em;
  text-transform:uppercase; }
.mhead .fnic{ width:34px; height:34px; flex:none; }
.mcell{ padding:12px 14px; border-top:1px solid var(--line); }
.mcell .mc-t{ display:flex; align-items:baseline; gap:8px; }
.mcell .code{ font-size:11px; font-weight:700; color:var(--fn-l); letter-spacing:.04em; }
.mcell .nm{ color:#fff; font-size:14.5px; font-weight:700; }
.mcell .ol{ color:var(--muted); font-size:12.5px; line-height:1.5; margin-top:4px; display:block; }
.mnote{ color:var(--muted); font-size:13px; margin-top:16px; }

/* featured Introduction */
.feature{ display:flex; gap:24px; align-items:center; background:var(--panel-2);
  border:1px solid #4c6b78; border-radius:14px; padding:20px 22px; margin-top:22px; }
.feature .fthumb{ width:196px; flex:none; border:1px solid var(--line); border-radius:4px;
  overflow:hidden; display:block; }
.feature .fthumb img{ width:100%; display:block; }
.feature .fbody{ flex:1; }
.feature .tag{ color:var(--accent); font-weight:700; font-size:12px; letter-spacing:.14em; text-transform:uppercase; }
.feature .fbody h3{ font-family:'Lora',serif; color:#fff; font-size:26px; margin:6px 0 8px; }
.feature .fbody p{ color:#cfccc7; font-size:15.5px; line-height:1.55; margin:0 0 15px; max-width:66ch; }
.feature .links{ display:flex; gap:16px; }
.feature .links a{ font-size:14px; font-weight:700; }
.feature .links .pdf{ color:var(--muted); }
.sub-h{ font-family:'Lora',serif; color:#fff; font-size:22px; margin:36px 0 6px; }
.sub-p{ color:var(--muted); font-size:14.5px; margin:0 0 2px; max-width:72ch; }

/* History / prose document page */
.doc{ padding:52px 0 44px; }
/* Top band sits on the "Understanding the Model" divider photo, darkened —
   a full hero like the home page, so the image extends well down the page. */
.doc-hero{ position:relative; overflow:hidden; padding:66px 0 104px; }
.doc-hero::before{ content:''; position:absolute; inset:0; z-index:0;
  background:url(../img/history-bg.jpg) center 38%/cover no-repeat; }
.doc-hero::after{ content:''; position:absolute; inset:0; z-index:1;
  background:
    linear-gradient(90deg, rgba(8,8,9,.90) 0%, rgba(8,8,9,.70) 48%, rgba(8,8,9,.40) 100%),
    linear-gradient(180deg, rgba(8,8,9,.35) 0%, rgba(8,8,9,.12) 38%, var(--ground-2) 100%); }
.doc-hero > .wrap{ position:relative; z-index:2; }
.doc-body{ padding-top:18px; }
.doc .eyebrow{ margin-bottom:14px; }
.doc h1{ font-size:clamp(30px,4.4vw,46px); color:#fff; line-height:1.1; margin:0 0 18px; }
/* Hero title wraps into a narrow column like the home hero. */
.doc-hero h1{ font-size:clamp(30px,5vw,54px); line-height:1.08; max-width:16ch; margin-bottom:22px; }
.doc .lede-lg{ font-family:'Lora',serif; font-size:clamp(18px,2.2vw,23px); color:#e9e7e3;
  line-height:1.45; max-width:62ch; margin:0 0 8px; }
/* Hero title/subtitle wrap to the same column widths as the home hero. */
.doc-hero .lede-lg{ font-family:'Lato',sans-serif; font-size:clamp(16px,2vw,20px);
  color:#d7d4cf; line-height:1.55; max-width:60ch; }
.doc h2{ font-size:clamp(19px,2.4vw,25px); color:#fff; margin:36px 0 10px; }
.doc p{ color:#cfccc7; font-size:16.5px; line-height:1.66; max-width:72ch; margin:0 0 14px; }
.doc .byline{ color:var(--muted); font-style:italic; margin-top:26px; }
.models{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:20px 0 10px; }
.models .m{ background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
.models .m .k{ color:var(--muted); font-size:11px; letter-spacing:.12em; text-transform:uppercase; }
.models .m h3{ font-family:'Lora',serif; color:#fff; font-size:18px; margin:3px 0 0; }
.models .m p{ font-size:13.5px; line-height:1.5; margin:8px 0 12px; }
.models .m a{ font-size:13px; font-weight:700; }
@media (max-width:760px){ .models{ grid-template-columns:1fr; } }

/* guides grid */
.cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:20px; }
.card{ background:var(--panel); border:1px solid var(--line); border-radius:12px; overflow:hidden;
  display:flex; flex-direction:column; transition:transform .12s, border-color .12s; }
.card:hover{ transform:translateY(-3px); border-color:#5a5b5e; }
.card .thumb{ display:block; aspect-ratio:612/792; background:#000; overflow:hidden; border-bottom:1px solid var(--line); }
.card .thumb img{ width:100%; display:block; }
.card .body{ padding:14px 15px 16px; display:flex; flex-direction:column; flex:1; }
.card .ct{ font-family:'Lora',serif; font-weight:700; color:#fff; font-size:18px; }
.card .cs{ color:var(--muted); font-size:12.5px; line-height:1.45; margin:5px 0 12px; flex:1; }
.card .links{ display:flex; gap:10px; }
.card .links a{ font-size:13px; font-weight:700; }
.card .links .pdf{ color:var(--muted); }
.card.intro{ grid-column:span 1; border-color:#4c6b78; }

@media (max-width:900px){
  .domains,.cards{ grid-template-columns:repeat(2,1fr); }
  .matrix{ grid-template-columns:repeat(2,1fr); }
  .stance-row{ grid-template-columns:1fr; }
}
@media (max-width:640px){
  .feature{ flex-direction:column; align-items:flex-start; }
  .feature .fthumb{ width:150px; }
}
@media (max-width:560px){
  .domains,.cards,.matrix{ grid-template-columns:1fr; }
}
/* Header brand (full title) responsive sizing */
@media (max-width:820px){
  .brand .brandfull{ font-size:12px; letter-spacing:.1em; }
  .site-nav a{ margin-left:14px; }
  .hero-badge{ width:106px; }
}
@media (max-width:760px){
  .site-header{ display:block; height:auto; min-height:0; padding:13px 16px; }
  .brand{ display:flex; align-items:center; gap:9px; padding-right:40px; }
  .logo2x2{ width:26px; }
  .brand .brandfull{ font-size:11px; letter-spacing:.04em; white-space:normal; }
  .navtoggle{ display:block; position:absolute; top:11px; right:12px; }
  .site-nav{ display:none; margin-top:11px; }
  .site-header.nav-open .site-nav{ display:block; }
  .site-nav a{ display:block; margin:0; padding:10px 2px; font-size:14px; border-top:1px solid var(--line); }
  .hero-badge{ width:78px; }
  .eyebrow .eb-rest{ display:none; }
}
