/* FreelaPRO landing. Tokens mirror src/index.css (light theme) so the page
   and the app feel like one product. Mobile first: base styles target ~375px,
   then tablet (768px) and desktop (1080px) layers. */

:root {
  --background: hsl(0 0% 99%);
  --foreground: hsl(220 20% 10%);
  --card: hsl(0 0% 100%);
  --primary: hsl(217 91% 50%);
  --primary-hover: hsl(217 91% 44%);
  --primary-deep: hsl(217 91% 22%);
  --secondary: hsl(220 14% 96%);
  --muted-foreground: hsl(220 10% 42%);
  --accent: hsl(217 91% 96%);
  --accent-foreground: hsl(217 91% 40%);
  --border: hsl(220 14% 90%);
  --success: hsl(142 71% 45%);
  --warning: hsl(38 92% 50%);
  --critical: hsl(0 85% 58%);
  --high: hsl(24 92% 52%);
  --medium: hsl(45 93% 47%);
  --low: hsl(220 9% 46%);
  --col-gray: hsl(220 10% 70%);
  --col-blue: hsl(217 70% 55%);
  --col-green: hsl(152 69% 45%);

  --radius: 0.625rem;
  --shadow-sm: 0 1px 2px hsl(220 20% 10% / 0.05);
  --shadow: 0 1px 3px hsl(220 20% 10% / 0.06), 0 8px 24px -8px hsl(220 20% 10% / 0.1);
  --shadow-lg: 0 24px 60px -20px hsl(217 91% 30% / 0.35);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.025em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid hsl(217 91% 50% / 0.45); outline-offset: 2px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 8px; background: var(--primary); color: #fff;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 760px; }
.center { display: flex; justify-content: center; margin-top: 36px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--primary); color: #fff;
  font: 600 16px/1.2 var(--font); text-decoration: none; text-align: center;
  box-shadow: 0 1px 2px hsl(217 91% 30% / 0.3), inset 0 1px 0 hsl(0 0% 100% / 0.15);
  transition: background .15s, transform .15s, box-shadow .15s;
  cursor: pointer;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn span { transition: transform .15s; }
.btn:hover span { transform: translateX(3px); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: 17px; }
.btn--block { width: 100%; }
.btn--ghost { background: var(--card); color: var(--foreground); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { background: var(--secondary); }
.btn--light { background: #fff; color: var(--primary-deep); box-shadow: 0 10px 30px -10px hsl(220 60% 5% / 0.5); }
.btn--light:hover { background: hsl(217 91% 97%); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: hsl(0 0% 99% / 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav__links { display: none; }
.nav__cta { display: flex; align-items: center; gap: 14px; }
.link-muted { display: none; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--muted-foreground); }
.link-muted:hover { color: var(--foreground); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand b { color: var(--primary); font-weight: 800; }
.brand--sm { font-size: 16px; }
.brand--sm img { width: 24px; height: 24px; border-radius: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 44px 0 0;
  background:
    radial-gradient(70% 45% at 50% 0%, hsl(217 91% 50% / 0.13), transparent 70%);
}
.hero__copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--card); color: var(--accent-foreground);
  border: 1px solid hsl(217 91% 50% / 0.18);
  font-size: 13px; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px hsl(217 91% 50% / 0.18); }
.hero h1 { margin-top: 20px; max-width: 15ch; font-size: clamp(2.4rem, 11vw, 4.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04; }
.hl { color: var(--primary); }
.lead { margin-top: 20px; font-size: 17px; color: var(--muted-foreground); max-width: 36rem; }
.hero__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; width: 100%; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 20px; font-size: 14px; color: var(--muted-foreground); font-weight: 500; }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust svg, .guarantees svg { width: 16px; height: 16px; fill: none; stroke: var(--success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Product preview */
.app {
  margin: 44px auto 0; max-width: 1040px;
  border-radius: 16px 16px 0 0; background: var(--card);
  border: 1px solid var(--border); border-bottom: 0;
  box-shadow: 0 -2px 0 hsl(0 0% 100%), 0 30px 80px -24px hsl(217 91% 30% / 0.35);
  overflow: hidden;
}
.app__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--secondary); }
.app__bar i { width: 9px; height: 9px; border-radius: 50%; background: hsl(220 14% 82%); }
.app__bar span { margin-left: 10px; font-size: 11px; color: var(--muted-foreground); background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 2px 10px; }
.app__body { display: grid; grid-template-columns: 1fr; }
.app__side { display: none; }
.app__main { padding: 16px; display: grid; gap: 14px; background: hsl(220 20% 98.5%); text-align: left; }
.app__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app__head b { display: block; font-size: 15px; }
.app__head small { font-size: 11.5px; color: var(--muted-foreground); }
.app__btn { flex: none; padding: 7px 12px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); display: grid; gap: 2px; }
.kpi small { font-size: 11px; color: var(--muted-foreground); font-weight: 600; }
.kpi b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 11px; color: var(--muted-foreground); }
.kpi em.up { color: hsl(142 71% 32%); font-weight: 600; }
.kpi--hide-sm { display: none; }
.bar { height: 5px; border-radius: 999px; background: var(--secondary); margin-top: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--success); border-radius: inherit; }
.list { padding: 6px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.list__title { font-size: 12px; font-weight: 700; padding: 6px 0; }
.row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "tag name money" "tag client money"; column-gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); }
.row .tag { grid-area: tag; }
.row b { grid-area: name; font-size: 13px; line-height: 1.25; font-weight: 700; min-width: 0; }
.row small { grid-area: client; font-size: 11px; color: var(--muted-foreground); }
.row .money { grid-area: money; font-size: 12.5px; font-weight: 700; }
.tag { justify-self: start; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; min-width: 54px; text-align: center; }
.tag--crit { background: var(--critical); } .tag--high { background: var(--high); } .tag--low { background: var(--low); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--tint { background: hsl(220 20% 97%); border-block: 1px solid hsl(220 14% 93%); }
.head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.head h2, .calc h2 { font-size: clamp(1.7rem, 6vw, 2.5rem); font-weight: 800; }
.sub { margin-top: 14px; color: var(--muted-foreground); font-size: 16.5px; }

/* Pains */
.pains { display: grid; gap: 14px; }
.pain { padding: 22px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.pain__emoji { font-size: 26px; line-height: 1; }
.pain h3 { margin-top: 12px; font-size: 18px; font-weight: 700; }
.pain p { margin-top: 8px; color: var(--muted-foreground); font-size: 15px; }

/* Features */
.features { display: grid; gap: 16px; }
.feature { padding: 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); }
.feature__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin-top: 16px; font-size: 19px; font-weight: 700; }
.feature > p { margin-top: 8px; color: var(--muted-foreground); font-size: 15px; }
.feature .ticks { margin-top: 14px; }

.ticks { display: grid; gap: 8px; font-size: 14.5px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B64F3' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.extras { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.extras > p { font-weight: 700; font-size: 14px; color: var(--muted-foreground); }
.extras ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.extras li { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; }

/* Steps */
.steps { display: grid; gap: 14px; counter-reset: s; }
.steps li { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.steps__n { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; font-size: 17px; }
.steps h3 { font-size: 17px; font-weight: 700; }
.steps p { margin-top: 4px; color: var(--muted-foreground); font-size: 15px; }

/* Calculator */
.calc { display: grid; gap: 28px; align-items: center; }
.calc__copy { text-align: center; }
.calc__box { padding: 24px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; gap: 22px; }
.field { display: grid; gap: 10px; font-weight: 600; font-size: 15px; }
.field span { display: flex; justify-content: space-between; gap: 12px; }
.field output { color: var(--primary); font-weight: 800; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(var(--primary), var(--primary)) 0 / var(--fill, 50%) 100% no-repeat, var(--secondary); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--secondary); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--primary); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-shadow: var(--shadow); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-shadow: var(--shadow); }
.calc__result { padding: 18px; border-radius: 14px; background: var(--accent); text-align: center; }
.calc__result > p:first-child { font-size: 14px; font-weight: 600; color: var(--accent-foreground); }
.calc__result strong { display: block; margin: 4px 0 8px; font-size: clamp(2rem, 9vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; color: var(--primary-deep); font-variant-numeric: tabular-nums; }
.calc__compare { font-size: 14px; color: var(--muted-foreground); }
.calc__compare b { color: var(--foreground); }

/* Pricing */
.cycle { display: flex; width: max-content; max-width: 100%; margin: 0 auto 28px; padding: 4px; gap: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.cycle button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; font: 600 14.5px var(--font); color: var(--muted-foreground); cursor: pointer; transition: background .15s, color .15s; }
.cycle button[aria-checked=true] { background: var(--foreground); color: #fff; }
.save { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: hsl(142 71% 45% / 0.16); color: hsl(142 71% 30%); }
.cycle button[aria-checked=true] .save { background: hsl(142 71% 45%); color: #fff; }

.plans { display: grid; gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 26px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.plan h3 { font-size: 20px; font-weight: 800; }
.plan__for { margin-top: 6px; font-size: 14px; color: var(--muted-foreground); min-height: 2.6em; }
.price { display: flex; align-items: baseline; gap: 4px; margin-top: 18px; }
.price__cur { font-size: 16px; font-weight: 700; color: var(--muted-foreground); }
.price__val { font-size: 40px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.price__per { font-size: 15px; font-weight: 600; color: var(--muted-foreground); }
.price__note { margin: 6px 0 20px; font-size: 13px; color: var(--muted-foreground); min-height: 1.5em; }
.plan .ticks { margin-top: 22px; }
.plan--featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
/* Below desktop the paid plans come first; Free closes the list as the safety net. */
.plan--free { order: 1; }
.plan__badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }

.guarantees { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 28px; font-size: 14px; font-weight: 600; color: var(--muted-foreground); }
.guarantees li { display: inline-flex; align-items: center; gap: 8px; }
.guarantees svg { stroke-width: 2.2; stroke: var(--primary); width: 18px; height: 18px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 14px; background: var(--card); border: 1px solid var(--border); transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
/* The "+" is drawn with two bars so it sits exactly in the circle's center, whatever the font metrics. */
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background:
    linear-gradient(var(--primary), var(--primary)) center / 12px 2px no-repeat,
    linear-gradient(var(--primary), var(--primary)) center / 2px 12px no-repeat,
    var(--accent);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 20px; color: var(--muted-foreground); font-size: 15px; }

/* Final CTA */
.final {
  padding: 72px 0; color: #fff; text-align: center;
  background:
    radial-gradient(60% 80% at 50% 0%, hsl(217 91% 60% / 0.55), transparent 70%),
    linear-gradient(160deg, hsl(217 91% 45%), var(--primary-deep));
}
.final__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.final h2 { font-size: clamp(1.8rem, 7vw, 2.8rem); font-weight: 800; max-width: 18ch; }
.final p { color: hsl(217 91% 92%); max-width: 32rem; }
.final .btn { margin-top: 8px; }
.final__micro { font-size: 13.5px; }

/* Footer */
.footer { padding: 32px 0 calc(96px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); font-size: 14px; color: var(--muted-foreground); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer .brand { color: var(--foreground); }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--foreground); }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 14px;
  background: hsl(220 20% 10% / 0.94); color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px -12px hsl(220 40% 5% / 0.6);
  transform: translateY(140%); transition: transform .3s ease;
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta b { display: block; font-size: 15px; }
.sticky-cta small { font-size: 12px; color: hsl(220 14% 75%); }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .hero__actions { flex-direction: row; justify-content: center; }
  .hero h1 { max-width: none; font-size: clamp(3rem, 7.4vw, 4.6rem); }
  .hl { display: block; }
  .kpi--hide-sm { display: grid; }
  .link-muted { display: inline; }
  .pains { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .footer { padding-bottom: 32px; }
}

@media (min-width: 768px) {
  .hero { padding: 64px 0 0; }
  .app__body { grid-template-columns: 180px 1fr; }
  .app__side { display: grid; align-content: start; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--border); background: hsl(220 20% 98%); text-align: left; }
  .app__logo { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; padding: 2px 8px 12px; }
  .app__logo img { border-radius: 5px; }
  .app__logo b { color: var(--primary); }
  .app__nav { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted-foreground); }
  .app__nav span { width: 14px; height: 14px; border-radius: 4px; border: 2px solid currentColor; opacity: .55; }
  .app__nav.is-active { background: var(--accent); color: var(--accent-foreground); }
  .app__main { padding: 22px; gap: 16px; }
  .section { padding: 88px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; }
  .calc__box { max-width: 560px; margin: 0 auto; width: 100%; }
  .sticky-cta { display: none; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1080px) {
  .nav__links { display: flex; gap: 28px; }
  .nav__links a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted-foreground); }
  .nav__links a:hover { color: var(--foreground); }
  .hero { padding: 80px 0 0; }
  .app { margin-top: 56px; }
  .app__body { grid-template-columns: 200px 1fr; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lead { font-size: 18.5px; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .feature { padding: 30px; }
  .calc { grid-template-columns: 1fr 1fr; gap: 56px; }
  .calc__copy { text-align: left; }
  .calc__box { margin: 0; }
  .plans { grid-template-columns: repeat(4, 1fr); }
  .plan--free { order: 0; }
  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .plan--featured { transform: translateY(-8px); }
}

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