/* ==========================================================================
   LinkOnnAction — Master Stylesheet
   Link this single file on every page (Home, Blog, etc.) to keep design
   compact and consistent. Do not fork this file per page.
   ========================================================================== */

:root {
  --abyss: #050B14;
  --navy-900: #0A1B33;
  --navy-800: #0F2647;
  --navy-700: #12335F;
  --blue-600: #1B4C82;
  --blue-500: #2C6BAE;
  --blue-400: #4A8FD1;
  --cyan-300: #6FD8FF;
  --cyan-200: #A6E8FF;
  --white: #FFFFFF;
  --mist: #C7D3E0;
  --muted: #7E92A8;

  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --fs-h1: clamp(2.1rem, 5vw, 3.75rem);
  --fs-h2: clamp(1.6rem, 3vw, 2.5rem);
  --fs-h3: 1.2rem;

  --sp-1: .5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2rem; --sp-5: 3rem; --sp-6: 5rem;
  --container-max: 1140px;
  --radius: 12px;

  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);

  /* Extended scale — for components below (forms, cards, blog, pricing) */
  --fs-small: .875rem;
  --fs-xs: .75rem;
  --lh-body: 1.65;
  --shadow-sm: 0 2px 12px rgba(0,0,0,.25);
  --shadow-md: 0 8px 32px rgba(0,0,0,.35);
  --shadow-glow: 0 0 24px rgba(111,216,255,.35);
  --ease: cubic-bezier(.4,0,.2,1);
  --transition: .2s var(--ease);
  --container-narrow: 720px; /* blog post / article reading width */

  /* Breakpoint reference (CSS vars can't drive @media directly — kept here
     as the source of truth; media queries below must match these values) */
  /* --bp-sm: 640px; --bp-md: 900px; --bp-lg: 1140px; */
}

html { scroll-behavior: smooth; scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--mist);
  background: var(--abyss);
  line-height: 1.65;
  overflow-x: hidden;
  width: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); color: var(--white); line-height: 1.15; margin: 0 0 var(--sp-2); font-weight: 700; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { max-width: 65ch; margin: 0 0 var(--sp-2); color: var(--mist); }
:focus-visible { outline: 2px solid var(--cyan-300); outline-offset: 3px; }

/* ---- Layout ---------------------------------------------------------- */
.container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--sp-3); position: relative; z-index: 1; }
.section {
  padding-block: var(--sp-6);
  position: relative;
  width: 100vw; max-width: 100vw;
  left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
}
.section--raised { background: linear-gradient(180deg, rgba(18,51,95,.35), transparent); }
.grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  background: rgba(5,11,20,.75);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(111,216,255,.08);
  padding-block: var(--sp-2);
  padding-top: calc(var(--sp-2) + env(safe-area-inset-top, 0px));
  position: fixed; top: 0; left: 0; right: 0;
  width: 100%;
  z-index: 20;
}
/* Reserve space at the top of the page equal to the fixed header's height,
   so content doesn't render underneath it. Adjust --header-h if your logo
   size or padding changes noticeably. */
:root { --header-h: 76px; }
body { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
.site-header .container { display: flex !important; align-items: center !important; justify-content: space-between !important; flex-wrap: nowrap !important; width: 100% !important; max-width: var(--container-max) !important; margin-inline: auto !important; }
.logo-group { display: flex !important; align-items: center !important; gap: .65rem !important; flex-shrink: 0 !important; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--abyss);
  border: 2px solid var(--cyan-300);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(111,216,255,.4);
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; display: block; }
.brand-mark--sm { width: 30px; height: 30px; border-radius: 8px; }
.brand-mark--sm svg { width: 17px; height: 17px; }
.brand-text {
  font-family: 'Space Grotesk', var(--font-display), sans-serif;
  font-weight: 700; letter-spacing: -.5px;
  font-size: 1.2rem; line-height: 1;
  background: linear-gradient(120deg, var(--cyan-200) 0%, var(--cyan-300) 45%, var(--blue-400) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
.brand-text--sm { font-size: 1rem; }
.nav-links { display: flex !important; align-items: center !important; gap: var(--sp-3) !important; list-style: none !important; margin: 0 !important; padding: 0 !important; }
.nav-links a { color: var(--mist); font-size: .9rem; transition: color .2s ease; }
.nav-links a:hover { color: var(--cyan-300); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; padding: .8rem 1.7rem; border-radius: 8px;
  font-weight: 600; font-size: .9rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary {
  background: linear-gradient(135deg, var(--blue-400), var(--cyan-300));
  color: var(--abyss);
  box-shadow: 0 4px 24px rgba(74,143,209,.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(111,216,255,.45); }
.btn--outline { border-color: rgba(255,255,255,.25); color: var(--white); }
.btn--outline:hover { border-color: var(--cyan-300); color: var(--cyan-300); }

/* ---- Cinematic hero ------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  overflow: hidden;
  padding-block: var(--sp-6);
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(74,143,209,.28), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 75%, rgba(111,216,255,.18), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--abyss) 85%);
  width: 100vw; max-width: 100vw;
  left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(111,216,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111,216,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  animation: drift 30s linear infinite;
}
@keyframes drift { from { background-position: 0 0, 0 0; } to { background-position: 480px 240px, 480px 240px; } }
.hero .container {
  display: flex; flex-direction: row; align-items: center;
  justify-content: space-between; gap: var(--sp-5);
  flex-wrap: wrap;
}
.hero-copy { display: flex; flex-direction: column; gap: var(--sp-3); flex: 1 1 480px; min-width: 280px; }
.hero-graphic { flex: 0 1 420px; min-width: 260px; max-width: 100%; }
.hero-graphic svg { width: 100%; height: auto; overflow: visible; }
.hero-graphic .chart-line {
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: drawLine 1.8s ease forwards; animation-delay: .6s;
}
.hero-graphic .chart-dot {
  opacity: 0; animation: dotPop .4s ease forwards;
}
.hero-graphic .chart-area { opacity: 0; animation: fadeIn 1s ease forwards; animation-delay: 1.6s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes dotPop { to { opacity: 1; } }
@keyframes fadeIn { to { opacity: 1; } }
@media (max-width: 860px) {
  .hero .container { flex-direction: column; }
  .hero-graphic { order: 2; max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-graphic .chart-line { stroke-dashoffset: 0; animation: none; }
  .hero-graphic .chart-dot, .hero-graphic .chart-area { opacity: 1; animation: none; }
}
.hero h1, .hero p, .hero .cta-group { opacity: 0; animation: rise .9s ease forwards; }
.hero h1 { animation-delay: .1s; }
.hero p { animation-delay: .3s; max-width: 52ch; }
.hero .cta-group { animation-delay: .5s; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { color: var(--cyan-300); font-size: .85rem; letter-spacing: .03em; margin-bottom: var(--sp-1); opacity: 0; animation: rise .9s ease forwards; }

/* ---- Glass cards ---------------------------------------------------------- */
.card {
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid rgba(111,216,255,.12);
  border-radius: var(--radius);
  padding: var(--sp-3);
  backdrop-filter: blur(6px);
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: rgba(111,216,255,.4); transform: translateY(-4px); }
.card h3 { color: var(--white); }
.card p { font-size: .92rem; color: var(--muted); margin-bottom: 0; }

/* ---- Process steps --------------------------------------------------------- */
.steps { display: flex; flex-direction: column; gap: var(--sp-3); }
.step { display: flex; gap: var(--sp-3); align-items: flex-start; }
.step-num {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  color: var(--cyan-300); min-width: 3ch;
  text-shadow: 0 0 16px rgba(111,216,255,.5);
}

/* ---- FAQ -------------------------------------------------------------------- */
.faq details { border-bottom: 1px solid rgba(111,216,255,.12); padding-block: var(--sp-2); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--white); }
.faq p { margin-top: .6rem; font-size: .92rem; }

/* ---- Final CTA ---------------------------------------------------------------- */
.cta-final {
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(74,143,209,.3), transparent 70%), var(--navy-900);
  text-align: center;
}

/* ---- Footer ---------------------------------------------------------------------- */
.site-footer {
  background: var(--abyss);
  border-top: 1px solid rgba(111,216,255,.08);
  padding-block: var(--sp-5);
  font-size: .875rem;
  padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  width: 100vw; max-width: 100vw;
  left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
}
.site-footer a:hover { color: var(--cyan-300); }
.footer-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.footer-grid h3 { color: var(--white); font-size: .95rem; }

/* ---- Responsive --------------------------------------------------------------------- */
/* ---- Hamburger nav toggle (hidden on desktop) --------------------------- */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: .4rem; z-index: 31; position: relative;
}
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--white); fill: none; stroke-width: 2; stroke-linecap: round; }
.nav-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 29; opacity: 0; transition: opacity .25s ease;
}
.nav-backdrop.is-open { display: block; opacity: 1; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100dvh; width: min(78vw, 320px);
    background: var(--navy-900);
    flex-direction: column; align-items: flex-start;
    padding: calc(var(--sp-5) + env(safe-area-inset-top, 0px)) var(--sp-3) var(--sp-3);
    gap: var(--sp-3);
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    box-shadow: -8px 0 24px rgba(0,0,0,.45);
    z-index: 30;
    margin: 0; list-style: none;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { font-size: 1rem; width: 100%; }
  .nav-links .btn { width: 100%; text-align: center; }
}

/* ---- Reduced spacing on small screens ------------------------------------ */
@media (max-width: 640px) {
  .hero { min-height: auto; text-align: left; padding-block: var(--sp-5); }
  .section { padding-block: var(--sp-4); }
  .site-footer { padding-block: var(--sp-4); }
  h1 { text-align: left; }
}

/* ---- iOS/Android dynamic viewport fix for full-height hero --------------- */
@supports (height: 100svh) {
  .hero { min-height: 92svh; }
}

/* ==========================================================================
   Icon holder — used inside cards, nav, footer for real SVG icons
   ========================================================================== */
.icon-badge {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(111,216,255,.08);
  border: 1px solid rgba(111,216,255,.2);
  margin-bottom: var(--sp-2);
  transition: background var(--transition), border-color var(--transition);
}
.icon-badge svg { width: 22px; height: 22px; stroke: var(--cyan-300); fill: none; }
.card--link { display: block; cursor: pointer; }
.card--link:hover .icon-badge { background: rgba(111,216,255,.18); border-color: var(--cyan-300); }
.card__cta { display: inline-flex; align-items: center; gap: .35rem; font-size: var(--fs-small); color: var(--cyan-300); margin-top: var(--sp-1); }
.card__cta svg { width: 14px; height: 14px; stroke: currentColor; fill: none; transition: transform var(--transition); }
.card--link:hover .card__cta svg { transform: translateX(3px); }

/* ==========================================================================
   Contact modal — real hide/show popup form
   ========================================================================== */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  align-items: center; justify-content: center;
  z-index: 50; padding: var(--sp-3);
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: var(--navy-900);
  border: 1px solid rgba(111,216,255,.18);
  border-radius: var(--radius);
  padding: var(--sp-4);
  max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-md);
  animation: modalIn .25s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
.modal-close {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  background: none; border: none; color: var(--mist);
  font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .25rem .5rem;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--cyan-300); }

/* ==========================================================================
   Typography utilities
   ========================================================================== */
.lead { font-size: 1.15rem; color: var(--mist); max-width: 60ch; }
.muted { color: var(--muted); }
.text-center { text-align: center; }
.container--narrow { max-width: var(--container-narrow); }

/* ==========================================================================
   Badges / tags — blog categories, pricing labels, status pills
   ========================================================================== */
.badge {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .02em;
  background: rgba(111,216,255,.1);
  border: 1px solid rgba(111,216,255,.25);
  color: var(--cyan-300);
}

/* ==========================================================================
   Blog components — post cards, meta line, pagination
   ========================================================================== */
.post-card { display: flex; flex-direction: column; gap: var(--sp-1); }
.post-card img { border-radius: var(--radius); margin-bottom: var(--sp-1); aspect-ratio: 16/9; object-fit: cover; }
.post-meta { display: flex; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--muted); }
.post-meta span::before { content: '•'; margin-right: var(--sp-2); color: var(--muted); }
.post-meta span:first-child::before { content: none; margin-right: 0; }
.pagination { display: flex; gap: var(--sp-1); justify-content: center; margin-top: var(--sp-4); }
.pagination a {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(111,216,255,.15); border-radius: 8px; font-size: var(--fs-small);
  transition: border-color var(--transition), color var(--transition);
}
.pagination a:hover, .pagination a[aria-current="page"] { border-color: var(--cyan-300); color: var(--cyan-300); }

/* ==========================================================================
   Pricing — extends .card
   ========================================================================== */
.pricing-card { text-align: center; }
.pricing-card .price { font-family: var(--font-display); font-size: 2.25rem; color: var(--white); margin: var(--sp-1) 0; }
.pricing-card .price span { font-size: var(--fs-small); color: var(--muted); font-weight: 400; }
.pricing-card--featured { border-color: var(--cyan-300); box-shadow: var(--shadow-glow); }
.pricing-list { list-style: none; margin: var(--sp-2) 0; padding: 0; text-align: left; }
.pricing-list li { padding-block: .4rem; font-size: var(--fs-small); color: var(--mist); border-bottom: 1px solid rgba(111,216,255,.08); }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial { border-left: 2px solid var(--cyan-300); padding-left: var(--sp-2); }
.testimonial p { font-style: italic; color: var(--mist); }
.testimonial cite { display: block; margin-top: var(--sp-1); font-style: normal; font-size: var(--fs-small); color: var(--muted); }

/* ==========================================================================
   Forms — contact page, newsletter signup
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: var(--sp-2); }
.field label { font-size: var(--fs-small); color: var(--mist); }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: var(--fs-body, 1rem);
  padding: .75rem 1rem; border-radius: 8px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(111,216,255,.15);
  color: var(--white);
  transition: border-color var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--cyan-300);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select option {
  background: var(--navy-900);
  color: var(--white);
}

/* ==========================================================================
   Divider
   ========================================================================== */
.divider { height: 1px; background: rgba(111,216,255,.1); border: none; margin-block: var(--sp-4); }

/* ==========================================================================
   Grid width variants
   ========================================================================== */
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before { animation: none; }
  .hero h1, .hero p, .hero .cta-group, .eyebrow { animation: none; opacity: 1; }
  .btn { transition: none; }
}
