/* static/css/style.css
   Order matters in CSS: later rules win over earlier ones of equal strength.
   So the file goes from general (tokens, reset) to specific (page parts). */

/* 1. TOKENS: every color/size lives here, so a redesign = edit this block */
:root {
  --primary-50:  #f3f0ff;
  --primary-100: #e7e0ff;
  --primary-200: #cfc2fb;
  --primary-400: #8f75ef;
  --primary-500: #6944e7;
  --primary-600: #5230c9;
  --primary-700: #4125a0;
  --primary-900: #20134f;
  --accent: #f2c14e;

  --bg: #f8f7fc;
  --surface: #ffffff;
  --text: #1b1830;
  --text-muted: #5e5b75;
  --border: #e2e0ee;
  --link: var(--primary-600);
  --error: #c62f35;

  color-scheme: light; /* native form controls and scrollbars match */

  --radius: 6px;
  --content-width: 1040px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* THEMES: light is the default (the tokens above). Dark is just the same
   variable names with new values, switched on by <html data-theme="dark">.
   Nothing else in this file needs to know which theme is active. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14121f;
  --surface: #1e1b2e;
  --text: #ece9f8;
  --text-muted: #a29fb8;
  --border: #332f4a;
  --link: var(--primary-400);
  --error: #ff8a8f;
}

/* Fallback if JavaScript is off: follow the visitor's OS setting */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #14121f;
    --surface: #1e1b2e;
    --text: #ece9f8;
    --text-muted: #a29fb8;
    --border: #332f4a;
    --link: var(--primary-400);
    --error: #ff8a8f;
  }
}

/* 2. RESET AND BASE */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; } /* sticky navbar offset */

body {
  margin: 0;
  min-height: 100vh;
  display: flex;            /* body is a column: navbar, main, footer ... */
  flex-direction: column;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
main { flex: 1; }           /* ... and main grows, pushing the footer down */

a { color: var(--link); }
a:hover { color: var(--primary-500); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--text-muted); }
.lead { max-width: 60ch; margin-bottom: 2.25rem; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* 3. LAYOUT BUILDING BLOCKS
   Pattern: a full-width <section> paints the background band, and the
   .wrap inside it keeps the content narrow and centered. */
.section { padding: 4.5rem 1rem; }
.wrap { max-width: var(--content-width); margin-inline: auto; }
.wrap--narrow { max-width: 640px; }   /* forms, short reading */
.wrap--wide   { max-width: 1200px; }  /* four cards in a row */

.section--alt   { background: var(--surface); border-block: 1px solid var(--border); }
.section--dark  { background: var(--primary-900); color: #fff; }
.section--brand { background: var(--primary-500); color: #fff; }
.section--dark .muted  { color: var(--primary-200); }
.section--brand .muted { color: var(--primary-100); }

/* Responsive grid with no media query: as many columns of >=240px as fit */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

/* Exactly four items: 1 column on phones, 2 on tablets, 4 on desktop */
.grid--4 { grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 600px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* Text + panel side by side; stacks when too narrow for two 300px columns */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: center;
}
@media (min-width: 720px) {
  .split--reverse > :first-child { order: 2; } /* swap sides only when side by side */
}

/* 4. NAVBAR */
.navbar {
  display: flex;
  flex-wrap: wrap;
  background: var(--primary-500);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar a, .dropbtn {
  display: block;
  padding: 14px 16px;
  color: #fff;
  text-decoration: none;
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.navbar a:hover,
.navbar a[aria-current="page"],        /* current page highlighted */
.dropdown:hover .dropbtn,
.dropdown:focus-within .dropbtn { background: var(--primary-600); color: #fff; }

.dropdown { position: relative; }
.dropdown-content {
  display: none;
  position: absolute;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  z-index: 10;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content { display: block; }
.dropdown-content a { color: var(--text); }
.dropdown-content a:hover { background: var(--primary-100); color: var(--primary-700); }

/* Theme toggle button: pushed to the right end of the navbar.
   .navbar .theme-toggle is more specific than the global `button` rule, so it wins. */
.navbar .theme-toggle {
  margin-left: auto;
  padding: 14px 16px;
  background: none;
  border: 0;
  border-radius: 0;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}
.navbar .theme-toggle:hover { background: var(--primary-600); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* 5. BUTTONS: .btn is the shape, modifiers (--accent, --outline) the color */
.btn, button, input[type="submit"] {
  display: inline-block;
  padding: 0.75em 1.5em;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--primary-500);
  border: 2px solid transparent;
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover, button:hover, input[type="submit"]:hover { background: var(--primary-600); color: #fff; }
.btn--accent { background: var(--accent); color: var(--primary-900); }
.btn--accent:hover { background: #f6d27a; color: var(--primary-900); }
.btn--outline { background: transparent; border-color: var(--primary-200); }
.btn--outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--primary-500); color: var(--link); } /* outline for light backgrounds */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 2rem; }

/* 6. HERO */
.hero { padding-block: 6rem; }
.hero__title { font-size: clamp(2.25rem, 5vw, 3.75rem); max-width: 20ch; margin-inline: auto; }
.hero__accent { display: block; color: var(--accent); } /* second line in gold */
.hero__text { max-width: 52ch; margin: 1.5rem auto 0; font-size: 1.2rem; color: var(--primary-200); }

.eyebrow { margin: 0 0 1rem; color: var(--accent); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.75rem; }
.pill { color: #fff; border: 2px solid var(--primary-200); padding: 0.35rem 1.25rem; border-radius: 999px; text-decoration: none; }
.pill:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* 7. CARDS, STEPS, CHECKLIST, FAQ */
.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.card > * { margin: 0; }
.card__icon { width: 2.25rem; height: 2.25rem; color: var(--primary-500); }
.card__link { margin-top: auto; font-weight: 700; } /* pushes link to card bottom */

/* Card variants: featured (recommended) outline, badge, subtitle, list fills space */
.card--featured { position: relative; border-color: var(--primary-500); box-shadow: 0 0 0 1px var(--primary-500); }
.badge {
  position: absolute;
  top: -0.8rem;
  left: 1.5rem;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  background: var(--primary-500);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}
.card__sub { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.card .checklist { flex: 1; } /* pushes the button to the bottom of every card */

/* CSS counter: numbers 1, 2, 3 generated automatically, no number in the HTML */
.steps { counter-reset: step; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--primary-500);
  color: #fff;
  font-weight: 800;
}

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.checklist li { position: relative; padding-left: 1.75rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--primary-500); }
.price { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font-weight: 700; color: var(--link); }

.faq { max-width: 760px; margin-inline: auto; }
.faq details { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; }
.faq p { margin: 0.75rem 0 0; color: var(--text-muted); }

/* 8. FORMS: one .field per label + input, so spacing lives in one place */
label { display: block; margin-bottom: 0.3em; font-weight: 700; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], textarea, select {
  width: 100%;
  padding: 0.65em 0.8em;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card input, .card textarea, .card select { background: var(--bg); } /* contrast against the card */
textarea { min-height: 9rem; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--primary-500); }

.field { margin-bottom: 1.25rem; }
.errorlist { list-style: none; margin: 0.3rem 0 0; padding: 0; color: var(--error); font-size: 0.9rem; }
.notice { margin-bottom: 1.25rem; padding: 0.9rem 1.1rem; background: var(--surface); border: 1px solid var(--primary-500); border-radius: var(--radius); }
.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.intro { margin-bottom: 2.25rem; }

/* 9. FOOTER */
.site-footer { background: var(--primary-900); color: var(--primary-200); padding: 2rem 1rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--content-width);
  margin-inline: auto;
}
.social-links { display: flex; gap: 1.25rem; }
.social-links a { color: var(--primary-200); font-size: 1.5rem; line-height: 1; }
.social-links a:hover { color: var(--accent); }
.copyright { margin: 0; font-size: 0.85rem; opacity: 0.7; }


.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}