/* Netview — the app's own system, carried to the web: ink on paper, white cards
   with a 20 px radius on a light grey ground, Plus Jakarta Sans throughout.
   Values mirror src/theme/tokens.ts. */
:root {
  --bg: #F5F5F6;
  --surface: #FFFFFF;
  --surface-alt: #EFEFF1;
  --border: #E4E4E8;
  --text: #0A0A0B;
  --text-muted: #5F5F68;
  --text-faint: #9B9BA5;
  --on-brand: #FFFFFF;
  --primary: #0A0A0B;
  --primary-pressed: #2B2B30;
  --up: #0E8F52;
  --up-soft: #0E8F521F;
  --down: #D03A2F;
  --down-soft: #D03A2F1F;
  --flat: #6B7280;
  /* The inverse palette, for text on the ink card (as theme.inverse in the app). */
  --inv-muted: #A1A1AA;
  --inv-up: #3DD68C;
  --inv-up-soft: #3DD68C29;
  --shadow-1: 0 2px 10px rgba(10, 10, 11, .05);
  --shadow-2: 0 10px 24px rgba(10, 10, 11, .16);
  --card-border: transparent;
  --scroll-thumb: #C9C9D0;

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #141416; --surface-alt: #1F1F23; --border: #27272B;
    --text: #F5F5F6; --text-muted: #A1A1AA; --text-faint: #6C6C76; --on-brand: #000000;
    --primary: #F5F5F6; --primary-pressed: #D4D4D8;
    --up: #3DD68C; --up-soft: #3DD68C29; --down: #FF6B5E; --down-soft: #FF6B5E29; --flat: #8D97A6;
    --inv-muted: #5F5F68; --inv-up: #0E8F52; --inv-up-soft: #0E8F521F;
    --shadow-1: none; --shadow-2: none; --card-border: #27272B; --scroll-thumb: #3A3A40;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #141416; --surface-alt: #1F1F23; --border: #27272B;
  --text: #F5F5F6; --text-muted: #A1A1AA; --text-faint: #6C6C76; --on-brand: #000000;
  --primary: #F5F5F6; --primary-pressed: #D4D4D8;
  --up: #3DD68C; --up-soft: #3DD68C29; --down: #FF6B5E; --down-soft: #FF6B5E29; --flat: #8D97A6;
  --inv-muted: #5F5F68; --inv-up: #0E8F52; --inv-up-soft: #0E8F521F;
  --shadow-1: none; --shadow-2: none; --card-border: #27272B; --scroll-thumb: #3A3A40;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* Scrollbar: a thin ink thumb on the page's own ground, not the browser's grey bar. */
html { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::selection { background: var(--primary); color: var(--on-brand); }

/* Smooth scrolling (scroll.js, with Lenis). Without the script the page scrolls natively. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.6 var(--font);
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 20; background: var(--bg);
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }

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

/* Header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.brand-tile {
  width: 34px; height: 34px; border-radius: 10px; background: var(--primary);
  display: grid; place-items: center; flex: none;
}
.brand-tile svg { width: 56%; height: 56%; fill: var(--on-brand); }
.top nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.top nav a { display: inline-flex; align-items: center; height: 40px; }
.top nav a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Store-badge style download button: "Muy pronto en / App Store". */
.store-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; flex: none;
  border-radius: 12px; background: var(--primary); color: var(--on-brand); text-decoration: none; white-space: nowrap;
}
.store-badge:hover { background: var(--primary-pressed); }
.store-badge svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.store-badge span { display: grid; line-height: 1.05; text-align: left; }
.store-badge small { font-size: 10px; font-weight: 600; opacity: .75; }
.store-badge b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.store-badge.lg { height: 56px; padding: 0 22px 0 18px; gap: 10px; border-radius: 16px; }
.store-badge.lg svg { width: 26px; height: 26px; }
.store-badge.lg small { font-size: 12px; }
.store-badge.lg b { font-size: 20px; }
.store-badge.inverse { background: var(--on-brand); color: var(--primary); justify-self: start; }
.store-badge.inverse:hover { background: color-mix(in srgb, var(--on-brand) 88%, var(--primary)); }
.theme-btn {
  width: 40px; height: 40px; border-radius: 50%; padding: 0; cursor: pointer; flex: none;
  background: var(--surface); color: var(--text); border: 1px solid var(--card-border);
  box-shadow: var(--shadow-1); display: grid; place-items: center;
}
.theme-btn svg { width: 18px; height: 18px; }
/* Language switch: the other language's code, in the same round button. */
.lang-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--card-border); box-shadow: var(--shadow-1);
  font-size: 13px; font-weight: 800; letter-spacing: .02em; text-decoration: none;
}
.lang-btn:hover, .theme-btn:hover { background: var(--surface-alt); }

/* "Also in English": a small card at the foot of the screen, never in the way. */
.lang-hint {
  position: fixed; z-index: 30; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; justify-content: center;
  padding: 10px 10px 10px 18px; border-radius: 22px;
  background: var(--surface); color: var(--text); border: 1px solid var(--card-border); box-shadow: var(--shadow-2);
  font-size: 14px; font-weight: 600; animation: hint-in .4s cubic-bezier(.2, .7, .2, 1);
}
.lang-hint a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--primary); color: var(--on-brand); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.lang-hint button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; flex: none;
  display: grid; place-items: center; background: var(--surface-alt); color: var(--text-muted);
}
.lang-hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* Buttons: the app's pill */
.pill-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px;
  border-radius: 999px; background: var(--primary); color: var(--on-brand);
  font: 700 16px/1 var(--font); text-decoration: none; border: 0; white-space: nowrap;
}
.pill-btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.pill-btn.soon { cursor: default; }

/* Cards and icon tiles, as in the app */
.card {
  background: var(--surface); border-radius: var(--r-lg); padding: 20px;
  box-shadow: var(--shadow-1); border: 1px solid var(--card-border);
}
.icon-tile {
  width: 40px; height: 40px; border-radius: 13px; background: var(--surface-alt);
  display: grid; place-items: center; flex: none; color: var(--text);
}
.icon-tile svg { width: 20px; height: 20px; }
.lucide { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Footer */
.foot { padding-block: 48px 40px; color: var(--text-muted); font-size: 14px; }
.foot .wrap { display: grid; gap: 20px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot-row .brand { font-size: 17px; margin-right: auto; color: var(--text); }
.foot-row .brand-tile { width: 28px; height: 28px; border-radius: 8px; }
.foot-row a { text-decoration: none; font-weight: 600; }
.foot-row a:hover { color: var(--text); }
.foot small { font-size: 12.5px; line-height: 1.6; color: var(--text-faint); max-width: 62em; display: block; }

/* Site footer: brand, product links, legal, contact; the disclaimer below a hairline. */
.site-foot { padding-block: 72px 40px; font-size: 14px; color: var(--text-muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.foot-brand { display: grid; gap: 12px; align-content: start; }
.foot-brand .brand { color: var(--text); }
.foot-brand p { font-size: 15px; }
.foot-col { display: grid; gap: 10px; align-content: start; }
.foot-col b { color: var(--text); font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.foot-col a { text-decoration: none; font-weight: 600; }
.foot-col a:hover { color: var(--text); }
.foot-col a, .foot-col span { overflow-wrap: anywhere; }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: .5px solid var(--border); display: grid; gap: 10px; }
.foot-bottom span { font-weight: 600; }
.foot-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.foot-lang { display: flex; align-items: center; gap: 4px; }
.foot-lang a {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  text-decoration: none; font-size: 13px; font-weight: 700; color: var(--text-muted);
}
.foot-lang a:hover { color: var(--text); }
.foot-lang a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); border: 1px solid var(--card-border); }
.foot-lang svg { width: 15px; height: 15px; }
.foot-bottom small { font-size: 12.5px; line-height: 1.6; color: var(--text-faint); max-width: 62em; }
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .site-foot { padding-block: 56px 32px; }
}

/* Header menu. Wide screens: the wrapper dissolves and its links, the language and
   the theme switch sit in the bar in this order. Phones: see the media query below. */
.menu-btn {
  display: none; width: 40px; height: 40px; border-radius: 50%; padding: 0; cursor: pointer; flex: none;
  background: var(--surface); color: var(--text); border: 1px solid var(--card-border);
  box-shadow: var(--shadow-1); place-items: center;
}
.menu-btn:hover { background: var(--surface-alt); }
.menu-btn svg { width: 20px; height: 20px; }
.top-menu, .menu-tools { display: contents; }
.top .brand { order: 0; }
.top nav { order: 1; }
.top .store-badge { order: 2; }
.top .lang-btn { order: 3; }
.top .theme-btn { order: 4; }
.btn-label { display: none; }

@media (max-width: 640px) {
  /* On a phone the bar keeps the logo, the name and the download button; the
     sections, the language and the theme switch fold into a panel under the burger. */
  .top .store-badge { margin-left: auto; order: 0; }
  .menu-btn { display: grid; }
  .top-menu {
    display: none; position: absolute; top: calc(100% + 4px);
    left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
    flex-direction: column; padding: 8px; border-radius: var(--r-lg);
    background: var(--surface); border: 1px solid var(--card-border); box-shadow: var(--shadow-2);
    max-height: calc(100dvh - 96px); overflow-y: auto;
  }
  .top-menu.open { display: flex; animation: menu-in .18s cubic-bezier(.2, .7, .2, 1); }
  .top-menu nav { display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; order: 0; }
  .top-menu nav a { height: 48px; padding: 0 14px; border-radius: 12px; font-size: 16px; font-weight: 700; color: var(--text); }
  .top-menu nav a:hover, .top-menu nav a:active { background: var(--surface-alt); }
  .menu-tools { display: flex; gap: 8px; margin-top: 6px; padding: 10px 4px 4px; border-top: .5px solid var(--border); }
  .top .menu-tools .lang-btn, .top .menu-tools .theme-btn {
    flex: 1 1 0; width: auto; height: 44px; border-radius: 999px; box-shadow: none; background: var(--surface-alt);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 700;
  }
  .top .menu-tools .lang-btn:active, .top .menu-tools .theme-btn:active { background: var(--border); }
  .menu-tools .btn-label { display: inline; }
  .menu-tools .lang-btn .code { display: none; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 420px) {
  .top .wrap { gap: 8px; }
  .menu-btn { width: 36px; height: 36px; }
  .top .store-badge { padding: 0 10px; gap: 6px; }
}
@media (max-width: 374px) {
  .brand { font-size: 18px; gap: 8px; }
  .brand-tile { width: 30px; height: 30px; }
}
@media (max-width: 340px) {
  /* The smallest phones keep the logo tile and drop the word. */
  .top .brand { font-size: 0; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Social links in the footer: the brands' own marks, in the page's ink. */
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  background: var(--surface); color: var(--text); border: 1px solid var(--card-border); box-shadow: var(--shadow-1);
  transition: background .15s, color .15s;
}
.socials a:hover { background: var(--primary); color: var(--on-brand); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }
