/* ============================================================
   med.co.uk · med.uk — private-offering landing
   Staging: flat black, single dark identity. No theme switch — the
   generative background and light palette were tried and set aside;
   this is the plain, permanent look.
   ============================================================ */

:root {
  --ink: #000000;                              /* flat black ground */
  --ink-raised: #0a0a0b;
  --paper: #ece7dd;                            /* primary text */
  --paper-dim: #c9c1b3;                        /* secondary text */
  --paper-faint: rgba(236, 231, 221, 0.82);    /* annotations, eyebrow */
  --paper-press: #d5cec1;                      /* CTA hover surface */
  --accent: #b3985f;                           /* muted gold, single accent */
  --hairline: rgba(236, 231, 221, 0.09);
  --hairline-strong: rgba(236, 231, 221, 0.3); /* hero divider */
  --topbar-bg: rgba(0, 0, 0, 0.6);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 34rem;
  --fast: 120ms ease-out;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main, .topbar, .footer { position: relative; z-index: 2; }

::selection { background: var(--accent); color: var(--ink); }

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 5vw, 3.5rem);
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--hairline);
}

.marque {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  color: var(--paper);
  text-decoration: none;
}

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

.topbar-cta {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
  padding: 0.3rem 0.1rem 0.2rem;
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast);
}

.topbar-cta:hover,
.topbar-cta:focus-visible { border-color: var(--paper); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;   /* fallback for browsers without dvh/lvh support */
  min-height: 100lvh;  /* large viewport: always >= the visible area in every
                          mobile browser-chrome state, so on first paint the
                          hero fully covers the screen and "The asset" never
                          peeks in before the visitor scrolls past it */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5.5rem clamp(1.25rem, 5vw, 3.5rem) 3.5rem;
  position: relative;
}

.kicker {
  font-size: 0.71875rem;   /* 11.5px */
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--paper-faint);
  margin-bottom: 1.75rem;
}

/* Engraved, single ink — no gradients, no accents on the names */
.hero-wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  font-size: clamp(2.8rem, 8.5vw, 6.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.9rem, 2.2vw, 1.4rem);
}

.hero-wordmark .divider {
  display: block;
  width: clamp(2.5rem, 6vw, 4rem);
  height: 1px;
  background: var(--hairline-strong);
}

.hero-line {
  margin-top: 2rem;
  max-width: var(--measure);
  font-size: clamp(1.05rem, 1.5vw, 1.1875rem);
  color: var(--paper-dim);
}

.hero .cta { margin-top: 2rem; }

.hero-note {
  margin-top: 1.1rem;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--paper-dim);
}

/* ---------- CTA ---------- */

.cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 0.95rem 2.4rem;
  background: var(--paper);
  border: 1px solid var(--paper);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--fast), border-color var(--fast);
}

.cta:hover,
.cta:focus-visible {
  background: var(--paper-press);
  border-color: var(--paper-press);
}

.cta:active { transform: translateY(1px); }

.cta:focus-visible,
.topbar-cta:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Sections ---------- */

.section {
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) clamp(1.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--hairline);
  text-align: center;
}

/* Section titles: clean sans label, confident weight — a product
   section heading, not a serif clause heading */
.section .kicker {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--paper);
  margin-bottom: 1.75rem;
}

/* Sideways sections: a sticky label pinned left while its copy scrolls
   past on the right — Vercel/Stripe's two-column feature-section pattern.
   Pure CSS grid + position: sticky, no JS. */
.section-asset,
.section-whynow,
.section-terms {
  max-width: 64rem;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  column-gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.section-asset > .kicker,
.section-whynow > .kicker,
.section-terms > .kicker {
  grid-column: 1;
  position: sticky;
  top: 6rem;
  margin-bottom: 0;
}

.section-asset > .statements,
.section-whynow > .terms-copy,
.section-whynow > .whynow-lead,
.section-terms > .terms-copy {
  grid-column: 2;
}

/* Why-now's label spans two content rows (the quiet line, then the lead) */
.section-whynow > .kicker { grid-row: 1 / -1; }

/* Why it matters: a 3-up feature grid instead of a stacked list */
.section-why {
  max-width: 72rem;
  text-align: left;
}

.statements {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: flex-start;
}

.statement {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.6;
  max-width: 42rem;
}

.statement em { font-style: normal; color: var(--accent); }

/* Numbered feature grid — side by side on desktop, stacked below 48rem */

.points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(2rem, 4vw, 3rem);
  row-gap: 3rem;
  align-items: start;
}

.point {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.point-num {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.point h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  letter-spacing: -0.01em;
}

.point p { color: var(--paper-dim); max-width: var(--measure); }

/* Why now · Terms */

.terms-copy {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  max-width: 36rem;
}

.section-whynow .terms-copy { color: var(--paper-dim); }

.whynow-lead {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.3;
  max-width: 36rem;
  margin-top: 1.25rem;
  color: var(--paper);
}

/* ---------- Enquiry ---------- */

/* The form title anchors the bottom half of the page — kept exactly
   as before (serif), this section is untouched by the sans/grid pass */
.section-enquiry .kicker {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.01em;
  font-size: clamp(1.6rem, 2.6vw, 1.9rem);
  margin-bottom: 1.25rem;
}

.enquiry-line {
  color: var(--paper-dim);
  max-width: var(--measure);
  margin: 0 auto 2.5rem;
}

.enquiry-form {
  max-width: 36rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  text-align: left;
}

.hp-field { position: absolute; left: -9999px; height: 1px; width: 1px; overflow: hidden; }

.field { display: flex; flex-direction: column; gap: 0.55rem; }

.field label {
  font-size: 0.71875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
  transition: color 150ms ease-out;
}

.field input,
.field textarea {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--paper);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  padding: 0.55rem 0;
  border-radius: 0;
  transition: border-color 150ms ease-out;
}

.field input:focus,
.field textarea:focus { border-bottom-color: var(--accent); }

.field:focus-within label { color: var(--paper); }

/* Keep browser autofill from painting fields light */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--paper);
  -webkit-box-shadow: 0 0 0 1000px var(--ink) inset;
  caret-color: var(--paper);
  transition: background-color 600000s ease-out, border-color 150ms ease-out;
}

.field textarea { resize: vertical; min-height: 7rem; }

.cta-submit { align-self: center; margin-top: 0.5rem; }

.call-link { margin-top: 2rem; }

.cta-ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--paper);
}

.cta-ghost:hover,
.cta-ghost:focus-visible {
  background: transparent;
  border-color: var(--paper);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding: 2.25rem clamp(1.25rem, 5vw, 3.5rem);
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--paper-dim);
}

.footer p + p { margin-top: 0.5rem; }

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

/* Hidden state only applies once JS confirms it can reveal (.js on <html>),
   so content is always visible without JavaScript. */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
  will-change: opacity, transform;
}

.js .reveal.in { opacity: 1; transform: none; }

/* Cascade the grid/stack children in, rather than fading as one block */
.js .points > .point:nth-child(2) { transition-delay: 60ms; }
.js .points > .point:nth-child(3) { transition-delay: 120ms; }
.js .statements > .statement:nth-child(2) { transition-delay: 60ms; }
.js .statements > .statement:nth-child(3) { transition-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cta { transition: none; }
}

/* ---------- Sideways-section collapse ---------- */

/* Sits after the base rules so it wins the cascade at narrow widths:
   sticky label + grid become a plain single-column stack, no JS involved. */
@media (max-width: 48rem) {
  .section-asset,
  .section-whynow,
  .section-terms {
    grid-template-columns: 1fr;
  }
  .section-asset > .kicker,
  .section-whynow > .kicker,
  .section-terms > .kicker {
    position: static;
    grid-column: 1;
    grid-row: auto;
    margin-bottom: 2rem;
  }
  .section-asset > .statements,
  .section-whynow > .terms-copy,
  .section-whynow > .whynow-lead,
  .section-terms > .terms-copy {
    grid-column: 1;
  }
  .points { grid-template-columns: 1fr; }
}

/* ---------- Small screens ---------- */

@media (max-width: 40rem) {
  .section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .statements { gap: 2rem; }
  .points { gap: 2.5rem; }

  /* Vertical stacking puts headings hard against their own body copy;
     add the breathing room that side-by-side layout gave them for free.
     (Private enquiry keeps its own spacing, untouched by this pass.) */
  .section-asset .kicker,
  .section-why .kicker,
  .section-whynow .kicker,
  .section-terms .kicker {
    margin-bottom: 2.25rem;
  }
  .point { gap: 0.65rem; }
  .point h2 { margin-bottom: 0.2rem; }
}
