/*
 * Cuarta POS website. System fonts (no downloads), mobile first, light and dark.
 * Motion is decoration only: content is fully visible without JavaScript and with reduced motion.
 */
:root {
  --forest: #013d2f;
  --forest-2: #04533f;
  --emerald: #067452; /* 5.4:1 or better on every light background used */
  --emerald-2: #0aa673;
  --mint: #e3f4ec;
  --gold: #f2b705;
  --gold-ink: #6b4d00;
  --ink: #10201a;
  --muted: #4a5c55;
  --bg: #ffffff;
  --bg-soft: #f4f8f6;
  --card: #ffffff;
  --line: #dbe7e1;
  --shadow: 0 1px 2px rgba(1, 61, 47, .06), 0 8px 24px rgba(1, 61, 47, .08);
  --radius: 18px;
  --header: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8f1ed;
    --muted: #a8bbb3;
    --bg: #0b1512;
    --bg-soft: #101e19;
    --card: #13231e;
    --line: #22362f;
    --mint: #163228;
    --gold-ink: #f6cf55;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: #5fd3a5; } }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
figure { margin: 0; }
/* Single-column grids on phones: columns may shrink to the screen, never past it. */
.spotlight, .two, .foot-grid { grid-template-columns: minmax(0, 1fr); }
.narrow { max-width: 780px; }
.center { text-align: center; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--bg); color: var(--ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 10px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand img { border-radius: 11px; }
.menu-btn {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer;
}
.menu-btn svg { width: 20px; height: 20px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 600;
}
.site-nav a:hover { background: var(--mint); color: var(--ink); }
@media (max-width: 860px) {
  .js .menu-btn { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 20px 16px; display: none;
  }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { width: 100%; min-height: 48px; font-size: 1.05rem; }
  /* Without JavaScript the links simply wrap under the brand. */
  html:not(.js) .top-row { flex-wrap: wrap; padding-bottom: 6px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 14px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center; line-height: 1.2;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--gold); color: var(--forest); box-shadow: 0 6px 18px rgba(242, 183, 5, .28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(242, 183, 5, .34); }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-play { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .25); cursor: default; }
.btn-play small { display: block; font-weight: 600; font-size: .78rem; opacity: .85; }
.btn-play span { text-align: left; }
@media (prefers-reduced-motion: reduce) { .btn, .card { transition: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(10, 154, 107, .5) 0%, rgba(10, 154, 107, 0) 60%), var(--forest); /* text stays at 5:1 or better */
  padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px);
}
/* minmax(0, …) lets each column shrink to the screen instead of to its longest line. */
.hero-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.status {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px 6px 10px; max-width: 100%;
  border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  font-size: .9rem; font-weight: 600;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero h1 span { display: block; color: #bff0d9; font-size: .52em; font-weight: 700; letter-spacing: -.01em; margin-top: .35em; }
.free {
  display: inline-block; margin: 4px 0 18px; padding: 8px 18px; border-radius: 999px;
  background: var(--gold); color: var(--forest); font-weight: 900; letter-spacing: .02em; font-size: clamp(1rem, 2.6vw, 1.2rem);
}
.lead { font-size: clamp(1.05rem, 2.3vw, 1.22rem); color: #d7efe4; max-width: 38em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.cta .btn { flex: 1 1 220px; max-width: 320px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: #d7efe4; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--gold); }
.hero-phone { justify-self: center; width: min(320px, 78vw); }

/* Phone mockup (pure CSS frame around a real screenshot). */
.phone {
  position: relative; margin: 0; padding: 10px; border-radius: 42px;
  background: #0b1311; box-shadow: 0 30px 60px rgba(0, 0, 0, .35), inset 0 0 0 2px #26322e;
}
.phone img { border-radius: 33px; width: 100%; background: #fff; }
.phone::before {
  /* A thin speaker slot in the bezel: it never covers the real screenshot. */
  content: ""; position: absolute; top: 3px; left: 50%; width: 16%; height: 4px; transform: translateX(-50%);
  border-radius: 4px; background: #2a3632;
}
.caption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 12px; }
.hero .caption { color: #a9d9c3; }

/* ---------- trust strip ---------- */
.strip { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.strip ul { list-style: none; margin: 0 auto; padding: 18px 20px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.strip li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.strip svg { width: 26px; height: 26px; color: var(--emerald); flex: none; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.soft { background: var(--bg-soft); }
.kicker { display: inline-block; font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--emerald); margin-bottom: 10px; }
@media (prefers-color-scheme: dark) { .kicker { color: #5fd3a5; } }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); list-style: none; padding: 0; margin: 0; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--emerald) 40%, var(--line)); }
}
.card p { color: var(--muted); margin: 0; }
.icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; margin-bottom: 14px;
  background: var(--mint); color: var(--emerald);
}
@media (prefers-color-scheme: dark) { .icon { color: #5fd3a5; } }
.icon svg { width: 24px; height: 24px; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--mint); color: var(--emerald); font-size: .72rem; font-weight: 800; letter-spacing: .03em; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .tag { color: #5fd3a5; } }

/* ---------- gallery ---------- */
.gallery { position: relative; }
.gallery-track {
  list-style: none; margin: 0; padding: 8px 48px 36px 4px; display: grid; grid-auto-flow: column;
  grid-auto-columns: min(240px, 70vw); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: thin;
  /* Soft edge instead of a hard cut where the strip ends; the end padding lets the last phone scroll clear of it. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.gallery-track.scrolled {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.gallery-track li { scroll-snap-align: center; }
.gallery-track figure { margin: 0; }
/* A shadow small enough to fit inside the scrolling strip, so the strip never clips it into a visible box. */
.gallery-track .phone { padding: 8px; border-radius: 34px; box-shadow: 0 10px 18px rgba(0, 0, 0, .22), inset 0 0 0 2px #26322e; }
.gallery-track .phone img { aspect-ratio: 360 / 714; object-fit: cover; object-position: top; }
.spotlight .caption { margin-top: 16px; }
/* Sample-data note and photo credits under the gallery (native <details>, no script). */
.credits { margin-top: 28px; max-width: 820px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 20px; }
.credits summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.credits summary:focus-visible { outline: 3px solid var(--emerald); outline-offset: 4px; border-radius: 6px; }
.credits p, .credits li { color: var(--muted); font-size: .92rem; }
.credit-list { padding-left: 20px; margin: 8px 0 4px; }
.credit-list li { margin: 4px 0; overflow-wrap: anywhere; }
.gallery-track .phone img { border-radius: 27px; }
.gallery-track .phone::before { top: 2px; height: 3px; }
.gallery-track figcaption { margin-top: 12px; text-align: center; font-weight: 700; }
.gallery-track figcaption span { display: block; font-weight: 400; font-size: .88rem; color: var(--muted); }
.gallery-nav { display: none; gap: 10px; justify-content: flex-end; margin-bottom: 10px; }
.js .gallery-nav { display: flex; }
.gallery-nav button {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.gallery-nav button:hover { border-color: var(--emerald); }
.gallery-nav svg { width: 22px; height: 22px; }

/* ---------- spotlight (dashboard) ---------- */
.spotlight { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) { .spotlight { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }
.spotlight .phone { width: min(300px, 76vw); justify-self: center; }
.checks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--emerald); }
@media (prefers-color-scheme: dark) { .checks svg { color: #5fd3a5; } }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.steps li { counter-increment: step; position: relative; padding-top: 60px; }
.steps li::before {
  content: counter(step); position: absolute; top: 20px; left: 22px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--forest); color: #fff; font-weight: 800;
}
@media (prefers-color-scheme: dark) { .steps li::before { background: var(--emerald); } }

/* ---------- two columns, callouts ---------- */
.two { display: grid; gap: 28px; align-items: start; }
@media (min-width: 860px) { .two { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
.callout { border-radius: var(--radius); padding: 24px; background: #fff7d6; color: #3d2c00; border: 1px solid #f3e1a0; }
.callout h3 { color: #3d2c00; }
@media (prefers-color-scheme: dark) { .callout { background: #2b2410; color: #f7e7b5; border-color: #4a3d16; } .callout h3 { color: #f7e7b5; } }
.roadmap { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.roadmap li { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px dashed var(--line); border-radius: 14px; background: var(--card); }
.roadmap svg { width: 22px; height: 22px; color: var(--muted); flex: none; margin-top: 2px; }
.roadmap p { margin: 0; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 10px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 52px 16px 18px; font-weight: 700; position: relative; min-height: 52px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details > div { padding: 0 18px 8px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- support ---------- */
.support { background: var(--forest); color: #e3f4ec; }
.support h2 { color: #fff; }
.support .plain { list-style: none; padding: 0; margin: 18px auto 24px; display: grid; gap: 8px; max-width: 520px; text-align: left; }
.support .plain li { display: flex; gap: 10px; }
.support .plain svg { width: 20px; height: 20px; flex: none; margin-top: 4px; color: var(--gold); }
.support-btn { min-width: min(100%, 280px); }
.support-note { max-width: 560px; margin: 16px auto 0; font-size: .88rem; color: #cfeadf; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 calc(28px + env(safe-area-inset-bottom)); font-size: .92rem; color: var(--muted); }
.foot-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.foot .brand { margin-bottom: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot a { color: var(--muted); }
.foot .foot-contact { flex-direction: column; gap: 6px; margin-top: 12px; }
.foot-contact a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; overflow-wrap: anywhere; }
.foot-contact svg { width: 18px; height: 18px; flex: none; color: var(--emerald); }
@media (prefers-color-scheme: dark) { .foot-contact svg { color: #5fd3a5; } }
.fine { font-size: .82rem; }

/* ---------- documents (privacy, 404) ---------- */
.doc { padding: 40px 0 72px; }
.doc h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.doc h2 { font-size: 1.35rem; margin-top: 1.8em; }
.doc li { margin-bottom: .4em; }
.note { color: var(--muted); font-size: .92rem; }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--mint); margin: 0 0 24px; }

/* ---------- scroll reveal (only with JS, never hides content otherwise) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.pending { opacity: 0; transform: translateY(18px); }
}
