/* ==========================================================================
   Charfield Consultancy — stylesheet
   A small, dependency-free design system. Edit the tokens first.
   ========================================================================== */

/* Tokens
   -------------------------------------------------------------------------- */
:root {
  --paper: #f7f3ea;
  --paper-2: #f1eadc;
  --paper-3: #fbf8f2;
  --ink: #1c1a16;
  --ink-2: #2a2721;
  --muted: #6d665a;
  --muted-light: #a8a093;
  --line: #ddd4c2;
  --line-dark: rgba(247, 243, 234, 0.16);
  --rust: #a34f27;
  --rust-dark: #853d1c;
  --rust-soft: #f0dfd2;
  --sage: #5b6953;
  --white: #fffdf8;

  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 8px rgba(28, 26, 22, 0.05);
  --shadow-md: 0 18px 50px -22px rgba(28, 26, 22, 0.3);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --header-h: 78px;
}

/* Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.9rem, 7vw, 5.1rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.2; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--rust) 55%, transparent);
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
a:hover { color: var(--rust); }

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }

ul, ol { margin: 0; padding: 0; }
li { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--rust); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(70px, 9vw, 120px); }

.section-tint { background: var(--paper-2); }

.section-head { max-width: 720px; margin-bottom: clamp(38px, 5vw, 60px); }

.section-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
  gap: 32px;
  align-items: end;
  max-width: none;
}

.section-lede {
  color: var(--muted);
  font-size: 1.075rem;
  max-width: 58ch;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust);
}

.eyebrow-light { color: #d99b78; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rust);
  flex: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rust) 14%, transparent);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--paper); }

/* Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
              border-color 0.22s var(--ease), transform 0.22s var(--ease),
              box-shadow 0.22s var(--ease);
}
.btn span[aria-hidden] { transition: transform 0.22s var(--ease); }
.btn:hover span[aria-hidden] { transform: translateX(3px); }

.btn-primary {
  background: var(--rust);
  color: var(--paper);
  box-shadow: 0 10px 24px -14px rgba(163, 79, 39, 0.9);
}
.btn-primary:hover {
  background: var(--rust-dark);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -14px rgba(163, 79, 39, 0.95);
}

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--rust);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--rust) 35%, transparent);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--rust-dark); border-color: var(--rust-dark); }
.text-link span { transition: transform 0.22s var(--ease); }
.text-link:hover span { transform: translateX(4px); }

/* Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -24px rgba(28, 26, 22, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand:hover { color: var(--ink); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1;
  padding-top: 2px;
}

.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.34rem;
  letter-spacing: -0.02em;
}
.brand-sub {
  margin-top: 5px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
  list-style: none;
}
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
  position: relative;
  padding-block: 6px;
}
.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s var(--ease);
}
.site-nav a:not(.nav-cta):hover::after,
.site-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.site-nav a.is-active { color: var(--rust); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper) !important;
  transition: background-color 0.2s var(--ease);
}
.nav-cta:hover { background: var(--rust); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-toggle-bars { display: grid; gap: 5px; width: 22px; }
.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 92px));
  padding-bottom: clamp(52px, 7vw, 88px);
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 720px;
  height: 720px;
  right: -260px;
  top: -260px;
  border: 1px solid color-mix(in srgb, var(--rust) 13%, transparent);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 460px;
  height: 460px;
  left: -260px;
  bottom: -220px;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

.hero-copy h1 { margin-bottom: 0.32em; }
.hero-copy h1 em {
  font-style: italic;
  color: var(--rust);
}

.hero-copy .lede {
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-points li {
  position: relative;
  padding-left: 20px;
  font-size: 0.86rem;
  color: var(--muted);
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border: 1px solid var(--rust);
  border-radius: 50%;
}

/* Browser mockup */
.hero-visual { margin: 0; position: relative; }

.browser {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 80px -50px rgba(28, 26, 22, 0.55), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
  transform: rotate(1.1deg);
  transition: transform 0.5s var(--ease);
}
.hero-visual:hover .browser { transform: rotate(0deg) translateY(-4px); }

.browser-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
}
.browser-url {
  flex: 1;
  padding: 4px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.02em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.browser-screen img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
}

.hero-visual figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-left: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.badge-live,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sage) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--sage) 25%, transparent);
  color: var(--sage);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-live .dot {
  width: 6px;
  height: 6px;
  background: var(--sage);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 16%, transparent);
}

/* Capability strip */
.strip {
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 55%, transparent);
}
.strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(14px, 4vw, 34px);
  padding-block: 18px;
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-style: italic;
  color: var(--muted);
}
.strip-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rust);
  opacity: 0.7;
}

/* Services
   -------------------------------------------------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  background: color-mix(in srgb, var(--white) 55%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              border-color 0.35s var(--ease), background-color 0.35s var(--ease);
}
.service-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--rust) 32%, var(--line));
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.service-index {
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--rust);
}
.service-card h3 { margin-bottom: 12px; }
.service-card > p:not(.service-index):not(.service-meta) {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 20px;
}

.tick-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
}
.tick-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.48em;
  width: 10px;
  height: 6px;
  border-left: 1.5px solid var(--rust);
  border-bottom: 1.5px solid var(--rust);
  transform: rotate(-45deg);
}

.service-meta {
  margin: auto 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Work
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 20px;
}

.work-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.work-card-feature { grid-row: span 2; }

.work-media {
  display: block;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.work-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.8s var(--ease);
}
.work-media:hover img { transform: scale(1.03); }

.work-media-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(28, 26, 22, 0.14));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.work-media:hover .work-media-veil { opacity: 1; }

.work-body { padding: clamp(22px, 3vw, 32px); }

.work-card-feature .work-body { display: flex; flex-direction: column; }
.work-card-feature .work-link { margin-top: auto !important; }

.work-facts { margin-top: 4px; }
.work-facts li::before { border-color: var(--sage); }

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.work-tags span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-body h3 { margin-bottom: 10px; }
.work-body h3 a { text-decoration: none; }
.work-body p { color: var(--muted); font-size: 0.95rem; }

.work-link {
  margin-top: 18px !important;
  font-size: 0.88rem !important;
  font-weight: 600;
}
.work-link a { color: var(--rust); text-decoration: none; }
.work-link a:hover { color: var(--rust-dark); }
.work-link-muted { color: var(--muted) !important; font-weight: 500 !important; }

/* Project placeholder tile */
.work-thumb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 15%, rgba(163, 79, 39, 0.16), transparent 55%),
    linear-gradient(145deg, #23201b 0%, #161512 100%);
  color: var(--paper);
}
.work-thumb::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(247, 243, 234, 0.14);
  border-radius: 12px;
}
.project-wordmark {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-align: center;
  z-index: 1;
}
.project-lines {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 26%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 155, 120, 0.8), transparent);
}
.status-chip {
  position: absolute;
  top: 26px;
  right: 26px;
  background: rgba(247, 243, 234, 0.1);
  border-color: rgba(247, 243, 234, 0.24);
  color: #d9b29a;
  z-index: 1;
}

.work-card-open {
  justify-content: center;
  border-style: dashed;
  background: transparent;
}
.work-card-open:hover { background: color-mix(in srgb, var(--paper-3) 60%, transparent); }
.work-card-open h3 { font-size: clamp(1.6rem, 2.6vw, 2rem); }
.work-card-open .work-body p { max-width: 32ch; }

/* Approach
   -------------------------------------------------------------------------- */
.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}

.approach-intro { position: sticky; top: calc(var(--header-h) + 40px); }
.approach-intro .section-lede { margin-bottom: 26px; }

.steps { list-style: none; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 22px;
  padding-block: 30px;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: 0; padding-top: 4px; }
.step:last-child { padding-bottom: 0; }

.step-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--rust);
  padding-top: 4px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.98rem; margin-bottom: 0; }

/* About (dark)
   -------------------------------------------------------------------------- */
.section-dark {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: clip;
}
.section-dark::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -220px;
  bottom: -300px;
  border: 1px solid rgba(247, 243, 234, 0.1);
  border-radius: 50%;
  pointer-events: none;
}
.section-dark h2 { color: var(--paper); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(40px, 7vw, 90px);
  align-items: start;
  position: relative;
}

.about-grid > div > p {
  color: #c3bbad;
  max-width: 50ch;
  font-size: 1rem;
}
.about-grid h2 { margin-bottom: 0.5em; }

.about-signoff {
  margin-top: 26px !important;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem !important;
  color: var(--paper) !important;
}

.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  list-style: none;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
.principles li {
  background: var(--ink);
  padding: clamp(22px, 3vw, 30px);
  transition: background-color 0.3s var(--ease);
}
.principles li:hover { background: var(--ink-2); }
.principle-num {
  display: block;
  margin-bottom: 20px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: #d99b78;
}
.principles h3 {
  font-size: 1.18rem;
  margin-bottom: 8px;
  color: var(--paper);
}
.principles p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #a8a093;
}

/* Pricing
   -------------------------------------------------------------------------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: 26px 22px;
  background: color-mix(in srgb, var(--white) 55%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.price-card-featured {
  background: var(--paper-3);
  border-color: color-mix(in srgb, var(--rust) 45%, var(--line));
  box-shadow: 0 16px 40px -26px rgba(28, 26, 22, 0.45);
}

.price-flag {
  align-self: flex-start;
  margin: 0 0 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--rust);
  color: var(--paper);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.price-card h3 { font-size: 1.2rem; margin-bottom: 10px; }

/* Reserve the badge's height so every card title sits on the same line. */
.price-card:not(.price-card-featured) h3 { margin-top: 35px; }

.price {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
}
.price span {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.price small { font-family: var(--font-sans); font-size: 0.85rem; color: var(--muted); }

.price-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 20px;
}

.tick-list-small { gap: 8px; margin-bottom: 22px; }
.tick-list-small li { font-size: 0.82rem; padding-left: 21px; }
.tick-list-small li::before { width: 8px; height: 5px; top: 0.5em; }

.price-time {
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.price-card-care { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.price-card-care h3,
.price-card-care .price { color: var(--paper); }
.price-card-care .price span,
.price-card-care .price small,
.price-card-care .price-desc,
.price-card-care .price-time { color: #a8a093; }
.price-card-care .tick-list li { color: #d6cec1; }
.price-card-care .tick-list li::before { border-color: #d99b78; }
.price-card-care .price-time { border-top-color: var(--line-dark); }

.price-note {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 80ch;
}

/* FAQ
   -------------------------------------------------------------------------- */
.section-faq { background: var(--paper-2); }

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}
.faq-intro { position: sticky; top: calc(var(--header-h) + 40px); }
.faq-intro .section-lede { margin-bottom: 20px; }

.faq-list { border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  line-height: 1.3;
  list-style: none;
  transition: color 0.2s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--rust); }

.faq-item summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--rust), var(--rust)) center / 12px 1.5px no-repeat,
    linear-gradient(var(--rust), var(--rust)) center / 1.5px 12px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--rust); }

.faq-answer { padding: 0 36px 24px 0; }
.faq-answer p { margin: 0; color: var(--muted); font-size: 0.96rem; max-width: 62ch; }

/* Contact
   -------------------------------------------------------------------------- */
.section-contact { background: var(--paper-2); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.contact-copy .section-lede { margin-bottom: 32px; }

.contact-details {
  display: grid;
  gap: 20px;
  margin: 0 0 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.contact-details div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
.contact-details dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}
.contact-details dd { margin: 0; font-size: 0.95rem; }
.contact-details a { color: var(--rust); }

.contact-note {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper-3) 60%, transparent);
}
.contact-note p { margin: 0; font-size: 0.86rem; color: var(--muted); }
.contact-note strong { color: var(--ink); }

.contact-form-wrap {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
}

.contact-form { display: grid; gap: 18px; }

.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.field label .optional { font-weight: 400; color: var(--muted); }
.field label span[aria-hidden] { color: var(--rust); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--rust);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rust) 14%, transparent);
}
.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--muted) 65%, transparent); }

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.field-honeypot {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.field-check {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.field-check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--rust);
}
.field-check label {
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
}
.field-check label span[aria-hidden] { color: var(--rust); }

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #b03a2e;
  box-shadow: 0 0 0 3px rgba(176, 58, 46, 0.12);
}

.btn-submit { width: 100%; margin-top: 4px; }
.btn-submit.is-loading .btn-label { opacity: 0.6; }
.btn-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid color-mix(in srgb, var(--paper) 40%, transparent);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-submit.is-loading .btn-spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.form-status.is-visible { display: block; }
.form-status.is-success {
  background: color-mix(in srgb, var(--sage) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--sage) 28%, transparent);
  color: #3f4c39;
}
.form-status.is-error {
  background: rgba(176, 58, 46, 0.08);
  border: 1px solid rgba(176, 58, 46, 0.25);
  color: #8d2d24;
}

.form-smallprint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.55;
}
.form-smallprint a { text-decoration: underline; }

/* Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-top: clamp(56px, 7vw, 84px);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(36px, 6vw, 90px);
  padding-bottom: clamp(40px, 6vw, 64px);
}

.brand-light { color: var(--paper); }
.brand-light:hover { color: var(--paper); }
.brand-light .brand-mark { background: var(--paper); color: var(--ink); }
.brand-light .brand-sub { color: var(--muted-light); }

.footer-brand p {
  margin-top: 22px;
  color: #a8a093;
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.footer-nav h2 {
  margin: 0 0 16px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-light);
}
.footer-nav ul { display: grid; gap: 10px; list-style: none; }
.footer-nav a {
  color: #d6cec1;
  font-size: 0.88rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--paper); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 22px;
  border-top: 1px solid var(--line-dark);
}
.footer-bottom p { margin: 0; font-size: 0.76rem; color: var(--muted-light); }
.footer-bottom a { color: #d6cec1; text-decoration: none; }
.footer-bottom a:hover { color: var(--paper); }

/* Legal & error pages
   -------------------------------------------------------------------------- */
.legal-page { padding-top: calc(var(--header-h) + clamp(44px, 7vw, 76px)); }
.legal-wrap { max-width: 760px; }
.legal-wrap h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 0.3em; }

.legal-updated {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.prose { margin-top: 34px; }
.prose h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
  margin: 42px 0 12px;
}
.prose h2:first-child { margin-top: 0; }
.prose p,
.prose li { color: var(--muted); font-size: 0.98rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul {
  display: grid;
  gap: 10px;
  margin: 0 0 1.3em;
  list-style: none;
}
.prose ul li { position: relative; padding-left: 20px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rust);
}
.prose a { color: var(--rust); }

.legal-back { margin-top: 44px; }

.error-page {
  min-height: 70vh;
  padding-top: calc(var(--header-h) + clamp(60px, 10vw, 120px));
}
.error-page h1 { font-size: clamp(2.6rem, 6vw, 4rem); margin-bottom: 0.25em; }
.error-page .section-lede { margin-bottom: 30px; }

/* Reveal animations
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { gap: 44px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-card:last-child { grid-column: span 2; }
}

@media (max-width: 860px) {
  :root { --header-h: 70px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    /* Absolute (not fixed): the header's backdrop-filter creates a containing
       block, which would otherwise trap a fixed panel inside the 70px bar. */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 20px var(--gutter) 40px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease),
                transform 0.25s var(--ease);
    overflow-y: auto;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .site-nav ul {
    display: grid;
    gap: 0;
    width: 100%;
  }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a {
    display: block;
    padding: 18px 4px;
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
  }
  .site-nav a:not(.nav-cta)::after { display: none; }
  .site-nav li:last-child { border: 0; margin-top: 18px; }
  .site-nav .nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 22px;
    font-family: var(--font-sans) !important;
    font-size: 1rem !important;
    font-weight: 600;
  }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 640px; }
  .hero-visual { max-width: 560px; }
  .browser { transform: none; }

  .section-head-row { grid-template-columns: 1fr; gap: 18px; align-items: start; }

  .work-grid { grid-template-columns: 1fr; }
  .work-card-feature { grid-row: auto; }

  .approach-grid,
  .about-grid,
  .faq-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }

  .approach-intro,
  .faq-intro { position: static; }

  .about-grid > div > p { max-width: none; }

  .footer-top { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 620px) {
  body { font-size: 1rem; }

  .hero { padding-top: calc(var(--header-h) + 40px); }
  .hero-actions .btn { width: 100%; }
  .hero-points { gap: 8px 16px; }

  .service-grid { grid-template-columns: 1fr; }
  .service-card:last-child { grid-column: auto; }

  .field-row { grid-template-columns: 1fr; }
  .contact-details div { grid-template-columns: 1fr; gap: 2px; }
  .contact-details dt { padding-top: 0; }

  .price-grid { grid-template-columns: 1fr; }
  .price-card:not(.price-card-featured) h3 { margin-top: 0; }

  .principles { grid-template-columns: 1fr; }

  .footer-nav { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-nav > div:last-child { grid-column: span 2; }

  .step { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }

  .strip-inner { gap: 10px 16px; font-size: 0.92rem; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
