/* OG = Oakes Grotesk (custom typeface). Self-hosted from /fonts. */
@font-face { font-family: "Oakes Grotesk"; font-weight: 300; font-style: normal;  src: url("fonts/OG_Light.ttf")     format("truetype"); font-display: swap; }
@font-face { font-family: "Oakes Grotesk"; font-weight: 300; font-style: italic;  src: url("fonts/OG_LightItal.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Oakes Grotesk"; font-weight: 400; font-style: normal;  src: url("fonts/OG_Regular.ttf")   format("truetype"); font-display: swap; }
@font-face { font-family: "Oakes Grotesk"; font-weight: 400; font-style: italic;  src: url("fonts/OG_RegItal.ttf")   format("truetype"); font-display: swap; }
@font-face { font-family: "Oakes Grotesk"; font-weight: 500; font-style: normal;  src: url("fonts/OG_Medium.ttf")    format("truetype"); font-display: swap; }
@font-face { font-family: "Oakes Grotesk"; font-weight: 500; font-style: italic;  src: url("fonts/OG_MedItal.ttf")   format("truetype"); font-display: swap; }
@font-face { font-family: "Oakes Grotesk"; font-weight: 600; font-style: normal;  src: url("fonts/OG_SemiBold.ttf")  format("truetype"); font-display: swap; }
@font-face { font-family: "Oakes Grotesk"; font-weight: 600; font-style: italic;  src: url("fonts/OG_SBoldItal.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Oakes Grotesk"; font-weight: 700; font-style: normal;  src: url("fonts/OG_Bold.ttf")      format("truetype"); font-display: swap; }
@font-face { font-family: "Oakes Grotesk"; font-weight: 700; font-style: italic;  src: url("fonts/OG_BoldItal.ttf")  format("truetype"); font-display: swap; }

:root {
  --edu:   #0A4F29;
  --intl:  #668C4A;
  --pre:   #3A7A5E;
  --music: #F7B917;
  --plus:  #27829E;
  --ink:   #0D0D0D;
  --silver:#DFDFE7;
  --bg:    #F7F7F5;
  --white: #FFFFFF;
  --border:#E4E4E4;
  --muted: #6B6B6B;
  --maxw:  1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Oakes Grotesk", "DM Sans", Verdana, system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 80px; }
header.hero { padding: 56px 24px 24px; max-width: var(--maxw); margin: 0 auto; }
.eyebrow { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
h1 { font-size: 40px; font-weight: 500; line-height: 1.05; margin: 12px 0 16px; letter-spacing: -0.02em; }
h2 { font-size: 22px; font-weight: 500; margin: 36px 0 8px; letter-spacing: -0.01em; }
h2 .sec-num { color: var(--muted); font-weight: 400; font-size: 13px; letter-spacing: 0.18em; margin-right: 10px; font-family: ui-monospace, monospace; }
h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; letter-spacing: 0.01em; }
p  { font-size: 14px; max-width: 70ch; margin: 8px 0; }
.lede { font-size: 17px; line-height: 1.45; max-width: 55ch; color: #2a2a2a; }
section[id] { scroll-margin-top: 72px; }
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85em; background: #efefea; padding: 2px 6px; border-radius: 4px; }
a { color: var(--edu); }

/* Sticky top nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 247, 245, 0.92);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topnav .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 52px;
}
.topnav .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.topnav .brand .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--edu);
}
.topnav .nav-links {
  flex: 1;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.topnav .nav-links::-webkit-scrollbar { display: none; }
.topnav .nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.12s ease, background 0.12s ease;
  letter-spacing: 0.01em;
}
.topnav .nav-links a:hover { color: var(--ink); background: rgba(0,0,0,0.04); }
.topnav .nav-links a.active { color: var(--edu); background: rgba(10,79,41,0.08); font-weight: 600; }
.topnav .nav-toggle {
  flex-shrink: 0;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
  transition: all 0.12s ease;
}
.topnav .nav-toggle:hover { background: var(--edu); color: var(--white); border-color: var(--edu); }

/* Scroll-to-top FAB */
.fab-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  border: 0;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
}
.fab-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.fab-top:hover { background: var(--edu); }

/* Collapsible sections (driven by app.js — adds .section-body wrapper + click on h2) */
section[data-collapsible] > h2 {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 8px;
  transition: color 0.15s ease;
}
section[data-collapsible] > h2:hover { color: var(--edu); }
section[data-collapsible] > h2::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
section[data-collapsed] > h2::after { transform: rotate(-45deg); }
section[data-collapsible] .section-body {
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.25s ease 0.05s;
  opacity: 1;
}
section[data-collapsed] .section-body {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* Hint line below hero */
.hint-line { font-size: 11px; color: var(--muted); margin-top: 12px; letter-spacing: 0.02em; }
.hint-line kbd { font-size: 10px; padding: 1px 5px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--white); border-radius: 3px; }

/* Hero CTA bar — download bundle for AI / offline use */
.cta-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--edu);
  color: var(--white);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(10,79,41,0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.cta:hover { background: #08401f; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,79,41,0.26); }
.cta .arrow { font-size: 14px; line-height: 1; }
.cta-bar .meta { font-size: 11px; color: var(--muted); }
.cta.secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: none;
  font-weight: 500;
}
.cta.secondary:hover { background: var(--bg); border-color: var(--ink); color: var(--ink); transform: none; box-shadow: none; }

/* Color swatches */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.swatch { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; position: relative; }
.swatch:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.swatch:active { transform: translateY(0); }
.swatch .chip { height: 64px; }
.swatch .meta { padding: 8px 10px 10px; }
.swatch .name { font-weight: 600; font-size: 12px; }
.swatch .hex  { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); margin-top: 2px; }
.swatch .extra { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.swatch .copy-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.swatch:hover .copy-hint { opacity: 1; }

/* Logo grid */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.logo-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.logo-card.dk  { background: var(--ink); border-color: var(--ink); }
.logo-card .frame { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; padding: 8px; position: relative; }
.logo-card .frame img { width: 100%; height: 100%; object-fit: contain; }
/* Bleed compensation per logo type — see brand.json.logo_rules.bleed_compensation */
.logo-card .frame img.t-Hrz  { transform: scale(1.30); }
.logo-card .frame img.t-Logo { transform: scale(1.20); }
.logo-card .frame img.t-Mark { transform: scale(1.30); }
.logo-card .frame img.t-Vrt  { transform: scale(1.18); }
.logo-card .label { padding: 10px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; }
.logo-card.dk .label { color: #c8c8c8; border-top-color: #2a2a2a; }
.logo-card .label code { background: transparent; padding: 0; }

/* Sub-brand banner */
.sb { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.sb-head { padding: 28px; border-radius: 8px; color: var(--white); }
.sb-head h3 { color: var(--white); margin: 0; font-size: 22px; font-weight: 500; }
.sb-head .swatch-line { font-family: ui-monospace, monospace; font-size: 13px; opacity: 0.85; margin-top: 6px; }

/* Gradients */
.grad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.grad { aspect-ratio: 16/9; border-radius: 8px; background-size: cover; background-position: center; position: relative; overflow: hidden; cursor: pointer; transition: transform 0.15s ease; }
.grad:hover { transform: translateY(-2px); }
.grad span { position: absolute; bottom: 8px; left: 10px; color: white; font-size: 11px; font-family: ui-monospace, monospace; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* Type specimen */
.type-specimen { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; margin: 12px 0; }
.type-specimen .glyphs { font-size: 44px; line-height: 1.05; letter-spacing: -0.01em; margin-top: 8px; word-break: break-all; }
.type-specimen p { font-size: 13px; margin-top: 14px; }
.weights-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; padding: 0; list-style: none; margin-top: 12px; }
.weights-list li { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: baseline; }
.weights-list .name { font-size: 15px; }
.weights-list .meta { font-family: ui-monospace, monospace; font-size: 10px; color: var(--muted); }
.w-light    { font-weight: 300; }
.w-regular  { font-weight: 400; }
.w-medium   { font-weight: 500; }
.w-semibold { font-weight: 600; }
.w-bold     { font-weight: 700; }

/* Hierarchy demo */
.hier { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; }
.hier .h-head { font-weight: 500; font-size: 36px; line-height: 1.05; }
.hier .h-sub  { font-weight: 400; font-size: 18px; line-height: 1.3; margin-top: 4px; color: #333; }
.hier .h-body { font-weight: 400; font-size: 13px; max-width: 60ch; margin-top: 10px; }
.hier .tag { font-size: 10px; color: var(--muted); font-family: ui-monospace, monospace; }

/* Rules: do / dont */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 8px; }
.rule { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.rule .tag { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.rule.do  .tag { color: var(--edu); }
.rule.dont .tag { color: #b3261e; }
.rule ul { margin: 6px 0 0; padding-left: 18px; }
.rule li { font-size: 12px; margin-bottom: 2px; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 10px 0; background: var(--white); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); font-size: 12px; vertical-align: top; }
th { background: #ececea; font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
td code { font-size: 11px; }

/* Sub-brand color tags */
.tag-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; color: var(--white); margin-right: 6px; }
.tag-edu   { background: var(--edu); }
.tag-intl  { background: var(--intl); }
.tag-pre   { background: var(--pre); }
.tag-music { background: var(--music); color: var(--ink); }
.tag-plus  { background: var(--plus); }

/* Notes */
.note { background: #f0eee5; border-left: 3px solid var(--music); padding: 10px 14px; border-radius: 4px; font-size: 12px; margin: 10px 0; }
.note.legacy { background: #fff7e8; border-left-color: #c97b00; }
.note code { font-size: 11px; }

/* Logo gallery (compact, all variations) */
.gallery-block { margin: 20px 0 4px; }
.gallery-block .sb-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 7px 12px; border-radius: 6px; color: var(--white); font-weight: 500; font-size: 13px; }
.gallery-row { margin: 10px 0 2px; }
.gallery-row > .row-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.mini { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.mini.dk  { background: var(--ink); border-color: var(--ink); }
.mini.tn  { background: var(--silver); }
.mini .frame { aspect-ratio: 4/3; padding: 6px; display: flex; align-items: center; justify-content: center; position: relative; }
.mini .frame img { width: 100%; height: 100%; object-fit: contain; }
.mini .frame img.t-Hrz  { transform: scale(1.30); }
.mini .frame img.t-Logo { transform: scale(1.20); }
.mini .frame img.t-Mark { transform: scale(1.30); }
.mini .frame img.t-Vrt  { transform: scale(1.18); }
.mini .lab { padding: 6px 10px; font-size: 10px; line-height: 1.2; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 6px; font-family: ui-monospace, monospace; }
.mini.dk .lab { color: #c8c8c8; border-top-color: #2a2a2a; }
.mini .lab .v { font-weight: 600; }

/* Asset link wrapper (added by app.js around img / on .grad) */
.asset-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.asset-link:focus-visible { outline: 2px solid var(--edu); outline-offset: 2px; border-radius: 4px; }
.asset-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: 2;
}
.mini .frame:hover .asset-actions,
.logo-card .frame:hover .asset-actions,
.grad:hover .asset-actions { opacity: 1; pointer-events: auto; }
.asset-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.1);
  font-weight: 600;
  line-height: 1;
  transition: background 0.12s ease;
}
.asset-btn:hover { background: var(--white); color: var(--edu); }
.mini.dk .asset-btn,
.logo-card.dk .asset-btn { background: rgba(255,255,255,0.85); }

/* Vision / mission / values */
.vmv { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
.vmv .card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.vmv .card h3 { margin-top: 0; margin-bottom: 6px; font-size: 13px; }
.vmv .card p  { font-size: 13px; margin: 4px 0; }
.values-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px; }
.values-list li { display: grid; grid-template-columns: 28px 1fr; align-items: baseline; padding: 6px 10px; background: var(--bg); border-radius: 6px; }
.values-list .letter { font-weight: 600; font-size: 15px; color: var(--edu); font-family: ui-monospace, monospace; }
.values-list .word { font-size: 13px; }
.pull { background: var(--ink); color: var(--white); padding: 18px 22px; border-radius: 8px; margin-top: 16px; }
.pull p { font-size: 16px; line-height: 1.45; max-width: 60ch; margin: 0; }
.pull small { display: block; margin-top: 8px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #c8c8c8; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.copy::before {
  content: "✓ ";
  color: var(--music);
  margin-right: 4px;
}

/* footer */
footer { max-width: var(--maxw); margin: 0 auto; padding: 48px 32px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
footer a { color: var(--muted); }

@media (max-width: 700px) {
  h1 { font-size: 30px; }
  h2 { font-size: 18px; }
  main { padding: 24px 16px 64px; }
  header.hero { padding: 40px 16px 16px; }
  .topnav .inner { padding: 0 12px; height: 48px; }
  .sb  { grid-template-columns: 1fr; }
  .lede { font-size: 15px; }
}

/* Logo animations (section 04) — thumbnails + modal player */
.anim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.anim-thumb { display: block; width: 100%; padding: 0; margin: 0; font: inherit; text-align: left; background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.anim-thumb:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.10); }
.anim-thumb .frame { position: relative; display: block; }
.anim-thumb .frame img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.anim-thumb .play-badge { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(13,13,13,0.62); color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center; padding-left: 3px; transition: background 0.15s ease; }
.anim-thumb:hover .play-badge { background: rgba(13,13,13,0.85); }
.anim-thumb .lab { padding: 10px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.anim-thumb .lab .v { font-weight: 600; color: var(--ink); }

.video-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.video-modal[hidden] { display: none; }
.video-modal .backdrop { position: absolute; inset: 0; background: rgba(13,13,13,0.72); }
.video-modal figure { position: relative; margin: 0; width: min(960px, 100%); background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.35); }
.video-modal video { width: 100%; aspect-ratio: 16/9; display: block; background: var(--white); }
.video-modal figcaption { padding: 12px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.video-modal figcaption .v { font-weight: 600; color: var(--ink); }
.video-modal .close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border: none; border-radius: 50%; background: rgba(13,13,13,0.55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.video-modal .close:hover { background: rgba(13,13,13,0.85); }
