/* Rastreador de Descuentos — sitio.
   Colores de frontend/lib/config/app_colors.dart.
   Idea: el letrero de precios de una estación de servicio es el protagonista;
   el resto acompaña con calma. Un solo radio, nada de sombras gigantes. */
:root {
  --primary: #1668DC;
  --primary-dark: #0F52B5;
  --coral: #FF6B4F;
  --yellow: #FFC83D;
  --orange: #FF7A36;
  --navy: #1C3A5A;
  --navy-deep: #12263D;
  --sky: #D7E9F7;
  --sky-light: #E9F3FC;

  --bg: #FFFFFF;
  --bg-soft: #F4F8FC;
  --fg: #1C3A5A;
  --fg-soft: #53677D;
  --line: #DFE7F0;
  --link: #1668DC;
  --hero-bg: #D7E9F7;
  --hero-fg: #1C3A5A;

  --led: #FFB830;
  --led-off: #3A2A12;

  --font-display: "Bricolage Grotesque", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1622;
    --bg-soft: #112033;
    --fg: #E8EFF6;
    --fg-soft: #A5B6C8;
    --line: #22354B;
    --link: #7BAEF6;
    --hero-bg: #12263D;
    --hero-fg: #EAF2FA;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 var(--font-body); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 760px; }

/* ── Header ─────────────────────────────────────────────── */
.site-header { background: var(--hero-bg); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 28px; min-height: 72px; padding-top: 12px; padding-bottom: 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font: 700 1.08rem var(--font-display); letter-spacing: -0.01em;
  color: var(--hero-fg); text-decoration: none; white-space: nowrap;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; font-size: .95rem; font-weight: 500; }
.site-header nav a { color: var(--hero-fg); opacity: .78; text-decoration: none; }
.site-header nav a:hover { opacity: 1; }

/* ── Botones ───────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius); border: 0;
  background: var(--primary); color: #fff;
  font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s;
}
.button:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ── Hero ──────────────────────────────────────────────── */
.hero { background: var(--hero-bg); color: var(--hero-fg); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: end;
  padding-top: 56px;
}
.hero-text { display: grid; gap: 24px; padding-bottom: 88px; min-width: 0; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); font-weight: 800; }
.mark { position: relative; white-space: nowrap; }
.mark svg { position: absolute; left: -2%; bottom: -0.12em; width: 104%; height: .32em; overflow: visible; }
.mark path { stroke: var(--coral); stroke-width: 7; fill: none; stroke-linecap: round; }
.hero .lead { font-size: 1.15rem; max-width: 31rem; opacity: .82; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }
.soon { font-size: .92rem; opacity: .7; }

/* Tótem de la estación */
.totem { justify-self: center; width: min(340px, 100%); display: grid; justify-items: center; }
.totem-sign {
  width: 100%;
  background: var(--navy-deep);
  border-radius: var(--radius) var(--radius) 4px 4px;
  padding: 18px 18px 14px;
  color: #fff;
  border: 3px solid #fff;
}
.totem-top { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 2px solid rgba(255,255,255,.1); }
.totem-top img { width: 38px; height: 38px; border-radius: 9px; }
.totem-top b { font: 700 1rem var(--font-display); display: block; line-height: 1.1; }
.totem-top small { font-size: .74rem; color: #9DB1C7; }
.price-row {
  display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.price-row:last-of-type { border-bottom: 0; }
.fuel { font: 800 1.05rem var(--font-display); background: #fff; color: var(--navy-deep); border-radius: 6px; text-align: center; padding: 6px 0; }
.fuel.diesel { font-size: .82rem; padding: 9px 0; }
.led {
  font: 700 2.3rem/1 var(--font-display);
  color: var(--led);
  text-align: right;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255,184,48,.45);
  background: #0A1726;
  border-radius: 6px;
  padding: 6px 10px 4px;
  letter-spacing: .02em;
}
.led s { display: none; }
.totem-note {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 10px; padding-top: 10px; border-top: 2px solid rgba(255,255,255,.1);
  font-size: .78rem; color: #9DB1C7;
}
.totem-note .chip { background: var(--coral); color: #fff; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .4s, transform .4s; }
.totem.applied .chip { opacity: 1; transform: none; }
.totem-pole { width: 34px; height: 80px; background: linear-gradient(90deg, #B9C9D9, #E9F0F6 45%, #A9BBCD); }
.totem-base { width: 120px; height: 14px; background: var(--navy); border-radius: 4px 4px 0 0; }

/* ── Calculadora ───────────────────────────────────────── */
.calc-band { background: var(--bg); }
.calc {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding-top: 96px; padding-bottom: 96px;
}
.kicker { font: 600 .95rem var(--font-body); color: var(--coral); margin-bottom: 12px; }
.calc h2, .section h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
.calc-intro p { margin-top: 16px; color: var(--fg-soft); font-size: 1.08rem; max-width: 30rem; }
.calc-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 22px; min-width: 0; }
.slider { display: grid; gap: 8px; }
.slider-top { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.slider-top output { font-weight: 700; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--primary); }
.result { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 4px; }
.result small { color: var(--fg-soft); }
.result strong { font: 800 clamp(2.4rem, 6vw, 3.4rem)/1 var(--font-display); color: var(--primary); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.result span { color: var(--fg-soft); }
.result span b { color: var(--fg); }
.fine { font-size: .8rem; color: var(--fg-soft); }

/* ── Secciones de funciones ────────────────────────────── */
.section { padding-top: 96px; padding-bottom: 96px; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.row + .row { margin-top: 96px; }
.row.flip .row-text { order: 2; }
.row-text { display: grid; gap: 16px; min-width: 0; }
.row-text h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.row-text p { color: var(--fg-soft); font-size: 1.06rem; max-width: 30rem; }
.row-text ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.row-text li { padding-left: 22px; position: relative; color: var(--fg-soft); }
.row-text li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }

/* Mini pantallas */
.screen { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 10px; min-width: 0; }
.screen-title { font: 700 .95rem var(--font-display); display: flex; justify-content: space-between; gap: 10px; }
.screen-title span { font: 500 .8rem var(--font-body); color: var(--fg-soft); }
.item { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.item b { font-weight: 600; }
.item small { color: var(--fg-soft); font-size: .82rem; }
.item .price { grid-row: span 2; text-align: right; font: 800 1.25rem var(--font-display); color: var(--primary); font-variant-numeric: tabular-nums; }
.item .price s { display: block; font: 400 .78rem var(--font-body); color: var(--fg-soft); }
.item .pct { grid-row: span 2; font: 800 1.4rem var(--font-display); color: var(--coral); }
.item .tag { grid-column: 1 / -1; justify-self: start; margin-top: 6px; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: #E3F2E4; color: #2E7D32; }
.item .day { display: inline-block; font-size: .74rem; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--sky-light); color: var(--primary); margin-right: 4px; }
@media (prefers-color-scheme: dark) {
  .item .tag { background: #1C3324; color: #8FD694; }
  .item .day { background: #18304D; color: #8DB8F5; }
}

/* ── Banda de privacidad ───────────────────────────────── */
.privacy { background: var(--navy); color: #EAF2FA; }
.privacy .wrap { padding-top: 96px; padding-bottom: 96px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.privacy h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
.privacy h2 em { font-style: normal; color: var(--yellow); }
.privacy .intro p { margin-top: 18px; color: #B9CBDD; font-size: 1.06rem; max-width: 28rem; }
.privacy .intro a { color: #fff; }
.privacy dl { margin: 0; display: grid; gap: 22px; }
.privacy dt { font: 700 1.1rem var(--font-display); }
.privacy dd { margin: 4px 0 0; color: #B9CBDD; }

/* ── Contacto ──────────────────────────────────────────── */
.contact-band .wrap { padding-top: 88px; padding-bottom: 88px; display: grid; gap: 18px; justify-items: start; }
.contact-band h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; max-width: 22ch; }
.contact-band p { color: var(--fg-soft); font-size: 1.06rem; max-width: 36rem; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.email { font: 700 clamp(1.2rem, 3vw, 1.6rem) var(--font-display); color: var(--fg); user-select: all; word-break: break-all; }
.copy { font: 600 .85rem var(--font-body); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--fg); cursor: pointer; }

/* ── Páginas legales ───────────────────────────────────── */
.page-head { background: var(--hero-bg); color: var(--hero-fg); }
.page-head .wrap { padding-top: 40px; padding-bottom: 52px; display: grid; gap: 12px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; }
.page-head p { font-size: 1.1rem; opacity: .8; }
.doc { padding-top: 48px; padding-bottom: 88px; }
.doc h2 { font-size: 1.5rem; margin: 44px 0 12px; }
.doc h3 { font-size: 1.12rem; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--fg-soft); }
.doc strong { color: var(--fg); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2rem; margin: 10px 0; display: grid; gap: 6px; }
.updated { font-size: .9rem; margin-bottom: 20px !important; }
.box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.table-scroll { overflow-x: auto; margin: 12px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--fg); background: var(--bg-soft); font-weight: 600; }

/* ── Footer ────────────────────────────────────────────── */
footer { background: var(--navy-deep); color: #C9D8E8; font-size: .92rem; }
footer .wrap { padding-top: 56px; padding-bottom: 28px; }
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.foot-top .brand { color: #fff; }
.foot-top p { margin-top: 12px; max-width: 30ch; color: #A9BDD2; }
.foot-top h4 { margin: 0 0 12px; font: 700 .9rem var(--font-display); color: #fff; }
.foot-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer a { color: #C9D8E8; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; color: #A9BDD2; }

/* ── Hero general (descuentos) ─────────────────────────── */
.hero-v2 .wrap { align-items: center; padding-bottom: 72px; }
.hero-v2 .hero-text { padding-bottom: 0; }
.cats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; opacity: .85; }
.cats span { background: #fff; color: var(--primary); font-weight: 600; font-size: .82rem; padding: 3px 11px; border-radius: 999px; }
.deals { justify-self: center; width: min(380px, 100%); display: grid; gap: 14px; }
.notif { display: grid; grid-template-columns: 38px 1fr; gap: 12px; background: #fff; color: var(--navy); border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(18,38,61,.14); transform: rotate(-1.2deg); }
.notif img { width: 38px; height: 38px; border-radius: 9px; }
.notif-top { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: #53677D; }
.notif-top b { color: var(--navy); font-weight: 600; }
.notif p { font-size: .92rem; line-height: 1.4; margin-top: 2px; }
.deals-card { background: var(--navy-deep); color: #fff; border: 3px solid #fff; border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; }
.deals-title { font: 700 .95rem var(--font-display); display: flex; justify-content: space-between; gap: 10px; padding: 2px 2px 6px; }
.deals-title span { font: 500 .78rem var(--font-body); color: #9DB1C7; }
.deal { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; background: #0A1726; border-radius: 10px; padding: 10px 12px; }
.deal b { font-weight: 600; }
.deal small { color: #9DB1C7; font-size: .78rem; }
.deal-val { grid-column: 2; grid-row: 1 / span 2; font: 800 1.35rem var(--font-display); color: var(--led); text-shadow: 0 0 12px rgba(255,184,48,.35); font-variant-numeric: tabular-nums; white-space: nowrap; }
.deal-cat { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 7px; border-radius: 5px; margin-right: 7px; vertical-align: 2px; }
.deal-cat.food { background: var(--coral); color: #fff; }
.deal-cat.fuel { background: #fff; color: var(--navy-deep); }
.section .calc-inline { padding: 0; margin-top: 96px; }
.calc-inline + .row { margin-top: 96px; }
.hero-v2 h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); }
@media (max-width: 880px) {
  .hero-v2 .wrap { gap: 36px; padding-bottom: 56px; }
  .section .calc-inline { padding: 0; margin-top: 72px; }
  .calc-inline + .row { margin-top: 72px; }
}

/* ── Publicidad ────────────────────────────────────────── */
.site-header nav a.nav-cta { opacity: 1; font-weight: 600; color: #fff; background: var(--coral); padding: 7px 14px; border-radius: 999px; }
.site-header nav a.nav-cta:hover { background: #F0573A; }
.button-coral { background: var(--coral); }
.button-coral:hover { background: #F0573A; }
.ad-strip { background: var(--navy-deep); color: #C9D8E8; }
.ad-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 16px; padding-bottom: 16px; font-size: .98rem; }
.ad-strip b { color: #fff; }
.ad-strip-link { color: var(--yellow); font-weight: 600; white-space: nowrap; text-underline-offset: 4px; }
.ad-strip-link::after { content: " →"; }
.advertise { background: var(--bg-soft); border-top: 1px solid var(--line); }
.advertise .wrap { padding-top: 96px; padding-bottom: 96px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.advertise-text { display: grid; gap: 16px; min-width: 0; }
.advertise h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
.advertise-text p { color: var(--fg-soft); font-size: 1.08rem; max-width: 32rem; }
.advertise-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 8px; }
.advertise-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.advertise-list li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 6px; align-content: start; }
.advertise-list b { font: 700 1.02rem var(--font-display); }
.advertise-list span { color: var(--fg-soft); font-size: .93rem; }
@media (max-width: 880px) {
  .advertise .wrap { grid-template-columns: 1fr; gap: 36px; padding-top: 64px; padding-bottom: 64px; }
}
@media (max-width: 520px) {
  .advertise-list { grid-template-columns: 1fr; }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero .wrap, .calc, .row, .privacy .wrap { grid-template-columns: 1fr; }
  .hero .wrap { gap: 8px; padding-top: 36px; }
  .hero-text { padding-bottom: 32px; }
  .row.flip .row-text { order: 0; }
  .row + .row { margin-top: 72px; }
  .calc, .section, .privacy .wrap { padding-top: 64px; padding-bottom: 64px; }
  .calc, .row, .privacy .wrap { gap: 36px; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .led { font-size: 1.9rem; }
  .calc-box { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, .totem-note .chip { transition: none !important; }
}
