/* =========================================================
   NodeLink Solutions — stylesheet
   Modern, responsive, accessible. No frameworks.
   ========================================================= */

:root {
  --primary: #1a73e8;
  --primary-dark: #1559b8;
  --primary-light: #e8f0fe;
  --accent: #00c2b3;
  --dark: #0f1b33;
  --text: #3c4257;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f5f8ff;
  --border: #e4e9f2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(15, 27, 51, 0.08);
  --shadow-sm: 0 2px 8px rgba(15, 27, 51, 0.06);
  --maxw: 1120px;
  --transition: 0.2s ease;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  color: var(--dark);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

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

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.container-narrow { max-width: 760px; }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-head h2 { margin-top: 0.5rem; }

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

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

.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;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.9rem; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.35);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--dark);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--dark);
  letter-spacing: -0.02em;
}
.logo span { color: var(--primary); }
.logo-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.35);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 0;
}
.nav-links a:not(.btn) {
  color: var(--text);
  font-weight: 500;
}
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--primary); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 20px; height: 2px;
  background: var(--dark);
  transform: translateX(-50%);
  transition: var(--transition);
}
.nav-toggle-bar { top: 50%; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(0, 194, 179, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(26, 115, 232, 0.16), transparent 55%),
    var(--bg-alt);
  text-align: center;
}
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero h1 { margin: 0.75rem 0 1rem; }
.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* page hero (subpages) */
.page-hero {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  background:
    radial-gradient(800px 400px at 90% -20%, rgba(0, 194, 179, 0.15), transparent 60%),
    var(--bg-alt);
}
.page-hero h1 { margin: 0.5rem 0 0.75rem; }
.page-hero .hero-lead { color: var(--muted); max-width: 640px; }

/* ---------- Stats ---------- */
.stats {
  background: var(--dark);
  color: #fff;
  padding: 2.5rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stat-number {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.stat-label { color: #aab6d3; font-size: 0.95rem; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(26, 115, 232, 0.35);
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); margin: 0; }

.card-icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.card-feature { border-top: 4px solid var(--primary); }

.card-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text);
  font-size: 0.95rem;
}
.card-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.card-highlight {
  margin-top: 1rem !important;
  font-weight: 600;
  color: var(--primary) !important;
}

/* Pricing cards */
.pricing-card { display: flex; flex-direction: column; }
.pricing-card p:not(.price) { flex: 1; }
.price {
  margin-top: 1.25rem !important;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
}
.price span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.section-cta { text-align: center; margin-top: 2.5rem; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform var(--transition);
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 1.5rem 1.4rem; }
.faq-body p { color: var(--muted); margin: 0; }

.faq-contact {
  text-align: center;
  margin-top: 3rem;
  padding: 2.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
}
.faq-contact h2 { margin-bottom: 0.5rem; }
.faq-contact p { color: var(--muted); margin-bottom: 1.5rem; }

/* ---------- CTA / Forms ---------- */
.cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}
.cta-inner { text-align: center; max-width: 620px; margin: 0 auto; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,0.9); margin: 0.5rem 0 2rem; }

.contact-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.contact-form input[type="email"] {
  flex: 1 1 240px;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  color: var(--text);
}
.cta .contact-form input { box-shadow: var(--shadow-sm); }
.form-note { font-size: 0.85rem; color: rgba(255,255,255,0.8) !important; margin-top: 1rem !important; }

/* Form status messages */
.form-status {
  flex-basis: 100%;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.cta .form-status.is-success { color: #d6fff6; }
.cta .form-status.is-error { color: #ffd9d9; }
.form-status.is-success { color: #0a7d57; }
.form-status.is-error { color: #c0392b; }
.newsletter-form .form-status.is-success { color: var(--accent); }
.newsletter-form .form-status.is-error { color: #ff9b9b; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #c4cde3; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}
.footer-brand .logo { color: #fff; margin-bottom: 0.75rem; }
.footer-brand .logo span { color: var(--accent); }
.footer-brand p { color: #93a0bf; max-width: 260px; }

.site-footer h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.footer-nav ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav a { color: #c4cde3; }
.footer-nav a:hover { color: #fff; }

.newsletter-form { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.newsletter-form input[type="email"] {
  flex: 1 1 160px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid #2a3a5e;
  background: #16243f;
  color: #fff;
  font-size: 0.95rem;
}
.newsletter-form input::placeholder { color: #7c8aac; }
.newsletter-consent {
  flex-basis: 100%;
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #93a0bf;
  margin-top: 0.25rem;
}
.newsletter-consent input { margin-top: 0.2rem; }
.newsletter-consent a { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid #1f2d4d;
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: #8290b0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1.25rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a:not(.btn) {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links .btn { margin-top: 0.75rem; width: 100%; }
}

@media (max-width: 720px) {
  .stats-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .card-grid,
  .card-grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
