/* MeasurePad marketing site.
 * Editorial feel: serif body copy for reading sections, sans-serif for
 * UI elements. No gradient-text shimmer, no browser-frame screenshot
 * chrome, no alternating-card feature grids. Long-form prose with
 * inline figures, asymmetric rhythm, specific numbers.
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fbfaf7;          /* warm off-white, not SaaS-blue */
  color: #0f172a;
  font-family: 'Source Serif 4', Charter, 'Iowan Old Style', Georgia, serif;
  font-size: 19px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: underline; text-decoration-color: rgba(245, 158, 11, 0.5); text-underline-offset: 3px; }
a:hover { text-decoration-color: #f59e0b; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

:root {
  --navy:    #0f172a;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --amber:    #f59e0b;
  --amber-deep: #b45309;
  --cream:    #fbfaf7;
  --ink:      #1c1917;          /* warmer than pure slate */
  --rule:     #e6e4dd;          /* warm divider lines */

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Source Serif 4', Charter, 'Iowan Old Style', Georgia, serif;

  --measure: 640px;             /* reading column */
  --wide:    920px;             /* image column */
  --full:    1240px;            /* full-bleed max */
}

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}
.topbar-inner {
  max-width: var(--full);
  margin: 0 auto;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); }

.topbar-links {
  display: flex;
  justify-self: center;
  gap: 28px;
}
.topbar-links a {
  font-size: 14.5px;
  color: var(--slate-700);
  text-decoration: none;
  font-weight: 500;
}
.topbar-links a:hover { color: var(--ink); }

.topbar-cta { display: flex; align-items: center; gap: 20px; }
.topbar-signin {
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--slate-700);
  font-weight: 500;
  text-decoration: none;
}
.topbar-signin:hover { color: var(--ink); }

@media (max-width: 860px) {
  .topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .topbar-links { display: none; }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-solid {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}
.btn-solid:hover {
  background: #000000;
  border-color: #000000;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-link {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--amber-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(180, 83, 9, 0.3);
  padding-bottom: 1px;
}
.btn-link:hover { border-bottom-color: var(--amber-deep); }

/* Trial CTA swaps to a shorter label on phones (see mobile block below) */
.btn-short { display: none; }

/* ── Layout primitives ───────────────────────────────────── */
.column {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 28px;
}
/* Content hangs slightly left of centre on wide viewports for editorial rhythm. */
@media (min-width: 1100px) {
  .column { margin-left: calc(50% - 520px); margin-right: 0; }
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 20px;
}
.heading {
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 28px;
  max-width: 16ch;
}

.prose p {
  font-size: 19px;
  line-height: 1.62;
  color: var(--ink);
  margin-bottom: 1.1em;
}
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--amber-deep); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: 88px 0 48px;
  display: grid;
  gap: 64px;
}
@media (min-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
    align-items: start;
    padding-left: calc(50% - 580px);
    padding-right: 40px;
    gap: 56px;
  }
  .hero .column { margin: 0; padding: 0; max-width: 560px; }
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin-bottom: 28px;
}

.lede {
  max-width: 520px;
}
.lede p {
  font-size: 19.5px;
  line-height: 1.58;
  color: var(--slate-700);
  margin-bottom: 28px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hero-foot {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--slate-500);
}

.hero-figure {
  margin: 0;
}
.hero-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 18px 40px -16px rgba(15, 23, 42, 0.18);
}
.hero-figure figcaption {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--slate-500);
  margin-top: 14px;
  max-width: 48ch;
}

/* ── Maths section (the money section) ──────────────────── */
.maths {
  padding: 88px 0;
  border-top: 1px solid var(--rule);
}
.maths .prose p { font-size: 20px; }

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 48px;
  margin: 56px 0 40px;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .numbers-grid { grid-template-columns: 1fr; gap: 28px; padding: 28px 0; margin: 40px 0 28px; }
}
.num-label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 6px;
}
.num {
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 4px;
}
.num.highlight { color: var(--amber-deep); }
.num-note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--slate-500);
  line-height: 1.4;
}

.pull {
  margin: 40px 0 0;
  padding: 24px 0 24px 28px;
  border-left: 3px solid var(--amber);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
  max-width: 36ch;
}

/* ── Calculator (interactive ROI widget) ────────────────────── */
.calculator {
  padding: 88px 0;
  border-top: 1px solid var(--rule);
}
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin: 40px 0 20px;
  align-items: start;
  max-width: var(--wide);
}
@media (max-width: 760px) {
  .calc { grid-template-columns: 1fr; gap: 32px; }
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.calc-input { display: block; }
.calc-input-label {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-500);
  display: block;
  margin-bottom: 10px;
}
.calc-input input[type="range"] {
  width: 100%;
  accent-color: var(--amber-deep);
  cursor: pointer;
  height: 22px;
}
.calc-input output {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: block;
  margin-top: 6px;
}

.calc-output {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 28px 28px 24px;
}
.calc-metric + .calc-metric {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.calc-label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 6px;
}
.calc-value {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.calc-value.highlight { color: var(--amber-deep); }
.calc-foot {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--slate-600, #475569);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.calc-disclaimer {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--slate-500);
  max-width: 58ch;
  margin-top: 12px;
}

/* ── What it does (full-bleed figures with editorial prose) ── */
.what {
  padding: 88px 0 48px;
  border-top: 1px solid var(--rule);
}
.what .column + .full-bleed { margin-top: 40px; }
.what .full-bleed + .column { margin-top: 40px; }
.what .column + .column { margin-top: 40px; }

.full-bleed {
  max-width: var(--full);
  margin: 0 auto;
  padding: 0 28px;
}
.full-bleed img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 14px 32px -16px rgba(15, 23, 42, 0.15);
}
.full-bleed figcaption {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--slate-500);
  margin-top: 14px;
  max-width: 56ch;
}
@media (min-width: 1100px) {
  .full-bleed { margin-left: calc(50% - 520px); margin-right: 28px; max-width: none; }
  .full-bleed figcaption { max-width: 48ch; }
}

/* ── Pricing ─────────────────────────────────────────────── */
.pricing {
  padding: 88px 0;
  border-top: 1px solid var(--rule);
}
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 48px 0 24px;
  max-width: var(--wide);
}
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
}
.plan {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 28px 28px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan-featured { border-color: var(--ink); border-width: 1.5px; }
.plan-badge {
  font-family: var(--sans);
  position: absolute;
  top: -10px;
  left: 22px;
  background: var(--ink);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  border-radius: 3px;
}
.plan-name {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.plan-price {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.plan-price .sym { font-size: 28px; vertical-align: top; margin-right: 2px; }
.plan-price .per { font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--slate-500); letter-spacing: 0; }
.plan-note {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--slate-500);
  margin-bottom: 4px;
}
.plan .btn { margin-top: 4px; width: 100%; text-decoration: none; }
.plan-context {
  font-size: 15px;
  line-height: 1.5;
  color: var(--slate-700);
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  margin-top: 6px;
}

.pricing-foot {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--slate-500);
  max-width: 55ch;
}

/* ── Questions (paragraph-based, no accordion) ───────────── */
.questions {
  padding: 88px 0;
  border-top: 1px solid var(--rule);
}
.qa {
  margin: 0;
  display: grid;
  gap: 36px;
  max-width: 640px;
}
.qa dt {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 10px;
}
.qa dd {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--slate-700);
}
.qa dd code {
  background: var(--slate-100);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 15px;
  color: var(--ink);
}

/* ── Close (quiet CTA, no dark shout) ────────────────────── */
.close {
  padding: 96px 0 120px;
  border-top: 1px solid var(--rule);
}
.close .heading { margin-bottom: 24px; }
.close .prose { max-width: 55ch; margin-bottom: 36px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 40px 0 28px;
  font-family: var(--sans);
  background: #ffffff;
}
.footer-top {
  max-width: var(--full);
  margin: 0 auto;
  padding: 0 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  font-size: 16px;
}
.footer-brand .brand-mark { width: 26px; height: 26px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.footer-links a {
  font-size: 14px;
  color: var(--slate-500);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); }
.footer-bottom {
  max-width: var(--full);
  margin: 0 auto;
  padding: 14px 28px 0;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--slate-400);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: var(--slate-500); text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }

/* ── Reveal on scroll (retained, subtler) ────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Anchor-link offset so section tops clear the sticky topbar */
#what, #maths, #calculator, #pricing, #questions { scroll-margin-top: 80px; }

/* ── Mobile tightening (≤640px) ──────────────────────────── */
@media (max-width: 640px) {
  /* Topbar: keep both sign-in and trial CTA visible, but tighten everything
     and swap the trial button to a shorter label so it fits on narrow phones. */
  .topbar-inner { padding: 12px 16px; gap: 10px; }
  .topbar-cta { gap: 12px; }
  .topbar-signin { font-size: 14px; }
  .brand-name { font-size: 16px; }
  .brand-mark { width: 26px; height: 26px; }

  .btn { padding: 9px 14px; font-size: 14px; }
  .btn-lg { padding: 12px 20px; font-size: 15px; }

  /* Swap trial CTA text on mobile so both topbar links fit */
  .topbar-cta .btn .btn-full { display: none; }
  .topbar-cta .btn .btn-short { display: inline; }

  /* Tighter horizontal gutters */
  .column,
  .full-bleed { padding: 0 22px; }

  /* Hero */
  .hero { padding: 48px 0 36px; gap: 40px; }
  .display { font-size: clamp(30px, 8.6vw, 44px); line-height: 1.12; margin-bottom: 22px; }
  .lede p { font-size: 18px; line-height: 1.55; margin-bottom: 24px; }
  .hero-cta { gap: 14px; }
  .hero-figure figcaption,
  .full-bleed figcaption { font-size: 13px; margin-top: 12px; }
  .hero-figure img,
  .full-bleed img {
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.05),
      0 10px 24px -12px rgba(15, 23, 42, 0.15);
  }

  /* Headings */
  .heading { font-size: clamp(26px, 7vw, 36px); margin-bottom: 22px; }
  .eyebrow { margin-bottom: 16px; font-size: 11.5px; }

  /* Calculator */
  .calculator { padding: 56px 0; }
  .calc { margin: 32px 0 16px; gap: 28px; }
  .calc-output { padding: 22px 20px 20px; }
  .calc-input-label { font-size: 12px; }
  .calc-input output { font-size: 20px; }

  /* Maths */
  .maths { padding: 56px 0; }
  .maths .prose p { font-size: 18.5px; }
  .numbers-grid { margin: 40px 0 24px; padding: 24px 0; gap: 24px; }
  .num { font-size: 28px; }
  .pull {
    font-size: 19px;
    line-height: 1.45;
    padding: 16px 0 16px 20px;
    margin-top: 28px;
    border-left-width: 3px;
  }

  /* What it does */
  .what { padding: 56px 0 24px; }
  .what .column + .full-bleed,
  .what .full-bleed + .column,
  .what .column + .column { margin-top: 32px; }

  /* Pricing */
  .pricing { padding: 56px 0; }
  .plans { margin: 36px 0 20px; gap: 22px; }
  .plan { padding: 24px 22px 26px; gap: 12px; }
  .plan-price { font-size: 40px; }
  .plan-price .sym { font-size: 26px; }
  .plan-context { font-size: 14.5px; }

  /* Questions */
  .questions { padding: 56px 0; }
  .qa { gap: 28px; }
  .qa dt { font-size: 19px; }
  .qa dd { font-size: 16.5px; }

  /* Close */
  .close { padding: 56px 0 72px; }
  .close .prose { margin-bottom: 28px; }

  /* Footer */
  .footer-top { padding: 0 22px 20px; gap: 20px; }
  .footer-links { gap: 12px 18px; }
  .footer-bottom { padding: 14px 22px 0; font-size: 12px; gap: 10px; }

  /* Body copy slightly smaller to earn comfortable line length on narrow screens */
  body { font-size: 17.5px; }
  .prose p { font-size: 17.5px; }
}
