@import url('fonts.css');

/* ============================================================================
   WARAQA — site stylesheet
   Palette and type are TOKENS. Change them here, never in a component.
   Accent rule (from the Phase 1 brief): --wq-accent is 2.9:1 against paper —
   it is for the drawing, nodes and UI only. Text uses --wq-accent-ink (5.2:1).
   Never de-emphasise a container with opacity; swap the colour token instead.
   ========================================================================== */

:root {
  --wq-ink: #232B20;
  --wq-accent: #A88434;
  --wq-accent-ink: #7A5E1C;
  --wq-soft: #E4E0CB;
  --wq-paper: #F7F5EF;
  --wq-stone: #EFEBDD;
  --wq-slate: #5C6154;
  --wq-body: #3B4136;
  --wq-rule: #EEEADC;
  --wq-forest: #1F2B20;
  --wq-gray: #5C6459;
  --wq-soft-ink: #374236;
  --wq-gold: #B28A2E;
  --wq-gold-txt: #7F621B;

  --wq-serif: Spectral, Georgia, 'Times New Roman', serif;
  --wq-sans: Archivo, Arial, Helvetica, sans-serif;
  --wq-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --wq-measure: 1280px;
  --wq-gutter: clamp(20px, 4vw, 44px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--wq-paper);
  color: var(--wq-ink);
}

body {
  font-family: var(--wq-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* `clip`, never `hidden`. overflow-x:hidden forces overflow-y to `auto`, which
   turns the page into a scroll container and silently kills every
   position:sticky descendant — the header AND the Knowledge Path stage. `clip`
   suppresses the same horizontal overflow without creating a scrollport. */
html, body { overflow-x: clip; }

a { color: var(--wq-accent-ink); text-decoration: none; }
a:hover { color: var(--wq-accent); text-decoration: underline; }
button { font-family: inherit; font-size: inherit; }
*:focus-visible { outline: 2px solid var(--wq-accent-ink); outline-offset: 3px; }

.wq-wrap { max-width: var(--wq-measure); margin: 0 auto; padding-inline: var(--wq-gutter); }

.wq-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Eyebrow / label — mono, uppercase, letterspaced. One treatment everywhere. */
.wq-eyebrow {
  font-family: var(--wq-mono);
  font-weight: 500;
  font-size: clamp(10px, 1.5vh, 12px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wq-gold-txt);
}

/* ── Header ───────────────────────────────────────────────────────────────── */

#wq-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 249, 243, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wq-rule);
}
#wq-header .wq-wrap {
  padding-block: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wq-logo {
  display: flex; align-items: center; flex: none; text-decoration: none;
  color: var(--wq-ink);
}
.wq-logo:hover { text-decoration: none; }
.wq-logo svg {
  width: 108px; height: 41px;
  color: var(--wq-ink);
  --waraqa-fold: var(--wq-accent);
  --waraqa-fold-opacity: 1;
  flex: none;
}
.wq-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.wq-nav a {
  font-family: var(--wq-mono);
  font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--wq-slate);
}
.wq-nav a:hover { color: var(--wq-ink); text-decoration: none; }
@media (max-width: 700px) { .wq-nav a[data-secondary] { display: none; } }

/* ── Section furniture ────────────────────────────────────────────────────── */

.wq-section { border-top: 1px solid var(--wq-rule); }
.wq-section__head {
  padding-block: clamp(48px, 8vh, 92px) clamp(24px, 4vh, 44px);
  display: flex; flex-direction: column; gap: 14px;
}
.wq-h2 {
  margin: 0;
  font-family: var(--wq-serif); font-weight: 200;
  font-size: clamp(30px, 5.2vw, 52px); line-height: 1.06;
  letter-spacing: -0.018em; color: var(--wq-forest);
}
.wq-lede {
  margin: 0; max-width: 62ch;
  font-family: var(--wq-serif); font-weight: 400;
  font-size: clamp(16px, 1.6vw, 21px); line-height: 1.45; color: var(--wq-gray);
}

/* ── Knowledge Path ───────────────────────────────────────────────────────── */

/* The stage plays itself (assets/site.js) — it is no longer a sticky,
   scroll-scrubbed track, so it simply sits in the flow at its natural height. */
#wq-track { position: relative; }
.wq-stage { position: relative; display: flex; flex-direction: column; }
.wq-stage__draw {
  flex: 0 0 auto; width: 100%; max-width: var(--wq-measure);
  padding-inline: var(--wq-gutter); margin: 0 auto;
}
.wq-stage__svgwrap { position: relative; line-height: 0; width: min(100%, calc(30vh * 3.75)); }
.wq-stage__svgwrap svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wq-stage__text {
  order: 2; flex: 0 0 auto; width: 100%; max-width: var(--wq-measure);
  margin: 0 auto; padding: clamp(20px, 3.4vh, 40px) var(--wq-gutter) clamp(32px, 6vh, 64px);
  display: flex; flex-direction: column; align-items: flex-start;
}
/* Every step sits in the same grid cell; only .is-on is shown. The cell is as
   tall as the longest step, so the proof strip below never jumps. */
.wq-states { display: grid; width: 100%; }
.wq-state {
  grid-area: 1 / 1;
  display: flex; flex-direction: column; gap: clamp(3px, 0.6vh, 9px); max-width: 940px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.wq-state.is-on {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .5s ease .15s, transform .6s cubic-bezier(.3,.7,.3,1) .15s, visibility 0s;
}

/* Pause / Play, with a hairline that fills over each step's dwell time. */
.wq-auto { display: flex; align-items: center; gap: 14px; margin-top: clamp(16px, 2.8vh, 30px); }
.wq-auto__btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 0 14px 0 12px;
  background: transparent; border: 1px solid #C6BFA6; color: var(--wq-slate);
  font-size: 14px; cursor: pointer;
}
.wq-auto__btn:hover { color: var(--wq-ink); border-color: var(--wq-ink); }
.wq-auto__btn svg { width: 9px; height: 9px; fill: currentColor; flex: none; }
.wq-auto__bar { position: relative; width: clamp(80px, 12vw, 140px); height: 2px; background: var(--wq-soft); overflow: hidden; }
.wq-auto__bar i { position: absolute; inset: 0; background: var(--wq-accent); transform-origin: left center; transform: scaleX(0); }
.wq-state__seq { display: flex; align-items: baseline; gap: 16px; }
.wq-state__num {
  font-family: var(--wq-mono); font-weight: 500;
  font-size: clamp(11px, 1.7vh, 18px); letter-spacing: 0.16em;
  color: var(--wq-gold-txt); flex: none;
}
.wq-state__flag {
  font-family: var(--wq-mono); font-weight: 500;
  font-size: clamp(9px, 1.1vh, 12px); letter-spacing: 0.16em;
  color: var(--wq-gold-txt); flex: none;
}
.wq-state__title {
  margin: 0; font-family: var(--wq-serif); font-weight: 600;
  font-size: clamp(27px, 6.2vh, 48px); line-height: 1.04;
  letter-spacing: -0.016em; color: var(--wq-forest);
}
.wq-state__tag {
  font-family: var(--wq-serif); font-weight: 400;
  font-size: clamp(15px, 2.7vh, 22px); line-height: 1.32; color: var(--wq-gray);
}
.wq-state__why {
  font-size: clamp(12.5px, 2.05vh, 18px); line-height: 1.5;
  color: var(--wq-soft-ink); max-width: 64ch;
}
.wq-node-hit {
  position: absolute; transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 999px;
  background: transparent; border: none; padding: 0; cursor: pointer;
}

/* Proof strip, at the foot of the stage. */
.wq-proof { order: 4; flex: none; background: var(--wq-ink); border-top: 1px solid #3A4434; }
.wq-proof .wq-wrap {
  padding-block: 13px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: baseline;
}
.wq-proof__cell {
  min-width: 0; display: flex; align-items: baseline; justify-content: center;
  gap: 9px; padding: 0 14px; border-inline-start: 1px solid #3A4434;
}
.wq-proof__cell:first-child { border-inline-start: 0; }
.wq-proof__v {
  font-family: var(--wq-serif); font-weight: 200;
  font-size: clamp(14px, 1.5vw, 21px); line-height: 1.1; letter-spacing: -0.018em;
  color: var(--wq-paper); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.wq-proof__k {
  font-family: var(--wq-mono); font-size: clamp(8px, 0.72vw, 9.5px);
  letter-spacing: 0.16em; text-transform: uppercase; color: #C7A65E;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Five cells on a 390px screen leave ~66px each — a value and its label cannot
   share that baseline, and the label ellipses away to nothing ("100+ E"). Stack
   them instead: both fit, and the strip keeps all five figures in one row. */
@media (max-width: 700px) {
  .wq-proof .wq-wrap { padding-inline: 8px; }
  .wq-proof__cell { flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 7px; }
  .wq-proof__v { font-size: 13px; }
  .wq-proof__k { font-size: 7px; letter-spacing: 0.1em; }
}

/* ── Services ────────────────────────────────────────────────────────── */

/* The nav jumps here; land below the sticky header, not under it. */
#services, #how { scroll-margin-top: var(--wq-header-h, 70px); }
.wq-svc-list { padding-bottom: clamp(48px, 8vh, 92px); }

/* Three plain commitments, set as one ruled row. Facts, not badges: no icons,
   no ticks, nothing that reads like a trust-seal sticker. */
.wq-assure {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--wq-forest);
}
.wq-assure li {
  padding: 18px clamp(16px, 2.4vw, 32px) 20px 0;
  font-size: 14.5px; line-height: 1.55; color: var(--wq-body);
}
.wq-assure li + li { padding-inline-start: clamp(16px, 2.4vw, 32px); border-inline-start: 1px solid var(--wq-rule); }
.wq-assure b {
  display: block; margin-bottom: 4px;
  font-family: var(--wq-serif); font-weight: 400; font-size: 19px; line-height: 1.3; color: var(--wq-forest);
}
@media (max-width: 760px) {
  .wq-assure { grid-template-columns: 1fr; }
  .wq-assure li { padding: 14px 0 15px; }
  .wq-assure li + li { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid var(--wq-rule); }
}

/* Fee schedule: one group per research stage, one ruled row per service.
   Columns: what it is | what you get | what it costs. */
.wq-svc-group { margin-top: clamp(44px, 7vh, 76px); }
.wq-svc-group__head { padding-bottom: 14px; border-bottom: 1px solid var(--wq-forest); }
.wq-svc-group__title {
  margin: 0; font-family: var(--wq-serif); font-weight: 300;
  font-size: clamp(25px, 2.8vw, 32px); line-height: 1.15; letter-spacing: -0.01em; color: var(--wq-forest);
}
.wq-svc-group__sub {
  margin: 6px 0 0; font-family: var(--wq-serif); font-size: 16.5px; line-height: 1.45; color: var(--wq-gray);
}

.wq-svc__row {
  display: grid; align-items: start;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 176px;
  gap: 14px clamp(24px, 3.4vw, 52px);
  padding-block: clamp(22px, 3.2vh, 32px);
  border-bottom: 1px solid var(--wq-rule);
}
.wq-svc__name {
  margin: 0 0 8px; font-family: var(--wq-serif); font-weight: 400;
  font-size: clamp(20px, 2vw, 24px); line-height: 1.2; color: var(--wq-forest);
}
.wq-svc__desc { margin: 0; max-width: 58ch; font-size: 15px; line-height: 1.62; color: var(--wq-body); }

.wq-svc__facts { margin: 0; padding-top: 5px; font-size: 14.5px; line-height: 1.55; color: var(--wq-body); }
.wq-svc__facts dt { font-family: var(--wq-serif); font-size: 15px; color: var(--wq-accent-ink); }
.wq-svc__facts dd { margin: 1px 0 12px; }
.wq-svc__facts dd:last-child { margin-bottom: 0; }
.wq-svc__facts dt + dd + dt + dd { color: var(--wq-gray); }

.wq-svc__buy { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding-top: 2px; }
.wq-svc__price {
  margin: 0; text-align: end; white-space: nowrap;
  font-family: var(--wq-serif); font-weight: 300; font-size: clamp(28px, 2.8vw, 34px); line-height: 1;
  color: var(--wq-forest); font-variant-numeric: lining-nums tabular-nums;
}
.wq-svc__cur { font-size: 0.5em; font-weight: 400; letter-spacing: 0.06em; color: var(--wq-gold-txt); vertical-align: 0.18em; }

/* Below ~980px the three columns get too narrow to read: the description and
   "You receive" stack, the price and button keep their own column. */
@media (max-width: 980px) {
  .wq-svc__row { grid-template-columns: minmax(0, 1fr) 156px; }
  .wq-svc__facts { grid-column: 1; grid-row: 2; padding-top: 0; }
  .wq-svc__buy { grid-column: 2; grid-row: 1 / span 2; }
}
/* Phone: one column, price and button share the last line. */
@media (max-width: 600px) {
  .wq-svc__row { grid-template-columns: minmax(0, 1fr); }
  .wq-svc__facts, .wq-svc__buy { grid-column: 1; grid-row: auto; }
  .wq-svc__buy { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 4px; }
  .wq-svc__price { text-align: start; }
}

.wq-svc-help {
  margin-top: clamp(36px, 6vh, 60px); padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  background: var(--wq-stone);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
}
.wq-svc-help p { margin: 0; max-width: 62ch; font-family: var(--wq-serif); font-size: 18px; line-height: 1.45; color: var(--wq-gray); }
.wq-svc-help b { font-weight: 400; color: var(--wq-forest); }

.wq-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  background: var(--wq-ink); color: var(--wq-paper);
  font-family: var(--wq-sans); font-size: 15px; letter-spacing: 0.01em;
}
.wq-btn:hover { background: var(--wq-accent-ink); color: var(--wq-paper); text-decoration: none; }
button.wq-btn { border: 0; cursor: pointer; }
.wq-btn--quiet { background: transparent; color: var(--wq-forest); box-shadow: inset 0 0 0 1px var(--wq-forest); }
.wq-btn--quiet:hover { background: var(--wq-forest); }

/* Request form — one <dialog> shared by every service card. */
.wq-dialog {
  width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--wq-rule);
  background: var(--wq-paper); color: var(--wq-ink);
  box-shadow: 0 24px 60px rgba(31, 43, 32, 0.28);
}
.wq-dialog::backdrop { background: rgba(35, 43, 32, 0.55); }
.wq-dialog__inner { position: relative; padding: clamp(24px, 5vw, 40px); }
.wq-dialog__view { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.wq-dialog__view[hidden] { display: none; }
.wq-dialog__close {
  position: absolute; top: 10px; inset-inline-end: 10px;
  width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--wq-slate);
}
.wq-dialog__close:hover { color: var(--wq-ink); }
.wq-dialog__title {
  margin: 0; padding-inline-end: 32px;
  font-family: var(--wq-serif); font-weight: 300;
  font-size: clamp(26px, 4vw, 32px); line-height: 1.12; color: var(--wq-forest);
}
.wq-dialog__title:focus { outline: none; }
.wq-dialog__meta { margin: 0; font-family: var(--wq-serif); font-size: 18px; color: var(--wq-gold-txt); font-variant-numeric: lining-nums; }
.wq-dialog__meta:empty { display: none; }
.wq-dialog__lede { margin: 4px 0 8px; font-family: var(--wq-serif); font-size: 17px; line-height: 1.45; color: var(--wq-gray); }

.wq-form { align-self: stretch; display: flex; flex-direction: column; gap: 14px; }
.wq-field { display: flex; flex-direction: column; gap: 6px; }
.wq-field span { font-size: 14.5px; color: var(--wq-body); }
.wq-field span i { font-style: normal; color: var(--wq-gray); }
/* 16px keeps iOS Safari from zooming the page when a field takes focus. */
.wq-field input, .wq-field textarea {
  font: inherit; resize: vertical; font-size: 16px; color: var(--wq-ink);
  padding: 12px 14px; background: #FBF9F3; border: 1px solid #C6BFA6; border-radius: 0;
}
.wq-field input:focus, .wq-field textarea:focus { outline: 2px solid var(--wq-accent-ink); outline-offset: 0; border-color: transparent; }
.wq-field input::placeholder, .wq-field textarea::placeholder { color: #8C9085; }
.wq-form__fine { margin: 0; font-size: 13px; line-height: 1.5; color: var(--wq-gray); }
.wq-form .wq-btn { align-self: stretch; margin-top: 4px; }

/* Dark band, same ink and rule as the proof strip. Backgrounds are dropped in
   print by default, which would leave paper-coloured text on white paper. */
.wq-steps-band {
  background: var(--wq-ink); color: var(--wq-paper);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.wq-steps-band .wq-eyebrow { color: #C7A65E; }
.wq-steps-band .wq-h2 { color: var(--wq-paper); }
.wq-steps {
  list-style: none; margin: 0; padding: 0 0 clamp(48px, 8vh, 92px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px clamp(16px, 2.4vw, 32px);
}
.wq-steps li {
  border-top: 1px solid #3A4434; padding-top: 16px;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--wq-serif); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.4;
}
.wq-steps__n { font-family: var(--wq-mono); font-size: 11px; letter-spacing: 0.16em; color: #C7A65E; }
@media (max-width: 860px) { .wq-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .wq-steps { grid-template-columns: 1fr; gap: 18px; } }

/* ── Footer ───────────────────────────────────────────────────────────────── */

#contact { border-top: 1px solid var(--wq-rule); }
#contact .wq-wrap {
  padding-block: 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.wq-foot-nav { display: flex; gap: 24px; }
.wq-foot-nav a { font-size: 14.5px; color: var(--wq-slate); }
.wq-foot-nav a:hover { color: var(--wq-ink); }
.wq-copyright { font-family: var(--wq-mono); font-size: 11px; letter-spacing: 0.13em; color: var(--wq-slate); }
.wq-whatsapp {
  display: flex; align-items: center; gap: 9px;
  color: var(--wq-ink); border-bottom: 1px solid #C6BFA6; padding-bottom: 2px; font-size: 14.5px;
}
.wq-whatsapp:hover { color: var(--wq-ink); text-decoration: none; border-bottom-color: var(--wq-accent); }
.wq-whatsapp i { width: 7px; height: 7px; border-radius: 50%; background: var(--wq-accent-ink); flex: none; }

/* Placeholders that must not ship silently — amber dashed chips, per the brief. */
.wq-todo {
  font-family: var(--wq-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #8A6A12; border: 1px dashed #C9A227; padding: 2px 7px; white-space: nowrap;
}

/* ── Print ────────────────────────────────────────────────────────────────── */

@media screen { [data-print-only] { display: none !important; } }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  [data-screen-only] { display: none !important; }
  [data-print-block] { break-inside: avoid; page-break-inside: avoid; }
  #wq-header { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
