/*
Theme Name: Willa
Theme URI: https://willa.app
Author: Willa
Description: Light, family-friendly marketing theme for Willa — a parent-controlled AI chat app for children, built as a native WordPress theme.
Version: 1.0.0
License: Proprietary
Text Domain: willa
*/

/* Design tokens — palette derived from the Willa app icon (indigo shield + gold W). */
:root {
  --bg:          #FFFDF6;
  --bg-tint:     #FFF8E9;
  --bg-tint-2:   #FFF3DA;
  --ink:         #211C50;
  --ink-2:       #39326D;
  --gold:        #F5DA42;
  --gold-light:  #FFD97F;
  --gold-lighter:#FFE7B0;
  --gold-dark:   #C79A2E;
  --muted:       #5B5480;
  --line:        #E9E1CF;
  --line-strong: #DCCFA8;
  --white:       #FFFFFF;
  --bubble-tint: #EEECF7;
  --indigo-wash: #F4F3F9;
  --indigo-soft: #A9A2D8;

  --footer-bg:    #FFF8E9;
  --footer-ink:   #211C50;
  --footer-muted: #5B5480;

  --wrap: 1200px;
  --gap: 24px;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(33, 28, 80, 0.06);
  --shadow-md: 0 12px 32px rgba(33, 28, 80, 0.10);
  --shadow-lg: 0 20px 48px rgba(33, 28, 80, 0.14);

  --font-heading: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-2); text-decoration: none; }
a:hover { color: var(--ink); }

/* Visible, high-contrast focus states everywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ink-2);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 112px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--bg-tint); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
}

.rule {
  width: 64px; height: 4px;
  background: var(--gold);
  border: 0; border-radius: var(--radius-pill);
  margin: 0 0 28px;
}
.rule--center { margin-left: auto; margin-right: auto; }

.center { text-align: center; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 760px; }
.lede--center { margin-left: auto; margin-right: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 246, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 88px;
}
.site-logo { display: flex; align-items: center; gap: 12px; }
.site-logo img,
.site-logo .custom-logo { height: 44px; width: auto; border-radius: 10px; }
.site-logo__wordmark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav a {
  color: var(--ink-2);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  display: inline-block;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav a:hover, .nav .current-menu-item > a { color: var(--ink); background: var(--gold-lighter); }

/* Dropdowns */
.nav ul ul {
  position: absolute; top: 100%; left: 0;
  display: block; flex-direction: column; gap: 0;
  min-width: 240px; padding: 10px; margin-top: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.nav li:hover > ul, .nav li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.nav ul ul a { display: block; padding: 10px 14px; font-size: 0.9rem; border-radius: var(--radius-sm); }
.nav ul ul a:hover { background: var(--bg-tint); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 2px solid var(--ink);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.btn--solid { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: 0 4px 12px rgba(245, 218, 66, 0.35); }
.btn--solid:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--sm { padding: 9px 18px; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--white); border: 1px solid var(--line);
  color: var(--ink); border-radius: var(--radius-sm);
  padding: 9px 13px; font-size: 1.1rem; cursor: pointer;
}

/* ---------- Hero ---------- */
/* Pure CSS background: soft gold/cream gradient with decorative indigo + gold blobs. */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--bg-tint-2) 0%, var(--bg) 65%);
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  z-index: 0;
}
.hero::before {
  width: 620px; height: 620px;
  top: -220px; right: -180px;
  background: radial-gradient(circle at 30% 30%, var(--gold-light) 0%, var(--gold-lighter) 55%, transparent 75%);
  opacity: 0.8;
}
.hero::after {
  width: 460px; height: 460px;
  bottom: -240px; left: -140px;
  background: radial-gradient(circle at 60% 40%, var(--ink-2) 0%, var(--ink) 55%, transparent 75%);
  opacity: 0.08;
}
.hero > * { position: relative; z-index: 1; }
.hero__inner { padding: 100px 24px 96px; }
/* Copy on the left, dashboard screenshot across from it on the right. */
.wp-block-columns.hero__cols { gap: 64px; margin-bottom: 0; }
.wp-block-column.hero__copy { flex: 1.1 1 0; }
.wp-block-column.hero__copy > * { max-width: 640px; }
.wp-block-column.hero__media { flex: 1 1 0; }
.hero__shot { margin: 0; }
.hero__shot img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.hero__shot-caption {
  margin: 14px 4px 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}
.hero__title { margin-bottom: 0; }
.hero__accent {
  color: var(--ink-2);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 20px;
}
.hero__tagline { font-size: 1.3rem; color: rgba(33, 28, 80, 0.8); margin-bottom: 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Feature cards ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid rgba(245, 218, 66, 0.35);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: 0 12px 32px rgba(33, 28, 80, 0.05), 0 4px 12px rgba(33, 28, 80, 0.03);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { color: var(--ink); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* ---------- Split (text + image) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split--top { align-items: start; }
.split + .split { margin-top: 72px; }
.split__media img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--muted);
}
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 0.3em;
  width: 20px; height: 20px;
  background: var(--gold);
  border-radius: 6px;
  transform: rotate(12deg);
}
.checklist li::after {
  content: "";
  position: absolute; left: 6px; top: 0.62em;
  width: 8px; height: 4px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
}

/* Pull-quote style callout */
.callout {
  border-left: 4px solid var(--gold);
  background: var(--bg-tint);
  padding: 26px 30px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 40px;
}
.callout h3 { color: var(--ink); }
.callout p { color: var(--muted); margin: 0; }

/* ---------- Illustrated example cards (framed / plate / shot) ----------
   No screenshots exist for this rebuild, so these wp:group wrappers (plain
   divs, not figures) are styled as small CSS "mockup" cards: a faux app
   titlebar (three dots) on a rounded, shadowed card. framed/plate/shot
   share the same shell; their contents (chat bubbles, dashboard rows,
   pipeline steps) differ below. */
.framed,
.plate,
.shot {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  padding: 34px 22px 22px;
}
.framed::before,
.plate::before,
.shot::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 34px;
  background: var(--bg-tint);
  border-bottom: 1px solid var(--line);
}
.framed::after,
.plate::after,
.shot::after {
  content: "";
  position: absolute; top: 13px; left: 18px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 16px 0 0 var(--gold-light), 32px 0 0 var(--gold-dark);
}

/* Optional warm-accent variant for a card that needs to stand out, e.g. an
   alert row. Nothing in the current pattern content opts into this yet —
   add "shot--alert" to the wrapper (and "dash-line--alert" to the relevant
   row) to get the warm border + tint. */
.shot--alert {
  border-color: var(--gold-dark);
  background: var(--bg-tint-2);
}
.shot--alert::before { background: var(--gold-lighter); border-bottom-color: var(--gold-dark); }

/* Chat bubbles inside .framed / .shot — opposing sides like a real chat:
   kid right-aligned on a gold tint, Willa left-aligned on a cream/white tint. */
.chat-line {
  max-width: 82%;
  margin: 0 0 14px;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}
.chat-line:last-child { margin-bottom: 0; }
.chat-line--kid {
  margin-left: auto;
  background: var(--gold-lighter);
  border-bottom-right-radius: 6px;
}
.chat-line--willa {
  margin-right: auto;
  background: var(--white);
  border: 1px solid var(--gold-light);
  box-shadow: 0 2px 8px rgba(245, 218, 66, 0.18);
  border-bottom-left-radius: 6px;
}

/* Parent-dashboard summary rows inside .shot. */
.dash-line {
  margin: 0;
  padding: 9px 0;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
}
.dash-line:first-of-type { border-top: 0; padding-top: 0; }
.dash-line--title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  border-top: 0;
  padding-top: 0;
  padding-bottom: 6px;
}
/* Opt-in modifier for an alert row — see .shot--alert above. */
.dash-line--alert { color: var(--ink); font-weight: 700; }

/* Small muted centered caption under a .shot card (replaces figcaption). */
.shot__caption {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* Four-step safety pipeline inside .plate. */
.plate__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 18px;
}
.plate__line {
  margin: 0;
  padding: 9px 0;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
}
.plate__line:first-of-type { border-top: 0; padding-top: 0; }

/* ---------- Alerts: SMS / email mockups + escalation ladder ----------
   Used by the #alerts section. .sms-card and .email-card sit on a .shot
   group, so they inherit the titlebar card shell above; these rules only
   cover their inner content. */
.sms-card__header {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.sms-bubble {
  max-width: 85%;
  margin: 0 0 10px;
  padding: 10px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 6px;
  background: var(--bubble-tint);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}
.sms-bubble:last-child { margin-bottom: 0; }

.email-card__subject {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 6px;
}
.email-card__meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.email-card__body {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 10px;
}
.email-card__body:last-child { margin-bottom: 0; }

/* Displayed (non-interactive) confirm button inside the email mockup. */
.email-card__button {
  display: inline-block;
  align-self: flex-start;
  margin: 4px 0 14px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

/* Escalation ladder: a numbered vertical timeline. Each tier is one step —
   a badge circle on a connector rail, and beside it a card with the tier
   title, a channel chip, and the description. Severity builds through
   indigo/gold depth and weight, never a red/alarm color. */
.escalation {
  display: grid;
  gap: 20px;
  max-width: 980px;
  margin: 44px auto 0;
}
.escalation-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
  position: relative;
}
.escalation-step__badge {
  width: 56px; height: 56px;
  margin: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
  border: 3px solid var(--line-strong);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  position: relative;
  z-index: 1;
}
/* Connector rail between badges. */
.escalation-step::before {
  content: "";
  position: absolute;
  left: 26px; top: 56px; bottom: -20px;
  width: 4px;
  border-radius: 4px;
  background: var(--gold-light);
}
.escalation-step:last-child::before { display: none; }

.escalation-step__card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 6px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  box-shadow: var(--shadow-sm);
}
.escalation-step__title {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--ink);
}
.escalation-step__chip {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--indigo-wash);
  color: var(--ink-2);
}
.escalation-step__body {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.escalation-step--info .escalation-step__badge { border-color: var(--indigo-soft); }
.escalation-step--info .escalation-step__card { border-left-color: var(--indigo-soft); }

.escalation-step--warning .escalation-step__badge { border-color: var(--gold); background: var(--gold-lighter); }
.escalation-step--warning .escalation-step__card { border-left-color: var(--gold); }
.escalation-step--warning .escalation-step__chip { background: var(--gold-lighter); color: var(--ink); }

.escalation-step--critical .escalation-step__badge { border-color: var(--gold-dark); background: var(--gold-light); }
.escalation-step--critical .escalation-step__card { border-left-color: var(--gold-dark); background: var(--bg-tint); }
.escalation-step--critical .escalation-step__chip { background: var(--gold-light); color: var(--ink); }

.escalation-step--crisis .escalation-step__badge { border-color: var(--ink); background: var(--white); color: var(--ink); }
.escalation-step--crisis .escalation-step__card { border-left-color: var(--ink); background: var(--indigo-wash); }
.escalation-step--crisis .escalation-step__chip { background: var(--gold-light); color: var(--ink); }

/* ---------- Slideshow: "A Look Inside Willa" (#portal) ----------
   Base state (no JS): .slideshow just holds .slide blocks in normal flow,
   so the section is fully usable without the carousel script. assets/js/
   theme.js progressively enhances this into a clipped, translating track
   with prev/next/dot controls — see the .slideshow__* rules below. */
.slideshow {
  position: relative;
  max-width: 880px;
  margin: 44px auto 0;
}
.slideshow .slide + .slide { margin-top: 24px; }

/* JS-enhanced state. */
.slideshow__viewport {
  overflow: hidden;
  border-radius: var(--radius);
}
.slideshow__track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.35s ease;
}
.slideshow__track .slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: 6px; /* keeps the card's box-shadow from being clipped by the viewport */
  margin-top: 0;
}
.slide__shot { margin: 0 auto; max-width: 100%; width: 100%; min-height: 280px; }
.slide__caption {
  margin: 16px auto 0;
  max-width: 640px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.slideshow__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s ease, color .15s ease;
}
.slideshow__arrow:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.slideshow__arrow--prev { left: 0; transform: translate(-50%, -50%); }
.slideshow__arrow--next { right: 0; transform: translate(50%, -50%); }

.slideshow__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.slideshow__dot {
  width: 22px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  cursor: pointer;
  transition: background-color .15s ease, width .15s ease;
}
.slideshow__dot:hover { background: var(--gold-dark); }
.slideshow__dot[aria-current="true"] { width: 30px; background: var(--ink); }

/* Pull the arrows inside the card on narrow screens, where there's no room
   for them to sit half outside the slideshow's edges. */
@media (max-width: 640px) {
  .slideshow__arrow--prev { left: 8px; transform: translateY(-50%); }
  .slideshow__arrow--next { right: 8px; transform: translateY(-50%); }
}

/* Slide 6: a kid's-eye view of the chat, warmer and playful. Overrides the
   .shot shell's flex-column layout with plain centered block flow so the
   two chip "buttons" can sit side by side without needing extra markup. */
.kid-screen {
  display: block;
  text-align: center;
  background: var(--bg-tint);
}
.kid-screen .chat-line { text-align: left; }

.kid-screen__buddy {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 116px;
  margin: 4px auto 18px;
  font-size: 64px;
  line-height: 1;
}
.kid-screen__buddy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-light) 0%, var(--gold-lighter) 60%, transparent 80%);
}

.kid-screen__chip {
  display: inline-block;
  vertical-align: middle;
  margin: 0 6px 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  background: var(--gold-lighter);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
}

@media (max-width: 560px) {
  .slideshow { margin-top: 32px; }
}

/* ---------- Gallery grid ----------
   The card shell (background, titlebar, shadow) for .shot is defined above
   alongside .framed/.plate. This section only covers the legacy figure
   markup (wp:image with a "shot" class + figcaption), kept in case any page
   ever uses a real screenshot instead of the illustrated chat-mockup content. */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--bg-tint-2);
  padding: 20px;
}
.shot figcaption {
  margin-top: auto;
  padding: 16px 20px;
  font-size: 0.92rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ---------- Contact form (#contact) ---------- */
.contact-form-wrap { max-width: 680px; margin: 40px auto 0; }
.contact-notice {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: 20px;
}
.contact-notice--ok { background: var(--gold-lighter); color: var(--ink); border: 1px solid var(--gold); }
.contact-notice--err { background: var(--indigo-wash); color: var(--ink-2); border: 1px solid var(--indigo-soft); }

.contact-form__trap {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form__field { margin: 0 0 18px; }
.contact-form__field label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}
.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color .15s ease;
}
.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-color: var(--gold-dark);
}
.contact-form__field textarea { resize: vertical; min-height: 140px; }
.contact-form__submit { margin: 4px 0 0; text-align: center; }
.contact-form__submit .btn {
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(245, 218, 66, 0.35);
}
.contact-form__submit .btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--white); }

.contact-updates {
  margin: 28px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.contact-updates a { font-weight: 800; font-family: var(--font-heading); color: var(--gold-dark); }
.contact-updates a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .contact-form__row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--gold-light);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.site-footer img.footer-logo { height: 52px; width: auto; border-radius: 12px; margin-bottom: 18px; }
.site-footer h4 { color: var(--gold); font-family: var(--font-heading); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer p, .site-footer li { color: var(--footer-muted); font-size: 0.95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--footer-muted); }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid var(--line-strong);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 0.86rem; color: var(--footer-muted);
}

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed; left: 24px; right: 24px; bottom: 24px; z-index: 90;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 22px 26px;
  max-width: 920px;
  margin: 0 auto;
}
.cookie__inner { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.cookie__text { flex: 1 1 420px; }
.cookie__text strong { display: block; color: var(--ink); margin-bottom: 4px; font-family: var(--font-heading); }
.cookie__text p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.cookie[hidden] { display: none; }

/* ---------- Generic page/post content ---------- */
.entry { padding: 72px 0; }
.entry__body h2, .entry__body h3 { color: var(--ink); margin-top: 1.6em; }

/* ---------- Core block mappings ----------
   The landing page is built from core blocks so the copy stays editable in
   wp-admin. These rules map core block markup onto the design above. */

/* Separator -> gold rule */
.wp-block-separator.rule {
  border: 0;
  opacity: 1;
  width: 64px;
  height: 4px;
  background: var(--gold);
  border-radius: var(--radius-pill);
  margin: 0 0 28px;
}
.wp-block-separator.rule--center { margin-left: auto; margin-right: auto; }

/* Buttons */
.wp-block-buttons.hero__cta { gap: 14px; }
.wp-block-button .wp-block-button__link {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.wp-block-button.btn--solid .wp-block-button__link { background: var(--gold); border-color: var(--gold); color: var(--ink); box-shadow: var(--shadow-sm); }
.wp-block-button.btn--solid .wp-block-button__link:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.wp-block-button.btn--ghost .wp-block-button__link:hover { background: var(--ink); color: var(--white); }

/* Feature card row */
.wp-block-columns.cards { gap: var(--gap); margin-bottom: 0; }
.wp-block-column.card { padding: 30px 26px; }

/* Two-up text/image splits */
.wp-block-columns.split-cols { gap: 56px; margin-bottom: 0; }
.wp-block-columns.split--top { align-items: flex-start; }
.split-cols + .split-cols { margin-top: 72px; }

/* Images (legacy: kept in case a page uses real wp:image figures instead
   of the illustrated group-based mockups; the .framed/.plate/.shot shell
   itself is defined once, earlier, as a bare class so it covers both the
   wp:group (div) and wp:image (figure) versions). */
.wp-block-image.framed { margin: 0; }
.wp-block-image.framed img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* System preview gallery */
.wp-block-columns.gallery-row { gap: 30px; margin-bottom: 0; }
.gallery-row + .gallery-row { margin-top: 30px; }
.gallery-row .shot { height: 100%; margin: 0; }
.wp-block-image.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--bg-tint-2);
  padding: 20px;
}
.wp-block-image.shot figcaption {
  margin: auto 0 0;
  padding: 16px 20px;
  font-size: 0.92rem;
  text-align: left;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Keep card columns two-up on tablets rather than jumping straight to one. */
@media (min-width: 782px) and (max-width: 1000px) {
  .wp-block-columns.cards { flex-wrap: wrap; }
  .wp-block-columns.cards > .wp-block-column { flex-basis: calc(50% - 12px); flex-grow: 0; }
}

@media (max-width: 781px) {
  .split-cols + .split-cols { margin-top: 36px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 14px 24px 22px;
    max-height: 75vh; overflow-y: auto;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--line); }
  .nav a { padding: 12px 14px; width: 100%; border-radius: var(--radius-sm); }
  .nav ul ul {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: transparent;
    padding: 0 0 8px 16px; min-width: 0;
  }
  .header-actions { display: none; }
  .site-header__inner { position: relative; min-height: 72px; }
  .hero__inner { padding: 78px 24px 72px; }
  .gallery { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}

@media (max-width: 560px) {
  .grid--4, .grid--2, .footer-grid { grid-template-columns: 1fr; }
  .escalation-step { grid-template-columns: 40px 1fr; gap: 14px; }
  .escalation-step__badge { width: 40px; height: 40px; font-size: 1rem; border-width: 2px; }
  .escalation-step::before { left: 18px; top: 40px; }
}

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

/* ---------- Live demo: "Watch a Conversation Happen" (#demo) ----------
   Markup: .demo holds three .demo-scenario groups, each with a title, a
   note, and a two-column .demo-stage (child chat on the left, parent phone
   on the right). Every revealable element carries .demo-beat.

   No JS: everything below renders statically — all three scenarios stack
   with their titles, every chat line and notification visible.

   With JS (theme.js adds .demo--enhanced): scenario titles become a tab
   bar, one scenario shows at a time, and .demo-beat elements start hidden
   and are revealed in sequence with a typing indicator. */

.demo { max-width: 1060px; margin: 44px auto 0; }

.demo-scenario + .demo-scenario { margin-top: 64px; }
.demo--enhanced .demo-scenario + .demo-scenario { margin-top: 0; }
.demo--enhanced .demo-scenario { display: none; }
.demo--enhanced .demo-scenario.is-active { display: block; }
.demo--enhanced .demo-scenario__title { display: none; } /* title lives in the tab */

.demo-scenario__title { text-align: center; margin-bottom: 8px; }
.demo-scenario__note {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.97rem;
}

/* JS-injected tab bar. */
.demo-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.demo-tab {
  padding: 11px 22px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink-2);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.demo-tab:hover { border-color: var(--gold-dark); color: var(--ink); }
.demo-tab[aria-selected="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(245, 218, 66, 0.35);
}

/* Stage columns: chat wider than phone. Core stacks them below 782px. */
.wp-block-columns.demo-stage { gap: 32px; margin-bottom: 0; align-items: flex-start; }
.wp-block-column.demo-stage__chat { flex: 1.5 1 0; }
.wp-block-column.demo-stage__phone { flex: 1 1 0; }

.demo-chat { min-height: 320px; }
.demo-chat__who {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

/* Accent chat-line variants used by the demo scenarios. */
.chat-line--redirect { border-left: 4px solid var(--gold-dark); }
.chat-line--care { background: var(--indigo-wash); border-color: var(--indigo-soft); }

/* Parent phone frame. */
.demo-phone {
  position: relative;
  background: var(--indigo-wash);
  border: 3px solid var(--ink);
  border-radius: 30px;
  padding: 44px 16px 22px;
  box-shadow: var(--shadow-md);
  min-height: 320px;
}
.demo-phone::before { /* speaker slot */
  content: "";
  position: absolute;
  top: 16px; left: 50%;
  width: 56px; height: 6px;
  transform: translateX(-50%);
  border-radius: var(--radius-pill);
  background: var(--ink);
  opacity: 0.25;
}
.demo-phone__label {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
  margin: 0 0 14px;
}

/* Notification cards on the phone. */
.notify {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.notify:last-child { margin-bottom: 0; }
.notify__title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink);
  margin: 0 0 6px;
}
.notify__body { color: var(--muted); font-size: 0.88rem; line-height: 1.55; margin: 0; }
.notify__chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--indigo-wash);
  color: var(--ink-2);
}
.notify__chip--warning { background: var(--gold-lighter); color: var(--ink); }
.notify__chip--crisis { background: var(--ink); color: var(--gold-light); }
.notify__button {
  display: inline-block;
  margin: 10px 0 0;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: var(--shadow-sm);
}
.notify--quiet { background: var(--bg-tint); border-style: dashed; box-shadow: none; }
.notify--sms { border-color: var(--ink); border-width: 2px; }
.notify--escalate { background: transparent; border-style: dashed; box-shadow: none; }
.notify--escalate .notify__title { color: var(--ink-2); font-size: 0.82rem; }

/* Beat reveal: hidden only when JS has enhanced the demo. */
.demo--enhanced .demo-beat {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s ease, transform .4s ease;
}
.demo--enhanced .demo-beat.is-shown { opacity: 1; transform: none; }

/* JS-injected typing indicator: three bouncing dots in a Willa bubble. */
.demo-typing {
  display: inline-flex;
  gap: 5px;
  margin: 0 auto 14px 0;
  padding: 14px 18px;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  background: var(--white);
  border: 1px solid var(--gold-light);
}
.demo-typing i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--indigo-soft);
  animation: demo-bounce 1s infinite ease-in-out;
}
.demo-typing i:nth-child(2) { animation-delay: 0.15s; }
.demo-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes demo-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* JS-injected replay control. */
.demo__controls { display: flex; justify-content: center; margin-top: 28px; }
.demo__replay {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.demo__replay:hover { background: var(--ink); color: var(--white); }

.demo__footnote {
  margin: 36px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.eyebrow.center-block { display: block; text-align: center; }

@media (max-width: 781px) {
  .demo-scenario + .demo-scenario { margin-top: 44px; }
  .demo-phone { min-height: 0; }
  .demo-chat { min-height: 0; }
}

/* ---------- Devices: "One Willa, Every Screen" (#everywhere) ----------
   Three cards — phone / browser / desktop — each with a screenshot in a
   fixed-height media area so the portrait phone shot and the landscape
   screens line up. Screenshots share the .app-shot class, so the lightbox
   makes them full-size on click. */
.wp-block-columns.devices-row { gap: 30px; margin: 44px 0 0; align-items: stretch; }
.wp-block-column.device-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.wp-block-column.device-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.device-card__title { text-align: center; margin-bottom: 16px; }
/* The media area grows to fill the card and centers the screenshot, so the
   portrait phone and the landscape screens share one visual midline. */
.device-card .device-shot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 16px;
}
.device-card .device-shot img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 380px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.device-card .shot__caption { margin-top: auto; }

@media (max-width: 781px) {
  .device-card .device-shot img { max-height: 320px; }
}

/* ---------- Lightbox: click any app screenshot to view it full size ----
   Built entirely by theme.js; without JS screenshots are plain images. */
.js-zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px 32px;
  background: rgba(33, 28, 80, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: min(1400px, 100%);
  max-height: 82vh;
  width: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.lightbox__caption {
  max-width: 720px;
  margin: 0;
  text-align: center;
  color: var(--gold-lighter);
  font-size: 0.95rem;
}
.lightbox__close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--gold-light);
  border-radius: 50%;
  background: transparent;
  color: var(--gold-light);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.lightbox__close:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* ---------- Real app screenshots ---------- */
.app-shot { margin: 0; }
.app-shot img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.slide .app-shot { margin-bottom: 18px; }
.gallery-row .app-shot { margin-bottom: 12px; }
.gallery-row .shot__caption { text-align: center; }
