/* ============================================================
   Kromiax — marketing site
   Tokens derived from the official logo marks (teal/cyan + gold).
   ============================================================ */

:root {
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --container: 1200px;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 76px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: oklch(0.985 0.004 228);
  --bg-alt: oklch(0.963 0.008 228);
  --card: oklch(1 0 0);
  --fg: oklch(0.23 0.035 232);
  --muted: oklch(0.5 0.03 230);
  --border: oklch(0.905 0.012 228);
  --border-strong: oklch(0.84 0.02 228);
  --accent: oklch(0.46 0.11 228);
  --accent-strong: oklch(0.38 0.11 228);
  --accent-soft: oklch(0.905 0.035 228);
  --cyan: oklch(0.7 0.14 228);
  --gold: oklch(0.6 0.11 82);
  --on-accent: oklch(1 0 0);
  --ring: oklch(0.55 0.11 228);
  --glow-color: oklch(0.78 0.13 228 / 0.28);
  --shadow: 0 1px 2px oklch(0.2 0.03 230 / 0.05), 0 16px 40px -20px oklch(0.2 0.03 230 / 0.18);
  --shadow-lg: 0 2px 4px oklch(0.2 0.03 230 / 0.06), 0 28px 64px -24px oklch(0.2 0.03 230 / 0.28);
  --dot: oklch(0.2 0.03 230 / 0.16);
  --header-bg: oklch(0.985 0.004 228 / 0.82);
  --chip-bg: oklch(1 0 0 / 0.86);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(0.16 0.022 230);
  --bg-alt: oklch(0.188 0.026 230);
  --card: oklch(0.205 0.03 230);
  --fg: oklch(0.94 0.012 228);
  --muted: oklch(0.71 0.022 228);
  --border: oklch(0.31 0.03 228);
  --border-strong: oklch(0.42 0.03 228);
  --accent: oklch(0.78 0.13 230);
  --accent-strong: oklch(0.86 0.12 230);
  --accent-soft: oklch(0.29 0.055 228);
  --cyan: oklch(0.8 0.13 228);
  --gold: oklch(0.76 0.12 84);
  --on-accent: oklch(0.15 0.03 230);
  --ring: oklch(0.82 0.12 230);
  --glow-color: oklch(0.7 0.14 230 / 0.2);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 18px 44px -22px oklch(0 0 0 / 0.6);
  --shadow-lg: 0 2px 4px oklch(0 0 0 / 0.4), 0 32px 70px -26px oklch(0 0 0 / 0.7);
  --dot: oklch(0.9 0.02 228 / 0.14);
  --header-bg: oklch(0.16 0.022 230 / 0.82);
  --chip-bg: oklch(0.23 0.032 230 / 0.9);
}

/* ============ Base ============ */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.015em;
}

p { margin: 0; }

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

input { font-family: inherit; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 16px; }

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.97rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1.05rem; }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 24px -12px oklch(from var(--accent) l c h / 0.55);
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--fg);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.icon-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.icon-btn svg { width: 21px; height: 21px; }

#theme-toggle .icon-sun { display: none; }
#theme-toggle .icon-moon { display: block; }

[data-theme="dark"] #theme-toggle .icon-sun { display: block; }
[data-theme="dark"] #theme-toggle .icon-moon { display: none; }

#theme-toggle .icon-sun { color: oklch(0.79 0.15 70); }
#theme-toggle .icon-moon { color: oklch(0.52 0.09 252); }

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px -18px oklch(0.2 0.03 230 / 0.35);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  margin-right: auto;
}

.brand-logo { height: 40px; width: auto; }

.brand-logo-light, .preview-logo-light, .signal-logo-light { display: block; }
.brand-logo-dark, .preview-logo-dark, .signal-logo-dark { display: none; }

[data-theme="dark"] .brand-logo-light,
[data-theme="dark"] .preview-logo-light,
[data-theme="dark"] .signal-logo-light { display: none; }

[data-theme="dark"] .brand-logo-dark,
[data-theme="dark"] .preview-logo-dark,
[data-theme="dark"] .signal-logo-dark { display: block; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  color: var(--fg);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.site-nav a:hover { background: var(--accent-soft); }

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

.nav-cta { margin-left: 2px; }

.nav-cta-mobile { display: none; }

.nav-burger { display: none; }

/* ============ Language switcher ============ */

.lang-wrap { position: relative; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--fg);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.lang-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.lang-btn .flag { width: 24px; height: 16px; }
.lang-btn .chev { width: 14px; height: 14px; margin-left: 2px; transition: transform 0.2s ease; }
.lang-wrap.open .lang-btn .chev { transform: rotate(180deg); }

.flag {
  display: inline-flex;
  flex: none;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.25);
}

.flag svg { width: 100%; height: 100%; display: block; }

.lang-code {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 60;
}

.lang-wrap.open .lang-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }

.lang-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.92rem;
  color: var(--fg);
  text-align: left;
  transition: background-color 0.14s ease;
}

.lang-menu button:hover { background: var(--accent-soft); }

.lang-menu button[aria-selected="true"] { color: var(--accent); font-weight: 500; }

.lang-menu button[aria-selected="true"] .lang-code::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============ Sections ============ */

.section { padding: clamp(84px, 9vw, 128px) 0; }

.section:not(.hero), .footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 60px); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.kicker::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.section-sub {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 60ch;
}

/* ============ Hero ============ */

.hero {
  position: relative;
  padding: clamp(70px, 8vw, 110px) 0 clamp(60px, 7vw, 90px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52% 46% at 78% 22%, var(--glow-color), transparent 70%),
    radial-gradient(40% 38% at 8% 88%, oklch(from var(--gold) l c h / 0.08), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.hero-title .line { display: block; }
.hero-title .accent { color: var(--accent); }

.hero-sub {
  margin-top: 26px;
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 54ch;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-trust {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.hero-trust::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  flex: none;
  position: relative;
}

.hero-trust::before {
  background: transparent;
  border: 1.5px solid var(--accent);
}

.hero-trust::before {
  background:
    linear-gradient(var(--accent), var(--accent)) center / 8px 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 1.5px 8px no-repeat;
}

/* Hero visual */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.signal-card {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1 / 0.92;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.signal-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  opacity: 0.6;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 45%, #000 20%, transparent 78%);
  mask-image: radial-gradient(80% 80% at 50% 45%, #000 20%, transparent 78%);
}

.signal-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(52% 46% at 50% 44%, var(--glow-color), transparent 72%);
}

.signal-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid oklch(from var(--accent) l c h / 0.35);
  pointer-events: none;
}

.ring-outer { width: 74%; height: 74%; }
.ring-inner { width: 50%; height: 50%; border-style: dashed; border-color: oklch(from var(--accent) l c h / 0.4); }

.signal-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  width: clamp(140px, 34%, 190px);
  height: auto;
  filter: drop-shadow(0 18px 30px oklch(0.25 0.09 228 / 0.25));
}

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 500;
  font-size: 0.86rem;
  white-space: nowrap;
}

.float-chip svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

.chip-a { top: 18px; left: 18px; }
.chip-b { top: 50%; right: 14px; transform: translateY(-50%); }
.chip-c { bottom: 20px; left: 22px; }

/* ============ Marquee ============ */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  background: var(--bg-alt);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-item {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.marquee i {
  font-style: normal;
  color: var(--accent);
  font-size: 0.9rem;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============ Services ============ */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg { width: 24px; height: 24px; }

.feature-card h3 {
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============ Process ============ */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 26px;
}

.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 18px);
  opacity: 0.55;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin: 18px 0 16px;
}

.step h3 {
  font-size: 1.16rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p { color: var(--muted); font-size: 0.93rem; line-height: 1.6; }

/* ============ AI assistant ============ */

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.ai-list { margin-top: 26px; display: grid; gap: 14px; }

.ai-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 1rem;
  color: var(--fg);
}

.check {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.check svg { width: 13px; height: 13px; }

.ai-copy .btn { margin-top: 32px; }

/* Chat preview card */

.preview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.preview-head,
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.preview-avatar { width: 34px; height: 34px; border-radius: 9px; }

.preview-name,
.chat-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.preview-status,
.chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px oklch(from var(--gold) l c h / 0.2);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px oklch(from var(--gold) l c h / 0.18); }
  50% { box-shadow: 0 0 0 6px oklch(from var(--gold) l c h / 0.06); }
}

.preview-body {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.93rem;
  line-height: 1.5;
}

.bubble-bot {
  justify-self: start;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}

.bubble-user {
  justify-self: end;
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: 5px;
}

.typing {
  justify-self: start;
  display: inline-flex;
  gap: 4px;
  padding: 13px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 5px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s ease-in-out infinite;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

.preview-caption {
  padding: 14px 20px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ============ Team ============ */

.team-grid { align-items: stretch; }

.team-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.team-avatar {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  box-shadow: 0 10px 22px -10px oklch(from var(--accent) l c h / 0.6);
}

img.team-avatar {
  object-fit: cover;
}

.team-card h3 { font-size: 1.3rem; font-weight: 600; }

.team-role {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}

.team-focus {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.cert-toggle {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-alt);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--fg);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.cert-toggle:hover { border-color: var(--accent); background: var(--accent-soft); }

.cert-toggle .cert-count {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.cert-toggle .chev { width: 16px; height: 16px; transition: transform 0.2s ease; color: var(--muted); }
.team-card.open .cert-toggle .chev { transform: rotate(180deg); }

.cert-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.team-card.open .cert-panel { grid-template-rows: 1fr; }

.cert-panel-inner { overflow: hidden; }

.cert-groups { display: grid; gap: 18px; padding-top: 20px; }

.cert-group-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.cert-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 4px 18px;
}

.cert-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.cert-org {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--accent);
  white-space: nowrap;
}

.cert-name { color: var(--fg); }

.team-link {
  margin-top: auto;
  padding-top: 22px;
  font-weight: 500;
  font-size: 0.94rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.team-link::after {
  content: "→";
  transition: transform 0.16s ease;
}

.team-card:hover .team-link::after { transform: translateX(3px); }

/* ============ Final CTA ============ */

.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(46% 60% at 50% 0%, var(--glow-color), transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-inner .kicker { justify-content: center; }
.cta-inner .kicker::after {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
}

.cta-title {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.06;
  max-width: 20ch;
}

.cta-sub {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 52ch;
}

.cta-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.cta-mail { margin-top: 26px; }

.mail-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  border-bottom: 1px solid oklch(from var(--accent) l c h / 0.4);
  padding-bottom: 2px;
  transition: border-color 0.16s ease;
}

.mail-link:hover { border-color: var(--accent); }

/* ============ Footer ============ */

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: clamp(56px, 7vw, 84px) 0 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .brand { margin-bottom: 18px; }

.footer-tag {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 34ch;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.footer-social a {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--border);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.footer-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.footer-social svg { width: 19px; height: 19px; }

.footer-col { display: flex; flex-direction: column; gap: 10px; }

.footer-col h2.footer-col-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.footer-col a {
  color: var(--fg);
  font-size: 0.93rem;
  width: fit-content;
  transition: color 0.16s ease;
}

.footer-col a:hover { color: var(--accent); }

.footer-location { color: var(--muted); font-size: 0.93rem; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 26px;
  color: var(--muted);
  font-size: 0.83rem;
}

/* ============ Chat widget ============ */

.chat-root { position: fixed; right: 24px; bottom: 24px; z-index: 150; }

.chat-launcher {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 40px -12px oklch(from var(--accent) l c h / 0.65);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.chat-launcher:hover { background: var(--accent-strong); transform: translateY(-2px); }

.chat-launcher svg { width: 26px; height: 26px; }

.chat-launcher .launcher-close { display: none; }
.chat-root.open .chat-launcher .launcher-open { display: none; }
.chat-root.open .chat-launcher .launcher-close { display: block; }

.chat-launcher-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--accent);
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 16px);
  width: min(396px, calc(100vw - 48px));
  max-height: min(600px, calc(100vh - 120px));
  display: none;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.chat-root.open .chat-panel { display: flex; animation: panel-in 0.22s ease; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-head { position: relative; }

.chat-head .chat-close {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-alt);
  min-height: 200px;
  max-height: 320px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.chat-messages .bubble { max-width: 84%; }

.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.suggest-chip {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--fg);
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.suggest-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--fg);
  font-size: 0.95rem;
  transition: border-color 0.16s ease;
}

.chat-input::placeholder { color: var(--muted); }

.chat-input:focus { outline: none; border-color: var(--accent); }

.chat-send {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.chat-send:hover { background: var(--accent-strong); transform: translateY(-1px); }

.chat-send svg { width: 20px; height: 20px; }

.chat-note {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  padding: 8px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

/* ============ Reveal on scroll ============ */

/* Solo se oculta cuando hay JS: sin JS (crawlers) el contenido es
   visible por defecto y no depende de IntersectionObserver. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in, .no-js .reveal { opacity: 1; transform: none; }

/* ============ Responsive ============ */

@media (max-width: 1020px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 26px; }
  .ai-grid { grid-template-columns: 1fr; }
  .ai-preview { max-width: 520px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .site-nav {
    position: fixed;
    inset: var(--header-h) 16px auto 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .site-nav.open { opacity: 1; transform: none; pointer-events: auto; }

  .site-nav a { padding: 14px 16px; font-size: 1.02rem; }

  .site-nav a.nav-cta-mobile {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    text-align: center;
    margin-top: 6px;
  }

  .nav-cta-mobile { display: block; }

  .nav-burger { display: inline-flex; }

  .header-actions > .nav-cta { display: none; }

  .header-inner { gap: 16px; }

  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { text-align: center; }
  .hero-copy .kicker { justify-content: center; }
  .hero-copy .kicker::after {
    content: "";
    width: 26px;
    height: 1.5px;
    background: var(--accent);
    border-radius: 2px;
  }
  .hero-actions { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-visual { justify-content: center; }
  .signal-card { width: min(100%, 460px); }
}

@media (max-width: 640px) {
  .container { width: min(var(--container), 100% - 32px); }

  .header-inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand-logo { height: 32px; }
  .brand-name { font-size: 1rem; letter-spacing: 0.06em; }
  .header-actions { gap: 6px; }
  .icon-btn, .nav-burger { width: 40px; height: 40px; }
  .lang-btn { min-height: 40px; padding: 0 8px; gap: 5px; }
  .lang-btn .chev { width: 12px; height: 12px; }

  .hero-title { font-size: clamp(2rem, 9.5vw, 2.7rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .signal-card { width: min(100%, 400px); }

  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .ai-list li { font-size: 0.95rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-social a { width: 46px; height: 46px; }
  .float-chip { padding: 10px 13px; font-size: 0.78rem; }
  .chip-b { display: none; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { width: 100%; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .chat-root { right: 16px; bottom: 16px; }
  .chat-panel {
    right: 0;
    bottom: calc(100% + 14px);
    width: calc(100vw - 32px);
    max-height: min(70vh, calc(100vh - 140px));
  }
  .chat-messages { max-height: calc(100vh - 320px); min-height: 180px; }
}

@media (max-width: 400px) {
  .lang-btn .lang-code { display: none; }
  .brand-name { font-size: 0.95rem; }
  .section-title { font-size: 1.7rem; }
  .hero-sub { font-size: 1rem; }
  .section-sub { font-size: 1rem; }
}

@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;
  }
  .reveal, .js .reveal { opacity: 1; transform: none; }
}
