/* ============================================================
   yodepeque — sitio web
   Paleta tomada de la app (src/theme/colors.ts) + verde "brote"
   ============================================================ */

:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-muted: #f1ece3;
  --primary: #6c63ff;
  --primary-dark: #574fd6;
  --primary-soft: #e8e6ff;
  --accent: #e38b73;
  --green: #4ca85b;
  --green-dark: #2e8b43;
  --green-soft: #e3f1e4;
  --text: #241f1a;
  --text-muted: #6f665e;
  --border: #e5ddd2;
  --shadow: 0 18px 40px -24px rgba(36, 31, 26, 0.35);
  --shadow-sm: 0 8px 24px -16px rgba(36, 31, 26, 0.4);
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1120px;
  --font-head: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

.muted { color: var(--text-muted); }
.center { text-align: center; }

/* ---------- Announcement bar ---------- */
.announce-bar {
  background: var(--green-dark);
  color: #fff;
}
.announce-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 14px;
  padding: 9px 20px;
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: center;
}
.announce-bar .announce-cta {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.announce-bar .announce-cta:hover { opacity: 0.85; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 239, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--surface-muted); text-decoration: none; }

/* language picker */
.lang-picker { position: relative; }
.lang-picker select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 30px 8px 12px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.lang-picker::after {
  content: "▾";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-muted); }

/* store badges */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #1b1714;
  color: #fff;
  padding: 11px 18px;
  border-radius: 14px;
  min-width: 180px;
}
.store-badge:hover { text-decoration: none; background: #000; }
.store-badge svg { width: 24px; height: 24px; flex: none; }
.store-badge .small { font-size: 0.68rem; opacity: 0.8; line-height: 1.1; }
.store-badge .big { font-size: 1.05rem; font-weight: 600; line-height: 1.1; }
.store-badge.disabled { opacity: 0.55; cursor: default; pointer-events: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 12% 0%, var(--primary-soft) 0%, transparent 60%),
    radial-gradient(50% 45% at 92% 18%, var(--green-soft) 0%, transparent 60%);
  opacity: 0.9;
  z-index: -1;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 18px;
}
.hero-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero p.lead { font-size: 1.18rem; color: var(--text-muted); max-width: 46ch; }
.hero-cta { display: flex; flex-direction: column; gap: 18px; margin-top: 26px; }
.hero-note { font-size: 0.85rem; color: var(--text-muted); }

/* memory card used inside tinted feature visuals */
.phone-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
}
.phone-card .emoji { font-size: 1.2rem; }
.phone-card small { color: var(--text-muted); display: block; font-size: 0.68rem; }

/* real screenshot inside a device frame (screenshot already has its status bar) */
.device {
  justify-self: center;
  width: min(290px, 78vw);
  border: 11px solid #1b1714;
  border-radius: 44px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
.device img { display: block; width: 100%; height: auto; }
.device.sm { width: min(248px, 66%); border-width: 9px; border-radius: 38px; }

/* 2x2 grid of full phone screenshots */
.view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: 100%;
}
.view-grid .device {
  width: 100%;
  border-width: 8px;
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Sections ---------- */
section { padding: clamp(48px, 7vw, 86px) 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head p { font-size: 1.08rem; color: var(--text-muted); }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

/* feature grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}
.card .ic {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
  background: var(--primary-soft);
}
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; font-size: 0.96rem; color: var(--text-muted); }

/* "soon" / roadmap cards */
.card.soon { border-style: dashed; background: transparent; }
.card.soon .ic { background: var(--green-soft); }
.soon-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 12px;
}

/* thesis / repositioning band */
.thesis .container { max-width: 760px; text-align: center; }
.thesis h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 16px; }
.thesis p { font-size: 1.12rem; color: var(--text-muted); max-width: 60ch; margin: 0 auto; }
.thesis .chips { justify-content: center; margin-top: 24px; }

/* alternating feature rows */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse .feature-visual { order: 2; }
.feature-row h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.feature-row ul { list-style: none; padding: 0; margin: 14px 0 0; }
.feature-row li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.feature-row li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-soft);
  box-shadow: inset 0 0 0 2px var(--green);
}
.feature-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.feature-visual.green { background: linear-gradient(160deg, var(--green-soft), #fff); }
.feature-visual.purple { background: linear-gradient(160deg, var(--primary-soft), #fff); }
.feature-visual.accent { background: linear-gradient(160deg, #fbe9e2, #fff); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.9rem;
  font-weight: 500;
}
.chip .em { margin-right: 6px; }

/* roles list */
.roles { display: grid; gap: 10px; }
.role { display: flex; gap: 12px; align-items: flex-start; }
.role .badge {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  font-size: 1rem;
}
.role strong { display: block; }
.role span { font-size: 0.9rem; color: var(--text-muted); }

/* permanence band */
.perm-band { background: linear-gradient(160deg, var(--green-soft), var(--bg)); }
.perm-band .container { max-width: 840px; text-align: center; }
.perm-band p { color: var(--text-muted); font-size: 1.08rem; max-width: 62ch; margin: 0 auto 4px; }
.perm-band .chips { justify-content: center; margin: 22px 0 26px; }

/* languages section */
.langs { background: var(--surface-muted); }

/* privacy band */
.band {
  background: linear-gradient(160deg, #1f1b17, #2c2620);
  color: #f3ede4;
}
.band h2, .band h3 { color: #fff; }
.band .muted, .band p { color: #cbbfb2; }
.band .card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
.band .card p { color: #cbbfb2; }
.band .ic { background: rgba(108,99,255,0.25); }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .inner {
  background: linear-gradient(150deg, var(--primary), #8b84ff);
  border-radius: 28px;
  padding: clamp(36px, 6vw, 64px);
  color: #fff;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.9); max-width: 44ch; margin-inline: auto; }
.cta-band .stores { justify-content: center; margin-top: 24px; }
.cta-band .store-badge { background: #1b1714; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
  padding: 46px 0 30px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-grid .brand { margin-bottom: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.footer-col a { display: block; color: var(--text); margin-bottom: 8px; font-size: 0.95rem; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Legal / content pages ---------- */
.page-hero {
  padding: clamp(48px, 7vw, 80px) 0 0;
  background:
    radial-gradient(60% 60% at 15% 0%, var(--primary-soft) 0%, transparent 60%);
}
.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 36px 22px 80px;
}
.legal h2 { margin-top: 2em; }
.legal h2:first-of-type { margin-top: 1em; }
.legal h3 { margin-top: 1.4em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 8px; }
.legal .updated {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.legal a { font-weight: 500; }
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 22px 0;
}
.callout.green { border-left-color: var(--green); }

/* code blocks (spec page) */
.legal pre {
  background: #1f1b17;
  color: #f3ede4;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.55;
}
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.legal :not(pre) > code {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.88em;
}
.legal table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.legal th, .legal td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.legal th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

/* theme showcase (download page) */
.theme-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 920px; margin: 0 auto; }
.theme-row .device { width: 100%; border-width: 7px; border-radius: 26px; box-shadow: var(--shadow-sm); }
.theme-row figcaption { margin-top: 9px; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-align: center; }
.theme-row figure { margin: 0; }
@media (max-width: 700px) { .theme-row { grid-template-columns: 1fr 1fr; gap: 14px; } }

/* pricing plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 840px; margin: 0 auto 10px; }
.plans-3 { grid-template-columns: repeat(3, 1fr); max-width: 1040px; align-items: start; }
@media (max-width: 860px) { .plans-3 { grid-template-columns: 1fr; max-width: 460px; } }
.plans-4 { grid-template-columns: repeat(4, 1fr); max-width: 1180px; align-items: start; gap: 20px; }
.plans-4 .plan { padding: 28px 22px; }
@media (max-width: 1080px) { .plans-4 { grid-template-columns: repeat(2, 1fr); max-width: 720px; } }
@media (max-width: 560px) { .plans-4 { grid-template-columns: 1fr; max-width: 460px; } }
.pric-free-note { text-align: center; max-width: 60ch; margin: 0 auto 26px; font-size: 1rem; }
.plan-specs { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.plan-specs li { position: relative; padding: 10px 12px 10px 34px; margin: 0; background: var(--primary-soft); border-radius: 10px; color: var(--text); font-weight: 600; font-size: 0.98rem; }
.plan-specs li::before { content: "✦"; position: absolute; left: 13px; top: 10px; color: var(--primary); font-weight: 800; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow-sm); }
.plan.featured { border: 2px solid var(--primary); box-shadow: var(--shadow); position: relative; }
.plan .pname { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.plan .pprice { font-family: var(--font-head); font-size: 2rem; font-weight: 600; margin: 8px 0 2px; }
.plan .psub { color: var(--text-muted); font-size: 0.95rem; }
.plan .pnote { color: var(--text-muted); font-size: 0.82rem; margin-top: 8px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; }
.plan li { position: relative; padding-left: 26px; margin-bottom: 11px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.plan li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.plan .pcta { margin-top: 22px; width: 100%; }
.featured-badge { position: absolute; top: -12px; left: 24px; background: var(--primary); color: #fff; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 5px 13px; border-radius: 999px; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }

/* contact card */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

/* faq */
details.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  margin-bottom: 12px;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; font-weight: 400; }
details.faq[open] summary::after { content: "–"; }
details.faq p { padding-bottom: 16px; margin: 0; color: var(--text-muted); }
details.faq > div { padding-bottom: 16px; color: var(--text-muted); }
details.faq > div strong { display: block; color: var(--text); margin-top: 6px; }
details.faq > div ul { margin: 6px 0 10px; padding-left: 20px; }
details.faq > div li { margin-bottom: 5px; }
details.faq > div table { width: 100%; border-collapse: collapse; margin: 10px 0 12px; font-size: 0.95rem; }
details.faq > div thead th { text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--border); color: var(--text); font-weight: 700; }
details.faq > div tbody td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
details.faq > div tbody td:first-child { font-weight: 600; color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .hero .device { order: -1; }
  .feature-row { grid-template-columns: 1fr; gap: 24px; }
  .feature-row.reverse .feature-visual { order: 0; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 22px 18px; gap: 4px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .lang-picker { margin-top: 8px; }
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    width: 42px; height: 42px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    cursor: pointer;
    font-size: 1.2rem;
  }
}

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