/*
 * The app's visual language, not an imitation of it.
 *
 * Same tokens, same mesh, same orb, same Space Grotesk as
 * app.ciceapp.com — copied from src/styles/global.css and GlassMesh.tsx
 * rather than eyeballed. A landing that is nearly the product reads as a
 * different company; one that is exactly the product reads as a company that
 * pays attention.
 */

:root {
  --bg: #fefcf9;
  --text: #1a1a2e;
  --text-secondary: #555565;
  --text-muted: #a0a0aa;
  --border: rgba(0,0,0,.06);
  --accent: #8f22ef;
  --accent-2: #ff4470;
  --radius: 18px;
  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ═══ The mesh, lifted from GlassMesh ═══════════════════════════════ */
.mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden; background: var(--bg);
}
.mesh-blobs { position: absolute; inset: -12%; filter: blur(46px); opacity: .72; }
.mesh-blobs span { position: absolute; border-radius: 50%; }
.m1 { width: 58%; height: 44%; top: -4%;   right: -8%; background: rgba(255,122,92,.5);  animation: d1 17s ease-in-out infinite; }
.m2 { width: 62%; height: 48%; bottom: 2%; left: -10%; background: rgba(120,110,255,.46); animation: d2 21s ease-in-out infinite; }
.m3 { width: 46%; height: 36%; top: 30%;   left: 6%;   background: rgba(238,80,180,.36); animation: d3 19s ease-in-out infinite; }
.m4 { width: 40%; height: 32%; bottom: 12%; right: 2%; background: rgba(90,214,180,.3);  animation: d4 23s ease-in-out infinite; }
@keyframes d1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-26px,32px) scale(1.09)} }
@keyframes d2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(30px,-26px) scale(1.07)} }
@keyframes d3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(22px,-30px) scale(1.12)} }
@keyframes d4 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-24px,18px) scale(.9)} }
@media (prefers-reduced-motion: reduce) { .mesh-blobs span { animation: none; } }

/*
 * Stop everything while the tab is in the background.
 *
 * Browsers throttle timers in hidden tabs but keep compositing CSS animations,
 * so four blobs drifting inside a full-viewport blur kept the GPU busy for a
 * page nobody had on screen. `is-away` is set from main.js on visibilitychange.
 */
body.is-away .mesh-blobs span,
body.is-away .orb-body,
body.is-away .orb-eyes,
body.is-away .caret { animation-play-state: paused; }

main, .nav, .foot { position: relative; z-index: 1; }

/* ═══ Nav ═══════════════════════════════════════════════════════════ */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; max-width: var(--wrap); margin: 0 auto;
  padding: 22px 24px;
}
.nav-brand { display: block; color: var(--text); }
.nav-logo { width: 92px; height: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 9px 17px; border-radius: 999px;
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 3px 14px rgba(23,25,60,.07);
  color: var(--text) !important; font-weight: 600 !important;
}
@media (max-width: 620px) {
  .nav { padding: 16px; }
  /* The two section links go; the action stays. A nav that wraps to two lines
     on a phone is a nav nobody reads. */
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ═══ Hero ══════════════════════════════════════════════════════════ */
.hero {
  max-width: 780px; margin: 0 auto;
  padding: 26px 24px 90px; text-align: center;
}
.hero-orb { display: flex; justify-content: center; }
.orb { width: clamp(190px, 42vw, 290px); height: auto; display: block; }
.orb-floor { fill: rgba(23,25,60,.09); }
.orb-body {
  transform-box: view-box; transform-origin: 150px 250px;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { transform: translate(0,0) scale(1) skewX(0deg); }
  30%     { transform: translate(-3px,4px) scale(1.035) skewX(-1.6deg); }
  65%     { transform: translate(4px,-3px) scale(.972) skewX(1.9deg); }
}
.orb-eyes { animation: blink 6.5s infinite; transform-box: view-box; transform-origin: 150px 152px; }
@keyframes blink { 0%,94%,100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .orb-body, .orb-eyes { animation: none; } }

/* What CICE says on arrival. Two lines of room so the layout does not jump
   as the sentences swap. */
.hero-says {
  /* Block, not flex. As a flex container the caret became a sibling BOX of the
     text and drifted to its own line whenever the sentence wrapped — it has to
     flow inside the sentence, which is what inline content does. */
  min-height: 3.1em; margin: 14px auto 6px; max-width: 34ch;
  display: block; text-align: center;
  font-size: clamp(15px, 3.6vw, 18px); line-height: 1.5;
  font-weight: 500; color: var(--text-secondary);
}
.hero-says .caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 3px;
  background: var(--accent); vertical-align: text-bottom;
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.hero-h1 {
  margin: 6px 0 16px;
  font-size: clamp(38px, 9vw, 68px); line-height: 1.03;
  font-weight: 700; letter-spacing: -2.4px;
}
.hero-h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #8f22ef, #dc2bbd 46%, #ff4470);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede {
  margin: 0 auto 30px; max-width: 52ch;
  font-size: clamp(15.5px, 3.7vw, 18.5px); line-height: 1.6;
  color: var(--text-secondary);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.hero-facts {
  list-style: none; margin: 44px 0 0; padding: 0;
  display: grid; gap: 12px; text-align: left;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}
.hero-facts li {
  padding: 15px 17px; border-radius: 15px;
  background: rgba(255,255,255,.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.85);
  font-size: 13.5px; line-height: 1.5; color: var(--text-secondary);
}
.hero-facts strong { color: var(--text); font-weight: 600; }

/* ═══ Buttons ═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px;
  font-size: 14.5px; font-weight: 700; text-decoration: none;
  cursor: pointer; transition: transform .16s cubic-bezier(.34,1.56,.64,1);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, #8f22ef, #dc2bbd 55%, #ff4470);
  box-shadow: 0 8px 26px rgba(143,34,239,.28);
}
.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,.7);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.95);
}
.btn-lg { padding: 17px 34px; font-size: 15.5px; }

/* ═══ Sections ══════════════════════════════════════════════════════ */
.sec { max-width: var(--wrap); margin: 0 auto; padding: 76px 24px; }

/*
 * Do not render what nobody is looking at.
 *
 * Every card below carries a backdrop-filter, and a backdrop-filter re-samples
 * and re-blurs whatever sits behind it on every single frame — over a mesh that
 * is itself animating, so nothing can ever be cached. Seven of those cards live
 * past the fold, and without this they were being blurred continuously from the
 * moment the page loaded, for a visitor still reading the headline.
 *
 * The `auto` in contain-intrinsic-size makes the browser remember each section's
 * real height after it has been rendered once, so the scrollbar never jumps.
 * Those sizes describe the CONTENT box, so they are the measured heights minus
 * the 152px of vertical padding .sec carries — pass the border-box height and
 * every unrendered section reserves 152px too much.
 * Nothing here changes a single pixel of the result.
 *
 * The footer is deliberately left out. content-visibility brings layout
 * containment with it, and that stops its children's margins from collapsing
 * through — the footer grew by 100px, measured. It holds one card out of the
 * twelve, so it is not worth a pixel of change.
 */
.sec     { content-visibility: auto; }
#como    { contain-intrinsic-size: auto 580px; }
#precios { contain-intrinsic-size: auto 940px; }
#probar  { contain-intrinsic-size: auto 288px; }
.kicker {
  margin: 0 0 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 2.4px;
  text-transform: uppercase; color: var(--text-muted);
}
.sec h2 {
  margin: 0 0 14px;
  font-size: clamp(27px, 5.6vw, 42px); line-height: 1.1;
  font-weight: 700; letter-spacing: -1.3px;
}
.sec-lede {
  margin: 0 0 34px; max-width: 56ch;
  font-size: 16px; line-height: 1.6; color: var(--text-secondary);
}

/* ═══ Steps ═════════════════════════════════════════════════════════ */
.steps {
  display: grid; gap: 16px; margin-top: 34px;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}
.step {
  padding: 26px 24px 28px; border-radius: var(--radius);
  background: rgba(255,255,255,.66);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 6px 26px rgba(23,25,60,.06);
}
.step-n {
  display: block; margin-bottom: 14px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.6px;
  background: linear-gradient(100deg, #8f22ef, #ff4470);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { margin: 0 0 9px; font-size: 18px; font-weight: 700; letter-spacing: -.5px; }
.step p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-secondary); }

/* ═══ Plans ═════════════════════════════════════════════════════════ */
.plans {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  align-items: start;
}
.plan {
  position: relative;
  padding: 28px 24px 30px; border-radius: var(--radius);
  background: rgba(255,255,255,.66);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 6px 26px rgba(23,25,60,.06);
}
/* The middle one carries the weight, because it is the one that is the whole
   product. Nothing else on the page uses this treatment. */
.plan.is-star {
  background: rgba(255,255,255,.9);
  border-color: rgba(143,34,239,.28);
  box-shadow: 0 14px 44px rgba(143,34,239,.16);
}
.plan-badge {
  position: absolute; top: -11px; left: 24px;
  padding: 5px 12px; border-radius: 999px; color: #fff;
  background: linear-gradient(110deg, #8f22ef, #ff4470);
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
}
.plan h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: -.4px; }
.plan-price { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -1.6px; }
.plan-price small { font-size: 14px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan-tag { margin: 6px 0 18px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li {
  position: relative; padding-left: 22px;
  font-size: 14px; line-height: 1.5; color: var(--text-secondary);
}
.plan li::before {
  content: ""; position: absolute; left: 2px; top: .48em;
  width: 9px; height: 5px; border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.plan li strong { color: var(--text); font-weight: 600; }
.plan li.off { color: var(--text-muted); }
.plan li.off::before {
  border: none; width: 9px; height: 2px; top: .72em;
  background: var(--text-muted); transform: none;
}
.plans-note { margin: 22px 0 0; font-size: 12.5px; color: var(--text-muted); }

/* ═══ Try ═══════════════════════════════════════════════════════════ */
.sec-try { text-align: center; }
.sec-try .sec-lede { margin-left: auto; margin-right: auto; }
.try { display: flex; justify-content: center; }
.stores {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  margin-top: 26px;
}
.store {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 20px; border-radius: 14px;
  border: 1px dashed rgba(23,25,60,.16);
  font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
}
.store svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
/* Honest rather than aspirational: the stores are not live, and a dead badge
   that looks live is the first thing a visitor tries and the first
   disappointment. */
.store.is-soon { opacity: .68; }
.store em {
  font-style: normal; font-size: 10px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted);
}

/* ═══ Footer ════════════════════════════════════════════════════════ */
.foot {
  margin-top: 40px; padding: 54px 24px 40px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.5);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.foot-in {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; gap: 38px;
  grid-template-columns: minmax(220px, 1fr) 2fr;
}
.foot-logo { width: 84px; height: auto; display: block; color: var(--text); }
.foot-by { margin: 14px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }
.foot-by strong { color: var(--text-secondary); font-weight: 600; }
.foot-links {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.foot-h {
  margin: 0 0 12px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--text-muted);
}
.foot-links a {
  display: block; margin-bottom: 9px;
  font-size: 13.5px; color: var(--text-secondary); text-decoration: none;
}
.foot-links a:hover { color: var(--text); text-decoration: underline; }
.foot-legal {
  max-width: var(--wrap); margin: 40px auto 0;
  font-size: 11.5px; color: var(--text-muted);
}
@media (max-width: 720px) {
  .foot-in { grid-template-columns: 1fr; gap: 30px; }
}
