/* ============================================================
   3Goals — Landing
   Paleta basada en el tema real de la app:
   primary #d84315 · secondary #5CBBF6 · accent #FF4081
   + colores del heatmap de estadísticas
   ============================================================ */

:root {
  --terra: #d84315;
  --terra-600: #bf3a12;
  --coral: #ff5a3c;
  --pink: #ff4081;
  --blue: #5cbbf6;

  /* estados del heatmap (idénticos a la app) */
  --done: #28c76f;
  --delayed: #f5a524;
  --holiday: #54c0f0;
  --cancel: #4f7df9;
  --notdone: #f0473e;
  --notset: #e4dbd3;

  --ink: #1c140f;
  --ink-soft: #5a4d44;
  --paper: #fdf8f4;
  --paper-2: #f6ece4;
  --card: #ffffff;
  --line: rgba(28, 20, 15, 0.08);
  --dark: #160d09;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px -20px rgba(120, 40, 10, 0.28);
  --shadow-lg: 0 40px 90px -30px rgba(120, 40, 10, 0.45);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

/* grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600;
  border-radius: 999px; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--lg { padding: 15px 26px; font-size: 16px; }
.btn--solid {
  background: linear-gradient(135deg, var(--terra), var(--coral));
  color: #fff; box-shadow: 0 12px 30px -10px rgba(216, 67, 21, .6);
}
.btn--solid:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -12px rgba(216, 67, 21, .7); }
.btn--ghost { background: rgba(28,20,15,.04); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: rgba(28,20,15,.08); transform: translateY(-3px); }
.apple { margin-top: -2px; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark {
  display: grid; place-items: center; width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--terra), var(--coral));
  border-radius: 12px; box-shadow: 0 8px 18px -8px rgba(216,67,21,.6);
  color: #fff;
}
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(253, 248, 244, 0.7);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.nav.is-stuck { background: rgba(253, 248, 244, 0.85); border-color: var(--line); box-shadow: 0 8px 30px -20px rgba(120,40,10,.4); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.nav__links { display: flex; gap: 30px; }
.nav__links a { font-size: 15px; font-weight: 500; color: var(--ink-soft); position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--terra); transition: width .25s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }

/* ---------- Eyebrow / títulos ---------- */
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
  background: rgba(216, 67, 21, .1); color: var(--terra-600);
}
.eyebrow--dark { background: rgba(216,67,21,.08); }
.eyebrow--light { background: rgba(255,255,255,.1); color: var(--blue); }

.section__title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.04;
}
.section__title--light { color: #fff; }
.section__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); margin-top: 18px; max-width: 56ch; }
.section__lead--light { color: rgba(255,255,255,.72); }
.center { text-align: center; }
.center-lead { margin-left: auto; margin-right: auto; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding: 70px 0 90px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.blob--1 { width: 520px; height: 520px; top: -160px; right: -120px;
  background: radial-gradient(circle at 30% 30%, var(--coral), transparent 70%); }
.blob--2 { width: 460px; height: 460px; bottom: -200px; left: -140px;
  background: radial-gradient(circle at 30% 30%, var(--blue), transparent 70%); opacity: .4; }
.blob--3 { width: 340px; height: 340px; top: 40%; left: 45%;
  background: radial-gradient(circle at 30% 30%, var(--pink), transparent 70%); opacity: .3; }

.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center;
}
.hero__title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.04em;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: .98; margin-bottom: 24px;
}
.grad {
  background: linear-gradient(115deg, var(--terra), var(--pink) 60%, var(--coral));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--ink-soft); max-width: 50ch; }
.hero__lead em { font-style: normal; color: var(--terra-600); font-weight: 600; }
.hero__cta { display: flex; gap: 14px; margin: 32px 0 28px; flex-wrap: wrap; }

.hero__points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hero__points li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-soft); font-weight: 500; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--done);
  box-shadow: 0 0 0 4px rgba(40,240,40,.18); flex: none; }

/* ---------- Phone mockup ---------- */
.hero__device { position: relative; display: grid; place-items: center; perspective: 1300px; }
.device__glow {
  position: absolute; width: 80%; height: 70%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(216,67,21,.35), transparent 70%); filter: blur(50px);
}
.phone {
  position: relative; width: 300px; height: 610px; border-radius: 46px;
  background: #1a1a1f; padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.06);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
.phone__notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 26px; background: #1a1a1f; border-radius: 0 0 16px 16px; z-index: 3;
}
.phone__screen {
  width: 100%; height: 100%; border-radius: 36px; overflow: hidden;
  background: var(--paper); display: flex; flex-direction: column;
}
/* barra superior translúcida (sin fondo de color, como en la app) */
.appbar {
  background: transparent;
  padding: 30px 14px 4px;
  display: flex; align-items: center; justify-content: space-between;
}
.appbar__brand { display: inline-flex; align-items: center; gap: 7px; }
.appbar__mark {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--terra), var(--coral));
  box-shadow: 0 6px 14px -6px rgba(216, 67, 21, .7);
}
.appbar__name { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--ink); }
.appbar__name i { font-style: normal; color: var(--terra); }
.appbar__icons { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }

.screen__body { padding: 12px; display: flex; flex-direction: column; gap: 12px; }

.card { background: var(--card); border-radius: 16px; border: 1px solid var(--line); }

/* card de progreso */
.mini-stats { padding: 12px; box-shadow: 0 12px 26px -18px rgba(120, 40, 10, .4); }
.mini-stats__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.mini-stats__title { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); }
.mini-stats__sub { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

.mini-ring { position: relative; width: 40px; height: 40px; flex: none; }
.mini-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mini-ring__track { fill: none; stroke: var(--paper-2); stroke-width: 4; }
.mini-ring__seg { fill: none; stroke-width: 4; }
.mini-ring__done { stroke: var(--done); }
.mini-ring__delayed { stroke: var(--delayed); }
.mini-ring__pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 11px; color: var(--ink); }
.mini-ring__pct i { font-style: normal; font-size: 7px; font-weight: 600; color: var(--ink-soft); margin-left: 1px; }

.mini-heat { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-rows: repeat(3, 1fr); gap: 3px; height: 54px; }
.mini-heat .cell { border-radius: 3px; }

/* card del día */
.day-card { padding: 14px; box-shadow: 0 12px 26px -18px rgba(120, 40, 10, .4); }
.day-card__pill {
  display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: rgba(216, 67, 21, .12); color: var(--terra-600); margin-bottom: 9px;
}
.day-card__date { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.goal { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: none; }
.goal__n {
  flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px;
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  color: var(--terra); background: rgba(216, 67, 21, .10);
}
.goal--done .goal__n { color: #06351c; background: rgba(40, 199, 111, .18); }
.goal__txt { flex: 1; font-size: 12.5px; color: var(--ink); }
.goal--done .goal__txt { color: var(--ink-soft); }
/* check sin recuadro: el icono es verde cuando está conseguido */
.goal__check { flex: none; width: 24px; display: grid; place-items: center; color: rgba(28, 20, 15, .3); }
.goal__check svg { width: 18px; height: 18px; }
.goal__check--on { color: var(--done); }
.goal__check--on svg { width: 23px; height: 23px; }

/* ============================================================
   STRIP
   ============================================================ */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.strip__inner {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center;
  padding: 22px 24px; font-family: var(--font-display); font-weight: 500; color: var(--ink-soft); font-size: 15px;
}
.strip__inner i { color: var(--terra); font-style: normal; }

/* ============================================================
   SECTIONS genéricas
   ============================================================ */
.section { padding: clamp(70px, 9vw, 120px) 0; }
.section--soft { background: var(--paper-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* dark section */
.section--dark { background: radial-gradient(120% 120% at 80% 0%, #2a1a12, var(--dark)); color: #fff; position: relative; }

/* ---------- Heatmap grande ---------- */
.heatmap-wrap {
  margin: 48px auto 0; max-width: 760px; padding: 26px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); backdrop-filter: blur(6px);
}
.heatmap { display: grid; grid-template-columns: repeat(30, 1fr); gap: 5px; }
.heatmap .col { display: grid; grid-template-rows: repeat(3, 1fr); gap: 5px; }
.heatmap .cell {
  aspect-ratio: 1/1.3; border-radius: 5px; will-change: transform, opacity;
}

.legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 32px; }
.chip { font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; }

/* colores de estado (heatmap + chips + leyenda) */
.cell.DONE, .chip--DONE { background: var(--done); color: #06351c; }
.cell.DELAYED, .chip--DELAYED { background: var(--delayed); color: #4a3000; }
.cell.HOLIDAY, .chip--HOLIDAY { background: var(--holiday); color: #06324a; }
.cell.CANCEL, .chip--CANCEL { background: var(--cancel); color: #fff; }
.cell.NOTDONE, .chip--NOTDONE { background: var(--notdone); color: #fff; }
.cell.NOTSET, .chip--NOTSET { background: var(--notset); color: #6b5d53; }

/* ============================================================
   FEATURES
   ============================================================ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.feature { padding: 30px; transition: transform .3s, box-shadow .3s, border-color .3s; }
.feature:hover { box-shadow: var(--shadow); border-color: rgba(216,67,21,.25); }
.feature__icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  font-size: 24px; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(216,67,21,.12), rgba(255,90,60,.12)); color: var(--terra);
}
.feature h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin-bottom: 8px; letter-spacing: -.01em; }
.feature p { color: var(--ink-soft); font-size: 15px; }

/* Bento: la función principal ocupa el doble de ancho y va destacada */
.feature--lead {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, rgba(216, 67, 21, .07), rgba(255, 90, 60, .05));
  border-color: rgba(216, 67, 21, .18);
}
.feature--lead .feature__icon { width: 60px; height: 60px; font-size: 28px; }
.feature--lead h3 { font-size: 1.7rem; margin-bottom: 10px; }
.feature--lead p { font-size: 1.05rem; max-width: 46ch; }

/* ============================================================
   STEPS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; counter-reset: s; }
.step { position: relative; padding: 34px 28px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.step__num { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--terra), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin: 8px 0 8px; }
.step p { color: var(--ink-soft); }

/* ============================================================
   QUOTE
   ============================================================ */
.quote-section { padding: clamp(70px, 10vw, 130px) 0; }
.quote {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem); line-height: 1.28; max-width: 22ch; margin: 0 auto; color: var(--ink);
}

/* ============================================================
   CTA
   ============================================================ */
.cta { padding: 0 0 clamp(70px, 9vw, 120px); }
.cta__inner {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(48px, 7vw, 90px) 30px; border-radius: 34px; color: #fff;
}
.cta__bg { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, var(--terra), var(--terra-600) 55%, #7a1f08); }
.cta__inner::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: radial-gradient(60% 90% at 15% 0%, var(--coral), transparent 60%),
              radial-gradient(50% 80% at 90% 100%, var(--pink), transparent 60%);
}
.cta__title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; }
.cta__lead { margin: 18px auto 30px; max-width: 44ch; font-size: 1.15rem; color: rgba(255,255,255,.85); }
.cta__btns .btn--solid { background: #fff; color: var(--terra); box-shadow: 0 14px 36px -12px rgba(0,0,0,.4); }
.cta__btns .btn--solid:hover { box-shadow: 0 22px 46px -14px rgba(0,0,0,.5); }
.cta__btns .apple path { fill: var(--terra); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 50px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.brand--footer .brand__name { font-size: 18px; }
.footer__links { display: flex; gap: 22px; }
.footer__links a { color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.footer__links a:hover { color: var(--terra); }
.footer__copy { color: var(--ink-soft); font-size: 14px; width: 100%; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }

/* ============================================================
   Reveal animation
   ============================================================ */
/* ----------------------------------------------------------------
   Animaciones (Motion / app.js) como mejora progresiva.
   El contenido es visible por defecto. Solo se oculta su estado
   inicial cuando el JS de animación está activo (html.anim), que se
   añade de forma síncrona en el <head>. Si Motion falla o no carga,
   .anim se retira y todo queda visible: nunca una página en blanco.
   ---------------------------------------------------------------- */
.anim .reveal,
.anim .hero__copy > *,
.anim .hero__device,
.anim .heatmap .cell,
.anim .mini-heat .cell { opacity: 0; }

.anim .phone { animation: none; } /* el flotado lo controla Motion */

.reveal { will-change: opacity, transform; }

@media (prefers-reduced-motion: reduce) {
  .phone { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .hero__device { order: -1; }
  .nav__links { display: none; }
  .two-col { grid-template-columns: 1fr; gap: 20px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .features { grid-template-columns: 1fr; }
  .feature--lead { grid-column: auto; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .stores { justify-content: center; }
}

/* ============================================================
   Badges de tienda (App Store / Google Play)
   ============================================================ */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.stores--center { justify-content: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 9px 18px; border-radius: 14px; cursor: pointer;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.store-badge:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -14px rgba(120,40,10,.55); }
.store-badge:active { transform: translateY(-1px); }
.store-badge svg { width: 25px; height: 25px; flex: none; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.08; text-align: left; }
.store-badge small { font-size: 10.5px; opacity: .82; font-weight: 500; letter-spacing: .01em; }
.store-badge strong { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

/* ============================================================
   Modal "Próximamente"
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(28,20,15,.5); backdrop-filter: blur(5px); animation: fade-in .25s ease both; }
.modal__card {
  position: relative; max-width: 390px; width: 100%; text-align: center;
  background: var(--card); border-radius: 26px; padding: 38px 30px 30px;
  box-shadow: var(--shadow-lg);
  animation: modal-pop .35s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; transform: none; } }
.modal__x {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--paper-2); color: var(--ink-soft); transition: background .2s;
}
.modal__x:hover { background: var(--line); color: var(--ink); }
.modal__icon {
  display: inline-grid; place-items: center; width: 64px; height: 64px;
  border-radius: 20px; font-size: 32px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(216,67,21,.12), rgba(255,90,60,.16));
}
.modal__card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; letter-spacing: -.02em; }
.modal__card p { color: var(--ink-soft); margin: 10px auto 24px; max-width: 34ch; }
.modal__ok { width: 100%; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .modal__backdrop, .modal__card { animation: none; }
}
