/* Kora Clinic — sistema de diseño marketing site
   Crema cálida + terracota + verde oliva como acento secundario. */

:root {
  /* Backgrounds */
  --bg-app:        oklch(0.965 0.008 75);
  --bg-panel:      oklch(0.995 0.004 80);
  --bg-elev:       #ffffff;
  --bg-subtle:     oklch(0.945 0.010 75);
  --bg-inset:      oklch(0.925 0.012 75);
  --bg-deep:       oklch(0.215 0.012 60);
  --bg-deep-2:     oklch(0.28 0.013 62);

  /* Lines */
  --line:          oklch(0.905 0.008 70);
  --line-soft:     oklch(0.925 0.008 70);
  --line-strong:   oklch(0.84  0.011 70);

  /* Ink ramp */
  --ink:           oklch(0.21 0.012 60);
  --ink-2:         oklch(0.38 0.013 65);
  --ink-3:         oklch(0.54 0.011 70);
  --ink-4:         oklch(0.70 0.009 72);
  --ink-on-deep:   oklch(0.96 0.008 75);
  --ink-on-deep-2: oklch(0.78 0.010 72);

  /* Accent primario — terracota */
  --accent:        #B36646;
  --accent-deep:   #8E4E33;
  --accent-soft:   #F5EAE3;
  --accent-line:   #E8C9B8;

  /* Accent secundario — verde oliva */
  --accent2:       #7A8A4A;
  --accent2-deep:  #5E6B37;
  --accent2-soft:  #EEF1E3;
  --accent2-line:  #D4DAB8;

  /* Estados */
  --ok:            oklch(0.55 0.075 148);
  --ok-soft:       oklch(0.95 0.035 145);
  --warn:          oklch(0.62 0.110 75);
  --warn-soft:     oklch(0.95 0.045 80);
  --bad:           oklch(0.55 0.130 27);
  --bad-soft:      oklch(0.95 0.030 25);

  /* Radii / shadow */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --shadow-1: 0 1px 0 oklch(0.88 0.01 70 / .55);
  --shadow-2: 0 1px 2px oklch(0.20 0.01 60 / .04), 0 0 0 1px var(--line);
  --shadow-lift: 0 10px 30px -12px oklch(0.20 0.01 60 / .14), 0 2px 6px -2px oklch(0.20 0.01 60 / .06), 0 0 0 1px var(--line);
  --shadow-deep: 0 30px 80px -30px oklch(0.20 0.01 60 / .25), 0 8px 24px -8px oklch(0.20 0.01 60 / .10), 0 0 0 1px var(--line);

  /* Type */
  --f-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --site-max: 1240px;
  --gutter: 32px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-app);
  color: var(--ink);
  font-family: var(--f-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); color: var(--accent-deep); }

.num { font-feature-settings: "tnum", "ss01"; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); letter-spacing: -0.01em; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--accent);
}
.eyebrow.no-mark::before { display: none; }

.display {
  font-family: var(--f-sans);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.display-xl { font-size: clamp(44px, 6.4vw, 88px); }
.display-l  { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; }
.display-m  { font-size: clamp(26px, 3.0vw, 38px); line-height: 1.08; }
.display-s  { font-size: clamp(20px, 2.0vw, 26px); line-height: 1.15; letter-spacing: -0.02em; }

.lead {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 56ch;
}

/* ---------- Pills ---------- */
.pill {
  display:inline-flex; align-items:center; gap:6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.01em;
  background: var(--bg-inset); color: var(--ink-2);
}
.pill-ok   { background: var(--ok-soft);    color: oklch(0.38 0.07 148); }
.pill-warn { background: var(--warn-soft);  color: oklch(0.45 0.10 70); }
.pill-bad  { background: var(--bad-soft);   color: oklch(0.40 0.13 27); }
.pill-acc  { background: var(--accent-soft); color: var(--accent-deep); }
.pill-acc2 { background: var(--accent2-soft); color: var(--accent2-deep); }
.pill-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.pill-outline-light {
  background: transparent;
  border: 1px solid oklch(1 0 0 / .14);
  color: var(--ink-on-deep);
}

/* ---------- Buttons ---------- */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  height: 44px; padding: 0 18px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  transition: background .14s, border-color .14s, transform .14s;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { background: var(--bg-subtle); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--ink-on-deep);
  border-color: var(--ink);
}
.btn-primary:hover { background: oklch(0.30 0.012 60); }
.btn-accent {
  background: var(--accent);
  color: oklch(0.98 0.005 75);
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-deep); }
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--bg-subtle); color: var(--ink); }
.btn-ghost-on-deep {
  background: transparent;
  border-color: oklch(1 0 0 / .16);
  color: var(--ink-on-deep);
}
.btn-ghost-on-deep:hover { background: oklch(1 0 0 / .07); }
.btn-light {
  background: oklch(1 0 0 / .96);
  border-color: oklch(1 0 0 / .96);
  color: var(--ink);
}
.btn-light:hover { background: #fff; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 15px; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card-soft {
  background: var(--bg-subtle);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
}

/* ---------- Inputs ---------- */
.input {
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  width: 100%;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--ink-4); }

/* ---------- Sections rhythm ---------- */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.section.tight { padding: 64px 0; }
.section.first { border-top: 0; }
.section.deep {
  background: var(--bg-deep);
  color: var(--ink-on-deep);
  border-top: 0;
}
.section.deep .eyebrow { color: var(--ink-on-deep-2); }
.section.deep .eyebrow::before { background: oklch(0.78 0.085 48); }

/* ---------- Marquee / scrolling logos ---------- */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  display: flex; gap: 64px;
  animation: marquee 38s linear infinite;
  width: max-content;
}

/* ---------- Floaty hero animations ---------- */
@keyframes float-a {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes float-b {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.float-a { animation: float-a 7s ease-in-out infinite; }
.float-b { animation: float-b 9s ease-in-out infinite; }

/* ---------- Mini dashboard mockup base ---------- */
.mock {
  background: var(--bg-panel);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  border: 1px solid var(--line);
}
.mock .mock-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}
.mock .mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.mock .mock-bar .dot.r { background: oklch(0.74 0.13 27 / .55); }
.mock .mock-bar .dot.y { background: oklch(0.82 0.13 80 / .55); }
.mock .mock-bar .dot.g { background: oklch(0.75 0.11 145 / .55); }

/* ---------- Focus rings ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Avatar ---------- */
.avatar {
  width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: var(--bg-inset); color: var(--ink-2);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  flex: 0 0 auto;
}
.avatar-acc { background: var(--accent-soft); color: var(--accent-deep); }
.avatar-acc2 { background: var(--accent2-soft); color: var(--accent2-deep); }

/* Anchor offset for sticky nav */
section[id] { scroll-margin-top: 96px; }

/* ---------- Loading state ---------- */
#root:empty::after {
  content: "";
  display: block;
  width: 28px; height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ---------- Mobile nav ---------- */
.mobile-nav-open { overflow: hidden; }

@media (max-width: 768px) {
  /* Layout */
  .container { padding: 0 20px; }
  .section { padding: 52px 0; }
  .section.tight { padding: 36px 0; }

  /* Typography */
  .display-xl { font-size: clamp(32px, 8.5vw, 52px); }
  .display-l  { font-size: clamp(26px, 6vw, 42px); }
  .lead { font-size: 16px; }

  /* Section heads: less bottom gap */
  .section-head { margin-bottom: 32px !important; }

  /* Hero — dashboard escalado para móvil */
  .hero-dashboard-wrap {
    display: block !important;
    overflow: hidden;
    margin-top: 28px;
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px -8px oklch(0.20 0.01 60 / .12);
  }
  .hero-dash-inner {
    zoom: 0.35;
    width: 960px !important;
    max-width: none !important;
  }
  /* Floats del hero: ocultos en móvil (no encajan con el zoom) */
  .hero-float-1,
  .hero-float-2,
  .hero-float-3 { display: none !important; }
  .hero-trust { flex-direction: column !important; align-items: center !important; gap: 10px !important; }

  /* Stats band (hero) — 2×2 */
  .stats-band { grid-template-columns: repeat(2, 1fr) !important; margin-top: 40px !important; }
  .stats-band > div { padding: 18px 16px; }
  .stats-band > div:nth-child(2) { border-right: none !important; }
  .stats-band > div:nth-child(1),
  .stats-band > div:nth-child(2) { border-bottom: 1px solid var(--line); }

  /* Features */
  .features-grid { grid-template-columns: 1fr !important; }

  /* Client app */
  .client-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .phone-col { display: flex !important; min-height: 400px !important; }
  /* Reposition floats to avoid overflowing on narrow screens */
  .phone-col .float-b { right: 0 !important; width: 180px !important; top: 80px !important; }
  .phone-col .float-a { left: 0 !important; width: 170px !important; bottom: 40px !important; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr !important; }

  /* FAQ */
  .faq-grid { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* CTA */
  .cta-grid { grid-template-columns: 1fr !important; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 28px !important; }
  .footer-brand { grid-column: 1 / -1 !important; }

  /* Types */
  .types-grid { grid-template-columns: repeat(2,1fr) !important; }

  /* Hero H1 forced break: hide on mobile so text wraps naturally */
  .hero-br { display: none; }

  /* CTA final section: reduce top/bottom padding */
  .final-cta { padding-top: 56px !important; padding-bottom: 56px !important; }

  /* Pricing: reduce inner padding on cards */
  .pricing-grid article { padding: 24px 20px !important; }
}
