/* ==========================================================================
   Nathan's Web Design — portfolio styles
   Palette: warm white, black, forest green, deep brown
   ========================================================================== */

:root {
  --paper: #f7f4ee;
  --paper-2: #f0ebe3;
  --white: #ffffff;
  --ink: #161513;
  --ink-2: #3a3632;
  --ink-3: #625b53;
  --green: #2e4a3b;
  --green-dark: #22382c;
  --green-tint: #e3eae4;
  --brown: #4e3f35;
  --ridge-back: #cfc5b8;
  --line: #e1dbd1;
  --line-2: #cfc5b8;

  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgb(22 21 19 / 0.05), 0 12px 32px -18px rgb(22 21 19 / 0.28);
  --shadow-lift: 0 2px 4px rgb(22 21 19 / 0.05), 0 22px 44px -20px rgb(22 21 19 / 0.35);

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 44px);
  --section: clamp(72px, 10vw, 128px);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 300;
  background: var(--ink); color: var(--paper); padding: 12px 18px;
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.icon {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section); }
.band { background: var(--paper-2); border-block: 1px solid var(--line); }

/* ---------- Type ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  letter-spacing: -0.025em; font-optical-sizing: auto;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.04; }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.45rem); line-height: 1.2; letter-spacing: -0.015em; }
.accent { color: var(--green); }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brown); margin-bottom: 18px;
}
.lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--ink-2); }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p:not(.eyebrow) { margin-top: 16px; color: var(--ink-2); font-size: 1.125rem; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--green);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  text-decoration-color: rgb(46 74 59 / 0.35);
  transition: text-decoration-color 0.2s, gap 0.2s;
}
.text-link:hover { text-decoration-color: currentColor; gap: 9px; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--green); --fg: var(--paper); --bd: var(--green);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 12px 24px; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.btn:hover { --bg: var(--green-dark); --bd: var(--green-dark); transform: translateY(-2px); }
.btn:active { transform: none; }
.btn .icon { width: 1.1em; height: 1.1em; transition: transform 0.25s var(--ease); }
.btn:hover .icon-arrow { transform: translateX(3px); }
.btn--sm { min-height: 42px; padding: 8px 18px; font-size: 0.9375rem; }
.btn--outline { --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn--outline:hover { --bg: var(--ink); --fg: var(--paper); --bd: var(--ink); }
.btn--light { --bg: var(--paper); --fg: var(--ink); --bd: var(--paper); }
.btn--light:hover { --bg: var(--white); --bd: var(--white); }
.btn--ghost-light { --bg: transparent; --fg: var(--paper); --bd: rgb(247 244 238 / 0.4); }
.btn--ghost-light:hover { --bg: rgb(247 244 238 / 0.1); --bd: var(--paper); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 34px; height: 24px; flex: none; }
.logo-word { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgb(247 244 238 / 0.9);
  -webkit-backdrop-filter: saturate(1.3) blur(12px); backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgb(22 21 19 / 0.5); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); }
.nav-links { display: flex; gap: clamp(20px, 2.6vw, 32px); list-style: none; padding: 0; }
.nav-links a {
  position: relative; padding-block: 6px; text-decoration: none; font-weight: 500; font-size: 0.975rem; color: var(--ink-2);
  transition: color 0.2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--green);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 12px; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer; color: var(--ink);
}
.menu-toggle .icon { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99; overflow-y: auto;
  display: flex; flex-direction: column; gap: 28px; padding: 20px var(--gutter) 40px;
  background: var(--paper);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0s; }
.mobile-menu ul { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.mobile-menu li a {
  display: flex; justify-content: space-between; align-items: center; padding: 18px 0;
  border-bottom: 1px solid var(--line); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; letter-spacing: -0.02em;
}
.mobile-menu li a[aria-current="page"] { color: var(--green); }
.mobile-menu .icon { color: var(--brown); }
.mobile-menu-actions { display: grid; gap: 12px; }
body.menu-open { overflow: hidden; }

.action-bar { display: none; }

/* ---------- Hero ---------- */
.hero {
  --ridge-h: clamp(130px, 19vw, 330px);
  position: relative; overflow: hidden;
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: calc(var(--ridge-h) * 0.5);
  border-bottom: 1px solid var(--line);
}
.hero-copy { position: relative; z-index: 1; max-width: 640px; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.ridges {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 0;
  width: 100%; height: var(--ridge-h);
}
.ridges path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.ridges .ridge-fill { fill: var(--paper); stroke: none; }
.ridge-back { stroke: var(--ridge-back); stroke-width: 1.4; }
.ridge-front { stroke: var(--brown); stroke-width: 2; }
.js .ridges path[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease) forwards; }
.js .ridges .ridge-back { animation-delay: 0.35s; animation-duration: 2.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Selling points ---------- */
.values { padding-block: clamp(32px, 4vw, 48px) clamp(48px, 6vw, 72px); }
.values-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px);
  list-style: none; padding: 0;
}
.values-list h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.2rem; letter-spacing: -0.015em; margin-bottom: 8px;
}
.values-list h2::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.values-list p { color: var(--ink-3); padding-left: 19px; }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; padding: 0; }
.project-card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 12px 12px 22px; box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.project-card .browser { margin-bottom: 20px; }
.project-card-body { display: flex; flex-direction: column; flex: 1; padding-inline: 10px; }
.tag {
  align-self: flex-start; display: inline-block; margin-bottom: 12px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: var(--brown);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 11px;
}
.project-card h3 { font-size: 1.35rem; margin-bottom: 4px; }
.project-meta { color: var(--ink-3); font-size: 0.95rem; }
.project-summary { color: var(--ink-2); margin-top: 12px; display: none; }
.project-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 16px;
  font-weight: 600; color: var(--green);
}
.project-link .icon { transition: transform 0.25s var(--ease); }
.project-card:hover .project-link .icon { transform: translateX(4px); }

/* One project: show it as a wide featured card instead of a lonely column */
.work-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.work-grid[data-count="1"] .project-card {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center; gap: 12px 40px;
  padding: 16px 16px 16px 16px;
}
.work-grid[data-count="1"] .project-card .browser { margin-bottom: 0; }
.work-grid[data-count="1"] .project-card-body { padding: 16px 20px 16px 0; }
.work-grid[data-count="1"] .project-card h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.work-grid[data-count="1"] .project-summary { display: block; font-size: 1.05rem; }
.work-grid[data-count="1"] .project-link { margin-top: 24px; padding-top: 0; }
.work-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Live previews (scaled iframes) ---------- */
.browser {
  border-radius: 12px; overflow: hidden; background: var(--white);
  border: 1px solid var(--line); box-shadow: 0 1px 2px rgb(22 21 19 / 0.04);
}
.browser-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding-inline: 12px; background: #ece7df; }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: #cbc3b7; }
.preview { position: relative; overflow: hidden; background: var(--paper-2); }
.preview iframe {
  position: absolute; top: 0; left: 0; border: 0; pointer-events: none;
  max-width: none; transform-origin: 0 0; background: var(--white);
}
.phone {
  background: var(--ink); border-radius: 38px; padding: 9px;
  box-shadow: var(--shadow-card);
}
.phone .preview { border-radius: 30px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); list-style: none; padding: 0; }
.step-num {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 22px;
  border-radius: 50%; border: 1.5px solid var(--line-2);
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--brown);
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-3); max-width: 30ch; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.pricing-grid .section-head { margin-bottom: 0; }
.price-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-card);
}
.price-label { font-weight: 600; color: var(--ink-2); }
.price { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 4px; }
.price .from { color: var(--ink-3); font-size: 1rem; }
.price strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(3.2rem, 6vw, 4.2rem); line-height: 1; letter-spacing: -0.03em; }
.price-sub { color: var(--ink-3); font-size: 0.975rem; }
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 28px 0; padding: 26px 0 0; list-style: none; border-top: 1px solid var(--line); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .icon { width: 22px; height: 22px; padding: 4px; margin-top: 1px; border-radius: 50%; background: var(--green-tint); color: var(--green); stroke-width: 3; }
.price-note { margin-top: 18px; font-size: 0.9rem; color: var(--ink-3); }

/* ---------- About teaser / about page ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.photo-placeholder {
  display: grid; place-items: center; align-content: center; gap: 14px; text-align: center;
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg);
  border: 2px dashed var(--line-2); background: var(--paper-2); color: var(--ink-3);
  padding: 24px; font-size: 0.95rem;
}
.photo-placeholder svg { width: 56px; height: 40px; opacity: 0.8; }
.photo-placeholder strong { display: block; color: var(--brown); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.portrait {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
  border-radius: var(--radius-lg); background: var(--paper-2);
}
.split--text-first { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.split h2 { margin-bottom: 18px; }
.page-head .lead { margin-top: 24px; max-width: 30em; }
.split p + p { margin-top: 16px; }
.split .text-link { margin-top: 24px; }
.split-body p:not(.eyebrow) { color: var(--ink-2); font-size: 1.1rem; }

.page-head { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 6vw, 80px); }
.story { max-width: 680px; }
.story p { font-size: 1.1875rem; line-height: 1.7; color: var(--ink-2); }
.story p + p { margin-top: 22px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px); list-style: none; padding: 0; }
.feature { padding-top: 26px; border-top: 2px solid var(--ink); }
.feature h3 { margin-bottom: 10px; }
.feature p { color: var(--ink-3); }
.outdoors { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.outdoors img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 45%; }
.outdoors figcaption {
  position: absolute; left: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
  max-width: 420px; padding: 20px 24px; border-radius: var(--radius);
  background: rgb(247 244 238 / 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.outdoors figcaption strong { display: block; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -0.015em; margin-bottom: 4px; }
.outdoors figcaption span { color: var(--ink-2); font-size: 0.975rem; }

/* ---------- Project page ---------- */
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 36px; font-weight: 600; font-size: 0.95rem; color: var(--ink-3); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.back-link .icon { transform: rotate(180deg); }
.case-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 32px clamp(40px, 6vw, 96px); align-items: end; }
.case-head .lead { margin-top: 20px; }
.case-facts { display: grid; gap: 14px; padding: 0; margin: 0; }
.case-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.case-facts dt { color: var(--ink-3); font-size: 0.925rem; }
.case-facts dd { font-weight: 500; }
.case-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.case-hero { margin-top: clamp(40px, 6vw, 72px); }
.case-hero .browser { box-shadow: var(--shadow-lift); border-radius: 16px; }
.case-hero .browser-bar { height: 34px; }
.case-section { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(32px, 6vw, 96px); }
.case-section h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.case-section .prose p { font-size: 1.125rem; color: var(--ink-2); line-height: 1.7; }
.case-section .prose p + p { margin-top: 18px; }
.decisions { display: grid; gap: 0; list-style: none; padding: 0; counter-reset: dec; border-top: 1px solid var(--line); }
.decisions li { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); counter-increment: dec; }
.decisions li::before {
  content: counter(dec, decimal-leading-zero);
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--brown); line-height: 1.3;
}
.decisions h3 { margin-bottom: 8px; }
.decisions p { color: var(--ink-3); }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); list-style: none; padding: 0; max-width: 980px; margin-inline: auto; }
.phones figcaption { margin-top: 16px; text-align: center; font-weight: 600; font-size: 0.95rem; color: var(--ink-2); }

/* ---------- Closing band + footer ---------- */
.site-footer { background: var(--ink); color: rgb(247 244 238 / 0.72); }
.cta { padding-block: clamp(72px, 9vw, 120px); border-bottom: 1px solid rgb(247 244 238 / 0.12); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 32px 56px; align-items: end; }
.cta h2 { color: var(--paper); font-size: clamp(2.3rem, 5vw, 3.8rem); }
.cta p { margin-top: 16px; font-size: 1.15rem; max-width: 34em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-main { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; padding-block: 56px 40px; }
.site-footer .logo { color: var(--paper); }
.site-footer .logo-mark .peak { fill: var(--paper); }
.site-footer .logo-mark .snow { fill: var(--ink); }
.footer-brand p { margin-top: 16px; max-width: 32ch; font-size: 0.975rem; }
.footer-col h2 {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--paper); margin-bottom: 16px;
}
.footer-col ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; list-style: none; padding: 0; font-size: 0.975rem; overflow-wrap: anywhere; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-block: 22px 28px; border-top: 1px solid rgb(247 244 238 / 0.12); font-size: 0.875rem;
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1020px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-grid[data-count="1"] .project-card { grid-template-columns: minmax(0, 1fr); }
  .work-grid[data-count="1"] .project-card-body { padding: 8px 10px 8px; }
  .pricing-grid, .case-head, .case-section { grid-template-columns: minmax(0, 1fr); }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .values-list, .steps, .features { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps .step { display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; }
  .step-num { grid-row: span 2; margin-bottom: 0; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .photo-placeholder { max-width: 360px; aspect-ratio: 4 / 4.2; }
  .split .portrait { max-width: 360px; }
  .cta-inner { grid-template-columns: minmax(0, 1fr); }
  .phones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .phone { border-radius: 26px; padding: 6px; }
  .phone .preview { border-radius: 21px; }
  .outdoors img { aspect-ratio: 4 / 3; }
  .outdoors figcaption { position: static; max-width: none; border-radius: 0; background: var(--paper-2); }
}

@media (max-width: 640px) {
  body { font-size: 1rem; padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 98;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgb(247 244 238 / 0.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .action-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
    border-radius: 14px; font-weight: 600; text-decoration: none;
    background: var(--white); color: var(--ink); border: 1.5px solid var(--line-2);
  }
  .action-bar a:first-child { background: var(--green); color: var(--paper); border-color: var(--green); }
  body.menu-open .action-bar { display: none; }

  .hero { padding-bottom: calc(var(--ridge-h) + 8px); }
  .hero-actions .btn { flex: 1 1 100%; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .checklist { grid-template-columns: minmax(0, 1fr); }
  .phones { grid-template-columns: minmax(0, 0.8fr); justify-content: center; gap: 32px; }
  .cta-actions .btn { flex: 1 1 100%; }
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .case-facts div { grid-template-columns: 96px 1fr; }
  .decisions li { grid-template-columns: 40px 1fr; gap: 12px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .ridges path[pathLength] { stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; }
}
