/* =====================================================================
   Gladdi — Web de presentación
   Design language mirrored from the Flutter app (lib/core/theme):
   dark "neon" surfaces + two-color gradient borders.
   ===================================================================== */

:root {
  /* Surfaces */
  --bg: #0e0f1a;
  --surface: #181a2a;
  --surface-high: #23263c;

  /* Text */
  --text-primary: #f4f5ff;
  --text-secondary: #9da1c2;
  --text-muted: #6a6e8f;

  /* Brand / accent stops */
  --brand-a: #6d5df6; /* indigo */
  --brand-b: #00d4ff; /* cyan   */
  --accent-a: #ff6a88; /* pink  */
  --accent-b: #ff9e45; /* orange*/
  --success-a: #12c2e9;
  --success-b: #22e1a1;
  --gold-a: #ffd75e;
  --gold-b: #ff9a3d;

  /* Gradients (the app's "double border" look) */
  --brand-gradient: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  --accent-gradient: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  --success-gradient: linear-gradient(135deg, var(--success-a), var(--success-b));
  --gold-gradient: linear-gradient(135deg, var(--gold-a), var(--gold-b));

  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1120px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient glow background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 60vw at 15% -10%, rgba(109, 93, 246, 0.22), transparent 60%),
    radial-gradient(55vw 55vw at 100% 0%, rgba(0, 212, 255, 0.16), transparent 55%),
    radial-gradient(50vw 50vw at 50% 110%, rgba(255, 106, 136, 0.12), transparent 55%);
  pointer-events: none;
}

a { color: var(--brand-b); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { color: var(--text-secondary); margin: 0 0 1em; }

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-text.accent { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; }
.gradient-text.gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--ring);
  margin-bottom: 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
  color: #0b0c16;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--brand-gradient); box-shadow: 0 14px 30px -10px rgba(109, 93, 246, 0.6); }
.btn-accent { background: var(--accent-gradient); box-shadow: 0 14px 30px -10px rgba(255, 106, 136, 0.55); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  box-shadow: var(--ring);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- Gradient-border card (mirrors GradientBorderCard) ---------- */
.gcard {
  position: relative;
  border-radius: var(--radius);
  padding: 1px;
  background: var(--brand-gradient);
  box-shadow: var(--shadow);
}
.gcard.accent { background: var(--accent-gradient); }
.gcard.success { background: var(--success-gradient); }
.gcard.gold { background: var(--gold-gradient); }
.gcard > .gcard-inner {
  background: var(--surface);
  border-radius: calc(var(--radius) - 1px);
  padding: 28px;
  height: 100%;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(14, 15, 26, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; color: var(--text-primary); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-secondary); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text-primary); font-size: 1.6rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero p.lead { font-size: 1.2rem; max-width: 34ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: .85rem; color: var(--text-muted); }

/* Phone mockup */
.phone {
  position: relative;
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 300 / 620;
  border-radius: 42px;
  padding: 14px;
  background: var(--brand-gradient);
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.phone-screen {
  background: var(--bg);
  border-radius: 32px;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--ring);
}
.phone-top { height: 120px; background: var(--brand-gradient); position: relative; }
.phone-top::after { content: ""; position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: 90px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.5); }
.phone-body { padding: 16px; display: grid; gap: 12px; }
.chip-row { display: flex; gap: 8px; }
.chip { height: 30px; flex: 1; border-radius: 10px; background: var(--surface-high); }
.chip.on { background: var(--accent-gradient); }
.mini-card { border-radius: 14px; padding: 1px; }
.mini-card .mini-inner { background: var(--surface); border-radius: 13px; padding: 12px; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-high); margin: 8px 0; }
.bar.fill { background: var(--success-gradient); width: 70%; }
.bar.fill2 { background: var(--gold-gradient); width: 45%; }

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

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; }
.stat { text-align: center; padding: 22px 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,.03); box-shadow: var(--ring); }
.stat .num { font-size: 1.9rem; font-weight: 800; }
.stat .lbl { color: var(--text-secondary); font-size: .85rem; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 42rem; margin: 0 auto 48px; }
.section-head p { font-size: 1.1rem; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature .icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 16px;
  background: var(--brand-gradient);
}
.feature.accent .icon { background: var(--accent-gradient); }
.feature.success .icon { background: var(--success-gradient); }
.feature.gold .icon { background: var(--gold-gradient); }
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; font-size: .98rem; }

/* Reto / metric chips */
.retos { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.reto-chip {
  padding: 12px 20px; border-radius: 999px; font-weight: 700; color: #0b0c16;
  box-shadow: var(--shadow);
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; }
.step .n {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem; color: #0b0c16; background: var(--gold-gradient); margin-bottom: 14px;
}

/* CTA band */
.cta-band { text-align: center; }
.cta-band .gcard-inner { padding: 56px 28px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 56px 0 40px;
  margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text-secondary); font-weight: 600; }
.footer-grid a:hover { color: var(--text-primary); text-decoration: none; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.06);
  color: var(--text-muted); font-size: .85rem;
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Legal / doc pages ---------- */
.doc { padding: 56px 0 40px; }
.doc .doc-wrap { max-width: 820px; margin: 0 auto; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc .updated { color: var(--text-muted); font-size: .9rem; margin-bottom: 8px; }
.doc .doc-body { font-size: 1.02rem; }
.doc .doc-body h2 { font-size: 1.5rem; margin-top: 2em; }
.doc .doc-body h3 { font-size: 1.15rem; margin-top: 1.4em; color: var(--text-primary); }
.doc .doc-body ul { padding-left: 1.2em; }
.doc .doc-body li { color: var(--text-secondary); margin-bottom: .4em; }
.doc .doc-body strong { color: var(--text-primary); }
.doc .doc-body a { font-weight: 600; }
.doc .placeholder {
  background: rgba(255, 158, 69, 0.14);
  color: var(--gold-a);
  padding: 1px 7px; border-radius: 6px; font-weight: 700; font-size: .92em;
  box-shadow: inset 0 0 0 1px rgba(255, 158, 69, 0.35);
}
.callout {
  border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 24px 0;
  background: rgba(109, 93, 246, 0.1);
  box-shadow: inset 0 0 0 1px rgba(109, 93, 246, 0.3);
}
.callout p { margin: 0; color: var(--text-secondary); }
.toc {
  background: rgba(255,255,255,.03); box-shadow: var(--ring);
  border-radius: var(--radius-sm); padding: 20px 24px; margin: 28px 0;
}
.toc h4 { margin: 0 0 10px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.toc ul { margin: 0; padding-left: 1.1em; columns: 2; }
.toc li { margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { max-width: none; }
  .hero-actions { justify-content: center; }
  .phone { order: -1; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--surface); padding: 20px 24px; gap: 16px; border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .stats { grid-template-columns: 1fr 1fr; }
  .features, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .toc ul { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
