/* Think Out The Box AI: talking website (draft)
   Warm-neutral, premium and light; ink/charcoal text; deep red accent; gold used sparingly.
   The Naomi orb (pearlescent glass, see assets/orb.js) is the visual centrepiece. */

:root {
  --bg: #FBF9F6;
  --bg-soft: #F4EFE9;
  --surface: #FFFFFF;
  --border: #E8E1D8;
  --text: #1D2035;
  --text-muted: #5B5D6B;
  --accent: #8E1B24;
  --accent-strong: #6F141B;
  --accent-tint: #F6E9E7;
  --gold: #B8913A;
  --focus: #A31621;

  --radius: 14px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(29, 32, 53, .04), 0 10px 30px rgba(29, 32, 53, .06);
  --container: 1120px;
  --gutter: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-script: "Allura", "Snell Roundhand", "Segoe Script", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { .container { padding: 0 32px; } }
.container-narrow { max-width: 780px; }
.center { text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Draft-only UI ---------- */
html:not([data-draft]) .draft-only { display: none !important; }
.draft-banner {
  background: #FFF8E6; color: #5C4715; border-bottom: 1px solid #EFD9A3;
  font-size: .85rem; padding: 8px var(--gutter); text-align: center;
}
.ph-tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: 2px 8px; border-radius: var(--radius-pill);
  border: 1px dashed #B08A2E; color: #6E5518; background: #FFF8E6; vertical-align: middle;
  white-space: nowrap;
}
.ph-tag--verify { border-color: #9A9AA2; color: #45454B; background: #F1F1F3; }
.draft-note { font-size: .88rem; color: var(--text-muted); margin: 0 0 1.25rem; }
.draft-note .ph-tag { margin-right: 6px; }

/* ---------- Buttons ---------- */
.btn {
  text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: var(--radius-pill);
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-primary { box-shadow: 0 8px 20px -8px rgba(142, 27, 36, .55); border-radius: 12px; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: #D9D0C4; border-radius: 12px; }
.btn-secondary:hover { border-color: var(--text); color: var(--text); }
.btn-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-outline-dark { background: #fff; color: var(--text); border-color: #CFCBC3; }
.btn-outline-dark:hover { border-color: var(--text); }
.link-btn {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 600;
  color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--accent-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 249, 246, .88); backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.wordmark { min-width: 0; display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.wordmark:hover { color: var(--text); }
.wordmark-text { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: 0; }
.wordmark-mark {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #D94452, var(--accent) 55%, var(--accent-strong));
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--gold);
}
.wordmark-ai { color: var(--accent); }
.header-ph { display: none; }
@media (min-width: 1100px) { .header-ph { display: inline-block; } }

.site-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--accent); }
.site-nav .nav-book { color: var(--accent); font-weight: 600; }
.menu-toggle { display: none; }

@media (max-width: 859px) {
  .header-inner { gap: 10px; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; order: 3;
    width: 44px; height: 44px; margin-left: 4px; border: 1px solid var(--border); background: #fff; border-radius: 10px; cursor: pointer;
  }
  .menu-bar, .menu-bar::before, .menu-bar::after { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; }
  .menu-bar::before, .menu-bar::after { content: ""; position: absolute; left: 0; }
  .menu-bar::before { top: -6px; } .menu-bar::after { top: 6px; }
  .header-talk { margin-left: auto; order: 2; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px var(--gutter); border-top: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .wordmark-text { font-size: .9rem; }
  .wordmark-mark { width: 18px; height: 18px; }
  .header-talk { padding: 0 14px; min-height: 38px; font-size: .88rem; }
  .draft-banner { font-size: .75rem; padding: 6px 12px; }
}
@media (max-width: 400px) {
  .wordmark-text { font-size: .8rem; line-height: 1.2; }
  .header-talk { padding: 0 12px; font-size: .82rem; }
  .menu-toggle { width: 40px; height: 40px; }
}
.header-talk { white-space: nowrap; flex: none; }
.btn { padding-top: 10px; padding-bottom: 10px; line-height: 1.2; }

/* ---------- Hero ---------- */
.hero {
  padding: 48px 0 64px; overflow: hidden;
  background:
    radial-gradient(620px 520px at 78% 42%, rgba(214, 206, 250, .45), transparent 70%),
    radial-gradient(700px 420px at 95% 0%, rgba(255, 226, 205, .55), transparent 70%),
    radial-gradient(600px 400px at 0% 100%, rgba(240, 228, 214, .8), transparent 70%),
    linear-gradient(180deg, #F8F4EF, var(--bg));
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 80px 0 96px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; }
}
.eyebrow {
  display: inline-block; font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px; padding-left: 14px; position: relative;
}
.eyebrow::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--gold); }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.08; }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.hero-actions-center { justify-content: center; }
.helper { font-size: .92rem; color: var(--text-muted); margin: 0; }
@media (max-width: 899px) {
  .hero-copy { text-align: center; }
  .hero-copy .lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  /* On phones the orb comes straight after the headline so it is visible without scrolling;
     the hero's duplicate talk button is not needed there. */
  .hero { padding: 28px 0 56px; }
  .hero-grid { gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy .eyebrow { order: 1; justify-self: center; margin-bottom: 8px; }
  .hero-copy h1 { order: 2; text-align: center; font-size: clamp(1.9rem, 8vw, 2.6rem); margin-bottom: 16px; }
  .demo-card { order: 3; }
  .hero-copy .hero-actions { order: 4; flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; margin: 8px auto 12px; }
  .hero-copy .helper { order: 5; text-align: center; }
  .hero-copy .lede { order: 6; text-align: center; margin: 24px auto 0; font-size: 1.05rem; }
  .demo-card { padding: 28px 0 8px; }
  .orb { width: clamp(200px, 58vw, 260px); }
}

/* ---------- Demo card + orb ---------- */
.demo-card { position: relative; text-align: center; padding: 36px 0 8px; }
.demo-ph { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2; }
.orb-wrap { --level: 0; display: grid; place-items: center; padding: 26px 0 6px; }
.orb {
  position: relative; width: clamp(240px, 32vw, 360px); aspect-ratio: 1; border-radius: 50%;
  border: 0; padding: 0; background: none; cursor: pointer; display: block;
  -webkit-tap-highlight-color: transparent;
}
.orb:disabled { cursor: default; }
.orb:focus-visible { outline-offset: 10px; border-radius: 50%; }

/* Soft coloured light around the sphere */
.orb-halo {
  position: absolute; inset: -26%; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle at 35% 70%, rgba(255, 208, 170, .55), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(236, 180, 232, .5), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(140, 170, 255, .45), transparent 62%);
  filter: blur(22px);
  opacity: .8;
  animation: orb-breathe 5.5s ease-in-out infinite;
}
.orb-ring {
  position: absolute; inset: -7px; border-radius: 50%; pointer-events: none;
  border: 1px solid transparent;
}
.orb-ring::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid rgba(140, 220, 230, .0);
}

/* The orb artwork (assets/img/naomi-orb.webp, the owner's high-resolution Naomi orb, used unmodified).
   The art itself is never redrawn or recoloured; motion and light are layered around and over it. */
.orb-sphere {
  position: absolute; inset: 0; border-radius: 50%;
  translate: 0 0; scale: calc(1 + var(--level) * .03);
  transition: scale .12s ease-out, opacity .6s ease;
  animation: orb-float 7s ease-in-out infinite;
}
/* The artwork's glass sphere fills ~82% of the image width (the rest is its transparent glow), so the
   image is drawn at 111% of the orb box to keep the sphere the same on-screen size as before. */
.orb-art {
  position: absolute; left: 50%; top: 50%; width: 111%; height: auto; max-width: none;
  transform: translate(-50%, -50%);
  user-select: none; -webkit-user-drag: none;
  /* Ambient turning: one full turn every 120 s, in every state. Only the artwork turns (about its own
     centre); the sphere's float, scale and state effects and the rings are untouched. */
  animation: orb-turn 120s linear infinite;
}
/* Luminous overlay used while Naomi speaks: soft white light, screen-blended so the art shows through */
.orb-light {
  position: absolute; inset: 6%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .75), rgba(255, 244, 236, .35) 45%, rgba(255, 255, 255, 0) 100%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .4s ease;
}

/* Signature under the orb */
.orb-signature { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 14px 0 0; }
.sig-name { font-family: var(--font-script); font-size: 3.1rem; line-height: 1; color: var(--text); }
.sig-role { font-size: .72rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--text-muted); }

/* States */
@keyframes orb-breathe { 0%, 100% { transform: scale(.96); opacity: .7; } 50% { transform: scale(1.04); opacity: .95; } }
@keyframes orb-pulse-fast { 0%, 100% { transform: scale(.98); opacity: .75; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes orb-spin { to { transform: rotate(360deg); } }
@keyframes orb-ripple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes orb-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes orb-light-pulse { 0%, 100% { opacity: .18; } 50% { opacity: .5; } }
@keyframes orb-turn { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

.orb-wrap[data-state="connecting"] .orb-halo,
.orb-wrap[data-state="requesting-mic"] .orb-halo { animation: orb-pulse-fast 1.6s ease-in-out infinite; }
.orb-wrap[data-state="connecting"] .orb-ring,
.orb-wrap[data-state="requesting-mic"] .orb-ring {
  border: 2px solid transparent; border-top-color: #E7C9A6; border-right-color: #B9A8F0;
  animation: orb-spin 1.2s linear infinite;
}
.orb-wrap[data-state="agent-speaking"] .orb-halo {
  animation: orb-pulse-fast 1.4s ease-in-out infinite;
  filter: blur(calc(22px + var(--level) * 10px));
}
.orb-wrap[data-state="listening"] .orb-ring::after {
  border-color: rgba(140, 220, 230, .7);
  animation: orb-ripple 2.2s ease-out infinite;
}
.orb-wrap[data-state="agent-speaking"] .orb-light {
  animation: orb-light-pulse 1.4s ease-in-out infinite;
}
.orb-wrap[data-state="agent-speaking"] .orb-sphere { filter: drop-shadow(0 0 calc(10px + var(--level) * 24px) rgba(255, 236, 225, .85)); }
.orb-wrap[data-state="ended"] .orb-sphere { opacity: .9; }
.orb-wrap[data-state="error"] .orb-sphere { opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  .orb-halo, .orb-ring, .orb-ring::after, .orb-sphere, .orb-light, .orb-art { animation: none !important; }
  .orb-sphere { scale: none !important; translate: none !important; }
}

.demo-consent { font-size: .85rem; color: var(--text-muted); max-width: 30em; margin: 12px auto 0; line-height: 1.5; }
.demo-status { font-weight: 600; margin: 22px auto 4px; min-height: 1.6em; max-width: 30em; }
.demo-timer { font-size: .9rem; color: var(--text-muted); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.demo-notice {
  display: inline-block; margin: 6px 0 4px; padding: 6px 14px; border-radius: var(--radius-pill);
  background: #FFF8E6; border: 1px solid #EFD9A3; color: #5C4715; font-size: .9rem; font-weight: 500;
}
.demo-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; }
/* Bot check: invisible unless Cloudflare asks the visitor to confirm they're human. */
.turnstile-box { display: flex; justify-content: center; max-width: 100%; overflow: hidden; }
.turnstile-box:empty { display: none; }
.hint-chips { list-style: none; padding: 0; margin: 14px 0 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hint-chips li { font-size: .85rem; color: var(--text-muted); background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 6px 12px; }
.demo-limit { font-size: .8rem; color: var(--text-muted); margin: 0; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.section-soft { background: var(--bg-soft); }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); max-width: 22em; margin-bottom: 32px; }
.center .section-title { margin-left: auto; margin-right: auto; }
.section-link { margin: 28px 0 0; }
.section-intro { margin-top: -12px; margin-bottom: 32px; }
.center .lede { margin-left: auto; margin-right: auto; }

.card-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .card-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.section-soft .card { box-shadow: 0 1px 2px rgba(28, 28, 30, .04); }
.card p { color: var(--text-muted); margin: 0; }
.card-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-tint); margin-bottom: 16px;
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature { border-top: 3px solid var(--accent); }

.industries { text-align: center; color: var(--text-muted); margin: 36px auto 28px; max-width: 40em; }
.industries::before { content: ""; display: block; width: 40px; height: 2px; background: var(--gold); margin: 0 auto 18px; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: none; }
.step { display: flex; gap: 18px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step h3 { margin-bottom: .3em; }
.step p { color: var(--text-muted); margin: 0; }
.step-num {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--text); color: #fff; font-weight: 700;
}
.step:first-child .step-num { background: var(--accent); }
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .step { flex-direction: column; padding: 24px 20px; }
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--border); margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--text-muted); margin: 0 0 20px; }

/* ---------- Final CTA + footer ---------- */
.final-cta { background: linear-gradient(180deg, var(--bg-soft), #fff); border-top: 1px solid var(--border); }
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; font-size: .92rem; color: var(--text-muted); }
.footer-inner { display: grid; gap: 18px; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1fr auto; align-items: start; } .footer-copy { grid-column: 1 / -1; } }
.site-footer p { margin: 0 0 6px; }
.footer-name { color: var(--text); font-weight: 700; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-copy { padding-top: 14px; border-top: 1px solid var(--border); }

/* ---------- Placeholder dialog ---------- */
.ph-dialog { border: 1px solid var(--border); border-radius: 16px; padding: 24px; max-width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.ph-dialog::backdrop { background: rgba(28, 28, 30, .35); }
.ph-dialog h2 { font-size: 1.15rem; }
.ph-dialog p { color: var(--text-muted); }
