/* ====================================================================
   Terremoto - Landing page
   Design system, light/dark theme, responsive layout
   ==================================================================== */

:root {
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-700: #1e40af;
  --accent: #06b6d4;

  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --border: #e3e8f0;
  --text: #0f172a;
  --text-soft: #475569;
  --text-mut: #64748b;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1140px;
  --header-h: 66px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --brand: #60a5fa;
  --brand-600: #3b82f6;
  --brand-700: #2563eb;
  --accent: #22d3ee;

  --bg: #0b1120;
  --bg-soft: #0f1729;
  --bg-elev: #111c30;
  --surface: #14203a;
  --border: #243149;
  --text: #e8eef8;
  --text-soft: #b6c2d6;
  --text-mut: #8a99b3;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 800; letter-spacing: -.02em; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Buttons & badges ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: .95rem; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #0f172a;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: var(--shadow-sm);
}
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
[data-theme="dark"] .store-badge { background: #f8fafc; color: #0f172a; border-color: rgba(0,0,0,.1); }
.store-badge__icon { flex: 0 0 auto; }
.store-badge__text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-badge__text small { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.store-badge__text strong { font-size: 1.18rem; font-weight: 700; }
.store-badge--light { background: #fff; color: #0f172a; }
.store-badge--lg { padding: 14px 26px; }
.store-badge--lg .store-badge__text strong { font-size: 1.35rem; }
.store-badge--sm { padding: 8px 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.brand__logo { border-radius: 9px; }
.main-nav { display: flex; gap: 26px; margin-left: 14px; margin-right: auto; }
.main-nav a { color: var(--text-soft); font-weight: 500; font-size: .98rem; transition: color .2s; }
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--brand); }
.lang-toggle__code { font-size: .85rem; font-weight: 600; }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle { display: none; }

/* Lang menu */
.lang-select { position: relative; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 168px;
  display: none;
  z-index: 200;
}
.lang-menu.open { display: block; }
.lang-menu button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
}
.lang-menu button:hover, .lang-menu button[aria-current="true"] { background: var(--bg-soft); }
.lang-menu button[aria-current="true"] { color: var(--brand); font-weight: 600; }

/* ---------- Hero ---------- */
.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 40px;
  background:
    radial-gradient(1200px 480px at 78% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
    radial-gradient(900px 420px at 10% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
}
.hero-title { font-size: clamp(2rem, 4.4vw, 3.3rem); margin-bottom: 16px; }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-soft); margin: 0 0 26px; max-width: 36ch; }

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 26px; }
.hero-rating { display: flex; align-items: center; gap: 10px; }
.stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: 1px; position: relative; }
.star-half { position: relative; display: inline-block; width: .55em; overflow: hidden; }
.hero-rating__text { font-size: .92rem; color: var(--text-soft); }
.hero-rating__text strong { color: var(--text); font-size: 1.05rem; }

.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-points li { position: relative; padding-left: 26px; color: var(--text-soft); font-size: .96rem; }
.hero-points li::before {
  content: "";
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- Phone mockups ---------- */
.hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 520px; }
.hero-blob {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 42% 58% 63% 37% / 42% 45% 55% 58%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  filter: blur(8px);
  opacity: .22;
  z-index: 0;
  animation: blob 14s ease-in-out infinite;
}
@keyframes blob {
  0%, 100% { border-radius: 42% 58% 63% 37% / 42% 45% 55% 58%; }
  50% { border-radius: 58% 42% 37% 63% / 55% 58% 42% 45%; }
}

.phone {
  position: relative;
  width: 280px;
  border-radius: 38px;
  background: linear-gradient(160deg, #1f2937, #0b1120);
  padding: 11px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.08);
}
.phone::before {
  content: "";
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 20px;
  background: #0b1120;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone__screen { border-radius: 28px; overflow: hidden; background: #fff; }
.phone__screen img { width: 100%; height: auto; display: block; }

.phone--main { z-index: 2; }
.phone--back {
  position: absolute;
  z-index: 1;
  width: 230px;
  transform: rotate(8deg) translate(120px, 22px);
  opacity: .92;
}
.phone--sm { width: 220px; }

/* ---------- Trust strip ---------- */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 22px 20px;
  text-align: center;
}
.trust__item { display: flex; flex-direction: column; gap: 2px; }
.trust__item strong { font-size: 1.5rem; color: var(--brand); }
.trust__item span { font-size: .85rem; color: var(--text-mut); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section--alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 14px; }
.section-sub { color: var(--text-soft); font-size: 1.08rem; margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature { padding: 28px 26px; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.feature__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  margin-bottom: 16px;
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.22rem; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--text-soft); font-size: .98rem; }

/* Highlight */
.highlight-inner {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 50px;
  align-items: center;
}
.highlight-art { display: flex; justify-content: center; }
.check-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 32px; color: var(--text-soft); }
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/15px no-repeat;
}
.check-list li::after {
  content: "";
  position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/15px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/15px no-repeat;
  background: var(--brand);
}

/* Screenshots scroller */
.screens-scroller {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 8px 4px 26px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.screen-card { flex: 0 0 auto; scroll-snap-align: center; text-align: center; margin: 0; width: 220px; }
.screen-card figcaption { margin-top: 16px; font-size: .92rem; color: var(--text-soft); padding: 0 6px; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--brand-700), var(--brand), var(--accent));
  color: #fff;
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 40px 20px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.cta-band p { margin: 6px 0 0; opacity: .92; }

/* Sources */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.source { padding: 22px 22px; display: flex; flex-direction: column; gap: 6px; }
.source:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.source__code { font-weight: 800; font-size: 1.1rem; color: var(--brand); letter-spacing: .02em; }
.source__name { color: var(--text-soft); font-size: .95rem; }
.sources-note { text-align: center; color: var(--text-mut); margin: 34px 0 0; font-size: .95rem; }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--brand);
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 18px; color: var(--text-soft); }

/* Final CTA */
.final-cta { padding: 80px 0; text-align: center; }
.final-cta__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.final-cta__icon { border-radius: 18px; box-shadow: var(--shadow-md); }
.final-cta h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.final-cta p { color: var(--text-soft); margin: 0 0 12px; max-width: 44ch; }

/* Footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 54px 0 28px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.4fr 1fr;
  gap: 30px;
}
.footer-tagline { color: var(--text-soft); margin: 14px 0 0; font-size: .95rem; max-width: 30ch; }
.footer-col h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mut); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-soft); transition: color .2s; }
.footer-col a:hover { color: var(--brand); }
.footer-actions { display: flex; align-items: flex-start; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}
.footer-privacy, .footer-copy { color: var(--text-mut); font-size: .85rem; margin: 0; max-width: 60ch; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .features-grid, .sources-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { min-height: 460px; order: -1; }
  .hero-sub { max-width: none; }
  .highlight-inner { grid-template-columns: 1fr; gap: 30px; }
  .highlight-art { order: 2; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
    margin: 0;
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    transition: transform .28s ease;
    z-index: 90;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .section { padding: 56px 0; }
  .trust-inner { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .cta-band__inner { flex-direction: column; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .phone--back { display: none; }
  .phone--main { width: 250px; }
}

@media (max-width: 420px) {
  .features-grid, .sources-grid { grid-template-columns: 1fr; }
  .header-actions { gap: 6px; }
}
