:root {
  color-scheme: light dark;
  --bg: #f5f9fc;
  --bg-strong: #edf3f8;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f4f8fb;
  --surface-dark: #0b1424;
  --surface-dark-strong: #101b31;
  --line: rgba(15, 23, 39, 0.08);
  --line-strong: rgba(15, 23, 39, 0.14);
  --text: #111827;
  --muted: #5c6b80;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --accent-alt: #2563eb;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-blue-soft: rgba(37, 99, 235, 0.12);
  --shadow: 0 18px 48px rgba(15, 23, 39, 0.08);
  --radius: 26px;
  --radius-sm: 16px;
  --max: 1200px;
  --grid-glow: radial-gradient(circle at top left, rgba(37, 99, 235, 0.05), transparent 34%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.04), transparent 30%);
}

html[data-theme="dark"] {
  --bg: #07101d;
  --bg-strong: #0b1628;
  --surface: rgba(11, 20, 36, 0.88);
  --surface-strong: #101a2f;
  --surface-soft: #132038;
  --surface-dark: #08111f;
  --surface-dark-strong: #0d1729;
  --line: rgba(148, 163, 184, 0.1);
  --line-strong: rgba(148, 163, 184, 0.18);
  --text: #eef4ff;
  --muted: #9fb0c9;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --grid-glow: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 36%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.08), transparent 34%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.04), transparent 32%),
    radial-gradient(circle at 88% 14%, rgba(56, 189, 248, 0.03), transparent 24%),
    var(--bg);
  color: var(--text);
}

html[data-theme="dark"] body {
  background:
    linear-gradient(180deg, rgba(7, 16, 29, 0.96), rgba(7, 16, 29, 0.98)),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(56, 189, 248, 0.1), transparent 24%),
    linear-gradient(225deg, rgba(59, 130, 246, 0.06), transparent 32%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(59, 130, 246, 0.018) 0, rgba(59, 130, 246, 0.018) 1px, transparent 1px, transparent 120px),
    linear-gradient(rgba(59, 130, 246, 0.012) 0, rgba(59, 130, 246, 0.012) 1px, transparent 1px, transparent 120px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 72%);
  z-index: -2;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.site-shell,
.simple-page {
  min-height: 100vh;
}

.site-shell {
  padding: 20px;
}

.topbar,
.section,
.site-footer,
.simple-card {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  animation: header-drop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-theme="dark"] .topbar {
  background: rgba(10, 18, 32, 0.82);
  border-color: rgba(148, 163, 184, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 30px rgba(37, 99, 235, 0.24);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--muted);
}

.brand-copy strong {
  color: var(--text);
  font-size: 0.94rem;
}

.main-nav,
.header-actions,
.lang-switch,
.hero-actions,
.hero-points,
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-nav {
  flex-wrap: wrap;
  justify-content: center;
  color: var(--muted);
}

.main-nav a:hover,
.lang-switch a:hover,
.site-footer a:hover {
  color: var(--text);
}

.lang-switch,
.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: var(--surface);
}

html[data-theme="dark"] .lang-switch,
html[data-theme="dark"] .theme-toggle {
  background: rgba(12, 21, 38, 0.92);
}

.lang-switch a,
.theme-toggle {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.lang-switch .is-active {
  background: var(--text);
  color: var(--surface-strong);
  border-radius: 999px;
}

html[data-theme="dark"] .lang-switch .is-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(56, 189, 248, 0.92));
  color: #fff;
}

.theme-toggle {
  color: var(--text);
  cursor: pointer;
}

.section {
  padding: 80px 0 0;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 40px;
  align-items: center;
  padding-top: 44px;
  min-height: calc(100vh - 140px);
}

.hero-copy > * {
  animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-copy > *:nth-child(2) {
  animation-delay: 0.08s;
}

.hero-copy > *:nth-child(3) {
  animation-delay: 0.16s;
}

.hero-copy > *:nth-child(4) {
  animation-delay: 0.24s;
}

.hero-copy > *:nth-child(5) {
  animation-delay: 0.32s;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.8rem, 5.6vw, 5.8rem);
  line-height: 0.93;
  letter-spacing: -0.05em;
  max-width: 11ch;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.lead,
.section-note,
.panel p,
.hero-points,
.site-footer,
.legal-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy .lead {
  max-width: 46rem;
  font-size: 1.06rem;
}

.hero-points {
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  list-style: none;
  margin: 22px 0 0;
}

.hero-points li {
  position: relative;
  padding-left: 18px;
}

.hero-points li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-alt), var(--accent));
}

.panel {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--grid-glow);
  opacity: 0.45;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: 500px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 248, 251, 0.98)),
    linear-gradient(135deg, rgba(59, 130, 246, 0.08), transparent 36%);
}

html[data-theme="dark"] .panel-grid {
  background:
    linear-gradient(180deg, rgba(13, 22, 39, 0.96), rgba(10, 18, 31, 0.98)),
    linear-gradient(135deg, rgba(59, 130, 246, 0.14), transparent 40%);
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-height: 150px;
  padding: 22px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, #ffffff, var(--surface-soft)),
    linear-gradient(135deg, rgba(59, 130, 246, 0.04), transparent 42%);
  border: 1px solid var(--line);
  transform: translateY(0);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

html[data-theme="dark"] .hero-card {
  background:
    linear-gradient(180deg, rgba(17, 27, 46, 0.98), rgba(13, 23, 41, 0.98)),
    linear-gradient(135deg, rgba(59, 130, 246, 0.08), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-card span {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 600;
}

.hero-card strong {
  font-size: 0.98rem;
  line-height: 1.4;
  max-width: 18ch;
  text-wrap: balance;
}

.hero-card-wide {
  grid-column: span 2;
  min-height: 220px;
}

.hero-visual {
  animation: float-panel 7s ease-in-out infinite;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.22);
}

.button-secondary {
  border-color: var(--line-strong);
  background: transparent;
}

html[data-theme="dark"] .button-secondary {
  background: rgba(255, 255, 255, 0.02);
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 64px rgba(15, 23, 39, 0.12);
  border-color: rgba(37, 99, 235, 0.18);
}

html[data-theme="dark"] .panel:hover {
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.38);
  border-color: rgba(148, 163, 184, 0.2);
}

.hero-card:hover {
  transform: translateY(-5px);
}

.section-heading {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
}

/* Sub-pages (module pages, etc.) use a real <h1> for SEO, but the global
   h1 rule above is tuned for the homepage hero's oversized display type —
   too large and too narrow (11ch) for a normal page title. Scope it down. */
.page-title h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  line-height: 1.08;
  max-width: 26ch;
  letter-spacing: -0.03em;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 24px 0 8px;
  font-size: 0.86rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.breadcrumbs a:hover {
  color: var(--text);
  border-bottom-color: currentColor;
}

.breadcrumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

.cta-panel {
  max-width: none;
  text-align: center;
  margin: 0 auto;
}

.cta-panel .hero-actions {
  justify-content: center;
}

.module-card-link {
  display: inline-flex;
  margin-top: 14px;
  font-weight: 600;
  color: var(--accent-alt);
  text-decoration: none;
}

html[data-theme="dark"] .module-card-link {
  color: var(--accent);
}

.module-card-link:hover {
  text-decoration: underline;
}

.problem-grid,
.module-grid,
.benefit-grid,
.audience-grid,
.feature-band,
.chat-layout {
  display: grid;
  gap: 18px;
}

.problem-grid,
.audience-grid,
.feature-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-grid,
.benefit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.module-card,
.audience-card {
  min-height: 190px;
}

.module-card,
.benefit-grid .panel,
.audience-card,
.feature-band .panel,
.problem-grid .panel {
  overflow: hidden;
}

.module-card::before,
.benefit-grid .panel::before,
.audience-card::before,
.feature-band .panel::before,
.problem-grid .panel::before {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-blue-soft), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.section-dark {
  position: relative;
  width: min(100%, var(--max));
  margin: 88px auto 0;
  padding: 72px 34px 34px;
  border-radius: 36px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(13, 23, 39, 0.98), rgba(10, 18, 31, 0.99)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), transparent 42%),
    radial-gradient(circle at 90% 18%, rgba(56, 189, 248, 0.08), transparent 22%);
  box-shadow: 0 34px 90px rgba(15, 23, 39, 0.18);
  padding-top: 88px;
}

.section-dark .panel,
html[data-theme="dark"] .section-dark .panel {
  background: linear-gradient(180deg, rgba(10, 19, 34, 0.9), rgba(15, 23, 39, 0.98));
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow: none;
}

.section-dark .section-heading h2,
.section-dark .section-heading .section-note,
.section-dark h3,
.section-dark .panel p,
.section-dark .hierarchy span {
  color: #e8f0ff;
}

.section-dark .eyebrow {
  color: #47c0ff;
}

.section-dark .section-heading h2 {
  max-width: 14ch;
}

.section-dark .section-heading .section-note,
.section-dark .panel p {
  color: #aebcd3;
}

.section-dark .hierarchy span {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.section-dark .hierarchy span:nth-child(odd) {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(56, 189, 248, 0.16));
}

.section-dark .panel::after {
  opacity: 0.22;
}

.hierarchy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hierarchy span {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hierarchy span:nth-child(odd) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(56, 189, 248, 0.06));
}

.section-compact {
  padding-bottom: 48px;
}

.contact-form {
  padding: 28px;
}

.chat-panel {
  padding: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(56, 189, 248, 0.02));
}

.chat-badge,
.chat-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-alt), var(--accent));
  box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.08);
}

.chat-status {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent-alt);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-status-text {
  color: var(--muted);
  font-size: 0.88rem;
}

.chat-thread {
  display: grid;
  gap: 16px;
  padding: 22px 20px;
}

.chat-message {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chat-bubble {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 251, 0.98));
  border: 1px solid var(--line);
}

html[data-theme="dark"] .chat-bubble {
  background: linear-gradient(180deg, rgba(18, 29, 50, 0.96), rgba(13, 23, 41, 0.98));
}

.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-attachment {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(37, 99, 235, 0.14);
}

.attachment-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-alt);
  font-weight: 700;
}

.chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.chat-chip {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.chat-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.06);
}

.chat-composer {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

html[data-theme="dark"] .chat-composer {
  background: rgba(255, 255, 255, 0.02);
}

.chat-side-panel h3 {
  margin-bottom: 14px;
}

.chat-rules {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.chat-rules li::marker {
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 500;
}

label span {
  font-size: 0.94rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--surface-strong);
  color: var(--text);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea {
  background: rgba(6, 13, 24, 0.72);
}

input::placeholder,
textarea::placeholder {
  color: #8190a5;
}

textarea {
  resize: vertical;
}

.full-width {
  grid-column: 1 / -1;
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: flex-start;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

/* Honeypot field: hidden from real visitors, left in the tab order for
   simple bots that fill every field regardless of CSS visibility. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  justify-content: space-between;
  margin-top: 20px;
  flex-wrap: wrap;
}

.form-hint {
  margin: 0;
  max-width: 620px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 48px;
  margin-top: 24px;
  color: var(--muted);
}

.theme-toggle,
.lang-switch a,
.main-nav a {
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.main-nav a:hover,
.lang-switch a:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
}

.simple-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.simple-card {
  max-width: 760px;
  padding: 48px;
}

.legal-card {
  max-width: 860px;
}

.is-invalid {
  border-color: var(--accent);
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-panel {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes header-drop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .topbar,
  .hero,
  .problem-grid,
  .module-grid,
  .benefit-grid,
  .audience-grid,
  .feature-band,
  .form-grid,
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    border-radius: 28px;
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav,
  .header-actions,
  .hero-actions,
  .site-footer {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-card-wide {
    grid-column: auto;
  }

  .hero {
    min-height: auto;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }

  .simple-card {
    padding: 32px 24px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    padding: 12px;
  }

  .section {
    padding-top: 54px;
  }

  .panel,
  .contact-form {
    padding: 20px;
  }

  h1 {
    max-width: none;
    font-size: clamp(3.3rem, 12vw, 4.6rem);
    line-height: 0.96;
  }

  .hero {
    gap: 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section-dark {
    margin-top: 54px;
    padding: 56px 20px 20px;
    border-radius: 28px;
  }

  .section-dark .section-heading {
    margin-bottom: 22px;
  }

  .section-dark .section-heading h2 {
    max-width: 100%;
    font-size: clamp(2.2rem, 10.4vw, 3.4rem);
    line-height: 0.94;
    letter-spacing: -0.045em;
    text-wrap: pretty;
  }

  .section-dark .eyebrow {
    font-size: 0.72rem;
    line-height: 1.35;
  }
}
