/* =========================
   Design tokens
   ========================= */
:root{
  --brand: #353A7A;
  --accent: #F37021;

  --text: #0b1220;
  --muted: #5A628F;

  --surface: #ffffff;
  --surface-2: #EEF1FF;
  --line: #E6ECF5;

  --radius: 12px;
  --shadow: 0 8px 20px rgba(16, 24, 40, .08);
  --shadow-strong: 0 18px 46px rgba(0,0,0,.28);
  --focus: 0 0 0 3px rgba(255, 107, 53, .35);

  --container: 1120px;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; }
button, input, select{ font: inherit; }

.skip-link{
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--accent);
  color: #fff;
  padding: .6rem .9rem;
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus{ left: 8px; outline: none; box-shadow: var(--focus); }

.container{
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

.section{ padding: clamp(2.25rem, 4vw, 4rem) 0; }
.section--alt{
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__head{ margin-bottom: var(--space-4); }
.center{ display: flex; justify-content: center; margin-top: var(--space-4); }

/* Typography */
.h1{
  font-size: clamp(1.65rem, 3.2vw, 3rem);
  line-height: 1.1;
  margin: .75rem 0 1rem;
  letter-spacing: -0.02em;
}
.h2{
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  margin: 0 0 .5rem;
  letter-spacing: -0.01em;
}
.h3{ font-size: 1.05rem; margin: 0 0 .35rem; }
.lead{ font-size: 1.05rem; color: var(--muted); margin: 0 0 var(--space-3); }
.muted{ color: var(--muted); margin: 0; }
.fineprint{ font-size: .9rem; color: var(--muted); margin: .75rem 0 0; }
.accent{ color: var(--accent); }
.inline-link{ color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Header */
.header{
  position: sticky;
  top: 0;
  z-index: 30;
  background: #ffffff;
  backdrop-filter: none;
  border-bottom: 1px solid var(--line);
}
.header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 0;
}
.logo{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-weight: 700;
  min-width: 0;
}
.logo__mark{
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  font-size: .95rem;
  flex: 0 0 auto;
}
.logo__text{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}

/* Nav */
.nav{ gap: 1rem; }
.nav__link{
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: .35rem .2rem;
}
.nav__link:hover{ color: var(--text); }
.nav--desktop{ display: none; }
.nav--mobile{ display: grid; gap: .6rem; }

/* Header actions */
.header__actions{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  flex: 0 0 auto;
}
.phone{ display: none; text-decoration: none; color: var(--text); font-weight: 800; }
.phone--mobile{ display: inline-flex; font-weight: 800; color: var(--brand); }

/* Burger */
.burger{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.burger:focus{ outline: none; box-shadow: var(--focus); }
.burger__bar{
  width: 18px;
  height: 2px;
  background: var(--brand);
  display: block;
  margin: 2px 0;
  border-radius: 2px;
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  will-change: transform;
}
.btn:focus{ outline: none; box-shadow: var(--focus); }
.btn:hover{ transform: translateY(-1px); }
.btn--block{ width: 100%; }

.btn--primary{
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,107,53,.25);
}
.btn--primary:hover{ box-shadow: 0 12px 26px rgba(255,107,53,.32); }

.btn--ghost{
  background: transparent;
  color: var(--brand);
  border-color: rgba(26,43,76,.25);
}
.btn--ghost:hover{ background: rgba(26,43,76,.06); }

/* Mobile nav overlay */
.mobile-nav{ position: fixed; inset: 0; z-index: 40; }
.mobile-nav__backdrop{ position: absolute; inset: 0; background: rgba(12, 18, 32, .55); }
.mobile-nav__panel{
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(360px, 88vw);
  background: #ffffff;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-strong);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-nav__head{ display: flex; align-items: center; justify-content: space-between; }
.mobile-nav__title{ font-weight: 900; color: var(--brand); }
.mobile-nav__close{
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
}
.mobile-nav__close:focus{ outline: none; box-shadow: var(--focus); }
.mobile-nav__footer{ margin-top: auto; }

/* Hero */
.hero{
  background:
    radial-gradient(1200px 500px at 10% 10%, rgba(255,107,53,.08), transparent 60%),
    radial-gradient(900px 480px at 90% 0%, rgba(26,43,76,.10), transparent 55%);
}
.hero__grid{ display: grid; gap: var(--space-5); }

.badge{
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  padding: .35rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}

.bullets{ margin: 0 0 var(--space-4); padding-left: 1.1rem; }
.bullets li{ margin: .4rem 0; }

.trust{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .75rem;
}
.trust__item{
  background: rgba(255,255,255,.85);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem;
}
.trust__item strong{ display: block; font-size: 1.05rem; }
.trust__item span{ color: var(--muted); font-size: .9rem; }

.hero__media{
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: #dbe6ff;
  aspect-ratio: 3 / 2;
}
.hero__media img{ width: 100%; height: 100%; object-fit: cover; }

/* Cards / grids */
.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}
.card--form{ padding: 1.25rem; }
.card--anchor{ scroll-margin-top: 90px; }

.two-col{ display: grid; gap: var(--space-4); }
.grid-4{ display: grid; gap: var(--space-4); }
.list{ margin: .75rem 0 0; padding-left: 1.1rem; }
.list li{ margin: .45rem 0; }

/* Forms */
.form{ margin-top: .75rem; }
.field{ margin-bottom: .85rem; }
.field--full{ grid-column: 1 / -1; }
label{ display: block; font-weight: 800; margin-bottom: .35rem; }

input[type="text"],
input[type="tel"],
input[type="number"],
select{
  width: 100%;
  padding: .85rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  transition: box-shadow .15s ease, border-color .15s ease;
}
input:focus, select:focus{ outline: none; box-shadow: var(--focus); border-color: rgba(255,107,53,.45); }

input.is-invalid, select.is-invalid{ border-color: #D92D20; box-shadow: 0 0 0 3px rgba(217,45,32,.15); }
.error{ color: #B42318; font-size: .9rem; margin: .35rem 0 0; min-height: 1.1em; }

.check{
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin: .85rem 0;
  color: var(--muted);
  font-size: .95rem;
}
.check input{ margin-top: .2rem; }

.form-success{
  margin: .75rem 0 0;
  padding: .75rem .9rem;
  border-radius: var(--radius);
  border: 1px solid rgba(22, 163, 74, .25);
  background: rgba(22, 163, 74, .10);
  color: #065F46;
  font-weight: 700;
}

/* Timeline */
.timeline{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.timeline__item{
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: .9rem;
  align-items: start;
}
.timeline__dot{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(255,107,53,.25);
  margin-top: 1.05rem;
  position: relative;
}
.timeline__item:not(:last-child) .timeline__dot::after{
  content:"";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 16px);
  background: rgba(26,43,76,.18);
}

/* Calculator */
.calc{ display: grid; gap: var(--space-4); }
.grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.result{ margin-top: .75rem; }
.result__row{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-top: 1px dashed var(--line);
}
.result__label{ color: var(--muted); }
.result__value{ font-weight: 800; }
.result__value--big{ font-size: 1.25rem; color: var(--brand); }

/* Table */
.table{ margin-top: .75rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table__row{
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 1rem;
  padding: .75rem .9rem;
  background: #ffffff;
}
.table__row:nth-child(even){ background: rgba(245,247,251,.9); }
.table__row--head{ background: rgba(26,43,76,.06); font-weight: 800; }

/* CTA */
.cta{
  background: linear-gradient(135deg, rgba(26,43,76,.96), rgba(26,43,76,.92));
  color: #fff;
}
.cta .muted{ color: rgba(255,255,255,.8); }
.cta .card{ box-shadow: 0 12px 26px rgba(0,0,0,.18); }
.cta__grid{ display: grid; gap: var(--space-4); align-items: start; }

/* Footer */
.footer{ border-top: 1px solid var(--line); padding: 1.25rem 0; background: #ffffff; }
.footer__inner{
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer__links{ display: inline-flex; gap: .75rem; align-items: center; }
.footer__link{ color: var(--brand); font-weight: 800; text-decoration: none; }
.footer__link:hover{ text-decoration: underline; }

/* Reveal */
.reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* Adaptive breakpoints */
@media (max-width: 420px){
  .btn{ padding: .75rem .9rem; }
  .logo__text{ max-width: 36vw; }
}
@media (min-width: 640px){
  .grid-4{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 768px){
  .nav--desktop{ display: flex; }
  .burger{ display: none; }
  .phone{ display: inline-flex; }
  .hero__grid{ grid-template-columns: 1.15fr .85fr; align-items: start; }
  .two-col{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
  .calc{ grid-template-columns: 1fr .9fr; align-items: start; }
  .grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 1024px){
  .header__inner{ padding: 1rem 0; }
}

/* Prevent background scroll when mobile menu open */
body.is-nav-open{ overflow: hidden; }


/* =========================
   Branding upgrades
   ========================= */

/* Logo sizing */
.logo__picture{ display: inline-flex; align-items: center; }
.logo__img{ height: 40px; width: auto; }
@media (min-width: 768px){
  .logo__img{ height: 44px; }
}

/* Gradient "fire" buttons */
.btn--primary{
  background: linear-gradient(135deg, #F37021 0%, #FDB913 45%, #F37021 100%);
  color: #fff;
  box-shadow: 0 12px 26px rgba(243,112,33,.22);
}
.btn--primary:hover{
  box-shadow: 0 16px 34px rgba(243,112,33,.30);
}
.btn--primary:active{
  transform: translateY(0);
}

/* Subtle animated sheen on primary button */
.btn--primary{
  position: relative;
  overflow: hidden;
}
.btn--primary::after{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.35), transparent 55%);
  transform: translateX(-35%) rotate(12deg);
  opacity: .55;
  transition: opacity .2s ease;
  animation: btnSheen 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btnSheen{
  0%, 100%{ transform: translateX(-35%) rotate(12deg); }
  50%{ transform: translateX(35%) rotate(12deg); }
}

/* Hero flame decoration (more realistic) */
.hero__aside{ position: relative; }
.hero-flame{
  position: absolute;
  left: 14px;
  top: 14px;
  width: 92px;
  height: 92px;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 20px 42px rgba(243,112,33,.22));
}

/* Outer flame */
.hero-flame__glow{
  position: absolute;
  inset: -6px;
  border-radius: 44% 56% 52% 48% / 58% 52% 48% 42%;
  background:
    radial-gradient(circle at 55% 78%, rgba(253,185,19,.55), rgba(243,112,33,0) 62%),
    radial-gradient(circle at 50% 45%, rgba(243,112,33,.45), rgba(243,112,33,0) 70%);
  filter: blur(9px);
  opacity: .9;
  transform-origin: 50% 80%;
  animation: flameGlow 1.25s ease-in-out infinite;
  mix-blend-mode: screen;
}

/* Inner flame core */
.hero-flame__core{
  position: absolute;
  inset: 6px 10px 10px 10px;
  border-radius: 42% 58% 55% 45% / 62% 55% 45% 38%;
  transform-origin: 50% 82%;
  background:
    radial-gradient(circle at 55% 82%, #FDB913 0%, #F37021 38%, rgba(243,112,33,0) 64%),
    radial-gradient(circle at 48% 35%, rgba(45,156,219,.65) 0%, rgba(45,156,219,0) 52%);
  opacity: .95;
  animation: flameFlicker 0.95s ease-in-out infinite;
}

/* Blue base flicker (gas-like) */
.hero-flame::before{
  content:"";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 12px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(45,156,219,.75), rgba(45,156,219,0) 70%);
  filter: blur(3px);
  opacity: .8;
  animation: basePulse 1.05s ease-in-out infinite;
  mix-blend-mode: screen;
}

/* Small sparks */
.hero-flame::after{
  content:"";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 35% 22%, rgba(255,255,255,.65), rgba(255,255,255,0) 12%),
    radial-gradient(circle at 68% 18%, rgba(255,255,255,.5), rgba(255,255,255,0) 10%),
    radial-gradient(circle at 52% 10%, rgba(255,255,255,.4), rgba(255,255,255,0) 12%);
  opacity: .35;
  filter: blur(0.2px);
  animation: sparkTwinkle 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes flameFlicker{
  0%, 100%{
    transform: rotate(-6deg) scale(1);
    border-radius: 42% 58% 55% 45% / 62% 55% 45% 38%;
  }
  40%{
    transform: rotate(2deg) scale(1.05);
    border-radius: 46% 54% 50% 50% / 64% 50% 50% 36%;
  }
  70%{
    transform: rotate(-2deg) scale(1.02);
    border-radius: 38% 62% 58% 42% / 58% 58% 42% 42%;
  }
}

@keyframes flameGlow{
  0%, 100%{ opacity: .72; transform: rotate(-3deg) scale(1.02); }
  50%{ opacity: .95; transform: rotate(3deg) scale(1.12); }
}

@keyframes basePulse{
  0%,100%{ opacity: .6; transform: scaleX(1) scaleY(1); }
  50%{ opacity: .9; transform: scaleX(1.15) scaleY(1.05); }
}

@keyframes sparkTwinkle{
  0%,100%{ opacity: .18; transform: translateY(0); }
  50%{ opacity: .42; transform: translateY(-2px); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .reveal, .btn--primary::after, .hero-flame__core, .hero-flame__glow{ animation: none !important; transition: none !important; }
}

/* Header light/dark versions */
.header{
  transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* Default (top of page): light */
.header{ background: #ffffff; box-shadow: none; border-bottom-color: rgba(230,236,245,.9); }
/* Scrolled: dark */
.header.is-scrolled{
  background: rgba(53,58,122,.96);
  border-bottom-color: rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(11,18,32,.18);
}
.header.is-scrolled .nav__link{ color: rgba(255,255,255,.82); }
.header.is-scrolled .nav__link:hover{ color: #ffffff; }
.header.is-scrolled .phone{ color: #ffffff; }
.header.is-scrolled .burger{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); }
.header.is-scrolled .burger__bar{ background: #ffffff; }
.header.is-scrolled .btn--primary{ box-shadow: 0 14px 30px rgba(243,112,33,.28); }

/* Ensure readability right after burger close on mobile */
@media (max-width: 767px){
  .header .btn--primary{ display: none; } /* keep header compact on small screens */
  .header__actions{ gap: .45rem; }
}


/* =========================
   Burger -> X animation
   ========================= */
.burger{ position: relative; }
.burger__bar{
  transition: transform .18s ease, opacity .18s ease, background-color .18s ease;
}
.burger.is-open .burger__bar:nth-child(1){ transform: translateY(4px) rotate(45deg); }
.burger.is-open .burger__bar:nth-child(2){ opacity: 0; transform: scaleX(.6); }
.burger.is-open .burger__bar:nth-child(3){ transform: translateY(-4px) rotate(-45deg); }
