/* M&E Web Co.: tokens come from DESIGN.md. Use the names, never raw values. Mobile first. */
:root {
  --ink: #1c1b18;
  --ink-soft: #5c5850;
  --paper: #f7f5f0;
  --paper-deep: #efebe2;
  --white: #ffffff;
  --line: #ddd7ca;
  --primary: #1f4d3a;
  --primary-dark: #163a2b;
  --accent: #a8461f;
  --on-ink-soft: #c9c4b8;
  --success: #1f6b3a;
  --error: #b3261e;

  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-display: clamp(2.25rem, 1.6rem + 3.2vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.45rem + 1.5vw, 2.4rem);
  --fs-h3: 1.25rem;
  --fs-lead: clamp(1.15rem, 1.08rem + 0.4vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-eyebrow: 0.8rem;

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 72px; --s8: 112px;
  --r-sm: 6px;
  --r-md: 12px;
  --shadow: 0 1px 2px rgba(28, 27, 24, 0.06), 0 4px 16px rgba(28, 27, 24, 0.06);
  --max: 1120px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--fs-body)/1.6 var(--font-body); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; color: var(--ink); margin: 0 0 var(--s3); }
h1 { font-size: var(--fs-display); line-height: 1.08; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); line-height: 1.15; }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
p { margin: 0 0 var(--s3); }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 2px; }
strong { font-weight: 700; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: 65ch; }
.section { padding: var(--s7) 0; }
.section--deep { background: var(--paper-deep); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink h2, .section--ink h3 { color: var(--paper); }
.section--ink p { color: var(--on-ink-soft); }
.section--ink a { color: var(--paper); }
.section--ink :focus-visible { outline-color: var(--paper); }
@media (min-width: 900px) { .section { padding: var(--s8) 0; } }

.eyebrow { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s3); }
.section--ink .eyebrow { color: #e9b48f; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-soft); max-width: 40ch; }
.muted { color: var(--ink-soft); }
.small { font-size: var(--fs-small); line-height: 1.5; }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: var(--s3); top: var(--s3); z-index: 100; background: var(--white); padding: var(--s2) var(--s3); border-radius: var(--r-sm); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 12px var(--s4);
  border-radius: var(--r-sm); border: 2px solid transparent; font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; }
.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-dark); }
.btn--secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--secondary:hover { background: var(--ink); color: var(--paper); }
.section--ink .btn--secondary { border-color: var(--paper); color: var(--paper); }
.section--ink .btn--secondary:hover { background: var(--paper); color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: var(--s3); min-height: 64px; }
.wordmark { font: 700 1.35rem/1 var(--font-head); color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.nav-toggle { min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--ink); border-radius: var(--r-sm); background: transparent; color: var(--ink); font: 700 0.95rem var(--font-body); cursor: pointer; }
.site-nav { display: none; list-style: none; margin: 0; padding: 0; }
.site-nav.is-open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: var(--s2) var(--gutter) var(--s3); }
.site-nav a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 700; }
.site-nav a:hover { color: var(--primary); }
.header-call { display: none; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: flex; position: static; gap: var(--s5); padding: 0; border: 0; background: none; }
  .site-nav a { padding: var(--s2) 0; font-weight: 400; }
  .header-call { display: inline-flex; min-height: 44px; }
}

/* Hero */
.hero { padding: var(--s6) 0 var(--s7); }
.hero__grid { display: grid; gap: var(--s6); align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .btn-row { margin-top: var(--s5); }
.hero__note { margin-top: var(--s4); font-size: var(--fs-small); color: var(--ink-soft); }
.hero__visual { justify-self: center; position: relative; }
.hero__visual figcaption { margin-top: var(--s3); text-align: center; font-size: var(--fs-small); color: var(--ink-soft); max-width: 28ch; margin-inline: auto; }
@media (min-width: 900px) {
  .hero { padding: var(--s7) 0 var(--s8); }
  .hero__grid { grid-template-columns: 1.25fr 1fr; gap: var(--s7); }
}

/* Phone frame around demo screenshots */
.phone { width: 260px; padding: 10px; background: var(--ink); border-radius: 36px; box-shadow: 0 20px 40px rgba(28, 27, 24, 0.18); }
.phone img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 27px; background: var(--white); }
@media (min-width: 900px) { .hero .phone { width: 300px; transform: rotate(2deg); } }

/* Problem list */
.split { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.2fr; gap: var(--s7); } }
.rule-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rule-list li { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.rule-list h3 { margin-bottom: var(--s2); }
.rule-list p { margin: 0; color: var(--ink-soft); }

/* Work */
.work { display: grid; grid-auto-flow: column; grid-auto-columns: 240px; gap: var(--s5); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: var(--s2) var(--gutter) var(--s4); margin: var(--s5) calc(var(--gutter) * -1) 0; }
.work figure { margin: 0; scroll-snap-align: start; }
.work .phone { width: 240px; box-shadow: none; }
.work figcaption { margin-top: var(--s3); }
.work figcaption strong { display: block; font-family: var(--font-head); font-size: var(--fs-h3); color: var(--paper); }
@media (min-width: 900px) {
  .work { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin-inline: 0; padding-inline: 0; }
  .work .phone { width: 100%; max-width: 280px; }
}

/* Lists */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding-left: 32px; margin-bottom: var(--s3); }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 14px; height: 8px; border-left: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(-45deg); }
.two-col { display: grid; gap: var(--s6); }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: var(--s7); } }

/* Pricing */
.prices { display: grid; gap: var(--s4); margin-top: var(--s5); }
@media (min-width: 760px) { .prices { grid-template-columns: 1fr 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: var(--s5); }
.price-card h3 { margin-bottom: var(--s1); }
.price { font: 700 clamp(2.5rem, 2rem + 2vw, 3.25rem)/1 var(--font-head); color: var(--accent); margin: var(--s3) 0 var(--s2); }
.price small { font: 400 1rem var(--font-body); color: var(--ink-soft); }
.price-card .was { color: var(--ink-soft); margin-bottom: var(--s4); }
.price-card .checklist { padding-top: var(--s4); border-top: 1px solid var(--line); }
.price-card .checklist li { margin-bottom: var(--s2); }

/* Steps: the signature element */
.steps { list-style: none; margin: var(--s5) 0 0; padding: 0; max-width: 720px; }
.steps li { position: relative; padding: 0 0 var(--s6) 72px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: 23px; top: 52px; bottom: 8px; width: 1px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .num { position: absolute; left: 0; top: -6px; width: 48px; font: 700 2.75rem/1 var(--font-head); color: var(--accent); text-align: center; }
.steps h3 { margin-bottom: var(--s2); }
.steps p { margin: 0; color: var(--ink-soft); }

/* About */
.about { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1.2fr; gap: var(--s7); } }
.promises { list-style: none; margin: 0; padding: 0; }
.promises li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.promises li:first-child { border-top: 1px solid var(--line); }

/* Contact */
.contact { display: grid; gap: var(--s6); }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1.1fr; gap: var(--s7); align-items: start; } }
.contact-lines { list-style: none; margin: var(--s5) 0 0; padding: 0; }
.contact-lines li { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.contact-lines .icon { color: var(--accent); }
.form { display: grid; gap: var(--s4); }
.field label { display: block; font-weight: 700; margin-bottom: var(--s2); }
.field .hint { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #9c968a; border-radius: var(--r-sm); background: var(--white); color: var(--ink); font: inherit; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.form .btn { width: 100%; }
.form-note { margin: 0; font-size: var(--fs-small); color: var(--ink-soft); }
.hp { display: none; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-ink-soft); padding: var(--s6) 0 calc(var(--s6) + 72px); font-size: var(--fs-small); }
.site-footer a { color: var(--paper); }
.site-footer :focus-visible { outline-color: var(--paper); }
.footer-grid { display: grid; gap: var(--s4); }
.footer-grid .wordmark { color: var(--paper); font-size: 1.25rem; }
.footer-grid .wordmark span { color: #e9b48f; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr auto; align-items: end; } .site-footer { padding-bottom: var(--s6); } }

/* Phone-only bottom bar */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2);
  padding: var(--s2) var(--s2) calc(var(--s2) + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.mobile-bar .btn { padding-inline: var(--s2); }
@media (min-width: 760px) { .mobile-bar { display: none; } }

/* Simple pages */
.page { padding: var(--s7) 0; }
.page h2 { font-size: var(--fs-h3); margin-top: var(--s5); }
