/* ==========================================================================
   Freelance Developer & Network Specialist — Landing Page
   --------------------------------------------------------------------------
   Contents
     01. Design tokens (custom properties)
     02. Reset & base
     03. Accessibility helpers
     04. Layout primitives
     05. Animated background
     06. Buttons & links
     07. Header / navigation
     08. Hero
     09. Section headings
     10. Services cards
     11. Why choose me
     12. Process timeline
     13. Statistics
     14. Call to action
     15. Contact & form
     16. Footer
     17. Scroll reveal
     18. Responsive breakpoints
     19. Reduced motion & print

   Everything is a single stylesheet on purpose: one small request, no
   render-blocking chain. Colours live in section 01 — change them there.
   ========================================================================== */

/* ==========================================================================
   01. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand palette — swap these two to re-skin the whole site */
  --accent: #38bdf8;          /* cyan */
  --accent-2: #818cf8;        /* indigo */
  --accent-soft: rgba(56, 189, 248, 0.12);

  /* Surfaces */
  --bg: #070b14;
  --bg-alt: #0a1120;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text — contrast-checked against --bg for WCAG AA */
  --text: #f1f5f9;            /* 16.8:1 */
  --text-muted: #a9b6c8;      /* 8.1:1  */
  --text-dim: #8695a8;        /* 5.6:1  */

  /* Feedback */
  --danger: #fb7185;
  --success: #34d399;

  /* Gradients */
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));

  /* Shape & depth */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 12px 40px -12px rgba(56, 189, 248, 0.45);

  /* Rhythm */
  --container: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.35s;

  /* Typography — system stack: zero font requests, instant first paint */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
}

/* ==========================================================================
   02. RESET & BASE
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  /* Offset anchor targets so the sticky header never covers a heading */
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
  overflow-x: hidden;
}

img,
svg { display: block; max-width: 100%; }

img { height: auto; }

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
  font-weight: 700;
}

p { text-wrap: pretty; }

ul, ol { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; border: 0; background: none; }

/* Visible focus for every interactive element — never remove this */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--accent);
  color: #051019;
}

/* ==========================================================================
   03. ACCESSIBILITY HELPERS
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  translate: -50% -200%;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #051019;
  font-weight: 600;
  transition: translate 0.25s var(--ease);
}
.skip-link:focus-visible { translate: -50% 0; }

/* Honeypot field — hidden from humans, visible to naive bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   04. LAYOUT PRIMITIVES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

/* Alternating band, subtly lighter than the page */
.section--alt {
  background: linear-gradient(180deg, transparent, var(--bg-alt) 12%, var(--bg-alt) 88%, transparent);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   05. ANIMATED BACKGROUND
   Three blurred orbs + a faint grid. Fixed, GPU-composited, pointer-events
   none. Animating only `transform` keeps this off the main thread.
   ========================================================================== */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.orb--1 {
  width: 40vmax; height: 40vmax;
  top: -12vmax; left: -8vmax;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.5), transparent 68%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.orb--2 {
  width: 34vmax; height: 34vmax;
  top: 32%; right: -10vmax;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.45), transparent 68%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

.orb--3 {
  width: 30vmax; height: 30vmax;
  bottom: -10vmax; left: 22%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.3), transparent 68%);
  animation: drift-c 38s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 5vmax, 0) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(-7vmax, -4vmax, 0) scale(0.95); }
}
@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(0.95); }
  to   { transform: translate3d(5vmax, -6vmax, 0) scale(1.1); }
}

/* Faint technical grid, faded out towards the edges */
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 100%);
}

/* ==========================================================================
   06. BUTTONS & LINKS
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.975rem;
  letter-spacing: 0.005em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--grad);
  color: #05101b;
  box-shadow: var(--shadow-glow);
}

/* Animated sheen that sweeps across on hover */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.45) 50%, transparent 75%);
  translate: -100% 0;
  transition: translate 0.7s var(--ease);
}
.btn--primary:hover::after,
.btn--primary:focus-visible::after { translate: 100% 0; }

.btn--primary:hover { box-shadow: 0 18px 46px -12px rgba(56, 189, 248, 0.6); }

.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  background: var(--surface-strong);
  border-color: var(--accent);
}

.btn--block { width: 100%; }

.btn__icon { transition: translate var(--dur) var(--ease); }
.btn:hover .btn__icon { translate: 4px 0; }

.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--dur) var(--ease);
}
.link:hover { color: #7dd3fc; }

/* ==========================================================================
   07. HEADER / NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}

/* .is-scrolled is toggled by script.js once the page scrolls */
.site-header.is-scrolled {
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--grad);
  color: #05101b;
  box-shadow: var(--shadow-glow);
}

.brand__accent { color: var(--accent); }

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface); }

/* Active section is highlighted by the scroll-spy in script.js */
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  translate: -50% 0;
  width: 16px; height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.nav__link--cta {
  margin-left: 0.4rem;
  padding-inline: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.nav__link--cta:hover { border-color: var(--accent); color: var(--accent); }
.nav__link--cta.is-active::after { display: none; }

/* Hamburger — hidden above the mobile breakpoint */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s linear;
}

/* Morph into an X when the menu is open */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   08. HERO
   ========================================================================== */
.hero {
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 7vw, 5.5rem);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  backdrop-filter: blur(10px);
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  70%  { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero__title {
  font-size: clamp(2.1rem, 1.1rem + 3.9vw, 3.85rem);
  margin-bottom: 1.25rem;
}

.hero__lead {
  max-width: 56ch;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.hero__trust li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.hero__trust svg { color: var(--accent); flex-shrink: 0; }

/* --- Hero visual --- */
.hero__visual {
  position: relative;
  isolation: isolate;
}

.hero__figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Tint the photo so it sits inside the dark palette instead of fighting it */
.hero__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.18), rgba(7, 11, 20, 0.78));
}

.hero__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Glass cards floating over the photo */
.float-card {
  position: absolute;
  z-index: 2;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: rgba(10, 17, 32, 0.72);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

.float-card--code {
  left: -6%;
  bottom: 8%;
  padding: 0.85rem 1rem 1rem;
  min-width: 250px;
}

.float-card--uptime {
  right: -4%;
  top: 7%;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 1.15rem;
  animation-delay: -3.5s;
}

.float-card__dots {
  display: flex;
  gap: 5px;
  margin-bottom: 0.6rem;
}
.float-card__dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}
.float-card__dots i:first-child { background: #f87171; }
.float-card__dots i:nth-child(2) { background: #fbbf24; }
.float-card__dots i:last-child  { background: #34d399; }

.float-card__code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.75;
  color: var(--text-muted);
  white-space: pre;
}
.float-card__code .ok { color: var(--success); }

.float-card__label {
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.float-card__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.float-card__value .pct { color: var(--accent); }

/* --- Tech strip --- */
.tech-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 0.7rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.tech-strip span {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tech-strip span:hover { color: var(--text); border-color: var(--accent); }

/* ==========================================================================
   09. SECTION HEADINGS
   ========================================================================== */
.section__head {
  max-width: 62ch;
  margin: 0 auto clamp(2.5rem, 5vw, 3.75rem);
  text-align: center;
}

.section__eyebrow {
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section__title {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  margin-bottom: 1rem;
}

.section__sub {
  color: var(--text-muted);
  font-size: 1.03rem;
}

.section__note {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ==========================================================================
   10. SERVICES CARDS
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.15rem;
}

.card {
  position: relative;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

/* Gradient wash that fades in on hover */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(56, 189, 248, 0.1), transparent 55%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; }

.card > * { position: relative; }

.card__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 1.15rem;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--accent-soft);
  color: var(--accent);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.card__icon svg { width: 24px; height: 24px; }

.card:hover .card__icon {
  transform: scale(1.07) rotate(-4deg);
  background: rgba(56, 189, 248, 0.2);
}

.card__title {
  margin-bottom: 0.55rem;
  font-size: 1.09rem;
}

.card__text {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* ==========================================================================
   11. WHY CHOOSE ME
   ========================================================================== */
.why-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.15rem;
}

.feature {
  display: flex;
  gap: 0.95rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.feature__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}
.feature__icon svg { width: 20px; height: 20px; }

.feature__title {
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.feature__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* --- Aside --- */
.why-aside {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.why-aside__figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.why-aside__figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.quote p {
  margin-bottom: 0.85rem;
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.6;
}
.quote footer {
  color: var(--text-dim);
  font-size: 0.82rem;
}
.quote__name { color: var(--accent); font-weight: 600; }

/* ==========================================================================
   12. PROCESS TIMELINE
   ========================================================================== */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.15rem;
  counter-reset: step;
}

.step {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 1.6rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

/* Accent bar grows down the left edge on hover */
.step::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad);
  scale: 1 0;
  transform-origin: top;
  transition: scale var(--dur) var(--ease);
}
.step:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.step:hover::before { scale: 1 1; }

.step__num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}

.step__title {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.step__text {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ==========================================================================
   13. STATISTICS
   ========================================================================== */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1.15rem;
}

.stat {
  padding: 2rem 1.25rem;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.stat:hover { transform: translateY(-4px); border-color: var(--accent); }

.stat__value {
  display: block;
  margin-bottom: 0.4rem;
  font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Reserve space so the counter animation can't shift layout */
  font-variant-numeric: tabular-nums;
}

.stat__label {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   14. CALL TO ACTION
   ========================================================================== */
.cta__panel {
  position: relative;
  max-width: 800px;
  margin-inline: auto;
  padding: clamp(2.25rem, 5vw, 3.75rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, rgba(56, 189, 248, 0.16), transparent 70%),
    var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Gradient hairline along the top edge */
.cta__panel::before {
  content: "";
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.cta__title {
  font-size: clamp(1.85rem, 1.3rem + 2.4vw, 2.9rem);
  margin-bottom: 1rem;
}

.cta__text {
  max-width: 60ch;
  margin: 0 auto 2rem;
  color: var(--text-muted);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

/* ==========================================================================
   15. CONTACT & FORM
   ========================================================================== */
.contact {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.contact__aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__aside-title {
  font-size: 1.15rem;
}

.contact__list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.contact__list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--accent);
}
.contact__icon svg { width: 19px; height: 19px; }

.contact__figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.contact__figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  opacity: 0.85;
}

/* --- Form --- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.req { color: var(--accent); }

.field__input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(7, 11, 20, 0.6);
  color: var(--text);
  font-size: 0.97rem;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

.field__input::placeholder { color: #64748b; }

.field__input:hover { border-color: rgba(255, 255, 255, 0.24); }

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(7, 11, 20, 0.85);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field__input--area {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

/* .has-error is applied by script.js during validation */
.field.has-error .field__input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.12);
}

.field__error {
  display: none;
  color: var(--danger);
  font-size: 0.83rem;
}
.field.has-error .field__error { display: block; }

.field__hint {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-align: right;
}

/* Submit button + spinner */
.btn--submit { margin-top: 0.3rem; }
.btn--submit:disabled { opacity: 0.75; cursor: not-allowed; transform: none; }

.spinner {
  display: none;
  width: 17px; height: 17px;
  border: 2px solid rgba(5, 16, 27, 0.35);
  border-top-color: #05101b;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn--submit.is-loading .spinner { display: block; }
.btn--submit.is-loading .btn__label { opacity: 0.7; }

@keyframes spin { to { rotate: 360deg; } }

/* Status message */
.form__status {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.form__status.is-visible { display: block; }

.form__status.is-success {
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.form__status.is-error {
  border: 1px solid rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.1);
  color: #fda4af;
}

.form__legal {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-align: center;
}

/* ==========================================================================
   16. FOOTER
   ========================================================================== */
.site-footer {
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 2.5rem;
}

.footer__brand .brand { margin-bottom: 1rem; }

.footer__summary {
  max-width: 52ch;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.65;
}

.footer__heading {
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.footer__nav ul,
.footer__contact ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer__nav a {
  color: var(--text-muted);
  font-size: 0.93rem;
  transition: color var(--dur) var(--ease);
}
.footer__nav a:hover { color: var(--accent); }

.footer__contact li { font-size: 0.93rem; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ==========================================================================
   17. SCROLL REVEAL
   Elements start hidden and are revealed by an IntersectionObserver in
   script.js. If JS never runs, a fallback in <script> keeps them visible —
   see script.js `documentElement.classList.add('js')`.
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   18. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* --- Tablet / small laptop --- */
@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__lead { margin-inline: auto; }
  .hero__actions,
  .hero__trust { justify-content: center; }

  .hero__visual { order: -1; max-width: 620px; margin-inline: auto; width: 100%; }
  .float-card--code { left: 0; bottom: 4%; min-width: 210px; }
  .float-card--uptime { right: 0; top: 4%; }

  .why-layout,
  .contact { grid-template-columns: 1fr; }

  .why-aside { position: static; max-width: 560px; margin-inline: auto; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* --- Mobile: collapse nav into a slide-down panel --- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    padding: 0.6rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: rgba(10, 17, 32, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);

    /* Hidden by default; `visibility` keeps it out of the tab order */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease),
                transform 0.25s var(--ease),
                visibility 0.25s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .nav__link {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    text-align: left;
    font-size: 1rem;
  }
  .nav__link.is-active::after { display: none; }
  .nav__link.is-active { background: var(--surface); color: var(--accent); }

  .nav__link--cta {
    margin-left: 0;
    margin-top: 0.35rem;
    text-align: center;
    background: var(--grad);
    color: #05101b;
    border-color: transparent;
  }
  .nav__link--cta:hover { color: #05101b; }
}

/* --- Small phones --- */
@media (max-width: 520px) {
  .hero__actions .btn,
  .cta__actions .btn { width: 100%; }

  .float-card--code { display: none; } /* Avoid crowding the hero image */
  .float-card--uptime { right: 4%; top: 5%; padding: 0.7rem 0.9rem; }
  .float-card__value { font-size: 1.25rem; }

  .stat { padding: 1.5rem 1rem; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { justify-content: center; text-align: center; }
}

/* ==========================================================================
   19. REDUCED MOTION & PRINT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Never leave content hidden if the reveal transition is disabled */
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .feature:hover, .step:hover, .stat:hover { transform: none; }
}

/* Support forced-colors / Windows high-contrast mode */
@media (forced-colors: active) {
  .card, .feature, .step, .stat, .form, .btn { border: 1px solid CanvasText; }
  .grad-text, .stat__value, .step__num { color: CanvasText; -webkit-text-fill-color: CanvasText; }
}

@media print {
  .bg-fx, .site-header, .float-card, .nav-toggle, .hero__visual { display: none; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; }
  .grad-text, .stat__value, .step__num { color: #000; -webkit-text-fill-color: #000; }
}
