/* ============================================================
   NUWEBWAVE — editorial / enterprise system (QDE-inspired)
   White paper, near-black ink, single BLUE accent, Roboto.
   Thin 1px rule-lines, big display type, generous whitespace.
   ============================================================ */

/* ===== TOKENS ===== */
:root {
  --ink:      #121212;
  --paper:    #ffffff;
  --bone:     #f6f6f6;
  --muted:    #6b6b66;
  --ink-soft: #555555;
  --ink-mute: #888888;
  --rule:     rgba(0, 0, 0, 0.12);

  /* Single locked accent — Nuwebwave logo blue */
  --accent:      #29abe2;
  --accent-deep: #0e79ad;   /* readable blue for small accent text on white */

  --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  --w-light: 300; --w-reg: 400; --w-med: 500; --w-bold: 700;

  /* Type scale */
  --t-xs: 13px; --t-sm: 15px; --t-base: 17px; --t-md: 20px; --t-lg: 22px;
  --t-xl: clamp(28px, 3.4vw, 36px);
  --t-2xl: clamp(40px, 4.6vw, 56px);
  --t-display: clamp(44px, 5vw, 80px);

  --tr-eyebrow: 0.1em; --tr-mono: 0.08em; --tr-wider: 0.14em; --tr-wide: 0.04em;

  /* Spacing */
  --s1: 8px; --s2: 12px; --s3: 16px; --s4: 24px; --s5: 28px; --s6: 32px;
  --s8: 40px; --s10: 48px;
  --s12: clamp(40px, 5vw, 56px);
  --s16: clamp(48px, 6vw, 64px);
  --s24: clamp(56px, 7vw, 80px);

  --bleed: 1400px;
  --gutter: clamp(20px, 2.4vw, 40px);
  --section-pad: max(var(--gutter), calc((100vw - var(--bleed)) / 2 + var(--gutter)));

  --geo-line: rgba(0, 0, 0, 0.10);

  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --dur-q: 120ms; --dur-m: 240ms;
}

/* ===== RESET / BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font);
  font-size: var(--t-base);
  font-weight: var(--w-reg);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.skip { position: absolute; left: -10000px; }
.skip:focus { position: static; display: inline-block; padding: .5em 1em; background: var(--ink); color: var(--paper); }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--rule);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.site-header__inner {
  width: 100%; max-width: var(--bleed); margin: 0 auto;
  padding: var(--s3) var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  position: relative;
}
.logo { display: inline-flex; align-items: center; line-height: 1; flex-shrink: 0; font-weight: var(--w-bold); font-size: 20px; letter-spacing: -0.01em; }
.logo .accent { color: var(--accent); }
.logo__img { height: 46px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: var(--s4); }
.nav__link, .nav__cta {
  font-size: 13px; font-weight: var(--w-med); letter-spacing: var(--tr-mono);
  text-transform: uppercase; position: relative; padding: .25em 0;
}
.nav__cta { color: var(--accent-deep); }
.nav__link::after, .nav__cta::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-q) var(--ease);
}
.nav__link:hover::after, .nav__cta:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--accent-deep); }
.nav-toggle { display: none; width: 32px; height: 32px; position: relative; color: var(--ink); flex-shrink: 0; }
.nav-toggle span { position: absolute; left: 7px; right: 7px; height: 1.5px; background: currentColor; transition: transform var(--dur-m) var(--ease), opacity var(--dur-m) var(--ease); }
.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { bottom: 12px; }
.site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.site-header.is-open .nav-toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 720px) {
  .logo__img { height: 38px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 0; padding: var(--s2) var(--gutter) var(--s3);
    background: var(--paper); border-bottom: 1px solid var(--rule); display: none;
  }
  .site-header.is-open .nav { display: flex; }
  .nav__link, .nav__cta { font-size: 14px; padding: var(--s2) 0; }
  .nav__link::after, .nav__cta::after { bottom: 4px; }
}

/* ===== PAGE / ROWS / SECTIONS ===== */
.ed-page { background: var(--paper); }

.ed-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: var(--s3) var(--section-pad);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-size: var(--t-xs); letter-spacing: var(--tr-wider);
  text-transform: lowercase; color: var(--ink-soft);
}
.ed-row__label { color: var(--accent-deep); font-weight: var(--w-bold); }
.ed-row__meta { color: var(--ink-mute); }

.ed-section {
  padding: var(--s12) var(--section-pad);
  background: var(--paper);
}
.ed-section--bone { background: var(--bone); }
.ed-section--compact { padding-top: var(--s6); padding-bottom: var(--s6); }
.ed-section__title {
  font-size: var(--t-xl); font-weight: var(--w-reg);
  margin: 0 0 var(--s6); max-width: 30ch; letter-spacing: -0.005em;
}
.ed-section__title .accent { font-weight: var(--w-bold); }

/* ===== HERO ===== */
.ed-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: var(--s16) var(--section-pad) var(--s12);
}
.ed-hero__grid { display: grid; grid-template-columns: 1fr; gap: var(--s16); }
.ed-hero__title {
  font-size: var(--t-display); font-weight: var(--w-bold);
  line-height: 1.05; letter-spacing: -0.025em; margin: 0; color: var(--ink);
}
.ed-hero__title .accent { color: var(--accent); }
.ed-hero__lede {
  font-size: var(--t-md); line-height: 1.5; max-width: 46ch;
  margin: var(--s4) 0 0; color: var(--ink-soft);
}
.ed-hero__actions { margin-top: var(--s8); display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }

/* faint technical line-grid behind hero */
.geo-grid { position: relative; isolation: isolate; }
.geo-grid::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--geo-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--geo-line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .5;
  -webkit-mask-image: radial-gradient(120% 90% at 15% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(120% 90% at 15% 0%, #000 30%, transparent 75%);
}

/* ===== 1px-RULE GRID ===== */
.ed-grid {
  display: grid; gap: 1px; background: var(--rule);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.ed-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ed-cell { background: var(--paper); padding: var(--s5) var(--s6); min-width: 0; }
.ed-section--bone .ed-cell { background: var(--bone); }

/* ===== PRODUCT (service) CARDS ===== */
.ed-product { padding: var(--s6); display: flex; flex-direction: column; }
.ed-product__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s6); }
.ed-product__eyebrow { font-size: var(--t-xs); letter-spacing: var(--tr-wider); text-transform: lowercase; color: var(--ink-soft); }
.ed-product__head .ed-stat-tag { margin-bottom: 0; }
.ed-product__name {
  font-family: var(--font); font-size: clamp(28px, 3vw, 44px); font-weight: var(--w-bold);
  line-height: 0.98; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 var(--s3);
}
.ed-product__name .accent { color: var(--accent); }
.ed-product__tagline { font-size: var(--t-md); line-height: 1.35; color: var(--ink); margin: 0 0 var(--s3); max-width: 38ch; }
.ed-product__prose { font-size: var(--t-base); line-height: 1.55; color: var(--ink-soft); margin: 0 0 var(--s6); flex: 1; }
.ed-product__link {
  font-size: var(--t-sm); letter-spacing: var(--tr-wide); text-transform: lowercase; color: var(--ink);
  border-top: 1px solid var(--rule); padding-top: var(--s3); margin-top: auto;
  transition: color var(--dur-q) var(--ease); align-self: flex-start;
}
.ed-product__link:hover { color: var(--accent-deep); }
.ed-product__link .arw { display: inline-block; transition: transform var(--dur-q) var(--ease); }
.ed-product__link:hover .arw { transform: translateX(3px); }

/* ===== STAT TAG ===== */
.ed-stat-tag {
  display: inline-block; font-size: 10px; letter-spacing: var(--tr-wider);
  text-transform: uppercase; padding: 6px 10px; border: 1px solid var(--ink);
  color: var(--ink); background: transparent; white-space: nowrap;
}
.ed-stat-tag--filled { background: var(--ink); color: var(--paper); }
.ed-stat-tag--accent { border-color: var(--accent-deep); color: var(--accent-deep); }

/* ===== PILLARS ===== */
.ed-pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s6); padding-top: var(--s3); border-top: 1px solid var(--rule); }
.ed-pillar__num { font-size: var(--t-xs); color: var(--accent-deep); letter-spacing: var(--tr-wider); font-weight: var(--w-bold); }
.ed-pillar__name { font-size: var(--t-lg); font-weight: var(--w-bold); color: var(--ink); margin: var(--s1) 0 var(--s2); letter-spacing: -0.01em; }
.ed-pillar__line { font-size: var(--t-sm); line-height: 1.55; color: var(--ink-soft); margin: 0; }

/* ===== METRIC (optional) ===== */
.ed-metric { padding: var(--s6); }
.ed-metric__num { font-size: clamp(26px, 3vw, 44px); font-weight: var(--w-bold); line-height: 1; letter-spacing: -0.025em; color: var(--ink); }
.ed-metric__label { font-size: var(--t-xs); letter-spacing: var(--tr-wider); text-transform: lowercase; color: var(--ink-soft); margin-top: var(--s3); }

/* ===== BUTTONS / LINKS ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: 14px 26px;
  font-size: 14px; font-weight: var(--w-bold); letter-spacing: var(--tr-wide);
  text-transform: lowercase; color: var(--ink); background: var(--accent);
  transition: background var(--dur-q) var(--ease), color var(--dur-q) var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.link { color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 1px; transition: border-color var(--dur-q) var(--ease); }
.link:hover { border-bottom-color: var(--ink); }

/* ===== CLOSER ===== */
.ed-closer { padding: var(--s16) var(--section-pad); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s16); align-items: end; border-top: 1px solid var(--rule); }
.ed-closer__title { font-size: var(--t-2xl); font-weight: var(--w-reg); line-height: 1.05; max-width: 18ch; letter-spacing: -0.015em; margin: 0; }
.ed-closer__title .accent { font-weight: var(--w-bold); }
.ed-closer__actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s3); }
.ed-closer__actions .txt { font-size: var(--t-md); color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 4px; transition: color var(--dur-q) var(--ease), border-color var(--dur-q) var(--ease); }
.ed-closer__actions .txt:hover { color: var(--accent-deep); border-color: var(--accent-deep); }

/* ===== FOOTER ===== */
.site-footer { background: var(--paper); color: var(--ink); margin-top: var(--s16); border-top: 1px solid var(--rule); }
.site-footer__inner { width: 100%; max-width: var(--bleed); margin: 0 auto; padding: var(--s8) var(--gutter) var(--s5); display: grid; gap: var(--s6); }
.site-footer__cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--s3); }
.site-footer__brand { display: flex; flex-direction: column; gap: var(--s2); }
.site-footer__brand-tag { font-size: var(--t-md); font-weight: var(--w-light); line-height: 1.25; letter-spacing: -0.01em; max-width: 20ch; }
.site-footer__brand-tag .accent { color: var(--accent); }
.site-footer__note { font-size: 11px; letter-spacing: var(--tr-wider); color: var(--ink-soft); margin-top: var(--s3); text-transform: lowercase; }
.site-footer__col h4 { font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: var(--tr-wider); text-transform: lowercase; color: var(--accent-deep); margin: 0 0 var(--s3); }
.site-footer__col a { color: var(--ink); font-size: var(--t-sm); display: inline-block; padding: 3px 0; transition: color var(--dur-q) var(--ease); }
.site-footer__col a:hover { color: var(--accent-deep); }
.site-footer__base { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--rule); font-size: var(--t-xs); color: var(--ink-soft); letter-spacing: var(--tr-wider); }

@media (max-width: 1023px) {
  .site-footer__cols { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
  .ed-pillars-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
  .site-footer__base { flex-direction: column; gap: var(--s2); }
  .ed-grid--3, .ed-grid--4 { grid-template-columns: 1fr; }
  .ed-pillars-grid { grid-template-columns: 1fr; }
  .ed-closer { grid-template-columns: 1fr; gap: var(--s6); }
  .ed-closer__actions { align-items: flex-start; }
}

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-m) var(--ease), transform var(--dur-m) var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* ===== CONTACT FORM ===== */
.contact-grid { display: grid; grid-template-columns: 1.3fr .8fr; gap: var(--s12); align-items: start; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s4); }
.field label { font-size: var(--t-xs); letter-spacing: var(--tr-wide); text-transform: lowercase; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: var(--t-base); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 0;
  padding: 12px 14px; outline: none; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.form-note { font-size: var(--t-sm); color: var(--ink-soft); margin-top: var(--s3); }
.form-note a { color: var(--ink); border-bottom: 2px solid var(--accent); }
.contact-aside > * + * { margin-top: var(--s6); }
.contact-aside h3 { font-size: var(--t-xs); letter-spacing: var(--tr-wider); text-transform: lowercase; color: var(--accent-deep); margin-bottom: var(--s2); }
.contact-aside a.big { font-size: var(--t-md); color: var(--ink); border-bottom: 2px solid var(--accent); }
.contact-aside ul li { font-size: var(--t-sm); color: var(--ink-soft); padding: 4px 0; }
.contact-aside ul li::before { content: "\2192  "; color: var(--accent-deep); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* ===== ARTICLE (blog post) ===== */
.post { max-width: 720px; }
.post__eyebrow { font-size: var(--t-xs); letter-spacing: var(--tr-wider); text-transform: lowercase; color: var(--accent-deep); font-weight: var(--w-bold); margin-bottom: var(--s3); }
.post h1 { font-size: var(--t-2xl); font-weight: var(--w-bold); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 var(--s4); }
.post h1 .accent { color: var(--accent); }
.post__lede { font-size: var(--t-md); line-height: 1.5; color: var(--ink-soft); max-width: 44ch; margin-bottom: var(--s3); }
.post__meta { font-size: var(--t-xs); letter-spacing: var(--tr-wide); text-transform: lowercase; color: var(--ink-mute); padding-top: var(--s3); border-top: 1px solid var(--rule); }
.post-body { margin-top: var(--s8); }
.post-body > p { font-size: var(--t-base); line-height: 1.7; margin-bottom: 1.05em; color: var(--ink); }
.post-body h2 { font-size: var(--t-lg); font-weight: var(--w-bold); letter-spacing: -0.01em; margin: 1.8em 0 .5em; }
.post-body h3 { font-size: var(--t-base); font-weight: var(--w-bold); margin: 1.3em 0 .3em; }
.post-body ul { margin: 0 0 1.1em; display: flex; flex-direction: column; gap: .5em; }
.post-body li { font-size: var(--t-base); line-height: 1.55; padding-left: 1.5em; position: relative; }
.post-body li::before { content: "\2192"; color: var(--accent-deep); position: absolute; left: 0; }
.post-body strong { font-weight: var(--w-bold); }
.post-back { display: inline-block; margin-top: var(--s6); font-size: var(--t-sm); color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 1px; }
