/* =========================================================================
   What Else Labs — stylesheet
   Identity: "architect's table" — drafting paper, graph grid, measured detail
   Single committed theme — light · graphite ink · pinky-purple accent
   Zero external dependencies (no webfonts, no trackers).
   ========================================================================= */

/* ---- Tokens ------------------------------------------------------------ */
:root {
  color-scheme: light;

  /* type */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;

  /* scale */
  --step--1: clamp(0.78rem, 0.75rem + 0.15vw, 0.86rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.6rem);

  --maxw: 1140px;
  --radius: 4px;
  --gutter: clamp(1.1rem, 5vw, 3rem);

  /* "architect's table" — drafting paper, graphite ink, blueprint-blue */
  --ground: #eef1f6;          /* drafting paper (cool light) */
  --surface: #ffffff;         /* drawing sheets */
  --surface-2: #e4e9f1;
  --line: #d3dbe7;            /* fine rule */
  --line-strong: #b3bfd2;
  --fg: #1b2432;             /* graphite */
  --fg-soft: #3c4658;
  --muted: #64708a;
  --accent: #9b2fc9;          /* pinky-purple — What Else Labs consulting brand */
  --accent-soft: #b34fd9;
  --accent-ink: #ffffff;
  --bp: #0f766e;              /* teal — Blueprint product brand (echoes the platform) */
  --cyan: #5a6a86;           /* muted slate — drafting annotation labels */
  --grid: rgba(155, 47, 201, 0.07);
  --glow: rgba(155, 47, 201, 0.05);
  --shadow: 0 1px 2px rgba(27, 36, 50, 0.06), 0 14px 34px -20px rgba(27, 36, 50, 0.20);
}

/* ---- 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(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--fg);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.08; text-wrap: balance; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---- Layout helpers ---------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
section[id] { scroll-margin-top: 76px; }
.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: currentColor; opacity: 0.7; }
.lede { font-size: var(--step-1); color: var(--fg-soft); max-width: 60ch; line-height: 1.5; }
.brand-kicker { font-size: var(--step-1); letter-spacing: 0.08em; color: var(--muted); }
.brand-kicker .wel { color: var(--accent); font-weight: 600; }
.bp-name { color: var(--bp); }
.cursor { color: var(--bp); animation: blink 1.15s steps(1, end) infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
.muted { color: var(--muted); }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.04em;
  padding: 0.85rem 1.35rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: transparent; color: var(--fg);
  cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Nav --------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-weight: 600; letter-spacing: -0.01em; }
.brand .mark { color: var(--accent); }
.brand .tld { color: var(--muted); font-weight: 400; }
.brand .svc { margin-left: 0.35rem; padding-left: 0.75rem; border-left: 1px solid var(--line-strong); font-size: var(--step--1); font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 820px) { .brand .svc { display: none; } }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.03em; color: var(--muted); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.lang { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.03em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.35rem 0.7rem; white-space: nowrap; flex: none; transition: color 0.15s ease, border-color 0.15s ease; }
.lang:hover { color: var(--accent); border-color: var(--accent); }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0;
    position: absolute; left: 0; right: 0; top: 64px;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav-links.open a { padding: 0.75rem 0; width: 100%; border-bottom: 1px solid var(--line); font-size: var(--step-0); }
  .nav-toggle {
    display: grid; place-items: center; width: 38px; height: 38px;
    border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--fg); cursor: pointer;
  }
}

/* ---- Hero -------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(4rem, 11vw, 9rem); }
/* drafting graph-paper: fine grid */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(125% 105% at 50% -5%, #000 55%, transparent 86%);
  mask-image: radial-gradient(125% 105% at 50% -5%, #000 55%, transparent 86%);
}
/* drafting graph-paper: major gridlines every 5th cell */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 12%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent) 1px, transparent 1px);
  background-size: 150px 150px;
  -webkit-mask-image: radial-gradient(125% 105% at 50% -5%, #000 42%, transparent 78%);
  mask-image: radial-gradient(125% 105% at 50% -5%, #000 42%, transparent 78%);
}
.hero-inner { position: relative; z-index: 1; max-width: 62rem; }
.hero h1 { font-size: var(--step-4); margin-top: 1.4rem; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { margin-top: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
/* ---- Section head ------------------------------------------------------ */
.head { display: flex; flex-direction: column; gap: 1rem; max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.head h2 { font-size: var(--step-3); }

/* ---- Capability spec cards -------------------------------------------- */
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr)); gap: 1rem; }
.cap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; gap: 0.9rem; position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cap:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
/* drafting registration marks at opposite corners */
.cap::before, .cap::after { content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none; }
.cap::before { top: 10px; left: 10px; border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.cap::after { bottom: 10px; right: 10px; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); }
.cap-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cap-icon { width: 22px; height: 22px; color: var(--accent); flex: none; }
.cap .idx { font-family: var(--mono); font-size: var(--step--1); color: var(--cyan); letter-spacing: 0.12em; }
.cap h3 { font-size: 1.15rem; line-height: 1.2; min-height: 2.4em; }
.cap p { color: var(--muted); font-size: var(--step-0); }
.cap ul { list-style: none; margin: 0; padding-top: 1rem; padding-left: 0; padding-right: 0; padding-bottom: 0; display: flex; flex-direction: column; gap: 0.45rem; margin-top: auto; }
.cap li { font-family: var(--mono); font-size: var(--step--1); color: var(--fg-soft); display: flex; gap: 0.55rem; }
.cap li::before { content: "→"; color: var(--accent); }

/* ---- Engagement steps -------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; counter-reset: step; }
.step { border-top: 2px solid var(--accent); padding-top: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.step .n { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); letter-spacing: 0.1em; }
.step h3 { font-size: var(--step-1); }
.step p { color: var(--muted); font-size: var(--step-0); }

/* ---- About ------------------------------------------------------------- */
.about-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: clamp(1.75rem, 4vw, 3rem); box-shadow: var(--shadow);
}
.about-card .quote { font-size: var(--step-2); letter-spacing: -0.02em; line-height: 1.25; text-wrap: balance; }
.about-card .quote .accent { color: var(--accent); }
/* ---- Blueprint (platform) ---------------------------------------------- */
.bp-label { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.bp-domains { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }
.bp-chip { font-family: var(--mono); font-size: var(--step--1); color: var(--fg-soft); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.4rem 0.9rem; background: var(--surface); }
.bp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; margin-top: 2.25rem; }
.bp-feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.bp-feature:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.bp-feature h4 { font-size: var(--step-0); margin: 0; display: flex; align-items: center; gap: 0.55rem; font-weight: 700; letter-spacing: -0.01em; }
.bp-feature h4::before { content: ""; width: 7px; height: 7px; background: var(--accent); border-radius: 1px; flex: none; }
.bp-feature p { color: var(--muted); font-size: var(--step--1); }

/* ---- Team ---------------------------------------------------------------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.profile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.5rem); display: flex; flex-direction: column; gap: 1rem; }
.profile .avatar { width: 72px; height: 72px; border-radius: var(--radius); border: 1px solid var(--line-strong); background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--surface-2);
  background-size: 12px 12px, 12px 12px, auto;
  display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 1.5rem; color: var(--accent); }
.profile .name { font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em; }
.profile .role { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 0.2rem; }
.profile p { color: var(--fg-soft); }
.profile .plinks { display: flex; flex-direction: column; gap: 0.35rem; font-family: var(--mono); font-size: var(--step--1); }
.profile .plinks a { color: var(--fg-soft); }
.profile .plinks a:hover { color: var(--accent); }
.profile .plinks span::before { content: "→ "; color: var(--accent); }

/* ---- Contact CTA ------------------------------------------------------- */
.cta-band {
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%),
    var(--surface);
  padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.75rem;
}
.cta-band h2 { font-size: var(--step-3); max-width: 20ch; }
.cta-band.cta-center { flex-direction: column; justify-content: center; text-align: center; }
.cta-band.cta-center h2 { max-width: none; }
.contact-lines { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); margin-top: 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.contact-lines a { color: var(--fg-soft); }
.contact-lines a:hover { color: var(--accent); }
.cta-actions { display: flex; flex-direction: column; gap: 0.85rem; }

/* ---- Contact page ------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.15fr 0.85fr; } }
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea { font-family: var(--sans); font-size: var(--step-0); color: var(--fg); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.7rem 0.85rem; width: 100%; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field textarea { min-height: 8.5rem; resize: vertical; }
.form button { align-self: flex-start; }

/* ---- Footer ------------------------------------------------------------ */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: clamp(2.5rem, 5vw, 3.5rem); }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer a { color: var(--fg-soft); font-size: var(--step--1); }
.footer a:hover { color: var(--accent); }
.footer .brand { font-size: var(--step-1); margin-bottom: 0.75rem; }
.footer .blurb { color: var(--muted); font-size: var(--step--1); max-width: 34ch; }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.footer-bottom .reg { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }

/* ---- Legal document pages --------------------------------------------- */
.doc { max-width: 52rem; margin-inline: auto; }
.doc-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); }
.doc-hero h1 { font-size: var(--step-3); margin-top: 1rem; }
.doc-hero .meta { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.review-banner {
  display: flex; gap: 0.85rem; align-items: flex-start;
  border: 1px solid var(--accent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding: 1rem 1.25rem; margin-block: 2rem; font-size: var(--step--1);
}
.review-banner strong { color: var(--accent); }
.review-banner .ico { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.doc-body { padding-block: 2.5rem 4rem; }
.doc-body h2 { font-size: var(--step-2); margin-top: 2.75rem; scroll-margin-top: 84px; display: flex; align-items: baseline; gap: 0.75rem; }
.doc-body h2 .num { font-family: var(--mono); font-size: var(--step-0); color: var(--cyan); }
.doc-body h3 { font-size: var(--step-1); margin-top: 1.75rem; }
.doc-body p, .doc-body li { color: var(--fg-soft); }
.doc-body p { margin-top: 1rem; max-width: 68ch; }
.doc-body ul, .doc-body ol { margin-top: 1rem; padding-left: 1.3rem; max-width: 68ch; display: flex; flex-direction: column; gap: 0.5rem; }
.doc-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.doc-body .fill { background: color-mix(in srgb, var(--cyan) 15%, transparent); color: var(--fg); font-family: var(--mono); font-size: 0.9em; padding: 0.05em 0.4em; border-radius: 3px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 1.25rem 1.5rem; margin-top: 2rem; }
.toc h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.75rem; }
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.toc li { margin-bottom: 0.4rem; }
.toc a { font-family: var(--mono); font-size: var(--step--1); color: var(--fg-soft); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.back-link { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); display: inline-flex; gap: 0.4rem; }
.back-link:hover { color: var(--accent); }

/* ---- Utility ----------------------------------------------------------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 0.6rem; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 0.9rem; border-radius: var(--radius); font-family: var(--mono); }
