/* ========== 1) Design Tokens (variables) ========== */
:root {
  --bg: #0b1020;
  --surface: #121a33;
  --text: #e7ecff;
  --muted: #b7c3ff;
  --brand: #7c9cff;
  --brand-strong: #9ab6ff;
  --line: #263156;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --maxw: 1100px;

  --step--1: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  --step-0:  clamp(1.00rem, 0.95rem + 0.3vw, 1.125rem);
  --step-1:  clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --step-2:  clamp(1.6rem,  1.3rem + 1.0vw, 2.0rem);
  --step-3:  clamp(2.1rem,  1.6rem + 1.8vw, 2.6rem);
}

/* ========== 2) Minimal Reset & Base ========== */
* { box-sizing: border-box; }
html, body { height: 100%; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: var(--step-0);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section h2 { font-size: var(--step-2); margin: 0 0 0.5rem; }
.section-lead { color: var(--muted); margin: 0 0 2rem; }


/* ========== 3) Header & CSS-only Hamburger Nav ========== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(18, 26, 51, 0.8);
  backdrop-filter: saturate(130%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative; /* anchor for absolute nav */
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px;
}
.logo { text-decoration: none; font-weight: 800; font-size: var(--step-1); color: var(--text); letter-spacing: 0.3px; }
.logo span { color: var(--brand); }

/* 1) Toggle control */
.nav-toggle { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }

/* 2) Hamburger button */
.hamburger { display: grid; gap: 6px; cursor: pointer; padding: .4rem; border-radius: 10px; }
.hamburger:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.hamburger span { display: block; inline-size: 28px; block-size: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }

/* 3) Collapsible nav (mobile) */
.nav-links {
  position: absolute; right: 0; left: 0; top: calc(100% + .5rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  display: grid; gap: .5rem; padding: .75rem;
  max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
  transition: max-height .3s ease, opacity .2s ease;
}
.nav-links a { text-decoration: none; color: var(--text); padding: .6rem .7rem; border-radius: 8px; }
.nav-links a:hover { background: #0e1530; }

/* 4) Open state when checkbox is checked */
.nav-toggle:checked ~ .nav-links { max-height: 30rem; opacity: 1; pointer-events: auto; }

/* 5) Animate hamburger to an "X" on open */
.nav-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 6) Desktop layout */
@media (min-width: 56rem) {
  .hamburger { display: none; }
  .nav-links {
    position: static; display: flex; gap: 1rem; padding: 0; max-height: none; opacity: 1; pointer-events: auto;
    background: transparent; border: 0; box-shadow: none;
  }
}

/* ========== 4) Hero ========== */
.hero { background: radial-gradient(1200px 600px at 10% 10%, #111b3a, transparent); }
.hero-inner {
  display: grid; align-items: center; gap: 2rem;
}
.hero-copy h1 { font-size: var(--step-3); line-height: 1.15; margin: 0 0 0.5rem; }
.hero-copy p { color: var(--muted); margin: 0 0 1.25rem; max-width: 60ch; }
.hero-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }

@media (min-width: 56rem) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
}

/* Buttons */
.btn {
  display: inline-block; background: var(--brand); color: #061027; font-weight: 700; text-decoration: none;
  padding: 0.7rem 1rem; border-radius: 12px; border: 0; cursor: pointer;
}
.btn:hover { background: var(--brand-strong); }

/* ========== 5) Features Grid ========== */
.grid { display: grid; gap: 1rem; }
.features-grid { grid-template-columns: 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

@media (min-width: 40rem) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

/* ========== 6) Testimonials ========== */
.testimonials-grid { grid-template-columns: 1fr; }
.quote { background: #0e1530; border-radius: var(--radius); border: 1px solid var(--line); padding: 1rem; }
.quote blockquote { margin: 0; font-size: var(--step-1); }
.quote figcaption { color: var(--muted); margin-top: 0.6rem; }

@media (min-width: 56rem) { .testimonials-grid { grid-template-columns: repeat(2, 1fr); } }

/* ========== 7) Contact Form ========== */
.contact-form { display: grid; gap: 1rem; max-width: 700px; }
.form-field { display: grid; gap: 0.35rem; }
.form-field label { font-weight: 600; }
.form-field input, .form-field textarea {
  background: #0e1530; border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--brand); }

/* ========== 8) Footer ========== */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); }

/* ========== 9) Debug utility (optional) ========== */
/*
* { outline: 1px solid rgba(255,0,0,.15); }
*/
