/* Presupusta home (ES + CA). Generated markup: tools/presupusta/build.mjs. Builds on styles.css tokens. */

:root {
  --navy: #071a3d;
  --navy-2: #0a2a63;
  --glow: rgba(253, 118, 26, .35);
}

.hx-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.hx-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 14px;
}
.hx-h2 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; letter-spacing: -0.025em; }
.hx-lead { margin-top: 14px; color: var(--on-surface-variant); font-size: clamp(16px, 1.8vw, 18px); max-width: 620px; }
.hx-center { text-align: center; }
.hx-center .hx-lead { margin-left: auto; margin-right: auto; }
.hx-section { padding: clamp(64px, 9vw, 112px) 0; }

/* ============================ HERO ============================ */
.hx-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 520px at 85% 10%, rgba(253,118,26,.28), transparent 60%),
    radial-gradient(1000px 600px at 10% 110%, rgba(33,112,228,.55), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 45%, #0058BE 100%);
  padding: clamp(48px, 7vw, 96px) 0 clamp(120px, 14vw, 180px);
}
.hx-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.hx-hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(24px, 5vw, 64px); align-items: center;
}
.hx-hero .platforms { margin-bottom: 22px; }
.hx-hero .pill { background: rgba(255,255,255,.12); color: #fff; backdrop-filter: blur(6px); }
.hx-hero .platforms .lang-switch { color: #cfe0ff !important; background: none; padding: 0 4px; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hx-hero h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; }
.hx-hero h1 span { display: block; color: #ffb27a; }
.hx-hero__lead { margin-top: 22px; font-size: clamp(17px, 2vw, 21px); color: #d6e3ff; max-width: 520px; }
.hx-hero .store-note { color: #a9c2f2; }
.hx-hero .store-badge:hover { box-shadow: 0 10px 30px rgba(0,0,0,.35); }

.hx-stage { position: relative; height: clamp(420px, 52vw, 600px); }
.hx-phone {
  position: absolute; margin: 0; width: clamp(150px, 19vw, 250px);
  padding: 7px; border-radius: 36px; background: #0b1326;
  box-shadow: 0 0 0 1.5px #3b4a6b inset, 0 40px 80px rgba(2,10,30,.55), 0 8px 24px rgba(2,10,30,.4);
}
.hx-phone img { width: 100%; height: auto; display: block; border-radius: 29px; }
.hx-phone--c { left: 50%; top: 0; transform: translateX(-50%); z-index: 3; width: clamp(170px, 22vw, 290px); animation: hx-float 7s ease-in-out infinite; }
.hx-phone--l { left: 2%; top: 9%; transform: rotate(-9deg); z-index: 2; animation: hx-float-l 8s ease-in-out infinite; }
.hx-phone--r { right: 2%; top: 13%; transform: rotate(8deg); z-index: 2; animation: hx-float-r 9s ease-in-out infinite; }
@keyframes hx-float { 50% { transform: translateX(-50%) translateY(-12px); } }
@keyframes hx-float-l { 50% { transform: rotate(-9deg) translateY(-8px); } }
@keyframes hx-float-r { 50% { transform: rotate(8deg) translateY(-10px); } }

.hx-chip {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--on-surface); border-radius: 14px; padding: 10px 14px;
  font-size: 13px; font-weight: 700; box-shadow: 0 16px 40px rgba(2,10,30,.35);
}
.hx-chip small { display: block; font-weight: 500; color: var(--outline); font-size: 11px; }
.hx-chip__dot { width: 30px; height: 30px; border-radius: 50%; background: rgba(31,166,113,.14); display: grid; place-items: center; color: var(--tertiary); }
.hx-chip--a { left: -4%; bottom: 6%; animation: hx-bob 6s ease-in-out infinite; }
.hx-chip--b { right: -3%; top: 50%; animation: hx-bob 7s ease-in-out -2s infinite; }
@keyframes hx-bob { 50% { transform: translateY(-9px); } }

/* ============================ PROOF STRIP ============================ */
.hx-proof { position: relative; z-index: 5; margin-top: -72px; }
.hx-proof__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: #fff; border-radius: 22px; box-shadow: 0 24px 60px rgba(17,28,45,.16);
  border: 1px solid var(--outline-variant); overflow: hidden;
}
.hx-proof__item { padding: 26px 22px; text-align: center; border-right: 1px solid var(--surface-container); }
.hx-proof__item:last-child { border-right: 0; }
.hx-proof__num { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; color: var(--primary); line-height: 1; }
.hx-proof__txt { margin-top: 8px; font-size: 14px; color: var(--on-surface-variant); }

/* ============================ HOW ============================ */
.hx-steps { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; position: relative; }
.hx-step { position: relative; background: #fff; border: 1px solid var(--outline-variant); border-radius: 20px; padding: 26px 22px; box-shadow: var(--shadow-sm); }
.hx-step__n {
  width: 40px; height: 40px; border-radius: 50%; background: var(--secondary); color: #fff; font-weight: 800;
  display: grid; place-items: center; margin-bottom: 16px; box-shadow: 0 8px 20px var(--glow);
}
.hx-step h3 { font-size: 18px; font-weight: 700; }
.hx-step p { margin-top: 6px; font-size: 14.5px; color: var(--on-surface-variant); }

/* ============================ SHOWCASE ============================ */
.hx-show { overflow: hidden; }
.hx-show:nth-of-type(odd) { background: var(--surface-low); }
.hx-show__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 96px); align-items: center; }
.hx-show--rev .hx-show__art { order: -1; }
.hx-show__copy .hx-lead { max-width: 520px; }
.hx-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.hx-list li { position: relative; padding-left: 34px; color: var(--on-surface-variant); font-size: 16px; }
.hx-list li strong { color: var(--on-surface); font-weight: 650; }
.hx-list li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(31,166,113,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231FA671' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/13px no-repeat;
}
.hx-tag {
  display: inline-block; vertical-align: 2px; margin-left: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 6px; background: var(--secondary); color: #fff;
}
.hx-show__art { position: relative; display: flex; justify-content: center; padding: 20px 0; }
.hx-show__art::before {
  content: ""; position: absolute; width: min(460px, 90%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(33,112,228,.28), rgba(33,112,228,.04) 70%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.hx-show__art .hx-phone { position: relative; width: clamp(220px, 28vw, 290px); }

.hx-doc {
  position: relative; width: min(100%, 560px); background: #fff; border-radius: 14px; padding: 8px;
  box-shadow: 0 40px 80px rgba(17,28,45,.22), 0 0 0 1px rgba(17,28,45,.06);
}
.hx-doc img { width: 100%; height: auto; border-radius: 8px; }
.hx-doc__pill {
  position: absolute; top: -14px; left: 22px; background: var(--secondary); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .05em; padding: 6px 12px; border-radius: 999px; box-shadow: 0 10px 24px var(--glow);
}
.hx-swatches { position: absolute; right: -10px; bottom: -22px; display: flex; gap: 8px; background: #fff; padding: 10px 12px; border-radius: 999px; box-shadow: var(--shadow-md); }
.hx-swatches i { width: 22px; height: 22px; border-radius: 50%; display: block; }

/* ============================ FEATURE GRID ============================ */
.hx-feats { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hx-feats::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 400px at 90% 0%, rgba(33,112,228,.35), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(253,118,26,.18), transparent 60%);
}
.hx-feats .hx-wrap { position: relative; }
.hx-feats .hx-eyebrow { color: #ffb27a; }
.hx-feats .hx-lead { color: #b9cdf3; }
.hx-legend { margin-top: 22px; display: flex; gap: 18px; justify-content: center; font-size: 13px; color: #b9cdf3; }
.hx-legend span { display: inline-flex; align-items: center; gap: 8px; }
.hx-legend i { width: 10px; height: 10px; border-radius: 50%; display: block; background: var(--tertiary); }
.hx-legend i.pro { background: var(--secondary); }
.hx-fgrid { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hx-f {
  position: relative; border-radius: 18px; padding: 24px 20px 22px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  transition: transform .2s, background .2s, border-color .2s;
}
.hx-f:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); }
.hx-f__ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #9ec3ff; margin-bottom: 16px; }
.hx-f--pro .hx-f__ic { background: rgba(253,118,26,.18); color: #ffb27a; }
.hx-f h3 { font-size: 16.5px; font-weight: 700; }
.hx-f p { margin-top: 6px; font-size: 14px; color: #b9cdf3; }
.hx-f__b { position: absolute; top: 16px; right: 16px; font-size: 10px; font-weight: 800; letter-spacing: .07em; padding: 3px 8px; border-radius: 999px; background: rgba(31,166,113,.2); color: #6fe0b0; }
.hx-f--pro .hx-f__b { background: var(--secondary); color: #fff; }

/* ============================ COMPARE + PRICING ============================ */
.hx-compare { margin: 44px auto 0; max-width: 860px; background: #fff; border: 1px solid var(--outline-variant); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
.hx-compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hx-compare th, .hx-compare td { padding: 15px 18px; text-align: center; border-bottom: 1px solid var(--surface-container); }
.hx-compare th:first-child, .hx-compare td:first-child { text-align: left; font-weight: 600; }
.hx-compare thead th { background: var(--surface-low); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--on-surface-variant); }
.hx-compare thead th.pro { background: var(--secondary); color: #fff; }
.hx-compare td.pro { background: rgba(253,118,26,.05); font-weight: 600; }
.hx-compare tr:last-child td { border-bottom: 0; }
.hx-yes { color: var(--tertiary); font-weight: 800; }
.hx-no { color: var(--outline-variant); }
.hx-compare .sub { display: block; font-weight: 400; font-size: 12.5px; color: var(--outline); }
.hx-pricing { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 860px; margin-left: auto; margin-right: auto; }
.hx-plan { position: relative; background: #fff; border: 1px solid var(--outline-variant); border-radius: 20px; padding: 28px 24px; text-align: center; }
.hx-plan--feat { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 20px 50px rgba(0,88,190,.18); transform: translateY(-8px); }
.hx-plan__badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.hx-plan__name { font-size: 15px; font-weight: 700; color: var(--on-surface-variant); }
.hx-plan__price { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 4px; }
.hx-plan__price span { font-size: 15px; font-weight: 500; color: var(--outline); letter-spacing: 0; }
.hx-plan__note { font-size: 13.5px; color: var(--on-surface-variant); }
.hx-fine { margin: 26px auto 0; max-width: 700px; text-align: center; font-size: 12.5px; color: var(--outline); }

/* ============================ FAQ ============================ */
.hx-faq { max-width: 780px; margin: 40px auto 0; display: grid; gap: 12px; }
.hx-faq details { background: #fff; border: 1px solid var(--outline-variant); border-radius: 16px; padding: 4px 22px; transition: box-shadow .2s; }
.hx-faq details[open] { box-shadow: var(--shadow-sm); border-color: var(--primary); }
.hx-faq summary { cursor: pointer; list-style: none; font-weight: 650; font-size: 16.5px; padding: 18px 28px 18px 0; position: relative; }
.hx-faq summary::-webkit-details-marker { display: none; }
.hx-faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--primary); font-weight: 400; transition: transform .2s; }
.hx-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.hx-faq p { padding: 0 0 20px; color: var(--on-surface-variant); font-size: 15.5px; }
.hx-faq a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ============================ FINAL CTA ============================ */
.hx-cta {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  padding: clamp(64px, 9vw, 110px) clamp(16px, 4vw, 40px);
  background: radial-gradient(700px 360px at 50% 120%, rgba(253,118,26,.4), transparent 60%), linear-gradient(135deg, var(--navy), #0058BE);
}
.hx-cta h2 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; letter-spacing: -0.03em; max-width: 780px; margin: 0 auto; }
.hx-cta p { margin: 16px auto 0; color: #cfe0ff; font-size: 17px; max-width: 520px; }
.hx-cta .store-badges { justify-content: center; margin-top: 34px; }

/* ============================ REVEAL ============================ */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv.d1 { transition-delay: .08s; } .js .rv.d2 { transition-delay: .16s; } .js .rv.d3 { transition-delay: .24s; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 960px) {
  .hx-hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hx-hero__copy { display: flex; flex-direction: column; align-items: center; }
  .hx-hero .store-badges { justify-content: center; }
  .hx-stage { height: clamp(300px, 74vw, 470px); order: 2; margin-top: 8px; }
  .hx-phone { width: clamp(130px, 30vw, 210px); }
  .hx-phone--c { width: clamp(150px, 36vw, 250px); }
  .hx-show__inner { grid-template-columns: 1fr; text-align: left; }
  .hx-show--rev .hx-show__art { order: 0; }
  .hx-show__art { margin-top: 12px; }
  .hx-fgrid { grid-template-columns: repeat(2, 1fr); }
  .hx-steps { grid-template-columns: repeat(2, 1fr); }
  .hx-proof__grid { grid-template-columns: repeat(2, 1fr); }
  .hx-proof__item:nth-child(2) { border-right: 0; }
  .hx-proof__item:nth-child(-n+2) { border-bottom: 1px solid var(--surface-container); }
}
@media (max-width: 640px) {
  .hx-fgrid, .hx-steps { grid-template-columns: 1fr; }
  .hx-pricing { grid-template-columns: 1fr; }
  .hx-plan--feat { transform: none; }
  .hx-chip { display: none; }
  .hx-compare th, .hx-compare td { padding: 12px 10px; font-size: 13.5px; }
  .hx-swatches { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-phone, .hx-chip { animation: none !important; }
  .js .rv { opacity: 1; transform: none; transition: none; }
}

/* two phones overlapped (pairs of captures) */
.hx-phones { position: relative; display: flex; justify-content: center; }
.hx-phones .hx-phone { position: relative; width: clamp(150px, 20vw, 220px); }
.hx-phones .hx-phone:first-child { transform: translateX(8%) rotate(-3deg); z-index: 1; }
.hx-phones .hx-phone--b { transform: translateX(-8%) translateY(7%) rotate(3deg); z-index: 2; }
.hx-show__art .hx-phones .hx-phone { width: clamp(150px, 20vw, 220px); }
@media (max-width: 640px) { .hx-phones .hx-phone { width: 42vw; } }
