/* ROBI Landing — design tokens from app colors.xml */

:root {
  --robi-primary: #3B82F6;
  --robi-primary-50: rgba(59, 130, 246, 0.08);
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --text-primary: #334155;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-on-primary: #FFFFFF;
  --border: #E5E7EB;
  --border-light: #F1F5F9;
  --accent-warm: #F59E0B;
  --accent-warm-bg: #FFFBEB;
  --record-red: #EF4444;
  --success: #22C55E;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-xl: 22px;
  --radius-pill: 999px;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --header-h: 64px;
  --container: min(1120px, 100% - 48px);
  --transition: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --robi-primary-50: rgba(59, 130, 246, 0.12);
    --bg: #0F172A;
    --surface: #1E293B;
    --surface-alt: #334155;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: #334155;
    --border-light: #1E293B;
    --accent-warm-bg: #422006;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  }
}

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

html {
  scroll-behavior: smooth;
}

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 9999;
}

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

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

a:hover {
  text-decoration: underline;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 8px 16px;
  background: var(--robi-primary);
  color: var(--text-on-primary);
  border-radius: var(--radius-sm);
  z-index: 10000;
}

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

/* Logo light/dark swap */
.logo-dark { display: none; }

@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo-link {
  flex-shrink: 0;
}

.logo-link:hover {
  text-decoration: none;
  opacity: 0.85;
}

.nav-desktop {
  display: none;
  gap: 28px;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.nav-desktop a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.header-actions {
  display: none;
  gap: 8px;
  margin-left: auto;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav-mobile[hidden] {
  display: none;
}

.nav-mobile a {
  padding: 12px 0;
  color: var(--text-primary);
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
}

.nav-mobile a:last-child {
  border-bottom: none;
  margin-top: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--robi-primary);
  color: var(--text-on-primary);
}

.btn-primary:hover {
  background: #2563EB;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--robi-primary);
  color: var(--robi-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 48px 0 72px;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(1.75rem, 4vw + 0.5rem, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 32em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-warm);
  background: var(--accent-warm-bg);
  border-radius: var(--radius-pill);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--robi-primary);
}

/* Phone mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(280px, 85vw);
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow-md);
}

.phone-notch {
  width: 80px;
  height: 6px;
  margin: 0 auto 12px;
  background: var(--border);
  border-radius: var(--radius-pill);
}

.phone-screen {
  padding: 16px;
  background: var(--bg);
  border-radius: 20px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mock-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mock-dot--rec {
  background: var(--record-red);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.mock-transcript {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.mock-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.mock-line--live {
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 6px;
}

.mock-timeline {
  padding: 12px;
  background: var(--robi-primary-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--robi-primary);
}

.mock-timeline-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--robi-primary);
  margin-bottom: 10px;
}

.mock-timeline-item {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.mock-timeline-item:last-child {
  margin-bottom: 0;
}

.mock-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.mock-l3 {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-secondary);
}

.mock-l3-badge {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--robi-primary);
  color: var(--text-on-primary);
  border-radius: var(--radius-sm);
}

/* Sections */
.section {
  padding: 72px 0;
}

.section--alt {
  background: var(--surface-alt);
}

.section-header {
  max-width: 540px;
  margin-bottom: 40px;
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0;
  color: var(--text-secondary);
}

/* Bento grid */
.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.bento-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.bento-card h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.bento-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.bento-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.bento-icon--record { background: rgba(239, 68, 68, 0.1); color: var(--record-red); }
.bento-icon--l2 { background: var(--robi-primary-50); color: var(--robi-primary); }
.bento-icon--l3 { background: rgba(124, 58, 237, 0.1); color: #7C3AED; }
.bento-icon--cal { background: var(--accent-warm-bg); color: var(--accent-warm); }
.bento-icon--files { background: rgba(45, 212, 191, 0.12); color: #0D9488; }
.bento-icon--folders { background: rgba(245, 158, 11, 0.12); color: var(--accent-warm); }

.bento-tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* Pipeline */
.pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.pipeline-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.pipeline-step:last-child {
  border-bottom: none;
}

.pipeline-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--robi-primary);
  padding-top: 2px;
}

.pipeline-body h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}

.pipeline-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Use cases */
.use-cases {
  display: grid;
  gap: 20px;
}

.use-case {
  padding: 24px;
  border-left: 3px solid var(--robi-primary);
  background: var(--surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.use-case h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.use-case p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Plans */
.plans {
  display: grid;
  gap: 20px;
}

.plan-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.plan-card--featured {
  border-color: var(--robi-primary);
  box-shadow: var(--shadow-md);
  position: relative;
}

.plan-tag {
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.plan-tag--popular {
  color: var(--robi-primary);
  background: var(--robi-primary-50);
}

.plan-tag--pro {
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.1);
}

.plan-card h3 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
}

.plan-price {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.plan-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.plan-headline {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.plan-card ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  flex: 1;
}

.plan-card li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.plan-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--robi-primary);
}

/* CTA final */
.cta-final {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.cta-inner {
  text-align: center;
  max-width: 480px;
}

.cta-logo {
  margin: 0 auto 20px;
}

.cta-inner h2 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 2vw + 0.5rem, 1.75rem);
  font-weight: 700;
}

.cta-inner p {
  margin: 0 0 24px;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  gap: 24px;
}

.footer-brand p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.footer-nav a {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-copy {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Focus */
:focus-visible {
  outline: 2px solid var(--robi-primary);
  outline-offset: 2px;
}

/* Tablet+ */
@media (min-width: 640px) {
  .use-cases {
    grid-template-columns: repeat(3, 1fr);
  }

  .plans {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }

  .plan-card--featured {
    transform: scale(1.02);
  }
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .header-actions {
    display: flex;
    margin-left: 0;
  }

  .nav-toggle {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
  }

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

  .bento {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
  }

  .bento-card--large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .bento-card--medium {
    grid-column: span 1;
  }

  .bento-card--small {
    grid-column: span 1;
  }

  .pipeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .pipeline-step {
    border-bottom: none;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pipeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    right: -16px;
    width: 32px;
    height: 1px;
    background: var(--border);
  }

  .footer-grid {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 64px 0 96px;
  }

  .section {
    padding: 96px 0;
  }
}

/* Guías SEO */
.guide-grid {
  display: grid;
  gap: 16px;
}

.guide-card {
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: inherit;
  box-shadow: var(--shadow-sm);
}

.guide-card:hover {
  text-decoration: none;
  border-color: var(--robi-primary);
}

.guide-card h3 {
  margin: 8px 0;
  font-size: 18px;
}

.guide-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.guide-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--robi-primary);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.crumbs a {
  color: var(--text-secondary);
}

.crumbs span[aria-hidden="true"] {
  color: var(--text-muted);
}

.page-hero {
  padding: 40px 0 8px;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 3vw + 0.6rem, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-hero .hero-lead {
  max-width: 680px;
}

.prose {
  max-width: 740px;
}

.prose h2 {
  margin: 40px 0 12px;
  font-size: clamp(1.35rem, 1.5vw + 0.6rem, 1.7rem);
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 1.15rem;
}

.prose p,
.prose li {
  color: var(--text-secondary);
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 8px;
}

.faq {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
}

.faq details p {
  margin: 0 0 16px;
}

.compare-wrap {
  overflow-x: auto;
  margin: 16px 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

.compare th,
.compare td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare th {
  font-size: 13px;
  background: var(--surface-alt);
}

.compare tr:last-child td {
  border-bottom: none;
}

.note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.related {
  display: grid;
  gap: 12px;
}

.related a {
  display: block;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: inherit;
}

.related a:hover {
  text-decoration: none;
  border-color: var(--robi-primary);
}

.related strong {
  display: block;
  margin-bottom: 4px;
}

.related span {
  color: var(--text-secondary);
  font-size: 14px;
}

@media (min-width: 768px) {
  .guide-grid,
  .related {
    grid-template-columns: 1fr 1fr;
  }

  .nav-desktop {
    gap: 18px;
  }
}
