/* ============================================================
   POPIA Compliance Copilot — marketing site
   Design system: "Case File" — a government-registry dossier
   aesthetic. Ink-green cover, manila paper folios, gold foil,
   redaction bars, a hand-stamped seal as the signature element.
   ============================================================ */

:root {
  --ink-green: #14311f;
  --ink-green-deep: #0d2216;
  --paper: #f1ead4;
  --paper-dim: #e4d9b4;
  --paper-line: #cdbf8f;
  --gold: #c9a227;
  --gold-bright: #e0bc48;
  --stamp-red: #a13328;
  --compliant: #3f8566;
  --ink-black: #1b1b16;
  --ink-soft: #4a4638;

  --font-hero: Verdana, Geneva, sans-serif;
  --font-display: "Roboto Slab", serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --max: 1180px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--ink-green);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------- Texture: paper grain + green field ---------------- */

.paper-field {
  background-color: var(--ink-green);
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(201, 162, 39, 0.08), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(201, 162, 39, 0.06), transparent 55%);
}

/* ---------------- Nav ---------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink-green-deep);
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }

.brand-word {
  font-family: var(--font-hero);
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: var(--paper);
  white-space: nowrap;
}

.brand-word small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--gold-bright);
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.nav-links a {
  text-decoration: none;
  color: var(--paper-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover { color: var(--gold-bright); border-color: var(--gold-bright); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-black);
  background: var(--gold);
  padding: 9px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-cta:hover { background: var(--gold-bright); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  color: var(--paper);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 18px;
  cursor: pointer;
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 88px 0 70px;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.file-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  border: 1px solid rgba(201, 162, 39, 0.5);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.file-tab::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--compliant);
  box-shadow: 0 0 0 3px rgba(63, 133, 102, 0.25);
}

.hero h1 {
  font-family: var(--font-hero);
  font-weight: bold;
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  color: var(--paper);
  max-width: 15ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold-bright);
}

.hero-sub {
  font-size: 17px;
  color: var(--paper-dim);
  max-width: 52ch;
  margin: 0 0 30px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }

.btn {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 14px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary { background: var(--gold); color: var(--ink-black); }
.btn-primary:hover { background: var(--gold-bright); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(241, 234, 212, 0.4);
}
.btn-ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); transform: translateY(-2px); }

.btn-stamp-red { background: var(--stamp-red); color: var(--paper); }
.btn-stamp-red:hover { background: #bd4136; transform: translateY(-2px); }

.hero-caveat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--paper-dim);
  border-left: 2px solid var(--stamp-red);
  padding-left: 10px;
}

.hero-caveat b { color: var(--paper); font-weight: 600; }

/* Stamp graphic */

.stamp-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.stamp {
  width: min(320px, 80%);
  transform: rotate(-8deg) scale(1);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
  animation: stampIn 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
  animation-delay: 0.15s;
}

@keyframes stampIn {
  0% { transform: rotate(-18deg) scale(2.4); opacity: 0; }
  55% { opacity: 1; }
  70% { transform: rotate(-4deg) scale(0.94); }
  100% { transform: rotate(-8deg) scale(1); }
}

.stamp-caption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper-dim);
  margin-top: 14px;
  max-width: 30ch;
}

/* ---------------- Section shell ---------------- */

.section { padding: 92px 0; }
.section-paper { background: var(--paper); color: var(--ink-black); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0 0 12px;
}

.section-paper .eyebrow { color: #7a6420; }

.section-head {
  max-width: 60ch;
  margin: 0 0 52px;
}

.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

h2.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0 0 14px;
  line-height: 1.2;
}

.section-lede {
  font-size: 16px;
  color: var(--paper-dim);
  margin: 0;
}

.section-paper .section-lede { color: var(--ink-soft); }

/* Redaction reveal */

.redact {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.redact::after {
  content: "";
  position: absolute;
  inset: -4% -2%;
  background: var(--ink-black);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.85s cubic-bezier(0.65, 0, 0.2, 1);
}

.section-paper .redact::after { background: var(--ink-green-deep); }

.redact.revealed::after { transform: scaleX(0); }

/* ---------------- Exhibits ---------------- */

.exhibit {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
}

.exhibit:not(:last-child) { border-bottom: 1px dashed var(--paper-line); }

.exhibit.reverse { grid-template-columns: 1.15fr 0.85fr; }
.exhibit.reverse .exhibit-figure { order: 2; }
.exhibit.reverse .exhibit-copy { order: 1; }

.exhibit-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--stamp-red);
  display: block;
  margin-bottom: 10px;
}

.exhibit-copy h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 14px;
}

.exhibit-copy p {
  color: var(--ink-soft);
  font-size: 15.5px;
  margin: 0 0 12px;
}

.exhibit-copy .chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--paper-dim);
  border: 1px solid var(--paper-line);
  padding: 3px 9px;
  border-radius: var(--radius);
  margin: 4px 6px 0 0;
}

.doc-frame {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  box-shadow: 0 22px 45px -20px rgba(20, 49, 31, 0.65);
  overflow: hidden;
  position: relative;
  transform: rotate(var(--tilt, -1.2deg));
}

.doc-frame::before {
  content: attr(data-label);
  position: absolute;
  top: 10px;
  right: -34px;
  background: var(--stamp-red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 40px;
  transform: rotate(35deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.doc-frame img { display: block; width: 100%; height: auto; }

/* ---------------- Demo videos ---------------- */

.section-demo { background: var(--ink-green-deep); }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.video-card {
  background: rgba(241, 234, 212, 0.04);
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 6px;
  padding: 18px;
}

.video-card.featured { grid-column: 1 / -1; }

.video-frame {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.4);
  background: #000;
  margin-bottom: 16px;
}

.video-frame video { width: 100%; display: block; }

.video-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.video-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.video-card p { font-size: 14px; color: var(--paper-dim); margin: 0; }

.video-runtime {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gold-bright);
  white-space: nowrap;
}

/* ---------------- Fee schedule ---------------- */

.fee-schedule {
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.fee-row {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1.6fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
}

.fee-row + .fee-row { border-top: 1px dashed var(--paper-line); }

.fee-row.head {
  background: var(--ink-green);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 24px;
}

.fee-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.fee-price { font-family: var(--font-mono); font-size: 1.05rem; color: var(--ink-green-deep); font-weight: 600; }
.fee-desc { font-size: 14px; color: var(--ink-soft); }

.fee-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  justify-self: start;
}

.fee-status.live { background: rgba(63, 133, 102, 0.15); color: #2c6249; border: 1px solid rgba(63, 133, 102, 0.4); }
.fee-status.soon { background: rgba(201, 162, 39, 0.18); color: #7a6420; border: 1px solid rgba(201, 162, 39, 0.45); }

.fee-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 18px;
}

/* ---------------- Two-track (who it's for) ---------------- */

.track-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.track-card {
  background: rgba(241, 234, 212, 0.04);
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 6px;
  padding: 30px;
}

.track-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 10px;
}

.track-card p { color: var(--paper-dim); font-size: 14.5px; margin: 0 0 16px; }

.track-card ul { margin: 0; padding-left: 18px; color: var(--paper-dim); font-size: 14px; }
.track-card li { margin-bottom: 6px; }

/* ---------------- Candour / what this isn't ---------------- */

.candour {
  background: var(--paper);
  color: var(--ink-black);
  border: 1px solid var(--paper-line);
  border-radius: 6px;
  padding: 40px;
  position: relative;
}

.candour-stamp {
  position: absolute;
  top: 26px;
  right: 34px;
  border: 3px solid var(--stamp-red);
  color: var(--stamp-red);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 4px;
  transform: rotate(6deg);
  opacity: 0.85;
}

.candour ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }

.candour li {
  padding-left: 26px;
  position: relative;
  font-size: 15px;
  color: var(--ink-soft);
}

.candour li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--stamp-red);
  font-weight: 700;
}

/* ---------------- Contact / correspondence ---------------- */

.correspondence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-card {
  background: var(--paper);
  color: var(--ink-black);
  border-radius: 6px;
  padding: 34px;
  border: 1px solid var(--paper-line);
}

.contact-card h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.contact-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 20px; }

.email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 8px 8px 8px 16px;
}

.email-link {
  font-family: var(--font-mono);
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-black);
  flex: 1;
  word-break: break-all;
}

.email-link:hover { color: var(--stamp-red); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--ink-green);
  color: var(--paper);
  border: none;
  border-radius: var(--radius);
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.copy-btn:hover { background: var(--ink-green-deep); }
.copy-btn.copied { background: var(--compliant); color: #fff; }

.copy-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.correspondence-notes { font-size: 14px; color: var(--paper-dim); }
.correspondence-notes p { margin: 0 0 14px; }
.correspondence-notes strong { color: var(--gold-bright); }

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--ink-green-deep);
  border-top: 1px solid rgba(201, 162, 39, 0.3);
  padding: 56px 0 30px;
  font-size: 13px;
  color: var(--paper-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .brand-mark { width: 28px; height: 28px; }
.footer-brand span { font-family: var(--font-hero); font-weight: bold; color: var(--paper); }

.footer-disclaimer { max-width: 46ch; font-size: 12.5px; }

.superpowers h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0 0 14px;
}

.superpowers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.superpowers a { text-decoration: none; color: var(--paper-dim); }
.superpowers a:hover { color: var(--gold-bright); }

.footer-bottom {
  border-top: 1px solid rgba(201, 162, 39, 0.18);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.footer-bottom a { color: var(--gold-bright); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stamp-stage { order: -1; }
  .stamp { width: 220px; }
  .exhibit, .exhibit.reverse { grid-template-columns: 1fr; }
  .exhibit.reverse .exhibit-figure, .exhibit.reverse .exhibit-copy { order: initial; }
  .track-grid { grid-template-columns: 1fr; }
  .correspondence { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .fee-row { grid-template-columns: 1fr; gap: 6px; }
  .fee-row.head { display: none; }
  .fee-status { justify-self: start; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav.open {
    position: fixed;
    inset: 0 0 auto 0;
    height: 100vh;
    overflow-y: auto;
  }
  .site-nav.open .wrap { flex-wrap: wrap; }
  .site-nav.open .nav-links {
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    width: 100%;
    background: var(--ink-green-deep);
    padding: 20px 0 6px;
    border-top: 1px solid rgba(201, 162, 39, 0.35);
    gap: 18px;
  }
  .site-nav.open .nav-cta {
    display: inline-flex;
    flex-basis: 100%;
    width: fit-content;
    margin-bottom: 24px;
  }
}
