/* ================================================================
   MERL — Claynosaurz-energy rebuild.
   Warm · Chunky · Character-first.
   ============================================================== */

:root {
  /* new warm palette */
  --cream:  #F5E8D5;
  --paper:  #FFF8EE;
  --sun:    #FF9B42;
  --tomato: #E8472C;
  --yolk:   #FFD23F;
  --grape:  #5B3789;
  --mint:   #8ED0A8;
  --sky:    #8FC4E8;
  --ink:    #1C1410;
  --ink-80: rgba(28,20,16,0.8);
  --ink-60: rgba(28,20,16,0.6);
  --ink-40: rgba(28,20,16,0.4);
  --ink-20: rgba(28,20,16,0.2);
  --ink-08: rgba(28,20,16,0.08);

  /* legacy aliases so support/privacy/terms keep rendering */
  --bg:      var(--cream);
  --surface: var(--paper);
  --accent:  var(--tomato);
  --gold:    var(--yolk);
  --dark:    var(--ink);
  --ink-30:  var(--ink-40);
  --mist:    var(--paper);

  /* shadow tokens — offset "sticker" style */
  --shadow-sm: 3px 4px 0 var(--ink);
  --shadow-md: 5px 7px 0 var(--ink);
  --shadow-lg: 8px 10px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Figtree", "Inter", -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ====== TYPOGRAPHY ====== */
h1, h2, h3, h4 {
  font-family: "Fraunces", "Figtree", "Inter", sans-serif;
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.display {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.label {
  font-family: "Figtree", "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
}

a { color: var(--tomato); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

/* Legacy support-page helpers (kept live so support.html inline styles still work) */
.serif { font-family: "Fraunces", serif; font-weight: 900; }
.mono  { font-family: "Figtree", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; font-weight: 700; }

/* ====== NAV ====== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245,232,213,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--ink);
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-logo {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  list-style: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-links a {
  font-family: "Figtree", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--tomato); text-decoration: none; }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 100px;
  font-family: "Figtree", sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  border: 2.5px solid var(--ink);
  transition: transform 0.15s cubic-bezier(0.2,0.7,0.2,1), box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 2px 0 var(--ink);
}

/* Nav CTA — bump specificity so the button's own color wins over `.nav-links a` */
.nav-links a.btn         { box-shadow: none; border-width: 2px; }
.nav-links a.btn-dark    { color: var(--cream); background: var(--ink); }
.nav-links a.btn-dark:hover { color: var(--cream); }
.nav-links a.btn-tomato  { color: var(--paper); background: var(--tomato); }
.nav-links a.btn-sun     { color: var(--ink); background: var(--sun); }
.nav-links a.btn-yolk    { color: var(--ink); background: var(--yolk); }
.nav-links a.btn-paper   { color: var(--ink); background: var(--paper); }
.nav-links a.btn:hover   { box-shadow: 2px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.nav-links a.btn:active  { box-shadow: 0 0 0 var(--ink); transform: translate(0, 0); }

.btn-dark    { background: var(--ink); color: var(--cream); }
.btn-sun     { background: var(--sun); color: var(--ink); }
.btn-tomato  { background: var(--tomato); color: var(--paper); }
.btn-yolk    { background: var(--yolk); color: var(--ink); }
.btn-paper   { background: var(--paper); color: var(--ink); }
.btn-accent  { background: var(--tomato); color: var(--paper); } /* legacy */
.btn-outline { background: transparent; color: var(--ink); }

/* ====== PAGE + SECTIONS ====== */
.page { padding-top: 68px; }

.section { padding: 90px 24px; max-width: 1200px; margin: 0 auto; position: relative; }
.section-sm { padding: 64px 24px; max-width: 720px; margin: 0 auto; }

/* tag pill (legacy) */
.tag {
  display: inline-block;
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--yolk);
  padding: 6px 14px;
  border-radius: 100px;
  border: 2px solid var(--ink);
  margin-bottom: 18px;
}

hr { border: none; border-top: 2px solid var(--ink); margin: 40px 0; }

/* ====== SOCIAL ROW (reusable) ====== */
.socials {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.socials .s-label {
  font-family: "Figtree", sans-serif;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-right: 6px;
}
.socials a {
  width: 42px; height: 42px;
  border-radius: 100px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: var(--shadow-sm);
}
.socials a:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.socials a.s-tiktok:hover    { background: var(--ink); color: var(--yolk); }
.socials a.s-instagram:hover { background: var(--tomato); color: var(--paper); }
.socials a.s-x:hover         { background: var(--ink); color: var(--paper); }
.socials a.s-youtube:hover   { background: var(--tomato); color: var(--paper); }
.socials svg { width: 18px; height: 18px; display: block; }

/* On-dark variant for the finale/ink sections */
.socials.on-ink .s-label { color: rgba(245,232,213,0.65); }
.socials.on-ink a { background: transparent; color: var(--cream); border-color: var(--cream); box-shadow: none; }
.socials.on-ink a:hover { background: var(--cream); color: var(--ink); }

@media (max-width: 560px) {
  .socials a { width: 38px; height: 38px; }
  .socials svg { width: 16px; height: 16px; }
}

/* ====== FOOTER ====== */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 60px 32px 32px;
}
footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
footer .footer-logo {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 2.2rem;
  color: var(--cream);
  letter-spacing: -0.04em;
  display: block;
  margin-bottom: 14px;
}
footer .footer-tag {
  color: rgba(245,232,213,0.65);
  max-width: 300px;
  font-size: 0.92rem;
  line-height: 1.55;
}
footer .footer-col h4 {
  font-family: "Figtree", sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yolk);
  margin-bottom: 18px;
}
footer .footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}
footer .footer-links a {
  color: rgba(245,232,213,0.8);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
footer .footer-links a:hover { color: var(--sun); text-decoration: none; }
footer .footer-copy {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(245,232,213,0.15);
  font-size: 0.82rem;
  color: rgba(245,232,213,0.45);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 820px) {
  footer .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  footer .footer-inner { grid-template-columns: 1fr; }
}

/* ==============================================================
   AGENT SUB-PAGE STYLES (used by /agents/*.html)
   ============================================================== */
.ap-hero {
  padding: 120px 24px 80px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}
@media (max-width: 640px) { .ap-hero { padding-top: 96px; } }
.ap-hero-grid {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 56px;
  align-items: center;
}
.ap-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--yolk);
  border: 2.5px solid var(--ink);
  border-radius: 100px;
  padding: 8px 16px;
  font-family: "Figtree", sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.ap-hero h1 {
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.ap-hero .lede {
  font-size: 1.2rem;
  color: var(--ink-80);
  max-width: 520px;
  line-height: 1.5;
  margin-bottom: 30px;
}
.ap-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.ap-mascot {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 40px;
  overflow: hidden;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
}
.ap-mascot video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-mascot .badge {
  position: absolute;
  top: 18px; left: 18px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 100px;
  padding: 8px 14px;
  font-family: "Figtree", sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  .ap-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .ap-mascot { max-width: 420px; margin: 0 auto; }
}

.ap-section {
  padding: 90px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.ap-section.paper { background: var(--paper); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); max-width: none; }
.ap-section.paper .ap-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.ap-section h2 {
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  margin-bottom: 18px;
  max-width: 720px;
}
.ap-section .intro {
  font-size: 1.08rem;
  color: var(--ink-80);
  max-width: 620px;
  margin-bottom: 44px;
  line-height: 1.55;
}

.ap-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ap-step {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.ap-step .n {
  display: inline-block;
  background: var(--tomato);
  color: var(--paper);
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 1.6rem;
  width: 48px; height: 48px;
  border-radius: 100px;
  border: 2.5px solid var(--ink);
  line-height: 44px;
  text-align: center;
  margin-bottom: 18px;
}
.ap-step h3 { font-size: 1.4rem; margin-bottom: 10px; line-height: 1.1; }
.ap-step p { color: var(--ink-80); font-size: 0.98rem; line-height: 1.55; }
@media (max-width: 800px) { .ap-steps { grid-template-columns: 1fr; } }

.ap-usecases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.ap-use {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 24px;
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
.ap-use h3 { font-size: 1.3rem; margin-bottom: 8px; line-height: 1.15; }
.ap-use p { color: var(--ink-80); font-size: 0.98rem; line-height: 1.55; }
.ap-use.sun { background: var(--sun); }
.ap-use.yolk { background: var(--yolk); }
.ap-use.mint { background: var(--mint); }
.ap-use.sky { background: var(--sky); }
.ap-use.tomato { background: var(--tomato); }
.ap-use.tomato h3 { color: var(--paper); }
.ap-use.tomato p { color: rgba(255,248,238,0.85); }
@media (max-width: 720px) { .ap-usecases { grid-template-columns: 1fr; } }

.ap-related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.ap-rel {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.ap-rel:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-md); text-decoration: none; }
.ap-rel .label { color: var(--tomato); margin-bottom: 10px; display: block; }
.ap-rel h3 { font-size: 1.4rem; margin-bottom: 6px; line-height: 1.1; }
.ap-rel p { color: var(--ink-80); font-size: 0.92rem; line-height: 1.45; }
@media (max-width: 800px) { .ap-related { grid-template-columns: 1fr; } }

/* ap-faq reuses details.faq styles defined in index inline — replicate here for sub-pages */
details.ap-faq {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
details.ap-faq[open] { box-shadow: var(--shadow-md); }
details.ap-faq summary {
  padding: 22px 24px;
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
  line-height: 1.2;
}
details.ap-faq summary::-webkit-details-marker { display: none; }
details.ap-faq summary::after {
  content: "+"; font-family: "Figtree", sans-serif;
  font-size: 1.8rem; font-weight: 900; color: var(--tomato);
  flex-shrink: 0; margin-left: 16px; transition: transform 0.2s; line-height: 1;
}
details.ap-faq[open] summary::after { transform: rotate(45deg); }
details.ap-faq .ans {
  padding: 0 24px 24px;
  font-size: 1rem; color: var(--ink-80); line-height: 1.6;
}

.ap-cta {
  background: var(--sun);
  border-top: 3px solid var(--ink);
  padding: 90px 24px;
  text-align: center;
}
.ap-cta h2 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin: 0 auto 20px;
  max-width: 900px;
}
.ap-cta p { max-width: 480px; margin: 0 auto 28px; color: var(--ink-80); font-size: 1.05rem; line-height: 1.55; }

/* ====== RESPONSIVE NAV ====== */
@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.88rem; }
  .nav-logo { font-size: 1.5rem; }
}
@media (max-width: 720px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.82rem; }
  /* drop Support first since it's still in footer */
  .nav-links li.nav-support { display: none; }
}
@media (max-width: 560px) {
  nav { padding: 0 16px; height: 60px; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 0.78rem; }
  /* collapse to just Agents + CTA at tightest */
  .nav-links li.nav-pricing,
  .nav-links li.nav-faq { display: none; }
  .nav-links li > a.btn { padding: 8px 14px; font-size: 0.82rem; }
  .nav-logo { font-size: 1.3rem; }
  .page { padding-top: 60px; }
}
@media (max-width: 420px) {
  .nav-links li.nav-agents { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 60px 20px; }
  .section-sm { padding: 48px 20px; }
  .btn { padding: 12px 20px; font-size: 0.9rem; }
}
