/* Gaussia — design system */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* Dark theme (default for Gaussia-dark.html) */
  --bg: #0a0a0a;
  --bg-elev: #111111;
  --bg-card: #141414;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --text: #f5f5f4;
  --text-dim: #a3a3a3;
  --text-faint: #6b6b6b;
  --accent: #f86e60;
  --accent-soft: rgba(248,110,96,0.12);
  --accent-glow: rgba(248,110,96,0.25);
  --on-accent: #0a0a0a;
  --nav-bg: rgba(15,15,15,0.72);
  --nav-bg-top: rgba(15,15,15,0.4);
  --hover-tint: rgba(248,110,96,0.04);
  --chip-neutral-bg: rgba(255,255,255,0.04);
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}

/* Light theme — bold editorial palette */
[data-theme="light"] {
  --bg: #f0e8d8;            /* sandy cream */
  --bg-elev: #ffffff;
  --bg-card: #f8f1e0;
  --bg-deep: #1a1612;
  --bg-coral: #ff5a3d;       /* full coral panel */
  --bg-ink: #1c1a2e;          /* deep navy/ink panel */
  --bg-sage: #d4dbc6;         /* dusty sage panel */
  --bg-ochre: #e8a838;        /* warm ochre panel */
  --line: rgba(20,16,14,0.18);
  --line-strong: rgba(20,16,14,0.36);
  --text: #0a0806;
  --text-dim: #2d2620;
  --text-faint: #6b6359;
  --accent: #ff5a3d;          /* punchy coral */
  --accent-deep: #c93820;     /* deeper coral for hover */
  --accent-soft: rgba(255,90,61,0.16);
  --accent-glow: rgba(255,90,61,0.32);
  --secondary: #1c1a2e;       /* navy ink as secondary */
  --tertiary: #e8a838;         /* ochre as tertiary */
  --on-accent: #ffffff;
  --nav-bg: rgba(255,253,250,0.88);
  --nav-bg-top: rgba(255,253,250,0.7);
  --hover-tint: rgba(255,90,61,0.08);
  --chip-neutral-bg: rgba(20,16,14,0.06);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-soft), transparent),
    radial-gradient(ellipse 60% 40% at 90% 30%, var(--accent-soft), transparent);
}

[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 70% 50% at 15% -5%, rgba(255,90,61,0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 95% 15%, rgba(232,168,56,0.20), transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(28,26,46,0.10), transparent 55%);
}

[data-theme="light"] .grain { opacity: 0.05; mix-blend-mode: multiply; }

/* Inverted dark section — Method */
[data-theme="light"] .section-deep {
  background: var(--bg-deep);
  --bg: #1a1612;
  --bg-elev: #221d18;
  --bg-card: #2a2420;
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.22);
  --text: #f5f0e8;
  --text-dim: #b8ada0;
  --text-faint: #7a7166;
  --accent: #ff7a5e;
  --accent-soft: rgba(255,122,94,0.18);
  --chip-neutral-bg: rgba(255,255,255,0.06);
  color: var(--text);
}
[data-theme="light"] .section-deep .eyebrow { color: var(--text-dim); }
[data-theme="light"] .section-deep p { color: var(--text-dim); }

/* Coral full-bleed section — for CTA */
[data-theme="light"] .section-coral {
  background: var(--bg-coral);
  --bg: #ff5a3d;
  --bg-elev: #ff7359;
  --bg-card: #ff7359;
  --line: rgba(255,255,255,0.22);
  --line-strong: rgba(255,255,255,0.4);
  --text: #ffffff;
  --text-dim: rgba(255,255,255,0.85);
  --text-faint: rgba(255,255,255,0.6);
  --accent: #1c1a2e;
  --accent-soft: rgba(28,26,46,0.12);
  --on-accent: #ffffff;
  --chip-neutral-bg: rgba(255,255,255,0.12);
  color: #ffffff;
}
[data-theme="light"] .section-coral .eyebrow { color: rgba(255,255,255,0.85); }
[data-theme="light"] .section-coral .eyebrow::before { background: #ffffff; box-shadow: 0 0 12px rgba(255,255,255,0.5); }
[data-theme="light"] .section-coral p { color: rgba(255,255,255,0.92); }

/* Sage section — for FAQ */
[data-theme="light"] .section-sage {
  background: var(--bg-sage);
  --bg: var(--bg-sage);
  --bg-elev: #ffffff;
  --line: rgba(20,40,20,0.18);
  --line-strong: rgba(20,40,20,0.32);
  --text-dim: #3a443a;
}

/* Ochre section — alternative warm */
[data-theme="light"] .section-ochre {
  background: var(--bg-ochre);
  --bg: var(--bg-ochre);
  --bg-elev: #fff5e0;
  --line: rgba(60,40,10,0.22);
  --line-strong: rgba(60,40,10,0.4);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Grain overlay */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
}

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  position: relative;
  padding: 140px 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type { border-top: none; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

h1, h2, h3 { font-weight: 400; letter-spacing: -0.03em; }

h1 {
  font-size: clamp(56px, 8vw, 112px);
  line-height: 0.95;
  font-weight: 300;
}

h2 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.0;
  font-weight: 300;
}

h3 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 400;
}

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

p { color: var(--text-dim); line-height: 1.6; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn .arrow {
  transition: transform 0.3s ease;
}
.btn:hover .arrow { transform: translateX(4px); }

/* Reveal animation */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js-reveal-on .reveal:not(.in) {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Marquee for client logos */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Subtle pulse for accent dot */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Code-like ticker */
.ticker {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

/* utility: separator dot */
.dot { color: var(--text-faint); margin: 0 10px; }

/* Hide scrollbar in marquee */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ===================================================
   RESPONSIVE — hamburger menu
   =================================================== */
.hamburger-btn {
  display: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  align-items: center; justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  background: none;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
  z-index: 60;
}
.hamburger-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.hamburger-line {
  display: block;
  width: 16px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.2,0.8,0.2,1), opacity 0.25s;
  position: absolute;
}
.hamburger-line:nth-child(1) { transform: translateY(-4.5px); }
.hamburger-line:nth-child(2) { transform: translateY(0); }
.hamburger-line:nth-child(3) { transform: translateY(4.5px); }

.hamburger-btn.open .hamburger-line:nth-child(1) { transform: rotate(45deg); }
.hamburger-btn.open .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-btn.open .hamburger-line:nth-child(3) { transform: rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.2,0.8,0.2,1);
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-menu a {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: -0.02em;
  padding: 14px 24px;
  color: var(--text);
  border-radius: 12px;
  transition: color 0.2s, background 0.2s;
}
.mobile-menu a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ===================================================
   RESPONSIVE — ≤ 1024px  (tablet landscape + small desktop)
   =================================================== */
@media (max-width: 1024px) {
  .section { padding: 100px 0; }

  /* Nav links — hide on tablet, show hamburger */
  .nav-links { display: none !important; }
  .hamburger-btn { display: flex; }
  .mobile-menu { display: flex; }
  .nav-cta-text { display: none; }
}

/* ===================================================
   RESPONSIVE — ≤ 768px  (tablet portrait — iPad)
   =================================================== */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }

  h1 { font-size: clamp(40px, 10vw, 56px) !important; }
  h2 { font-size: clamp(32px, 7vw, 44px) !important; }
  h3 { font-size: 24px; }
}

/* ===================================================
   RESPONSIVE — ≤ 480px  (mobile — iPhone SE)
   =================================================== */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }

  h1 { font-size: clamp(34px, 10vw, 44px) !important; }
  h2 { font-size: clamp(28px, 8vw, 36px) !important; }
  h3 { font-size: 22px; }

  .btn { padding: 12px 18px; font-size: 13px; }
  .eyebrow { font-size: 10px; }
}

/* ===================================================
   CHATBOT WIDGET
   =================================================== */
@keyframes chatbot-slide-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes chatbot-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

@keyframes chatbot-fab-pulse {
  0%, 100% { box-shadow: 0 6px 28px var(--accent-glow), 0 2px 8px rgba(0,0,0,0.12); }
  50% { box-shadow: 0 8px 36px var(--accent-glow), 0 4px 16px rgba(0,0,0,0.15); }
}

.chatbot-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: chatbot-bounce 1.2s infinite;
}

.chatbot-fab {
  animation: chatbot-fab-pulse 3s ease-in-out infinite;
}
.chatbot-fab:hover {
  animation: none;
}

/* Chatbot scrollbar */
.chatbot-window *::-webkit-scrollbar { width: 4px; }
.chatbot-window *::-webkit-scrollbar-track { background: transparent; }
.chatbot-window *::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
