/* Casmia by AI Executive, the partner AI assistant.
   Mobile first. Light and dark themes. No webfonts, no frameworks. */

:root {
  --bg: #faf8fc;
  --bg-soft: #f3eff9;
  --card: #ffffff;
  --ink: #2b2138;
  --muted: #635775;
  --line: #e3daf1;
  --lav: #7c6cc4;
  --lav-deep: #4a3d8f;
  --plum: #3a2c58;
  --rose: #b57e6b;
  --rose-soft: #f6e3d8;
  --gold-soft: #f7ead0;
  --glow-1: rgba(140, 120, 200, .28);
  --glow-2: rgba(217, 165, 143, .22);
  --shadow: 0 18px 50px rgba(74, 61, 143, .12);
  --portrait-halo-purple: rgba(140, 108, 224, .55);
  --portrait-halo-purple-soft: rgba(140, 108, 224, .28);
  --portrait-halo-white: rgba(255, 255, 255, .65);
  --teal: #0f9488;
  --teal-deep: #0b6e65;
  --teal-glow: rgba(15, 148, 136, .45);
  --teal-glow-soft: rgba(15, 148, 136, .22);
  --radius: 18px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

html[data-theme="dark"] {
  --bg: #14101c;
  --bg-soft: #1c1526;
  --card: #1e1729;
  --ink: #f1ebf9;
  --muted: #b7abc9;
  --line: #322845;
  --lav: #ab9ce4;
  --lav-deep: #c4b8f0;
  --plum: #ab9ce4;
  --rose: #d9a58f;
  --rose-soft: #3a2a33;
  --gold-soft: #38300f;
  --glow-1: rgba(150, 130, 220, .20);
  --glow-2: rgba(217, 165, 143, .14);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --portrait-halo-purple: rgba(178, 155, 255, .6);
  --portrait-halo-purple-soft: rgba(178, 155, 255, .32);
  --portrait-halo-white: rgba(255, 255, 255, .4);
  --teal: #2dd4bf;
  --teal-deep: #5eead4;
  --teal-glow: rgba(45, 212, 191, .55);
  --teal-glow-soft: rgba(45, 212, 191, .28);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #14101c;
    --bg-soft: #1c1526;
    --card: #1e1729;
    --ink: #f1ebf9;
    --muted: #b7abc9;
    --line: #322845;
    --lav: #ab9ce4;
    --lav-deep: #c4b8f0;
    --plum: #ab9ce4;
    --rose: #d9a58f;
    --rose-soft: #3a2a33;
    --gold-soft: #38300f;
    --glow-1: rgba(150, 130, 220, .20);
    --glow-2: rgba(217, 165, 143, .14);
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --portrait-halo-purple: rgba(178, 155, 255, .6);
    --portrait-halo-purple-soft: rgba(178, 155, 255, .32);
    --portrait-halo-white: rgba(255, 255, 255, .4);
    --teal: #2dd4bf;
    --teal-deep: #5eead4;
    --teal-glow: rgba(45, 212, 191, .55);
    --teal-glow-soft: rgba(45, 212, 191, .28);
  }
}

* { 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;
}

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(44px, 9vw, 88px); }
h2 { font-size: clamp(30px, 5.4vw, 48px); }
h3 { font-size: clamp(20px, 3vw, 25px); }

p { margin: 0 0 1em; }

a { color: var(--lav-deep); text-underline-offset: 3px; }
html[data-theme="dark"] a { color: var(--lav); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) a { color: var(--lav); } }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--lav);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--plum); color: #fff; padding: 10px 16px;
  border-radius: 10px; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; color: #fff; }

.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal-deep); margin: 0 0 12px;
}
html[data-theme="dark"] .eyebrow { color: var(--teal); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .eyebrow { color: var(--teal); } }

.section-sub { color: var(--muted); font-size: clamp(17px, 2.4vw, 20px); max-width: 62ch; }

section { padding: clamp(56px, 9vw, 110px) 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  padding-top: 12px; padding-bottom: 12px;
}
.brand { text-decoration: none; color: var(--ink); line-height: 1.1; display: grid; }
.brand-name { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; white-space: nowrap; }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex; gap: 2px; list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: 14px;
  padding: 7px 9px; border-radius: 10px; white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-soft); }
.nav-toggle { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--teal); }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  html:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-size: 16.5px; font-weight: 600;
  padding: 14px 28px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; line-height: 1.2;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary { background: var(--plum); color: #fff; box-shadow: var(--shadow); }
html[data-theme="dark"] .btn-primary { color: #171021; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .btn-primary { color: #171021; } }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--lav); }
.btn-small { padding: 10px 20px; font-size: 15px; background: var(--plum); color: #fff; }
html[data-theme="dark"] .btn-small { color: #171021; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .btn-small { color: #171021; } }
.btn-small-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-small-ghost:hover { border-color: var(--teal); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: clip; padding-top: clamp(48px, 8vw, 96px); }
.hero-glow {
  position: absolute; inset: -20% -10% auto; height: 90%; z-index: -1;
  background:
    radial-gradient(42% 55% at 22% 30%, var(--glow-1), transparent 70%),
    radial-gradient(36% 50% at 78% 42%, var(--glow-2), transparent 70%),
    radial-gradient(30% 40% at 55% 75%, var(--glow-1), transparent 70%);
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.05); }
}
.hero-inner {
  display: grid; gap: 40px; align-items: center;
}
.hero-copy .eyebrow { color: var(--teal-deep); }
html[data-theme="dark"] .hero-copy .eyebrow { color: var(--teal); }
.hero-sub { font-family: var(--font-display); font-size: clamp(20px, 3.4vw, 27px); color: var(--muted); margin-bottom: 14px; }
.hero-lede { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 56ch; }
.hero-lede strong, .hero-lede b { color: var(--ink); font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 14px; }
.hero-note { font-size: 14px; color: var(--muted); margin: 0; }
.hero-portrait { justify-self: center; position: relative; width: fit-content; }
.hero-portrait img {
  width: min(420px, 78vw); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  box-shadow: 0 24px 80px rgba(124, 108, 196, .35), 0 0 0 10px color-mix(in srgb, var(--card) 70%, transparent);
  position: relative; z-index: 1;
}
.hero-portrait::before {
  content: ""; position: absolute; inset: -16px; border-radius: 50%; z-index: 0;
  background:
    radial-gradient(circle, var(--portrait-halo-white) 0%, transparent 42%),
    radial-gradient(circle, var(--portrait-halo-purple) 20%, transparent 72%);
  filter: blur(14px); pointer-events: none;
  animation: casmia-portrait-halo 5s ease-in-out infinite;
}

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(22px, 3.4vw, 34px);
  box-shadow: var(--shadow);
}

/* ---------- moments ---------- */
.moments { padding-top: 0; }
.moment-grid { display: grid; gap: 20px; margin-top: 8px; }
.moment-kicker {
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--lav-deep); margin: 0 0 8px;
}
html[data-theme="dark"] .moment-kicker { color: var(--lav); }
.moment-card p:last-child { margin-bottom: 0; color: var(--muted); }

/* ---------- how ---------- */
.how { background: var(--bg-soft); }
.how-grid { display: grid; gap: 20px; margin-top: 30px; }
.how-grid .card p:last-child { margin-bottom: 0; color: var(--muted); }
.how-grid .card { border-top: 3px solid var(--lav); }

/* ---------- scenario ---------- */
.scenario-label {
  display: inline-block; font-size: 12.5px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--teal-deep);
  border: 1.5px solid var(--teal); border-radius: 999px;
  padding: 7px 16px; margin: 0 0 18px;
}
html[data-theme="dark"] .scenario-label { color: var(--teal); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .scenario-label { color: var(--teal); } }
.scenario-intro { color: var(--muted); max-width: 62ch; font-size: clamp(17px, 2.4vw, 20px); }
.dialogue { display: grid; gap: 12px; margin: 26px 0 30px; max-width: 560px; }
.bubble {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 4px 20px 20px 20px; padding: 14px 20px;
  box-shadow: var(--shadow); width: fit-content;
}
.bubble p { margin: 0; font-family: var(--font-display); font-size: 19px; }
.bubble:nth-child(even) { border-radius: 20px 4px 20px 20px; justify-self: end; background: var(--bg-soft); }
.scenario-answer { max-width: 720px; border-left: 4px solid var(--rose); }
.scenario-answer p:last-child { margin-bottom: 0; color: var(--muted); }

/* ---------- connected diagram ---------- */
.connected { background: var(--bg-soft); }
.diagram {
  background: var(--card); border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px); padding: clamp(24px, 4vw, 48px);
  margin-top: 34px; box-shadow: var(--shadow);
}
.d-row { display: grid; gap: 18px; align-items: stretch; }
.d-node { border: 2px solid var(--ink); border-radius: 14px; padding: 20px 22px; }
.d-node h3 { font-size: 20px; margin-bottom: 6px; }
.d-node p { margin: 0; font-size: 14.5px; color: var(--muted); }
.d-link { display: grid; gap: 6px; align-content: center; text-align: center; padding: 6px 0; }
.d-link-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--lav-deep);
}
html[data-theme="dark"] .d-link-label { color: var(--lav); }
.d-link-bar { height: 0; border-top: 3px dashed var(--lav); }
.d-link-note { font-size: 12.5px; color: var(--muted); }
.d-down { width: 0; height: 44px; border-left: 3px solid var(--rose); margin: 18px auto 0; }
.d-down-label {
  text-align: center; font-size: 11.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--rose);
  margin: 8px 0 0;
}
.d-ctm {
  max-width: 380px; margin: 14px auto 0; text-align: center;
  border: 2px solid var(--rose); border-radius: 14px; padding: 18px 22px;
}
.d-ctm h3 { color: var(--rose); font-size: 20px; margin-bottom: 6px; }
.d-ctm p { margin: 0; font-size: 14px; color: var(--muted); }
.diagram-legend { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- partners ---------- */
.partner-grid { display: grid; gap: 20px; margin-top: 30px; }
.partner-grid .card p:last-child { margin-bottom: 0; color: var(--muted); }

/* ---------- honest ---------- */
.honest { background: var(--bg-soft); }
.honest-grid { display: grid; gap: 20px; margin-top: 30px; }
.honest-real { border-top: 3px solid var(--lav); }
.honest-designed { border-top: 3px dashed var(--rose); }
.honest-grid ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 10px; }
.honest-grid li::marker { color: var(--lav); }
.honest-designed li::marker { color: var(--rose); }
.honest-foot { margin-top: 22px; font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; max-width: 72ch; }

/* ---------- meet ---------- */
.meet-inner { display: grid; gap: 36px; align-items: center; }
.meet-portrait { justify-self: center; position: relative; width: fit-content; }
.meet-portrait img {
  width: min(360px, 72vw); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  box-shadow: 0 24px 70px rgba(124, 108, 196, .30);
  position: relative; z-index: 1;
}
.meet-portrait::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%; z-index: 0;
  background:
    radial-gradient(circle, var(--portrait-halo-white) 0%, transparent 42%),
    radial-gradient(circle, var(--portrait-halo-purple) 20%, transparent 72%);
  filter: blur(12px); pointer-events: none;
  animation: casmia-portrait-halo 5s ease-in-out infinite;
}
@keyframes casmia-portrait-halo {
  0%, 100% { opacity: .75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
.meet-copy > p { color: var(--muted); max-width: 56ch; }
.call-card { margin-top: 26px; max-width: 420px; border-left: 4px solid var(--lav); }
.call-number { font-family: var(--font-display); font-size: clamp(28px, 5vw, 38px); margin: 4px 0 2px; }
.call-number a { color: var(--ink); text-decoration: none; }
.call-note { color: var(--muted); margin-bottom: 18px; }

/* ---------- contact ---------- */
.contact { background: var(--bg-soft); }
.contact-inner { display: grid; gap: 36px; }
.contact-direct { color: var(--muted); }
.socials { list-style: none; display: flex; gap: 10px; padding: 0; margin: 18px 0 0; flex-wrap: wrap; }
.socials a {
  display: inline-block; padding: 10px 20px; border: 1px solid var(--line);
  border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 15px;
  background: var(--card);
}
.socials a:hover { border-color: var(--lav); }
.contact-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14.5px; font-weight: 600; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--lav); outline: none; }
.form-note { font-size: 13.5px; color: var(--muted); margin: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; }
.footer-inner { display: grid; gap: 10px; justify-items: center; text-align: center; }
.footer-brand a { font-family: var(--font-display); font-size: 19px; color: var(--ink); text-decoration: none; }
.footer-aiexec { margin: 0; }
.footer-aiexec a { font-size: 14px; font-weight: 600; color: var(--teal-deep); text-decoration: none; }
html[data-theme="dark"] .footer-aiexec a { color: var(--teal); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .footer-aiexec a { color: var(--teal); } }
.footer-aiexec a:hover { text-decoration: underline; }
.footer-copy { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (min-width: 720px) {
  .moment-grid, .how-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
  .honest-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1.05fr .95fr; }
  .hero-portrait { justify-self: end; }
  .meet-inner { grid-template-columns: .9fr 1.1fr; }
  .contact-inner { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* AQ-1034 (2026-10-09): the five-column connected-agents diagram needs about
   820px. At 720-760px the third node ran up to 43px off the right edge and the
   whole page scrolled sideways. Verified by width sweep, 320px to 1920px. */
@media (min-width: 820px) {
  .d-row { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; }
  .d-link { min-width: 110px; }
}
@media (max-width: 819px) {
  .d-link-bar { border-top: none; border-left: 3px dashed var(--lav); height: 34px; width: 0; margin: 0 auto; }
}

/* Desktop keeps the full horizontal nav visible -- Jason 2026-11-12: "we
   should be able to see all of the buttons up top," no hamburger at normal
   desktop widths. Below 1460px (tablet, small laptop, and phone) it collapses to the
   hamburger, which on phone moves to the LEFT of the brand (see the
   max-width:720px block below) rather than staying on the right.
   The header needs more than the page's normal 1160px .wrap cap once the
   nav is horizontal (measured ~1223px, more for Spanish/Portuguese), so the
   header's own .wrap is widened separately from the rest of the page. */
@media (min-width: 1460px) {
  .site-header .wrap { width: min(1460px, 100% - 32px); }
}
@media (max-width: 1459px) {
  .site-nav ul {
    display: none; position: absolute; top: 100%; right: 12px;
    flex-direction: column; background: var(--card);
    border: 1px solid var(--line); border-radius: 14px;
    padding: 10px; box-shadow: var(--shadow); min-width: 220px;
  }
  .site-nav ul.is-open { display: flex; }
  .site-nav { position: relative; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 10px; padding: 11px 12px; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
}

/* Phone: hamburger sits to the left of "Casmia by AI Executive", not on the
   right. .site-nav holds the toggle button (the open menu itself is
   position:absolute and unaffected by this reorder). */
@media (max-width: 720px) {
  .header-inner { flex-wrap: nowrap; }
  .site-nav { order: -1; margin-left: 0; margin-right: 4px; }
}

@media (max-width: 719px) {
  .hero-ctas .btn { flex: 1 1 auto; }
}

/* 4K stage: keep line lengths readable, let type breathe */
@media (min-width: 1800px) {
  .wrap { width: min(1400px, 100% - 80px); }
  body { font-size: 19px; }
}

/* ---------- language switcher (AQ-1035 / EB-419) ----------
   Real links, not a <select> and not JavaScript: each language is its own URL,
   so the page arrives with the right `lang` attribute already set and the
   switcher works with JS off. aria-current marks the page you are on. */
.lang-switch { display: flex; align-items: center; gap: 2px; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 34px; padding: 0 6px; border-radius: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: .05em;
  color: var(--muted); text-decoration: none; border: 1px solid transparent;
}
.lang-switch a:hover { background: var(--bg-soft); color: var(--ink); }
.lang-switch a[aria-current="page"] {
  color: var(--ink); border-color: var(--line); background: var(--card);
}
.lang-switch a:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; }

/* ---------- FAQ (AQ-1035 / EB-419) ----------
   <details>/<summary>: keyboard and screen-reader behaviour comes from the
   browser, and every answer is present in the HTML whether it is open or not. */
.faq-list { display: grid; gap: 14px; margin-top: 34px; }
.faq-item { padding: 0; overflow: clip; }
.faq-item summary {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; cursor: pointer; list-style: none;
  padding: clamp(18px, 2.4vw, 24px) clamp(20px, 3vw, 30px);
  font-family: var(--font-display); font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.3; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: 0 0 auto; font-family: var(--font-body);
  font-size: 22px; line-height: 1; color: var(--teal-deep);
  transform: translateY(2px);
}
html[data-theme="dark"] .faq-item summary::after { color: var(--teal); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .faq-item summary::after { color: var(--teal); } }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary:hover { background: var(--bg-soft); }
.faq-item summary:focus-visible { outline: 2px solid var(--lav); outline-offset: -3px; }
.faq-item .faq-a {
  padding: 0 clamp(20px, 3vw, 30px) clamp(18px, 2.4vw, 24px);
  border-top: 1px solid var(--line);
}
.faq-item .faq-a p {
  margin: 16px 0 0; color: var(--muted); max-width: 78ch;
  font-size: clamp(15.5px, 1.7vw, 17px);
}

/* The in-menu copy of the switcher. Hidden by default: the header copy is the
   one that shows on anything wide enough to hold it. */
.nav-lang { display: none; }
.lang-switch-menu {
  display: flex; gap: 2px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* MEASURED, not guessed (AQ-1035): with the switcher in the header the header
   needed 379px at a 320px viewport, a 59px overflow, and the same elements
   were clipped at 375px and 414px. Under 560px the switcher moves into the
   hamburger menu, which is already the overflow container at that width. */
@media (max-width: 560px) {
  .header-actions .lang-switch { display: none; }
  .nav-lang { display: block; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-glow { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .skip { transition: none; }
  .hero-portrait::before, .meet-portrait::before { animation: none; opacity: .85; }
}

/* 375px fix: header overflowed by 59px; the hero carries the Call button. */
@media (max-width: 480px) { .header-actions .btn-small { display: none; } }

/* AQ-1034 (2026-10-09): at 320px the header still overflowed by 9px and the
   theme toggle was clipped at the right edge. Tighten the gaps only there. */
@media (max-width: 400px) {
  .header-inner { gap: 8px; }
  .header-actions { margin-left: 0; }
}

/* AQ-1035: the switcher is 3 links wide, so at 400px and under it takes the
   room the (already hidden) Call button used to use. */
@media (max-width: 400px) {
  .header-actions { gap: 6px; }
  .lang-switch a { min-width: 28px; padding: 0 4px; font-size: 12px; }
}

/* Persistent Casmia chat entry point: a pill carrying the portrait, her name
   and what the channel offers, always visible (not hover-only), with a teal
   pulse ring as the highlight accent against the purple brand. */
.casmia-chat-float {
  position: fixed; right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom)); z-index: 90;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px 10px 10px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card);
  box-shadow: var(--shadow), 0 0 0 1px var(--teal-glow-soft);
  text-decoration: none; color: var(--ink);
  animation: casmia-chat-glow 3.5s ease-in-out infinite;
  transition: transform .2s ease, box-shadow .2s ease;
}
.casmia-chat-float-portrait {
  position: relative; width: 56px; height: 56px; flex: 0 0 auto;
  border-radius: 50%;
}
.casmia-chat-float-portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 25%;
  border-radius: 50%; display: block;
  box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--teal);
}
.casmia-chat-float-text { display: grid; gap: 1px; line-height: 1.2; }
.casmia-chat-float-label { font: 700 15px var(--font-body); white-space: nowrap; }
.casmia-chat-float-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.casmia-chat-float-badge {
  position: absolute; bottom: -2px; right: -2px; width: 22px; height: 22px;
  border: 2px solid var(--card); border-radius: 50%;
  display: grid; place-items: center; background: var(--teal); color: #0b1a18;
}
.casmia-chat-float:hover, .casmia-chat-float:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow), 0 0 0 2px var(--teal); }
.casmia-chat-float:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
footer { padding-bottom: 110px; }
@keyframes casmia-chat-glow {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 1px var(--teal-glow-soft); }
  50% { box-shadow: var(--shadow), 0 0 0 1px var(--teal-glow-soft), 0 0 22px 2px var(--teal-glow); }
}
@media (max-width: 720px) {
  .casmia-chat-float-sub { display: none; }
}
@media (max-width: 600px) {
  .casmia-chat-float { padding: 8px 16px 8px 8px; gap: 10px; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); }
  .casmia-chat-float-portrait { width: 48px; height: 48px; }
  .casmia-chat-float-label { font-size: 14px; }
}
/* Phone: the labelled pill is wide enough to sit over the hero CTA stack,
   so it collapses to a portrait-only circle there (still bigger than the
   old 62px icon, still pulsing, still linked) -- the hero's own "Chat with
   Casmia" button already covers what the label would say. */
@media (max-width: 480px) {
  .casmia-chat-float { padding: 0; gap: 0; }
  .casmia-chat-float-text { display: none; }
  .casmia-chat-float-portrait { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .casmia-chat-float { animation: none; transition: none; } }

/* AQ-1190 (2026-10-13): circular approved portrait on every customer entry.
   The width/height attributes on the <img> would otherwise force an oval
   below the attribute size, so height is released and the ratio pinned. */
.hero-portrait img,.meet-portrait img{height:auto;aspect-ratio:1;object-fit:cover;object-position:center 25%;border-radius:50%}
.casmia-chat-float img{aspect-ratio:1;object-fit:cover;object-position:center 25%;border-radius:50%}

/* WhatsApp is secondary and US-numbers-only for now; web chat stays primary. */
.hero-wa-note{margin:0 0 10px;max-width:60ch}
.hero-wa-note a{color:inherit;text-decoration:underline}
.call-number a{white-space:nowrap}
.wa-block{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.wa-line{margin:0 0 8px;color:var(--muted);font-size:15px}
.wa-line a{color:inherit;text-decoration:underline}
.wa-block .btn{margin:6px 0 12px}
.wa-limits{margin:0;color:var(--muted);font-size:14px}
.call-card > .btn{margin:0 8px 10px 0}

/* The Talk wrapper shares the site's header. The conversation uses the rest
   of the visible viewport, including when the mobile keyboard opens. */
.site-nav [data-feature][hidden] { display: none; }
.talk-layout { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.talk-layout .site-header { flex: none; }
.talk-main { flex: 1; min-height: 0; }
.talk-main iframe { display: block; width: 100%; height: 100%; border: 0; }
.site-nav ul.is-open { max-height: calc(100dvh - 76px); overflow-y: auto; }
@media (max-width: 1459px) {
  .site-header .site-nav { position: static; }
  .site-nav ul { top: calc(100% + 4px); right: max(12px, calc((100vw - 1160px) / 2)); max-width: calc(100vw - 24px); }
}
@media (max-width: 700px) {
  .site-nav ul { left: 12px; right: auto; }
}
@media (max-width: 480px) {
  .hero-copy, .hero-ctas > a { min-width: 0; }
  .hero-ctas > a { max-width: 100%; white-space: normal; }
}
@media (max-width: 480px) {
  .meet-copy { min-width: 0; }
  .meet-copy .btn { white-space: normal; max-width: 100%; }
}

/* ---------- 2026-11-24 house drawer standard (Jason) ----------
   Header stays visible with a solid background at every width; in-page anchors
   land below it. On phones the menu is a full-height left drawer (brand top-left,
   X top-right) over a dimmed backdrop; drawer-kit.js adds the slide and swipe. */
.site-header { background: var(--bg); }
html { scroll-padding-top: 84px; }
[id] { scroll-margin-top: 84px; }
.nav-drawer-head, .nav-drawer-extra, .nav-scrim { display: none; }
@media (max-width: 720px) {
  .site-header:has(#nav-list.is-open) { backdrop-filter: none; -webkit-backdrop-filter: none; z-index: 2147483000; }
  .site-nav #nav-list {
    position: fixed; top: 0; left: 0; right: auto; bottom: 0;
    width: min(360px, 88vw); max-width: none; min-width: 0;
    height: 100vh; height: 100dvh; max-height: none;
    margin: 0; padding: 0 0 calc(24px + env(safe-area-inset-bottom));
    border: 0; border-right: 1px solid var(--line); border-radius: 0;
    background: var(--card); box-shadow: 0 0 60px rgba(0, 0, 0, .35);
    flex-direction: column; gap: 0; overflow-y: auto; overscroll-behavior: contain; z-index: 2;
  }
  .site-nav #nav-list.is-open { display: flex; max-height: none; }
  .site-nav #nav-list.is-open + .nav-scrim { display: block; }
  .nav-scrim { position: fixed; inset: 0; background: rgba(12, 8, 18, .55); z-index: 1; }
  #nav-list .nav-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 12px 14px 20px; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; background: var(--card);
  }
  .nav-drawer-brand { font-family: var(--font-display); font-size: 26px; color: var(--ink); }
  .nav-drawer-x {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
    background: transparent; border: 1px solid var(--line); color: var(--ink);
  }
  #nav-list > li > a { display: block; font-size: 17px; padding: 13px 20px; border-radius: 0; }
  #nav-list > li.nav-lang { padding: 12px 20px; }
  #nav-list .nav-drawer-extra { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 0; }
  #nav-list .nav-drawer-extra .nav-drawer-call {
    display: block; text-align: center; padding: 12px 16px; border-radius: 12px;
    background: var(--ink); color: var(--bg); font-weight: 600; font-size: 16px;
  }
  .nav-drawer-theme {
    font: inherit; font-size: 15px; padding: 11px 16px; border-radius: 12px; cursor: pointer;
    background: transparent; color: var(--ink); border: 1px solid var(--line);
  }
}

/* five-video: watch sections */
.watch-launch, .watch-more { padding: 56px 0 8px; }
.watch-launch .wrap, .watch-more .wrap { text-align: center; }
.watch-frame { border-radius: var(--radius); overflow: hidden; background: var(--plum); box-shadow: var(--shadow); border: 1px solid var(--line); }
.watch-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--plum); }
.watch-frame-main { max-width: 860px; margin: 24px auto 0; }
.watch-grid { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 24px; text-align: left; }
.watch-card { padding: 16px; }
.watch-card h3 { margin: 14px 0 6px; font-size: 20px; }
.watch-card p { margin: 0; color: var(--muted); }
@media (min-width: 820px) { .watch-grid { grid-template-columns: repeat(3, 1fr); } }
