/* Cobalt History site. Tokens and rules are described in ..\DESIGN.md; change both together. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("/fonts/Cinzel-var.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  /* Brand colours (PROJECT.md "Brand") */
  --night: #040E2A;
  --navy: #061C4D;
  --cobalt: #0047AB;
  --ice: #C4DAFF;
  --gold: #F2A900;
  --gold-light: #FFD66E;
  --cream: #F6F0E4;
  /* Derived */
  --line: #1B3570;   /* hairlines, between navy and cobalt */
  --muted: #93A9CF;  /* secondary text; 8.0:1 on night, 6.9:1 on navy */

  --serif: "Cinzel", "Perpetua Titling MT", Georgia, serif;
  --sans: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --wide: 76rem;     /* page sections */
  --measure: 44rem;  /* reading column on the policy pages */
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ice);
  font: 400 1.0625rem/1.65 var(--sans);
}
img, video { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--gold); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-light); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--gold); color: var(--night); padding: 8px 12px; border-radius: 6px; font-weight: 700; }
.skip:focus { left: 8px; }

/* Header: solid bar on inner pages, laid over the montage on the home page */
.site-header { position: relative; z-index: 3; border-bottom: 1px solid var(--line); }
.home .site-header { position: absolute; top: 0; left: 0; right: 0; border-bottom: 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img.coin { width: 44px; height: 44px; }
.brand img.wordmark { width: 136px; }
.header-cta { color: var(--cream); font-weight: 700; font-size: 0.9375rem; text-decoration: none; padding: 8px 14px; border: 1px solid rgba(246, 240, 228, 0.45); border-radius: 999px; }
.header-cta:hover { color: var(--night); background: var(--gold); border-color: var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: var(--gold-light); color: var(--night); }

/* Hero: full-screen montage */
.hero { position: relative; min-height: min(100svh, 920px); display: flex; align-items: flex-end; overflow: hidden; background: #000; }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  /* Stops measured against every montage frame at 1440x900, 1280x720 and 1024x768
     (worst case: headline 4.6:1 at 1280x720, paragraph 11.8:1, links 12.7:1) */
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.4) 45%, rgba(0, 0, 0, 0) 80%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 30%, rgba(0, 0, 0, 0.62) 48%, rgba(0, 0, 0, 0.78) 70%, rgba(4, 14, 42, 0.96) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding-top: 140px; padding-bottom: clamp(40px, 8vh, 88px); }
.hero h1 {
  margin: 0; max-width: 15ch;
  font: 700 clamp(2.5rem, 6.2vw, 5.25rem)/1.05 var(--serif);
  color: var(--cream); letter-spacing: 0.01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}
.hero p.sub { margin: 18px 0 0; max-width: 38rem; color: var(--cream); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.5; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }
.hero .also { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-weight: 600; }
.hero .also a { color: var(--cream); text-decoration: none; }
.hero .also a:hover { color: var(--gold-light); text-decoration: underline; }
.hero .pause {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 20px;
  font: 600 0.8125rem/1 var(--sans); color: var(--cream); background: rgba(4, 14, 42, 0.6);
  border: 1px solid rgba(246, 240, 228, 0.4); border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.hero .pause:hover { border-color: var(--gold); }

/* Home sections */
.section { padding: clamp(48px, 8vw, 96px) 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.section h2 { margin: 0; font: 700 clamp(1.625rem, 3vw, 2.375rem)/1.15 var(--serif); color: var(--cream); letter-spacing: 0.01em; }
.section-head a { font-weight: 700; }
.section p.intro { margin: -12px 0 24px; max-width: 46rem; }
h3 { margin: 28px 0 10px; color: var(--cream); font-size: 1.125rem; line-height: 1.35; font-weight: 700; }

/* Latest videos */
.videos { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.videos.long { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.videos.shorts { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.videos a { display: block; color: var(--cream); text-decoration: none; font-weight: 600; line-height: 1.4; }
.videos img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 10px; }
.videos a:hover span { color: var(--gold-light); text-decoration: underline; }
.soon { background: var(--navy); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 0; color: var(--cream); }

/* Story cards */
.stories { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.stories li { margin: 0; background: var(--navy); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stories img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.stories .text { padding: 16px 20px 20px; }
.stories .year { font: 700 1.125rem/1 var(--serif); color: var(--gold); letter-spacing: 0.04em; }
.stories h3 { margin: 8px 0 6px; font-size: 1.1875rem; }
.stories p { margin: 0; font-size: 1rem; line-height: 1.55; }

/* Platforms: YouTube first and larger */
.platforms { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.platforms li { margin: 0; }
.platforms a {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 100%;
  padding: 14px 18px; min-height: 72px;
  background: var(--navy); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--cream); text-decoration: none; font-weight: 700;
}
.platforms a span { color: var(--muted); font-weight: 400; font-size: 0.9375rem; }
.platforms a:hover { border-color: var(--gold); color: var(--cream); }
.platforms li.primary { grid-column: 1 / -1; }
.platforms li.primary a { flex-direction: row; align-items: center; justify-content: space-between; background: var(--gold); border-color: var(--gold); color: var(--night); font-size: 1.25rem; min-height: 80px; padding: 16px 24px; }
.platforms li.primary a span { color: var(--night); font-size: 1rem; font-weight: 600; }
.platforms li.primary a:hover { background: var(--gold-light); border-color: var(--gold-light); }
.contact { margin: 24px 0 0; max-width: 46rem; }

/* Policy pages */
.doc { padding-top: 40px; }
.doc h1 { margin: 0 0 6px; color: var(--cream); font: 700 clamp(1.75rem, 4vw, 2.5rem)/1.15 var(--serif); letter-spacing: 0.01em; }
.doc h2 { margin: 40px 0 10px; color: var(--cream); font-size: 1.25rem; line-height: 1.3; font-weight: 700; }
.doc .updated { color: var(--muted); margin-bottom: 24px; }
.doc .summary { background: var(--navy); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 8px; }
.doc .summary p:last-child, .doc .summary ul:last-child { margin-bottom: 0; }
p, ul { margin: 0 0 14px; }
ul { padding-left: 1.2em; }
li { margin-bottom: 6px; }
strong { color: var(--cream); font-weight: 700; }

/* Footer: the policy links sit here on every page, never behind a menu */
.site-footer { margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 0.9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer p { margin: 0; }

@media (max-width: 1023px) {
  .stories { grid-template-columns: repeat(2, 1fr); }
  .platforms { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 599px) {
  body { font-size: 1rem; }
  .brand img.coin { width: 38px; height: 38px; }
  .brand img.wordmark { width: 116px; }
  .header-cta { display: none; }
  .hero { min-height: 88svh; }
  /* Text sits higher on phones; measured at 375x715 and 390x602: worst case headline 4.9:1, paragraph 9.3:1 */
  .hero::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.55) 20%, rgba(0, 0, 0, 0.74) 33%, rgba(0, 0, 0, 0.8) 50%, rgba(4, 14, 42, 0.96) 100%); }
  .stories { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: repeat(2, 1fr); }
  .platforms li.primary a { flex-direction: column; align-items: flex-start; }
}
