/* =========================================================
   Platypus Media — Shared Site Styles
   Design system: Space Grotesk + Instrument Serif + Manrope
   Brand: Platypus Navy #0A2E5C, Warm Off-White #FAF8F4
   ========================================================= */

/* ---- Tokens ---- */
:root {
  /* Brand */
  --navy: #0A2E5C;
  --navy-deep: #061f3f;
  --navy-tint: #173f72;
  --ink: #0E0E10;
  --ink-soft: #2a2a2e;
  --off-white: #FAF8F4;
  --paper: #F2EEE5;
  --sand: #E8E2D6;
  --amber: #C76B2C;        /* warm handcrafted accent */
  --amber-soft: #E8A06B;
  --muted: #6b6b70;
  --line: rgba(14,14,16,0.12);
  --line-soft: rgba(14,14,16,0.07);

  /* Type */
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-serif:   "Instrument Serif", Georgia, serif;
  --font-body:    "Manrope", "Helvetica Neue", Arial, sans-serif;

  /* Scale */
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.86rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-1:  clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4:  clamp(2.6rem, 2rem + 3vw, 4.5rem);
  --step-5:  clamp(3.4rem, 2.4rem + 5vw, 7rem);
  --step-6:  clamp(4rem, 2.8rem + 7vw, 10rem);

  /* Spacing */
  --gutter: clamp(1.25rem, 3vw, 2rem);
  --section: clamp(4rem, 8vw, 7.5rem);

  /* Radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Density (tweakable) */
  --density: 1;
}

/* ---- Dark mode override (tweakable) ---- */
[data-theme="dark"] {
  --off-white: #0D0E10;
  --paper: #14161A;
  --sand: #1d2026;
  --ink: #F1EEE7;
  --ink-soft: #c7c4be;
  --muted: #9b9aa0;
  --line: rgba(241,238,231,0.14);
  --line-soft: rgba(241,238,231,0.08);
  --navy: #5B8FDC;
  --navy-deep: #0A2E5C;
  --navy-tint: #6EA0E6;
}

/* ---- Reset-ish ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: var(--step-5); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.025em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p  { margin: 0 0 1em; text-wrap: pretty; color: var(--ink-soft); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 50ch; }

.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* ---- Skip link (a11y) ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--ink);
  color: var(--off-white);
  padding: 12px 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  z-index: 1000;
}
.skip-link:focus { left: 12px; }

/* ---- Container ---- */
.wrap {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow {
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--off-white) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: var(--step-0);
}
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand-name {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name span:first-child { font-weight: 700; letter-spacing: 0.02em; }
.brand-name span:last-child {
  font-size: 0.65em;
  letter-spacing: 0.32em;
  color: var(--muted);
  margin-top: 3px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 28px);
}
.primary-nav a {
  font-size: var(--step--1);
  font-weight: 500;
  padding: 8px 4px;
  position: relative;
  color: var(--ink);
  letter-spacing: 0.01em;
  transition: color .2s ease;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav a[aria-current="page"] { font-weight: 600; }

.primary-nav a.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--off-white);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.primary-nav a.nav-cta::after { display: none; }
.primary-nav a.nav-cta:hover { background: var(--navy); color: var(--off-white); transform: translateY(-1px); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: var(--step--1);
}

@media (max-width: 880px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-flex; gap: 8px; align-items: center; }
  .site-header[data-open="true"] .primary-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--off-white);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .site-header[data-open="true"] .primary-nav a { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
  .site-header[data-open="true"] .nav-cta { margin-top: 12px; justify-content: center; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step-0);
  font-family: var(--font-body);
  border: 1px solid transparent;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
  text-wrap: nowrap;
}
.btn .arrow { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary {
  background: var(--ink);
  color: var(--off-white);
}
.btn-primary:hover { background: var(--navy); transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(10,46,92,0.45); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--off-white); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 12px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--ink);
}
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---- Hero (base) ---- */
.hero {
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
  position: relative;
  overflow: hidden;
}

/* ---- Sections ---- */
section { padding-block: var(--section); }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.section-kicker::before {
  content: "";
  width: 24px; height: 1px;
  background: currentColor;
}

/* ---- Cards / Placeholders ---- */
.placeholder {
  background:
    repeating-linear-gradient(135deg, rgba(10,46,92,0.06) 0 6px, transparent 6px 14px),
    var(--sand);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  aspect-ratio: 4/3;
  text-align: center;
  padding: 1rem;
}
.placeholder.tall { aspect-ratio: 3/4; }
.placeholder.wide { aspect-ratio: 16/9; }
.placeholder.square { aspect-ratio: 1/1; }

/* ---- Marquee ---- */
.marquee {
  --marquee-speed: 40s;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--paper);
}
.marquee-track {
  display: flex;
  gap: 4rem;
  padding-block: 1.25rem;
  width: max-content;
  animation: marquee var(--marquee-speed) linear infinite;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.marquee-track span::after {
  content: "✺";
  color: var(--amber);
  font-size: 0.7em;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: var(--off-white);
  padding-top: clamp(4rem, 7vw, 6rem);
  padding-bottom: 2rem;
}
[data-theme="dark"] .site-footer { background: #06070a; }
.site-footer h2, .site-footer h3, .site-footer h4 { color: var(--off-white); }
.site-footer p, .site-footer li { color: rgba(250,248,244,0.7); }
.site-footer a { color: rgba(250,248,244,0.78); transition: color .2s ease; }
.site-footer a:hover { color: var(--amber-soft); }

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(250,248,244,0.14);
}
@media (max-width: 880px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .footer-top { grid-template-columns: 1fr; }
}
.footer-cta-headline {
  font-size: var(--step-3);
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  color: var(--off-white);
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: rgba(250,248,244,0.55);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: var(--step-0); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  font-size: var(--step--1);
  color: rgba(250,248,244,0.55);
}
.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* ---- CTA strip ---- */
.cta-strip {
  background: var(--navy);
  color: var(--off-white);
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 5vw, 5rem);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: end;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--amber) 0%, transparent 60%);
  opacity: 0.35;
  pointer-events: none;
}
.cta-strip h2 { color: var(--off-white); font-size: var(--step-4); }
.cta-strip p { color: rgba(250,248,244,0.82); max-width: 40ch; }
.cta-strip .btn-primary { background: var(--off-white); color: var(--ink); }
.cta-strip .btn-primary:hover { background: var(--amber); color: var(--ink); }
.cta-strip .btn-secondary { color: var(--off-white); border-color: rgba(250,248,244,0.5); }
.cta-strip .btn-secondary:hover { background: var(--off-white); color: var(--ink); }
.cta-strip .cta-actions { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .cta-strip { grid-template-columns: 1fr; }
}

/* ---- Page-header (for inner pages) ---- */
.page-header {
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.page-header .eyebrow {
  font-size: var(--step--1);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 600;
}
.page-header h1 { font-size: var(--step-5); max-width: 16ch; }
.page-header .lede { margin-top: 1.5rem; }

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- Utilities ---- */
.hidden { display: none !important; }
.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;
}
.tag {
  display: inline-block;
  font-size: var(--step--1);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
  font-weight: 500;
}

/* Focus visible everywhere */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Theme variants (tweakable palettes) ---- */
[data-palette="amber"] { --amber: #C76B2C; --amber-soft: #E8A06B; --navy: #0A2E5C; }
[data-palette="forest"] { --amber: #5B7A3E; --amber-soft: #94B26B; --navy: #1F3D2B; --navy-deep: #0F2618; --navy-tint: #2E5A41; }
[data-palette="plum"]   { --amber: #B14D7A; --amber-soft: #D88BAE; --navy: #3D1F4A; --navy-deep: #25102E; --navy-tint: #5A2E6B; }
[data-palette="mono"]   { --amber: #0E0E10; --amber-soft: #6b6b70; --navy: #1A1A1F; --navy-deep: #0E0E10; --navy-tint: #2a2a2e; }

/* ---- Font variants (tweakable) ---- */
[data-font="modern"] {
  --font-display: "Space Grotesk", sans-serif;
  --font-serif: "Instrument Serif", serif;
  --font-body: "Manrope", sans-serif;
}
[data-font="editorial"] {
  --font-display: "Fraunces", serif;
  --font-serif: "Instrument Serif", serif;
  --font-body: "Manrope", sans-serif;
}
[data-font="industrial"] {
  --font-display: "Archivo", sans-serif;
  --font-serif: "Instrument Serif", serif;
  --font-body: "Archivo", sans-serif;
}

/* ---- Density (tweakable) ---- */
[data-density="cozy"] { --section: clamp(3rem, 6vw, 5rem); }
[data-density="comfortable"] { --section: clamp(4rem, 8vw, 7.5rem); }
[data-density="spacious"] { --section: clamp(6rem, 12vw, 11rem); }
