/* ============================================================
   NetWebLogic — static site styles
   Self-contained, no external requests. Light + dark themes.
   ============================================================ */

/* ----- Design tokens ----- */
:root {
  --accent-1: #6366f1;          /* indigo */
  --accent-2: #06b6d4;          /* cyan   */
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));

  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --border: #e7e9f0;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-muted: #64748b;
  --ring: rgba(79, 70, 229, 0.35);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 30px 60px -20px rgba(30, 27, 75, .35);

  --maxw: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --space: clamp(1rem, 2.5vw, 1.5rem);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;

  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-soft: #0e1426;
    --bg-elev: #121a30;
    --surface: #121a30;
    --border: #1f2942;
    --ink: #eef2ff;
    --ink-soft: #b6c0da;
    --ink-muted: #8a97b8;
    --ring: rgba(99, 102, 241, 0.5);
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  }
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 .5em; }
h1 { font-weight: 800; }
h2 { font-weight: 800; }
h3 { font-weight: 700; }
p { margin: 0 0 1rem; color: var(--ink-soft); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
ul { color: var(--ink-soft); }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ----- Layout helpers ----- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space); }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--grad); border-radius: 2px; }
.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section__head h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); }
.section__head p { font-size: 1.075rem; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* ----- Buttons ----- */
.btn {
  --pad-y: .8rem; --pad-x: 1.35rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: var(--pad-y) var(--pad-x);
  font: inherit; font-weight: 650; line-height: 1;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { box-shadow: var(--shadow-lg); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.btn--light:hover { background: rgba(255,255,255,.24); }
.btn--sm { --pad-y: .55rem; --pad-x: 1rem; font-size: .92rem; }
.btn svg { width: 1.05em; height: 1.05em; }

/* ----- Header / nav ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-size: 1.075rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.brand b { font-weight: 800; }
.brand span { color: var(--accent); }
.nav__spacer { flex: 1; }
.nav__links { display: flex; align-items: center; gap: .35rem; }
.nav__links a {
  color: var(--ink-soft); font-weight: 550; padding: .5rem .8rem; border-radius: 999px;
}
.nav__links a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.nav__cta { margin-left: .35rem; }

.nav__toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 10px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
.nav__toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    z-index: 60; isolation: isolate;
    background: var(--bg-elev); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: grid; gap: .25rem; padding: 1rem var(--space) 1.25rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav__menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links { flex-direction: column; align-items: stretch; gap: .15rem; }
  .nav__links a { padding: .8rem 1rem; font-size: 1.05rem; }
  .nav__cta { margin: .5rem 0 0; }
  .nav__cta .btn { width: 100%; }
}
@media (min-width: 821px) {
  .nav__menu { display: flex !important; align-items: center; gap: 1rem; }
}

/* ----- Hero ----- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 9vw, 7rem); }
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__bg::before, .hero__bg::after {
  content: ""; position: absolute; width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  border-radius: 50%; filter: blur(60px); opacity: .5;
}
.hero__bg::before { background: radial-gradient(circle, var(--accent-1), transparent 70%); top: -12%; right: -8%; }
.hero__bg::after  { background: radial-gradient(circle, var(--accent-2), transparent 70%); bottom: -18%; left: -10%; opacity: .42; }
.hero__grid {
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .5;
}
.hero__inner { max-width: 56rem; }
.hero h1 { font-size: clamp(2.3rem, 1.4rem + 4.4vw, 4.1rem); margin-bottom: .35em; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: clamp(1.075rem, 1rem + .5vw, 1.3rem); max-width: 40rem; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; margin-top: 2.5rem; color: var(--ink-muted); font-size: .95rem; }
.hero__meta b { color: var(--ink); font-weight: 700; }

/* ----- About ----- */
.about__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 880px) { .about__grid { grid-template-columns: 1fr; } }
.about__body p { font-size: 1.075rem; }
.card-aside {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-md);
}
.card-aside h3 { font-size: 1.05rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 1.25rem; padding: 0; list-style: none; }
.chips li { font-size: .85rem; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--border); background: var(--bg-soft); padding: .35rem .7rem; border-radius: 999px; }
.aside-note { font-size: .92rem; color: var(--ink-muted); margin: 0; }
.aside-note a { font-weight: 650; }

/* ----- Services ----- */
.services__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 1.1rem;
}
.s-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}
.s-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.s-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 1rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.s-icon svg { width: 24px; height: 24px; }
.s-card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.s-card p { margin: 0; font-size: .975rem; }

/* ----- CTA band ----- */
.cta {
  position: relative; overflow: hidden; color: #fff;
  background: var(--grad); border-radius: clamp(20px, 4vw, 28px);
  padding: clamp(2.25rem, 6vw, 4rem); box-shadow: var(--shadow-lg);
}
.cta::after {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .25;
  background: radial-gradient(circle at 80% 20%, #fff, transparent 45%);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.5rem); max-width: 22ch; }
.cta p { color: rgba(255,255,255,.92); font-size: 1.1rem; max-width: 52ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.cta__note { margin: 1.25rem 0 0; font-size: .9rem; color: rgba(255,255,255,.8); }
.cta__note a { color: #fff; text-decoration: underline; }

/* ----- Footer ----- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 460px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand p { font-size: .95rem; max-width: 34ch; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); margin: 0 0 .9rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer ul a { color: var(--ink-soft); font-size: .97rem; }
.footer ul a:hover { color: var(--accent); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center;
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  color: var(--ink-muted); font-size: .9rem;
}
.footer__bottom a { color: var(--ink-muted); }
.footer__bottom a:hover { color: var(--accent); }

/* ----- Legal / article pages ----- */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
.page-hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.page-hero .lead { max-width: 46rem; }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2.25rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2rem; display: grid; gap: .4rem; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.note-box {
  background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.note-box p { margin: 0; color: var(--ink-soft); }
.updated { color: var(--ink-muted); font-size: .9rem; }

/* ----- Scroll reveal (only hides when JS is active, so content is never lost) ----- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ----- Section anchor offset for sticky header ----- */
section[id], [id].anchor { scroll-margin-top: calc(var(--header-h) + 12px); }
