/* PachonLabs: colores del avatar (verde azulado → azul noche, acento menta). */
:root {
  --teal: #10766E;
  --teal-2: #0E5A57;
  --navy: #0F1B2D;
  --mint: #2DD4BF;
  --mint-ink: #0B5F56;
  --tan: #D9925B;

  --bg: #F4F8F7;
  --surface: #FFFFFF;
  --text: #0F1B2D;
  --muted: #4A5A66;
  --border: #D8E4E2;
  --shadow: 0 8px 24px rgba(15, 27, 45, .08);

  --live: #0E7A4F; --live-bg: #DDF5EA;
  --beta: #8A4B0F; --beta-bg: #FCEBD7;
  --dev: #3C4E9C; --dev-bg: #E3E8FB;

  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1422;
    --surface: #132235;
    --text: #EAF2F1;
    --muted: #A3B4BE;
    --border: #22364B;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
    --mint-ink: #7CEBDD;
    --live: #7BE0B0; --live-bg: #123A2C;
    --beta: #F5C38A; --beta-bg: #3D2A14;
    --dev: #AEBBFA; --dev-bg: #1F2A55;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1422; --surface: #132235; --text: #EAF2F1; --muted: #A3B4BE; --border: #22364B;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35); --mint-ink: #7CEBDD;
  --live: #7BE0B0; --live-bg: #123A2C; --beta: #F5C38A; --beta-bg: #3D2A14; --dev: #AEBBFA; --dev-bg: #1F2A55;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
h1, h2, h3, .brand, .btn { font-family: Nunito, Inter, system-ui, sans-serif; }
a { color: inherit; }
img { max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--mint); color: var(--navy); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

/* ---------- Portada ---------- */
.hero {
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal-2) 40%, var(--navy) 100%);
  color: #fff;
  padding: 0 16px 56px;
}
.top { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { font-weight: 900; font-size: 1.5rem; text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--mint); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.nav-link { text-decoration: none; padding: 10px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; opacity: .9; }
.nav-link:hover { background: rgba(255,255,255,.1); opacity: 1; }
.lang { min-width: 48px; min-height: 44px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.4); background: transparent; color: #fff; font: 800 .9rem Nunito, sans-serif; cursor: pointer; }
.lang:hover { background: rgba(255,255,255,.12); }
.sound { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.4); background: transparent; color: #fff; cursor: pointer; }
.sound:hover { background: rgba(255,255,255,.12); }
.sound[aria-pressed="false"] { opacity: .7; }

.hero-body { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 24px; padding-top: 24px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.05; margin: 14px 0 16px; font-weight: 900; letter-spacing: -.02em; }
.lead { font-size: 1.15rem; color: #D5ECE9; max-width: 34ch; margin: 0 0 26px; }
.bubble {
  display: inline-block; position: relative; margin: 0;
  background: #fff; color: var(--navy); font-weight: 600;
  padding: 12px 16px; border-radius: 18px 18px 18px 4px; max-width: 36ch;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 800; text-decoration: none; font-size: 1rem; transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--mint); color: var(--navy); }
.btn.ghost { border: 1.5px solid currentColor; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero-mascot { justify-self: center; background: radial-gradient(circle at 50% 55%, rgba(45,212,191,.28), rgba(45,212,191,0) 68%); border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.hero-mascot img { display: block; width: min(320px, 70vw); height: auto; animation: bob 4s ease-in-out infinite; }
.hero-3d { display: block; width: min(360px, 76vw); aspect-ratio: 1; cursor: grab; touch-action: pan-y; }
.hero-3d:active { cursor: grabbing; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---------- Secciones ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 56px 16px 8px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 4px; font-weight: 900; }
.section-head p { margin: 0 0 22px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }

/* ---------- Ficha ---------- */
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease;
}
.card:hover, .card:focus-within { transform: translateY(-2px); border-color: var(--mint); }
.card-top { display: flex; gap: 14px; align-items: center; }
.app-icon { width: 60px; height: 60px; border-radius: 16px; flex: none; object-fit: cover; background: var(--border); }
.app-icon.initials { display: grid; place-items: center; background: linear-gradient(140deg, var(--teal), var(--navy)); color: var(--mint); font: 900 1.3rem Nunito, sans-serif; }
.card h3 { margin: 0; font-size: 1.25rem; font-weight: 900; line-height: 1.2; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.pill.status-live { background: var(--live-bg); color: var(--live); border-color: transparent; }
.pill.status-beta { background: var(--beta-bg); color: var(--beta); border-color: transparent; }
.pill.status-dev, .pill.status-idea { background: var(--dev-bg); color: var(--dev); border-color: transparent; }
.tagline { margin: 0; color: var(--muted); flex: 1; }
.prop { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--mint) 18%, var(--surface)); color: var(--mint-ink); }
.prop svg { width: 22px; height: 22px; }
.card-top { padding-right: 44px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: .92rem; text-decoration: none; border: 1.5px solid var(--border); }
.link:hover { border-color: var(--mint); }
.link.main { background: var(--mint); color: var(--navy); border-color: var(--mint); }
.soon { color: var(--muted); font-size: .9rem; font-style: italic; margin: 0; min-height: 44px; display: flex; align-items: center; }

/* ---------- Sobre y contacto ---------- */
.about-card { display: flex; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.about-card img { flex: none; width: 140px; height: 140px; }
.about-card .about-3d { flex: none; width: 180px; height: 180px; }
.about-card h2 { margin: 0 0 8px; font-weight: 900; }
.about-card p { margin: 0; color: var(--muted); max-width: 70ch; }
.contact { text-align: center; padding-bottom: 56px; }
.contact h2 { font-size: 2rem; font-weight: 900; margin: 0 0 4px; }
.contact p { color: var(--muted); margin: 0 0 20px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.contact .btn.ghost { color: var(--text); border-color: var(--border); }
.foot { border-top: 1px solid var(--border); padding: 24px 16px 120px; text-align: center; color: var(--muted); font-size: .85rem; }
.foot p { max-width: 80ch; margin: 6px auto; }

/* ---------- Mascota que acompaña ---------- */
.buddy { position: fixed; right: 16px; bottom: 16px; display: flex; align-items: flex-end; gap: 8px; z-index: 20; pointer-events: none; opacity: 0; transform: translateY(20px); transition: opacity .25s ease, transform .25s ease; }
.buddy.show { opacity: 1; transform: none; }
.buddy img { width: 128px; height: 128px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)); }
.buddy-bubble { margin: 0 0 76px; max-width: 220px; background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 10px 14px; border-radius: 16px 16px 4px 16px; box-shadow: var(--shadow); font-weight: 600; font-size: .92rem; opacity: 0; transition: opacity .2s ease; }
.buddy-bubble.on { opacity: 1; }

/* Aviso de vista previa (se quita al elegir mascota) */
.preview-bar { position: sticky; top: 0; z-index: 30; background: var(--tan); color: var(--navy); text-align: center; font-weight: 700; font-size: .9rem; padding: 8px 16px; }
.preview-bar a { font-weight: 900; }
.preview-bar select { font: inherit; margin-left: 6px; min-height: 32px; border-radius: 8px; }

@media (max-width: 760px) {
  .hero-body { grid-template-columns: 1fr; text-align: left; }
  .hero-mascot { order: -1; }
  .hero-mascot img { width: min(220px, 60vw); }
  .hero-3d { width: min(260px, 66vw); }
  .nav-link { display: none; }
  .about-card { flex-direction: column; text-align: center; }
  .buddy img { width: 96px; height: 96px; }
  .buddy-bubble { max-width: 180px; margin-bottom: 58px; }
}
@media (max-width: 360px) {
  .grid, .grid.small { grid-template-columns: 1fr; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card, .card-top > div { min-width: 0; }
.card h3, .tagline { overflow-wrap: anywhere; }
