:root {
  color-scheme: dark;
  --bg: #0a1018;
  --surface: #101923;
  --surface-high: #16212d;
  --surface-highest: #1d2a38;
  --outline: #2a3949;
  --outline-variant: #1d2a38;
  --on-surface: #e2e7ef;
  --on-surface-variant: #a1acbb;
  --primary: #2ee6cf;
  --on-primary: #00382f;
  --primary-container: #0d4a42;
  --on-primary-container: #a6f6e8;
  --tertiary: #a197ff;
  --tertiary-container: #2d2768;
  --on-tertiary-container: #e3dfff;
  --lumina-violet: #8b5cf6;
  --lumina-cyan: #06b6d4;
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 28px;
  --gutter: 16px;
  --max: 1160px;
  --elev-1: 0 1px 2px rgb(0 0 0 / .4), 0 1px 3px 1px rgb(0 0 0 / .2);
  --elev-3: 0 4px 8px 3px rgb(0 0 0 / .25), 0 1px 3px rgb(0 0 0 / .4);
  --ease: cubic-bezier(.2, 0, 0, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--on-surface);
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 24px;
  line-height: 1;
  user-select: none;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* Top app bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgb(10 16 24 / .72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.topbar.scrolled { border-bottom-color: var(--outline-variant); background: rgb(16 25 35 / .85); }
.topbar .container { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-surface); font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--on-surface-variant); font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a:hover { background: var(--surface-high); color: var(--on-surface); text-decoration: none; }
@media (min-width: 860px) { .nav { display: flex; } }
.lang-toggle { margin-left: auto; }
@media (min-width: 860px) { .lang-toggle { margin-left: 8px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 0;
  font: 600 15px/1 inherit; font-family: inherit; cursor: pointer;
  transition: box-shadow .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn .material-symbols-rounded { font-size: 20px; }
.btn-filled { background: var(--primary); color: var(--on-primary); }
.btn-filled:hover { box-shadow: var(--elev-1); background: color-mix(in srgb, var(--primary) 85%, white); }
.btn-tonal { background: var(--primary-container); color: var(--on-primary-container); }
.btn-tonal:hover { box-shadow: var(--elev-1); background: color-mix(in srgb, var(--primary-container) 85%, white); }
.btn-outlined { background: transparent; color: var(--primary); border: 1px solid var(--outline); }
.btn-outlined:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.btn-small { height: 40px; padding: 0 16px; font-size: 14px; }

.segmented { display: inline-flex; border: 1px solid var(--outline); border-radius: 999px; overflow: hidden; }
.segmented button {
  background: transparent; color: var(--on-surface-variant); border: 0;
  font: 600 13px/1 inherit; font-family: inherit; padding: 9px 14px; cursor: pointer;
}
.segmented button + button { border-left: 1px solid var(--outline); }
.segmented button[aria-pressed="true"] { background: var(--primary-container); color: var(--on-primary-container); }

/* Hero */
.hero { position: relative; padding: 88px 0 96px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--outline-variant) 1px, transparent 1px),
    linear-gradient(90deg, var(--outline-variant) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .55;
}
.glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: .35; pointer-events: none; }
.glow-a { width: 520px; height: 520px; background: #14b8a6; top: -220px; left: -120px; }
.glow-b { width: 420px; height: 420px; background: #6d5ce6; bottom: -200px; right: -100px; opacity: .25; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface-high); border: 1px solid var(--outline-variant);
  color: var(--on-surface-variant); font-size: 13px; font-weight: 500;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tertiary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tertiary) 22%, transparent); }
.hero h1 { margin-top: 24px; font-size: clamp(38px, 7vw, 72px); max-width: 15ch; }
.gradient-text {
  background: linear-gradient(100deg, var(--primary), var(--tertiary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { margin-top: 24px; max-width: 58ch; font-size: clamp(17px, 2.2vw, 20px); color: var(--on-surface-variant); }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--outline); color: var(--on-surface-variant);
  font-size: 13px; font-weight: 500;
}
.chip .material-symbols-rounded { font-size: 18px; color: var(--primary); }

/* Sections */
section.block { padding: 88px 0; border-top: 1px solid var(--outline-variant); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.overline { color: var(--tertiary); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.section-head h2 { margin-top: 12px; font-size: clamp(28px, 4.5vw, 42px); }
.section-head p { margin-top: 16px; color: var(--on-surface-variant); font-size: 17px; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--outline-variant);
  border-radius: var(--radius-l); padding: 28px;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { background: var(--surface-high); border-color: var(--outline); transform: translateY(-2px); box-shadow: var(--elev-3); }
.icon-badge {
  width: 52px; height: 52px; border-radius: var(--radius-m);
  display: grid; place-items: center;
  background: var(--primary-container); color: var(--on-primary-container);
}
.icon-badge.alt { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.card h3 { margin-top: 20px; font-size: 19px; }
.card p { margin-top: 10px; color: var(--on-surface-variant); font-size: 15px; }

/* Product */
.product {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--outline-variant);
  border-radius: 32px; padding: 32px 24px;
  display: grid; gap: 40px; grid-template-columns: 1fr;
}
@media (min-width: 720px) { .product { padding: 48px; } }
@media (min-width: 960px) { .product { grid-template-columns: 1.15fr .85fr; align-items: center; padding: 56px; } }
.product::before {
  content: ""; position: absolute; z-index: -1; inset: auto -20% -60% 30%; height: 120%;
  background: radial-gradient(closest-side, rgb(139 92 246 / .28), transparent),
              radial-gradient(closest-side at 80% 40%, rgb(6 182 212 / .2), transparent);
  pointer-events: none;
}
.product-title { display: flex; align-items: center; gap: 18px; }
.product-title img { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--elev-3); }
.product-title h3 { font-size: clamp(26px, 4vw, 34px); }
.product-title span { display: block; color: var(--on-surface-variant); font-size: 15px; margin-top: 4px; }
.product .desc { margin-top: 24px; color: var(--on-surface-variant); font-size: 17px; max-width: 56ch; }
.features { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.features .material-symbols-rounded { color: #b79bff; font-size: 22px; flex: none; }
.platforms { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.platform {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  background: var(--surface-highest); font-size: 13px; font-weight: 500;
}
.platform .material-symbols-rounded { font-size: 18px; }
.platform small { color: var(--on-surface-variant); font-size: 12px; }
.platform.live { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--on-primary-container); }
.product-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn-lumina { background: linear-gradient(100deg, var(--lumina-violet), var(--lumina-cyan)); color: #fff; }
.btn-lumina:hover { box-shadow: 0 6px 24px rgb(139 92 246 / .35); }

/* Phone mock */
.phone {
  justify-self: center; width: min(280px, 100%); aspect-ratio: 9 / 18.5;
  border-radius: 40px; padding: 10px; background: #05070a;
  border: 1px solid var(--outline); box-shadow: 0 30px 80px rgb(0 0 0 / .6), 0 0 0 1px rgb(255 255 255 / .03) inset;
}
.screen {
  height: 100%; border-radius: 31px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, #1a1530 0%, #0d1220 55%, #0a0f1a 100%);
  display: flex; flex-direction: column; padding: 28px 20px 22px;
}
.screen .art {
  aspect-ratio: 1; border-radius: 18px; margin-top: 10px;
  background:
    radial-gradient(circle at 70% 30%, rgb(6 182 212 / .7), transparent 45%),
    radial-gradient(circle at 25% 75%, rgb(139 92 246 / .85), transparent 50%),
    linear-gradient(135deg, #2a1d5c, #0e2a3d);
  display: grid; place-items: center; box-shadow: 0 16px 40px rgb(139 92 246 / .3);
}
.screen .art img { width: 46%; border-radius: 14px; opacity: .95; }
.screen .meta { margin-top: 22px; }
.bar { height: 10px; border-radius: 6px; background: rgb(255 255 255 / .85); width: 70%; }
.bar.sub { height: 8px; margin-top: 10px; width: 45%; background: rgb(255 255 255 / .35); }
.progress { margin-top: 24px; height: 4px; border-radius: 4px; background: rgb(255 255 255 / .12); position: relative; }
.progress::after { content: ""; position: absolute; inset: 0 62% 0 0; border-radius: 4px; background: linear-gradient(90deg, var(--lumina-violet), var(--lumina-cyan)); }
.eq { margin-top: auto; display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 48px; }
.eq span { width: 6px; border-radius: 3px; background: linear-gradient(180deg, var(--lumina-cyan), var(--lumina-violet)); animation: eq 1.4s ease-in-out infinite; }
.eq span:nth-child(2n) { animation-delay: -.3s; }
.eq span:nth-child(3n) { animation-delay: -.7s; }
.eq span:nth-child(5n) { animation-delay: -1s; }
@keyframes eq { 0%, 100% { height: 20%; } 50% { height: 100%; } }
.controls { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; color: rgb(255 255 255 / .7); }
.controls .play { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--lumina-violet), var(--lumina-cyan)); }
@media (prefers-reduced-motion: reduce) { .eq span { animation: none; height: 60%; } html { scroll-behavior: auto; } }

/* Principles */
.principle { display: flex; gap: 16px; align-items: flex-start; }
.principle .num { font-size: 14px; font-weight: 700; color: var(--tertiary); font-variant-numeric: tabular-nums; padding-top: 3px; }
.principle h3 { font-size: 18px; margin-top: 0; }
.principle p { margin-top: 8px; color: var(--on-surface-variant); font-size: 15px; }

/* Contact */
.contact {
  border-radius: 32px; padding: 40px 24px; text-align: center;
  background: linear-gradient(135deg, var(--primary-container), var(--tertiary-container));
  border: 1px solid var(--outline);
}
@media (min-width: 720px) { .contact { padding: 64px 48px; } }
.contact h2 { font-size: clamp(28px, 4.5vw, 40px); }
.contact p { margin: 16px auto 0; max-width: 52ch; color: var(--on-primary-container); opacity: .85; font-size: 17px; }
.contact .email { margin-top: 28px; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.email-address { font-size: clamp(16px, 3.6vw, 22px); font-weight: 600; color: #fff; word-break: break-all; display: block; margin-top: 24px; }

/* Footer */
footer { padding: 40px 0 48px; color: var(--on-surface-variant); font-size: 14px; }
footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--on-surface-variant); }
footer a:hover { color: var(--on-surface); }

/* Snackbar */
.snackbar {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 24px);
  background: #e2e7ef; color: #1a1f26; padding: 14px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 500; box-shadow: var(--elev-3);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
  max-width: calc(100% - 32px);
}
.snackbar.show { opacity: 1; transform: translate(-50%, 0); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Legal page */
.legal { padding: 56px 0 88px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(30px, 5vw, 44px); }
.legal .updated { margin-top: 12px; color: var(--on-surface-variant); font-size: 14px; }
.legal h2 { margin-top: 44px; font-size: 22px; }
.legal h3 { margin-top: 24px; font-size: 17px; }
.legal p, .legal li { color: #c9d1dc; font-size: 16px; }
.legal p { margin-top: 14px; }
.legal ul { margin: 14px 0 0; padding-left: 22px; }
.legal li { margin-top: 8px; }
.legal li strong, .legal p strong { color: var(--on-surface); }
.legal .summary { margin-top: 32px; padding: 24px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--outline-variant); }
.legal .summary p:first-child { margin-top: 0; }
.table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--outline-variant); border-radius: var(--radius-m); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--outline-variant); vertical-align: top; color: #c9d1dc; }
th { background: var(--surface-high); color: var(--on-surface); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* Language visibility */
html[lang="en"] [data-lang="es"], html[lang="es"] [data-lang="en"] { display: none !important; }

/* Dexpedia product */
.product + .product { margin-top: 24px; }
.product-dex::before {
  background: radial-gradient(closest-side, rgb(255 28 72 / .16), transparent),
              radial-gradient(closest-side at 80% 40%, rgb(60 140 255 / .2), transparent);
}
.product-dex .features .material-symbols-rounded { color: #ff6b81; }
.platform.dev { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.disclaimer { margin-top: 24px; font-size: 12px; color: var(--on-surface-variant); max-width: 64ch; }
.dex-visual {
  position: relative; justify-self: center; width: min(300px, 100%); aspect-ratio: 1;
  display: grid; place-items: center;
}
.dex-visual img {
  width: 62%; border-radius: 50%;
  box-shadow: 0 24px 60px rgb(0 0 0 / .55), 0 0 0 10px rgb(255 255 255 / .03);
  animation: dex-float 6s ease-in-out infinite;
}
.dex-visual .type {
  position: absolute; padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #fff; box-shadow: var(--elev-1);
}
.t-fire { background: #e8603c; top: 8%; left: 2%; }
.t-water { background: #3b8be0; top: 14%; right: 0; }
.t-grass { background: #3fa45b; bottom: 14%; left: 0; }
.t-electric { background: #d9a520; color: #1a1300; bottom: 6%; right: 6%; }
@keyframes dex-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .dex-visual img { animation: none; } }

/* Weather app product */
.product-wx::before {
  background: radial-gradient(closest-side, rgb(255 184 0 / .18), transparent),
              radial-gradient(closest-side at 80% 40%, rgb(56 160 255 / .22), transparent);
}
.product-wx .features .material-symbols-rounded { color: #ffc23d; }
.icon-tile { background: linear-gradient(160deg, #e9f4ff, #b9dcff); padding: 8px; }
.wx-visual { position: relative; justify-self: center; width: min(300px, 100%); aspect-ratio: 1; display: grid; place-items: center; }
.wx-visual .sky {
  width: 72%; aspect-ratio: 1; border-radius: 36px; display: grid; place-items: center;
  background: linear-gradient(160deg, #5aa9ff 0%, #2f6fd6 55%, #1d3f8f 100%);
  box-shadow: 0 24px 60px rgb(0 0 0 / .5), inset 0 1px 0 rgb(255 255 255 / .25);
}
.wx-visual .sky img { width: 70%; animation: dex-float 7s ease-in-out infinite; }
.wx-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface-highest); color: var(--on-surface); border: 1px solid var(--outline); box-shadow: var(--elev-1);
}
.wx-chip .material-symbols-rounded { font-size: 18px; color: #ffc23d; }
.wx-chip.c1 { top: 6%; left: 0; }
.wx-chip.c2 { top: 42%; right: -2%; }
.wx-chip.c3 { bottom: 6%; left: 8%; }
@media (prefers-reduced-motion: reduce) { .wx-visual .sky img { animation: none; } }
