/* ============================================================
   Nyle Consulting - site stylesheet
   Brand colours are defined below as CSS variables; change them
   here once and they update everywhere.
   ============================================================ */

:root {
  --bg: #070d1f;
  --bg-soft: #0c1428;
  --card: #101c36;
  --card-hover: #15244712;
  --text: #e8eefc;
  --muted: #9fb0d0;
  --accent: #8fbce6;        /* ice steel blue */
  --accent-2: #3d6fa5;      /* deep steel blue */
  --accent-dark: #2b5178;
  --line: #1e2c4f;
  --radius: 14px;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- Reusable layout helpers ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
.section-alt { background: var(--bg-soft); }

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.15; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; margin-bottom: 12px; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
p { color: var(--muted); }

.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head { margin-bottom: 48px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Navigation
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 13, 31, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand .brand-sub { color: var(--accent); font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #04121c;
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(143, 188, 230, 0.35); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.nav-cta { padding: 9px 20px; }

/* The nav CTA is an <a> inside .nav-links, so .nav-links a and
   .nav-links a:hover would override .btn-primary - restoring the
   dark text colour and the 600 weight the other buttons use */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: #04121c;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 110px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(61, 111, 165, 0.16), transparent 60%),
    radial-gradient(700px 480px at 10% 110%, rgba(143, 188, 230, 0.12), transparent 60%),
    var(--bg);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero h1 span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { margin: 22px 0 34px; font-size: 1.15rem; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 40px rgba(143, 188, 230, 0.18)); }

.hero-badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
.badge {
  border: 1px solid var(--line);
  background: rgba(16, 28, 54, 0.6);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 999px;
}

/* ============================================================
   Cards / grids
   ============================================================ */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(143, 188, 230, 0.45);
  box-shadow: 0 14px 40px rgba(3, 8, 20, 0.5);
}
.card .icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(143, 188, 230, 0.18), rgba(61, 111, 165, 0.14));
  color: var(--accent);
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
.card ul { list-style: none; margin-top: 10px; }
.card ul li { color: var(--muted); padding: 4px 0 4px 22px; position: relative; font-size: 0.93rem; }
.card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   Split feature rows
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split .art svg { width: 100%; height: auto; }
.split + .split { margin-top: 96px; }

/* ============================================================
   Stats strip
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat h3 {
  font-size: 2.2rem;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}
.stat p { font-size: 0.9rem; }

/* ============================================================
   Quote / CTA
   ============================================================ */
.cta-band {
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(143, 188, 230, 0.15), transparent 60%),
    var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

blockquote {
  max-width: 46rem;
  margin: 0 auto;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text);
}
blockquote footer { margin-top: 14px; color: var(--muted); font-size: 0.95rem; font-style: normal; }

/* ============================================================
   Contact form
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }

.contact-list { list-style: none; margin-top: 24px; }
.contact-list li {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.contact-list li strong { color: var(--text); font-weight: 600; }

form.contact-form { display: grid; gap: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(143, 188, 230, 0.18);
}
.field textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: 0.8rem; color: var(--muted); }

/* Honeypot field - hidden from humans, tempting to bots */
.hp { position: absolute; left: -5000px; opacity: 0; height: 0; overflow: hidden; }

.form-status { display: none; padding: 14px 18px; border-radius: 10px; font-size: 0.93rem; }
.form-status.ok { display: block; background: rgba(143, 188, 230, 0.12); border: 1px solid rgba(143, 188, 230, 0.4); color: var(--accent); }
.form-status.err { display: block; background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.4); color: #fca5a5; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: #050a17;
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.site-footer h4 { color: var(--text); margin-bottom: 14px; font-size: 0.95rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 9px; }
.site-footer a { color: var(--muted); font-size: 0.92rem; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ============================================================
   Scroll fade animations (driven by js/main.js)
   Elements with .reveal fade in when scrolling into view,
   and fade back out when leaving the viewport.
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children with .reveal-delay-1 … -3 */
.reveal.delay-1 { transition-delay: 0.12s; }
.reveal.delay-2 { transition-delay: 0.24s; }
.reveal.delay-3 { transition-delay: 0.36s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 940px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 80px 0 70px; }
}

@media (max-width: 640px) {
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  section { padding: 64px 0; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 18px 24px 26px;
    gap: 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-cta-li { margin-top: 6px; }
}

/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
