/* Asia GMP paid-search landing pages
   Design language: instrument record. Ruled hairlines, tabular monospace numerics,
   colour used only to signal in-range vs excursion. See DESIGN.md. */

:root {
  --ink:            oklch(0.185 0.008 150);
  --ink-soft:       oklch(0.440 0.012 150);
  --ink-faint:      oklch(0.520 0.010 150);
  --paper:          oklch(0.985 0.004 120);
  --paper-sunk:     oklch(0.955 0.006 140);
  --paper-deep:     oklch(0.925 0.008 145);
  --rule:           oklch(0.885 0.008 145);
  --rule-strong:    oklch(0.780 0.010 145);

  --in-range:       oklch(0.571 0.158 150);   /* the logo green, non-text accents only */
  --action:         oklch(0.520 0.150 150);   /* text-bearing surfaces, 4.86:1 with --paper */
  --action-deep:    oklch(0.430 0.130 150);
  --in-range-deep:  oklch(0.455 0.135 150);
  --in-range-wash:  oklch(0.955 0.030 150);

  --cta:            #dc2626;   /* BMA SOP: all CTAs red. Conflicts with DESIGN.md, see README */
  --cta-deep:       #b91c1c;
  --excursion:      oklch(0.545 0.175 32);
  --excursion-wash: oklch(0.960 0.028 32);

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.88rem);
  --step-0:  clamp(1.02rem, 0.99rem + 0.14vw, 1.10rem);
  --step-1:  clamp(1.36rem, 1.28rem + 0.38vw, 1.60rem);
  --step-2:  clamp(1.80rem, 1.62rem + 0.86vw, 2.44rem);
  --step-3:  clamp(2.30rem, 1.94rem + 1.72vw, 3.60rem);

  --gutter: clamp(1.15rem, 4vw, 3rem);
  --measure: 66ch;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

img { max-width: 100%; height: auto; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.021em; font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); letter-spacing: -0.014em; }
p  { margin: 0 0 1.05em; max-width: var(--measure); text-wrap: pretty; }
strong { font-weight: 700; }

/* ---------- structural rules: the hairline IS the layout ---------- */

.shell { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gutter); }

.band { border-top: 1px solid var(--rule); }
.band--sunk { background: var(--paper-sunk); }
.band--ink { background: var(--ink); color: var(--paper); border-top-color: var(--ink); }
.band > .shell { padding-block: clamp(2.6rem, 6vw, 5.2rem); }

/* section marker: a monospace clause reference, like a document */
.marker {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}
.marker::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.band--ink .marker { color: oklch(0.76 0.02 150); }
.band--ink .marker::after { background: oklch(0.34 0.012 150); }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: relative;
  z-index: 5;
}
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.9rem;
}
.masthead img { height: 38px; width: auto; display: block; }
.masthead__meta {
  font-family: var(--mono); font-size: var(--step--1);
  color: var(--ink-soft); letter-spacing: 0.04em; text-align: right;
}
.masthead__meta b { color: var(--ink); font-weight: 600; }

/* ---------- hero ---------- */

.hero > .shell {
  display: grid; gap: clamp(2rem, 4vw, 3.4rem);
  padding-block: clamp(2.2rem, 5vw, 4rem) clamp(2.4rem, 5vw, 4.4rem);
}
@media (min-width: 62rem) {
  .hero > .shell { grid-template-columns: minmax(0, 1.28fr) minmax(24rem, 0.72fr); align-items: start; }
}

.eyebrow {
  font-family: var(--mono); font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--in-range-deep);
  margin: 0 0 1rem;
}
.hero h1 { margin-bottom: 1.1rem; }
.hero__sub { font-size: var(--step-1); line-height: 1.38; color: var(--ink-soft); font-weight: 400; max-width: 34ch; }

/* the reading of an instrument, used once in the hero */
.readout {
  margin-top: 2rem; border: 1px solid var(--rule); background: var(--paper);
  display: grid; grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 34rem) { .readout { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.readout div { padding: 0.95rem 1.05rem; border-bottom: 1px solid var(--rule); min-width: 0; }
.readout div:last-child { border-bottom: 0; }
@media (min-width: 34rem) {
  .readout div { border-bottom: 0; border-right: 1px solid var(--rule); }
  .readout div:last-child { border-right: 0; }
}
.readout dt {
  font-family: var(--mono); font-size: 0.70rem; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.3rem;
}
.readout dd { margin: 0; font-family: var(--mono); font-size: 1.22rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.readout dd small { display: block; margin-top: 0.15rem; }
.readout dd small { font-size: 0.72rem; font-weight: 400; color: var(--ink-soft); letter-spacing: 0.04em; }

/* ---------- form ---------- */

.form-card { border: 1px solid var(--rule-strong); background: var(--paper); }
@media (min-width: 62rem) { .form-card { position: sticky; top: 1.5rem; } }

.form-card__head { padding: 1.15rem 1.3rem; border-bottom: 1px solid var(--rule); background: var(--in-range-wash); }
.form-card__head p { margin: 0.35rem 0 0; font-size: var(--step--1); color: var(--ink-soft); max-width: none; }
.form-card__head strong { display: block; font-size: 1.12rem; line-height: 1.25; }
.form-card__body { padding: 1.3rem; }

.field { margin-bottom: 0.9rem; }
.field label {
  display: block; font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.35rem;
}
.field input, .field select {
  width: 100%; padding: 0.72rem 0.8rem; font: inherit; font-size: 0.98rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule-strong); border-radius: 0;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.field input:focus-visible, .field select:focus-visible {
  outline: none; border-color: var(--in-range);
  box-shadow: 0 0 0 3px var(--in-range-wash);
}
.field input[aria-invalid="true"] { border-color: var(--excursion); }
.field .err { display: none; font-size: 0.8rem; color: var(--excursion); margin-top: 0.3rem; }
.field input[aria-invalid="true"] ~ .err { display: block; }

.btn {
  display: block; width: 100%; padding: 0.95rem 1.1rem;
  font: inherit; font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em;
  color: #fff; background: var(--cta);
  border: 1px solid var(--cta); border-radius: 0; cursor: pointer;
  transition: background 180ms var(--ease);
}
.btn:hover, .btn:focus-visible { background: var(--cta-deep); border-color: var(--cta-deep); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.form-note {
  font-family: var(--mono); font-size: 0.72rem; line-height: 1.5;
  color: var(--ink-faint); margin: 0.8rem 0 0; letter-spacing: 0.02em;
}

/* ---------- recognition list ---------- */

.recognition { list-style: none; margin: 0; padding: 0; max-width: 72ch; }
.recognition li {
  border-top: 1px solid var(--rule); padding: 0.95rem 0 0.95rem 2.6rem;
  position: relative; font-size: 1.06rem;
}
.recognition li:last-child { border-bottom: 1px solid var(--rule); }
.recognition li::before {
  content: attr(data-n); position: absolute; left: 0; top: 1.05rem;
  font-family: var(--mono); font-size: 0.76rem; font-weight: 600;
  color: var(--excursion); letter-spacing: 0.04em;
}

/* ---------- open loops ---------- */

.loops { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.loops li { border-top: 1px solid var(--rule); padding: 1.35rem 0; }
.loops li:last-child { border-bottom: 1px solid var(--rule); }
.loops h3 { margin-bottom: 0.4rem; }
.loops h3 { overflow-wrap: break-word; }
.loops h3 span { font-family: var(--mono); color: var(--in-range-deep); font-weight: 600; }
.loops p { margin: 0; color: var(--ink-soft); }
.loops__more {
  font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-faint); margin-top: 1.2rem;
}

/* ---------- excursion / agitation block ---------- */

.excursion-block {
  background: var(--excursion-wash);
  border: 1px solid oklch(0.86 0.05 32);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  max-width: 74ch;
}
.excursion-block p:last-child { margin-bottom: 0; }
.excursion-block .lede { font-size: var(--step-1); line-height: 1.35; font-weight: 700; letter-spacing: -0.014em; }

/* ---------- the offer ---------- */

.offer { display: grid; gap: clamp(1.8rem, 4vw, 3rem); }
@media (min-width: 56rem) { .offer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.offer ol { margin: 0; padding: 0; list-style: none; counter-reset: pt; }
.offer ol li {
  counter-increment: pt; border-top: 1px solid oklch(0.34 0.012 150);
  padding: 0.7rem 0 0.7rem 3.1rem; position: relative; font-size: 0.98rem;
}
.offer ol li:last-child { border-bottom: 1px solid oklch(0.34 0.012 150); }
.offer ol li::before {
  content: counter(pt, decimal-leading-zero); position: absolute; left: 0; top: 0.78rem;
  font-family: var(--mono); font-size: 0.76rem; font-weight: 600; color: var(--in-range);
}

/* ---------- proof ---------- */

.proof { display: grid; gap: 1.6rem; }
@media (min-width: 52rem) { .proof { grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); align-items: start; } }
.proof__badge { border: 1px solid var(--rule); background: var(--paper); padding: 0.9rem; }
.proof__badge img { display: block; width: 260px; max-width: 100%; height: auto; }
.proof dl { margin: 0; display: grid; gap: 0; }
.proof dl > div { display: grid; gap: 0.2rem; border-top: 1px solid var(--rule); padding: 0.72rem 0; }
@media (min-width: 44rem) { .proof dl > div { display: flex; gap: 1rem; } }
.proof dl > div:last-child { border-bottom: 1px solid var(--rule); }
.proof dt {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); flex: 0 0 11rem;
}
.proof dd { margin: 0; font-size: 0.98rem; }

/* pending-asset placeholder, visible to the team, never a fake tile */
.pending {
  border: 1px dashed var(--rule-strong); background: repeating-linear-gradient(
    135deg, transparent, transparent 9px, var(--paper-sunk) 9px, var(--paper-sunk) 18px);
  padding: 1.1rem 1.2rem; margin-top: 1.4rem;
}
.pending p { margin: 0; font-family: var(--mono); font-size: 0.76rem; line-height: 1.6; color: var(--ink-soft); max-width: none; }
.pending b { color: var(--excursion); font-weight: 600; letter-spacing: 0.06em; }

/* ---------- figure ---------- */

.figure { margin: 0; }
.figure img { display: block; width: 100%; max-width: 300px; height: auto; }
.figure figcaption {
  font-family: var(--mono); font-size: 0.74rem; line-height: 1.55; color: var(--ink-faint);
  border-top: 1px solid var(--rule); margin-top: 0.85rem; padding-top: 0.6rem; max-width: 300px;
}
/* the caption sits on the ink band on every page; --ink-faint is unreadable there */
.band--ink .figure figcaption { color: oklch(0.740 0.014 150); border-top-color: oklch(0.34 0.012 150); }

/* ---------- faq ---------- */

.faq { max-width: 74ch; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; padding: 1.05rem 2rem 1.05rem 0; font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.012em; list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 0.95rem;
  font-family: var(--mono); font-size: 1.2rem; color: var(--in-range-deep);
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 2px solid var(--in-range); outline-offset: 3px; }
.faq details p { padding-bottom: 0.9rem; color: var(--ink-soft); }

/* ---------- closing ---------- */

.closing { display: grid; gap: clamp(1.8rem, 4vw, 3rem); }
@media (min-width: 62rem) { .closing { grid-template-columns: minmax(0, 1fr) minmax(22rem, 26rem); align-items: start; } }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--rule); background: var(--paper-sunk); }
.site-footer .shell { padding-block: 2rem; }
.site-footer p {
  font-family: var(--mono); font-size: 0.74rem; line-height: 1.7;
  color: var(--ink-faint); margin: 0; max-width: none; letter-spacing: 0.02em;
}
.site-footer img { height: 26px; width: auto; margin-bottom: 0.9rem; display: block; }
.site-footer p + p { margin-top: 0.8rem; }
.site-footer__pdpa { max-width: 62ch !important; }
.site-footer a { color: var(--in-range-deep); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(10px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 620ms var(--ease), transform 620ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
}

h2.visually-hidden { position: absolute; }

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