/* ============================================================
   AhorraSeguros — Landing v3
   Static recreation of the Claude Design prototype.
   ============================================================ */

:root {
  --bg: #05100b;
  --text: #eafaf2;

  --accent: #34d399;
  --accent-2: #10b981;
  --accent-3: #84e6bf;
  --accent-deep: #0c6b4f;

  --muted: #9fc7b6;
  --muted-2: #7fae9c;
  --muted-3: #5f8a76;
  --muted-4: #3f6353;

  --card-bg: rgba(255, 255, 255, .04);
  --card-border: rgba(255, 255, 255, .09);
  --card-border-hover: rgba(52, 211, 153, .3);

  --max: 1120px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Manrope', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
  font-feature-settings: 'ss01';
}

a { color: inherit; }

/* ---- keyframes ---- */
@keyframes asGrad   { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes asGlow   { 0%, 100% { transform: translate(0, 0) scale(1); opacity: .5; } 50% { transform: translate(30px, -20px) scale(1.15); opacity: .8; } }
@keyframes asMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ============================================================
   Layout shell
   ============================================================ */
.page {
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

/* ambient glows */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.glow--top {
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-2), transparent 65%);
  opacity: .22;
  animation: asGlow 14s ease-in-out infinite;
}
.glow--right {
  top: 900px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent), transparent 65%);
  opacity: .12;
  animation: asGlow 18s ease-in-out infinite reverse;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 14px;
  transition: transform .25s, box-shadow .25s, background .25s;
}
.btn--sm {
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 6px 22px rgba(52, 211, 153, .35);
}
.btn--sm:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(52, 211, 153, .5);
}
.btn--lg {
  padding: 17px 34px;
  font-size: 17px;
  box-shadow: 0 12px 34px rgba(52, 211, 153, .4);
}
.btn--lg:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(52, 211, 153, .55);
}

/* ============================================================
   Nav (pill)
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 18px 24px;
  display: flex;
  justify-content: center;
}
.nav__inner {
  width: 100%;
  max-width: var(--max);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  padding: 11px 14px 11px 22px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.nav__links > a:not(.btn) {
  text-decoration: none;
  transition: color .2s;
}
.nav__links > a:not(.btn):hover { color: #fff; }

/* brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.02em;
  color: #fff;
}
.brand__img {
  height: 32px;
  width: auto;
  display: block;
}
.brand__accent {
  color: var(--accent);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 40px 90px;
  text-align: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(52, 211, 153, .1);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid rgba(52, 211, 153, .25);
  letter-spacing: .02em;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 9vw, 84px);
  line-height: 1;
  letter-spacing: -.04em;
  margin: 26px 0 0;
  color: #fff;
}
.hero__title--row {
  line-height: 1.05;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 0;
}
.is-white { color: #fff; }

.rotator {
  position: relative;
  display: inline-grid;
  height: 1em;
  overflow: hidden;
  text-align: left;
}
.rotator__word {
  display: block;
  background: linear-gradient(120deg, var(--accent), var(--accent-3), var(--accent-2));
  background-size: 200% 200%;
  animation: asGrad 8s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 580px;
  margin: 28px auto 0;
}
.hero__cta {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero__note {
  font-size: 15px;
  color: var(--muted-2);
  font-weight: 600;
}

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  position: relative;
  z-index: 2;
  padding: 10px 0 70px;
}
.marquee__title {
  text-align: center;
  color: var(--muted-3);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.marquee__viewport {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: asMarquee 26s linear infinite;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--muted-4);
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 40px 90px;
}
.section--tight { padding-top: 20px; }

.section__head {
  text-align: center;
  margin-bottom: 48px;
}
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 46px);
  letter-spacing: -.03em;
  margin-top: 12px;
  color: #fff;
  text-wrap: balance;
}

/* scroll-margin so sticky nav doesn't cover anchored sections */
[id] { scroll-margin-top: 96px; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 30px;
  transition: transform .3s, border-color .3s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
}
.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin: 14px 0 8px;
  color: #fff;
}
.card__title--lg { font-size: 26px; margin: 20px 0 10px; }
.card__text {
  color: var(--muted);
  line-height: 1.55;
  font-size: 15px;
}
.card__text--wide { font-size: 16px; line-height: 1.6; max-width: 380px; }

/* icons */
.icon { color: var(--accent); }
.icon--filled {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
}

/* bento grid (features) */
.bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.card--feature {
  /* the big AI card */
  grid-row: span 2;
  background: linear-gradient(160deg, rgba(52, 211, 153, .14), rgba(255, 255, 255, .03));
  border: 1px solid rgba(52, 211, 153, .2);
  border-radius: 24px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .3s, border-color .3s;
}
.card--feature:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, .2);
}
.chips {
  margin-top: 28px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: #cfeede;
  font-weight: 600;
}

/* 3-up grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

/* process steps */
.card--step { padding: 34px; }
.card--step:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, .35);
}
.step__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 54px;
  line-height: 1;
  color: rgba(52, 211, 153, .25);
}
.card__title--step { font-size: 22px; margin: 14px 0 9px; }

/* ============================================================
   "Próximamente" banner
   ============================================================ */
.soon-wrap {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px 70px;
}
.soon {
  text-align: center;
  background: rgba(52, 211, 153, .06);
  border: 1px dashed rgba(52, 211, 153, .3);
  border-radius: 20px;
  padding: 24px;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
}
.soon strong { color: var(--accent); }
.soon .accent { color: var(--accent); }

/* ============================================================
   Footer / big CTA
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: 90px 40px 0;
  text-align: center;
}
.footer__cta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: -.03em;
  color: #fff;
  max-width: 740px;
  margin: 0 auto;
  line-height: 1.05;
  text-wrap: balance;
}
.footer__cta-text {
  color: var(--muted);
  font-size: clamp(16px, 2.3vw, 19px);
  margin: 18px auto 32px;
  max-width: 480px;
}
.footer .btn--lg {
  padding: 18px 40px;
  font-size: 18px;
}
.footer .btn--lg:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 50px rgba(52, 211, 153, .55);
}

.footer__cols {
  max-width: var(--max);
  margin: 80px auto 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  text-align: left;
  padding-bottom: 40px;
}
.footer__about {
  margin-top: 14px;
  line-height: 1.55;
  color: var(--muted-2);
  max-width: 300px;
}
.footer__heading {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  font-size: 14px;
}
.footer__list {
  line-height: 2;
  color: var(--muted-2);
  font-size: 14px;
}
.footer__list a {
  text-decoration: none;
  transition: color .2s;
}
.footer__list a:hover { color: var(--accent); }
.is-dim { opacity: .55; }

/* giant wordmark */
.wordmark {
  position: relative;
  overflow: hidden;
  line-height: .82;
  padding-top: 10px;
}
.wordmark__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(60px, 15vw, 200px);
  letter-spacing: -.04em;
  background: linear-gradient(180deg, rgba(52, 211, 153, .22), rgba(52, 211, 153, 0));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.footer__legal {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: 18px 0;
  font-size: 13px;
  color: var(--muted-3);
}

/* ============================================================
   Reveal-on-scroll (driven by main.js)
   ============================================================ */
.reveal-init {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}
.reveal-in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .bento { grid-template-columns: 1fr; }
  .card--feature { grid-row: auto; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .nav__links > a:not(.btn) { display: none; }
}

@media (max-width: 560px) {
  .hero { padding: 56px 22px 70px; }
  .section { padding: 30px 22px 70px; }
  .soon-wrap { padding: 0 22px 56px; }
  .footer { padding: 70px 22px 0; }
  .nav { padding: 14px 16px; }
  .hero__title--row { gap: 14px; }
}

/* ============================================================
   Modal cotizador
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal.is-open {
  visibility: visible;
  opacity: 1;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 16, 11, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.modal__box {
  position: relative;
  width: 75vw;
  height: 82vh;
  background: #081911;
  border: 1px solid rgba(52, 211, 153, .22);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .7), 0 0 0 1px rgba(52, 211, 153, .08);
  transform: scale(.95) translateY(16px);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.modal.is-open .modal__box {
  transform: scale(1) translateY(0);
}
.modal__iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  border-radius: inherit;
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.modal__close:hover { background: rgba(255, 255, 255, .18); }

@media (max-width: 760px) {
  .modal { padding: 16px; }
  .modal__box { width: 95vw; height: 90vh; border-radius: 20px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glow, .rotator__word, .marquee__track { animation: none; }
  .reveal-init { opacity: 1; transform: none; transition: none; }
}
