/* ==========================================================================
   OptAI Labs — Tokens
   ========================================================================== */
:root {
  /* Colors */
  --navy: #0B1F3A;
  --navy-hover: #12294a;
  --navy-band-1: #0A1A30;
  --navy-band-2: #071427;

  --blue: #2563EB;
  --blue-dark: #1D4FD7;
  --cyan: #22B8FF;
  --cyan-light: #7FD0FF;

  --green: #16A34A;
  --green-text: #12875A;
  --green-bg: #EAF7F0;

  --white: #FFFFFF;

  --text-body: #4A5A73;
  --text-muted: #5A6B85;
  --text-faint: #7C8AA3;
  --text-faint-2: #9AA7BD;

  --border-1: #E4EBF4;
  --border-2: #E6ECF4;
  --border-3: #EDF1F7;
  --border-4: #E1E8F2;

  --bg-section: #F7F9FC;
  --bg-card: #F6F9FC;
  --bg-card-2: #F4F8FD;

  --dark-text-body: #9DB0CC;
  --dark-text-muted: #8FA6C6;
  --dark-text-faint: #63799B;
  --dark-border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-display: 'Sora', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  /* Shadows */
  --shadow-card: 0 24px 60px rgba(11, 31, 58, 0.10);
  --shadow-chip: 0 14px 30px rgba(11, 31, 58, 0.12);
  --shadow-hover: 0 18px 40px rgba(11, 31, 58, 0.08);
  --shadow-cta: 0 10px 24px rgba(37, 99, 235, 0.22);

  /* Layout */
  --content-width: 1180px;

  /* Breakpoints (referenced in media queries below; documented here for consistency) */
  --bp-tablet: 1080px;
  --bp-mobile: 860px;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

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

::selection { background: rgba(37, 99, 235, 0.16); }

@keyframes optaiFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes optaiBar {
  from { height: 8%; }
}

/* ==========================================================================
   Shared components
   ========================================================================== */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Grid items default to a min-width based on their content's intrinsic size,
   which can force the track wider than the container on narrow viewports.
   min-width: 0 lets them shrink and wrap normally instead of overflowing. */
.hero__grid > *,
.value-grid > *,
.services-grid > *,
.process-grid > *,
.cases-grid > *,
.metrics-grid > *,
.kpi-grid > * {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}

.eyebrow__line { width: 22px; height: 1px; background: #B9C8DE; }
.eyebrow__label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow--dark .eyebrow__line { background: rgba(127, 208, 255, 0.6); }
.eyebrow--dark .eyebrow__label { color: var(--cyan-light); }

.section-intro { max-width: 640px; margin: 0 0 52px; }
.section-intro__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  color: var(--navy);
}
.section-intro__lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
}
.section-intro--dark .section-intro__title { color: var(--white); }
.section-intro--dark .section-intro__lead { color: var(--dark-text-body); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  padding: 15px 26px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background .2s, border-color .2s;
  cursor: pointer;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover { background: var(--blue-dark); color: var(--white); }

.btn--secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--border-4);
}
.btn--secondary:hover { border-color: #B9C8DE; color: var(--navy); }

.btn--ghost-dark {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.24);
}
.btn--ghost-dark:hover { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(228, 235, 244, 0.9);
}

.site-header__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo { height: 80px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a { color: #4A5A73; font-size: 14.5px; font-weight: 600; }
.main-nav a:hover { color: var(--navy); }

.site-header__actions { display: flex; align-items: center; gap: 12px; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  transition: background .2s;
}
.header-cta:hover { background: var(--navy-hover); color: var(--white); }

.menu-toggle {
  display: none;
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: var(--navy);
  align-items: center;
  justify-content: center;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border-1);
  background: var(--white);
  padding: 12px 24px 20px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav__list { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a { color: var(--navy); font-weight: 600; padding: 10px 0; }
.mobile-nav__cta {
  margin-top: 8px;
  text-align: center;
  background: var(--navy);
  color: var(--white) !important;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-sm);
}

/* Offset anchor-scroll targets by the fixed header's height (~108px: 14px*2
   padding + 80px logo) so section titles don't end up hidden underneath it. */
#inicio, #servicios, #proceso, #casos, #contacto {
  scroll-margin-top: 108px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 158px 24px 96px;
  overflow: hidden;
  background: var(--white);
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 31, 58, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 58, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(1000px 560px at 50% 20%, #000, transparent 78%);
  mask-image: radial-gradient(1000px 560px at 50% 20%, #000, transparent 78%);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__grid {
  position: relative;
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  color: #3A567F;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
}
.hero__badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); display: inline-block; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 24px 0 0;
  color: var(--navy);
}
.hero__title em { color: var(--blue); font-style: normal; }

.hero__lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-body);
  margin: 24px 0 0;
  max-width: 540px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 44px; }
.hero__stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--navy);
}
.hero__stat-label { font-size: 13px; color: var(--text-faint); font-weight: 600; }
.hero__stat-divider { width: 1px; background: var(--border-1); }

.hero__visual { position: relative; }

.dashboard-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border-2);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 20px;
  animation: optaiFloat 8s ease-in-out infinite;
}

.dashboard-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dashboard-card__title { display: flex; align-items: center; gap: 9px; }
.dashboard-card__title-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.dashboard-card__title-text { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--navy); }

.status-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--green-text);
  background: var(--green-bg);
  padding: 4px 9px;
  border-radius: 6px;
}
.status-live__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.kpi-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--bg-card); border: 1px solid #EDF2F8; border-radius: var(--radius-md); padding: 12px; }
.kpi__label { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.kpi__value { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--navy); }
.kpi__delta { font-size: 11px; color: var(--green-text); font-weight: 700; }
.kpi--dark { background: var(--navy); }
.kpi--dark .kpi__label { color: rgba(255, 255, 255, 0.7); }
.kpi--dark .kpi__value { color: var(--white); }
.kpi--dark .kpi__delta { color: var(--cyan-light); }

.chart-card { background: var(--bg-card); border: 1px solid #EDF2F8; border-radius: var(--radius-md); padding: 16px 14px 12px; }
.chart-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chart-card__title { font-size: 12px; font-weight: 700; color: var(--navy); }
.chart-card__period { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 92px; }
.chart-bars .bar { flex: 1; background: #D3DEEC; border-radius: 4px; animation: optaiBar 1.1s ease; }
.chart-bars .bar--accent { background: #AAC6EE; }
.chart-bars .bar--primary { background: var(--blue); }
.chart-bars .bar:nth-child(1) { height: 34%; animation-duration: 1.1s; }
.chart-bars .bar:nth-child(2) { height: 46%; animation-duration: 1.2s; }
.chart-bars .bar:nth-child(3) { height: 40%; animation-duration: 1.3s; }
.chart-bars .bar:nth-child(4) { height: 58%; animation-duration: 1.4s; }
.chart-bars .bar:nth-child(5) { height: 52%; animation-duration: 1.5s; }
.chart-bars .bar:nth-child(6) { height: 72%; animation-duration: 1.6s; }
.chart-bars .bar:nth-child(7) { height: 84%; animation-duration: 1.7s; }
.chart-bars .bar:nth-child(8) { height: 100%; animation-duration: 1.8s; }

.flow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 8px;
  margin-top: 14px;
  background: var(--white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 11px 12px;
}
.flow-pill { font-size: 12px; font-weight: 700; color: var(--blue); background: #EEF4FF; padding: 5px 10px; border-radius: 6px; }
.flow-arrow { color: #B7C4D8; flex-shrink: 0; }
.flow-status { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--green-text); }

.float-chip {
  position: absolute;
  bottom: -22px;
  right: -18px;
  background: var(--white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-chip);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  animation: optaiFloat 7s ease-in-out infinite .8s;
}
.float-chip__icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--green-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
}
.float-chip__title { font-size: 12px; font-weight: 800; color: var(--navy); }
.float-chip__subtitle { font-size: 11px; color: var(--text-faint); font-weight: 600; }

.trust-strip { max-width: var(--content-width); margin: 70px auto 0; padding-top: 32px; border-top: 1px solid var(--border-3); }
.trust-strip__label {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint-2);
  margin: 0 0 22px;
}
.trust-list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; list-style: none; margin: 0; padding: 0; }
.trust-list li {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-weight: 700;
  color: #8593AB;
  font-size: 14px;
}

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding: 104px 24px; background: var(--bg-section); border-top: 1px solid var(--border-3); }

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

.service-card {
  background: var(--white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #CBDCF6; }

.service-card__icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--blue);
}
.service-card__title { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 0 0 9px; color: var(--navy); }
.service-card__text { font-size: 15px; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* ==========================================================================
   Value proposition
   ========================================================================== */
.value-prop { padding: 104px 24px; background: var(--white); }

.value-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.value-prop__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  color: var(--navy);
}
.value-prop__lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-body);
  margin: 0 0 30px;
  max-width: 520px;
}

.value-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; list-style: none; margin: 0; padding: 0; }
.value-checklist li { display: flex; gap: 12px; align-items: center; }
.value-checklist__icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 7px;
  background: #EEF4FF;
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.value-checklist__text { font-size: 15px; font-weight: 600; color: var(--navy); line-height: 1.35; }

.value-gallery { position: relative; }
.value-gallery__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; aspect-ratio: 1 / 1; }
.value-gallery__item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-2);
  box-shadow: 0 16px 40px rgba(11, 31, 58, 0.10);
}
.value-gallery__item img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Process (dark band)
   ========================================================================== */
.process { position: relative; padding: 104px 24px; overflow: hidden; background: var(--navy-band-1); }

.process__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(900px 500px at 50% 0%, #000, transparent 80%);
  mask-image: radial-gradient(900px 500px at 50% 0%, #000, transparent 80%);
}

.process__inner { position: relative; max-width: var(--content-width); margin: 0 auto; }
.process__intro { max-width: 640px; margin: 0 0 54px; }

.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.process-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
}
.process-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.process-card__icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: rgba(127, 208, 255, 0.1);
  border: 1px solid rgba(127, 208, 255, 0.22);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan-light);
}
.process-card__number { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: rgba(255, 255, 255, 0.14); }
.process-card__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 0 0 8px; color: var(--white); }
.process-card__text { font-size: 14px; line-height: 1.6; color: var(--dark-text-body); margin: 0; }

/* ==========================================================================
   Use cases
   ========================================================================== */
.use-cases { padding: 104px 24px; background: var(--white); }
.use-cases .section-intro { margin: 0 0 48px; }

.cases-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.case-card {
  background: var(--white);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 22px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.case-card:hover { border-color: #CBDCF6; box-shadow: 0 14px 30px rgba(11, 31, 58, 0.07); }

.case-card__icon {
  display: flex;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-1);
  align-items: center; justify-content: center;
  color: var(--blue);
  margin-bottom: 14px;
}
.case-card__title { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; margin: 0 0 6px; color: var(--navy); }
.case-card__text { font-size: 13.5px; line-height: 1.55; color: var(--text-muted); margin: 0; }

/* ==========================================================================
   Metrics
   ========================================================================== */
.metrics { padding: 104px 24px; background: var(--bg-section); border-top: 1px solid var(--border-3); border-bottom: 1px solid var(--border-3); }

.metrics .section-intro { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.metrics .eyebrow { justify-content: center; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric-card { text-align: center; background: var(--white); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 36px 20px; }
.metric-value { font-family: var(--font-display); font-weight: 800; font-size: 46px; line-height: 1; color: var(--blue); }
.metric-label { font-size: 14px; font-weight: 600; color: var(--text-muted); margin: 12px 0 0; }
.metrics-note { text-align: center; font-size: 13px; color: var(--text-faint-2); margin: 26px 0 0; }

/* ==========================================================================
   Corporate statement (dark)
   ========================================================================== */
.statement { position: relative; padding: 118px 24px; overflow: hidden; background: var(--navy-band-2); }
.statement__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(700px 420px at 50% 50%, #000, transparent 75%);
  mask-image: radial-gradient(700px 420px at 50% 50%, #000, transparent 75%);
}
.statement__inner { position: relative; max-width: 900px; margin: 0 auto; text-align: center; }
.statement__icon { margin: 0 auto 24px; display: block; color: var(--cyan-light); }
.statement__quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 33px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--white);
  margin: 0;
}
.statement__quote em { color: var(--cyan-light); font-style: normal; }
.statement__author { margin: 26px 0 0; font-size: 15px; font-weight: 600; color: var(--dark-text-muted); }

/* ==========================================================================
   CTA final
   ========================================================================== */
.cta-final { padding: 104px 24px; background: var(--white); }

.cta-panel {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 64px 56px;
  background: var(--navy);
  border: 1px solid #16294a;
}
.cta-panel__glow {
  position: absolute;
  top: -40%; right: -8%;
  width: 420px; height: 420px;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.32), transparent 68%);
  pointer-events: none;
}
.cta-panel__line {
  position: absolute;
  top: 0; left: 56px; right: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 208, 255, 0.5), transparent);
}
.cta-panel__content { position: relative; max-width: 640px; }
.cta-panel__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--white);
  margin: 0 0 16px;
}
.cta-panel__lead { font-size: 18px; line-height: 1.6; color: #A9BAD4; margin: 0 0 32px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-actions .btn--primary { box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35); }
.cta-note { margin: 24px 0 0; font-size: 14px; color: var(--dark-text-muted); font-weight: 600; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { position: relative; background: var(--navy-band-2); padding: 72px 24px 30px; overflow: hidden; }
.site-footer__line {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(560px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 208, 255, 0.5), transparent);
}

.footer-main { position: relative; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-main__logo { height: 46px; width: auto; margin-bottom: 14px; }
.footer-main__brand { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; color: var(--white); margin-bottom: 12px; }
.footer-main__desc { font-size: 15.5px; line-height: 1.65; color: var(--dark-text-muted); max-width: 460px; margin: 0 0 26px; }

.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; margin-bottom: 26px; list-style: none; padding: 0; }
.footer-nav a { color: #C5D2E6; font-size: 15px; font-weight: 600; transition: color .2s; }
.footer-nav a:hover { color: var(--cyan-light); }

.footer-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 11px 22px;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  transition: border-color .2s, background .2s;
}
.contact-pill:hover { border-color: rgba(127, 208, 255, 0.5); background: rgba(127, 208, 255, 0.08); color: var(--white); }
.contact-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--white);
  transition: border-color .2s, background .2s, color .2s;
}
.social-link:hover { border-color: rgba(127, 208, 255, 0.5); background: rgba(127, 208, 255, 0.08); color: var(--cyan-light); }
.social-link svg { width: 20px; height: 20px; }

.footer-bottom {
  position: relative;
  max-width: 1000px;
  margin: 44px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--dark-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
.footer-bottom__copyright { font-size: 13px; color: var(--dark-text-faint); }
.footer-bottom__sep { color: #33465F; }
.footer-bottom a { font-size: 13px; color: var(--dark-text-muted); font-weight: 500; }

/* ==========================================================================
   Legal pages (privacy.html, terms.html)
   ========================================================================== */
.legal-main { max-width: 760px; margin: 0 auto; padding: 158px 24px 96px; }
.legal-main h1 { font-family: var(--font-display); font-weight: 800; font-size: 40px; letter-spacing: -0.025em; color: var(--navy); margin: 0 0 8px; }
.legal-main .legal-updated { font-size: 14px; color: var(--text-faint); margin: 0 0 40px; }
.legal-main h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--navy); margin: 40px 0 12px; }
.legal-main p, .legal-main li { font-size: 16px; line-height: 1.7; color: var(--text-body); }
.legal-main ul { padding-left: 20px; }

/* ==========================================================================
   Scroll reveal (JS toggles .is-visible; count-up handled in script.js)
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   Breakpoints match the original design: tablet < 1080px, mobile < 860px
   ========================================================================== */
@media (max-width: 1079px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .cases-grid { grid-template-columns: repeat(3, 1fr); }

  /* Absolutely positioned over the stacked single-column hero, this chip
     ends up overlapping surrounding text instead of floating clear of it. */
  .float-chip { display: none; }
}

@media (max-width: 859px) {
  .main-nav, .header-cta { display: none; }
  .menu-toggle { display: flex; }

  .hero { padding-top: 128px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 38px; }

  .value-grid { grid-template-columns: 1fr; }

  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 28px 12px; }
  .metric-value { font-size: 32px; }

  section h2, .section-intro__title { font-size: 30px; }

  .cta-panel { padding: 44px 28px; }
}

/* ==========================================================================
   Modal: Solicitar diagnóstico
   ========================================================================== */
/* The <dialog> itself is just a transparent, padding-less frame sized to its
   content. All the visible card (background, border, padding) lives on
   .diag-modal__inner, so a click that lands on the <dialog> means the true
   backdrop — never the card or its edge. */
.diag-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  color: var(--navy);
}
.diag-modal::backdrop { background: rgba(11, 31, 58, 0.55); }

/* showModal() toggles [open]; keep the closed dialog out of the layout. */
.diag-modal:not([open]) { display: none; }

.diag-modal__inner {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--white);
}

.diag-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.diag-modal__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
.diag-modal__close {
  flex-shrink: 0;
  display: inline-flex;
  padding: 6px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.diag-modal__close:hover { background: var(--bg-section); color: var(--navy); }

.diag-modal__intro {
  margin: 10px 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-body);
}

.diag-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.diag-field { display: flex; flex-direction: column; gap: 6px; }
.diag-field--full { grid-column: 1 / -1; }
.diag-field__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.diag-field__opt { font-weight: 500; color: var(--text-faint); }

.diag-field input,
.diag-field textarea {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border-4);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.diag-field textarea { resize: vertical; min-height: 88px; }
.diag-field input:focus,
.diag-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* Only flag invalid fields once the user has tried to submit. */
.diag-form.is-submitted .diag-field input:invalid,
.diag-form.is-submitted .diag-field textarea:invalid {
  border-color: #D9534F;
}

.diag-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-body);
}
.diag-consent input { margin-top: 2px; flex-shrink: 0; accent-color: var(--blue); }
.diag-consent.is-invalid input {
  outline: 2px solid #D9534F;
  outline-offset: 1px;
}

.diag-consent__error {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #C0392B;
}
.diag-consent__error[hidden] { display: none; }

.diag-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.diag-form__status {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}
.diag-form__status:empty { display: none; }
.diag-form.is-success .diag-form__status {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--green-text);
  background: var(--green-bg);
}
.diag-form.is-error .diag-form__status { color: #C0392B; }

.diag-form__submit { margin-top: 20px; width: 100%; justify-content: center; }
.diag-form__submit:disabled { opacity: .65; cursor: default; }

@media (max-width: 859px) {
  .diag-modal__inner { padding: 24px; }
  .diag-form__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .diag-modal[open] .diag-modal__inner { animation: diagModalIn .22s ease-out; }
  @keyframes diagModalIn {
    from { opacity: 0; transform: translateY(8px); }
  }
}
