/* ==========================================================================
   Local Renovation — homepage
   Paper / ink / forest / clay. Fraunces for display, Inter for text.
   Typography-led; photos appear only as toned texture.
   ========================================================================== */

/* Fonts ------------------------------------------------------------------ */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var.woff2") format("woff2-variations"),
       url("/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var-italic.woff2") format("woff2-variations"),
       url("/fonts/fraunces-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2-variations"),
       url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallbacks keep text from jumping when the webfonts swap in. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22.5%;
  line-gap-override: 0%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 104%;
  ascent-override: 94%;
  descent-override: 24.5%;
  line-gap-override: 0%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens ----------------------------------------------------------------- */

:root {
  --paper: #F3EEE6;
  --card: #FAF7F2;
  --ink: #1C1F1B;
  --ink-soft: #3A3E37;
  --muted: #595D55;          /* 5.7:1 on paper */
  --forest: #2B3328;
  --forest-deep: #20271E;
  --clay: #A5532F;           /* button fill (7:1 with its cream label) */
  --clay-text: #96482A;      /* AA small text on paper and tinted paper */
  --clay-dark: #8C4526;
  --clay-light: #DB9C78;     /* 5.5:1 on forest, 7:1 on ink — for text on dark */
  --error: #9E2A1C;
  --rule: rgba(28, 31, 27, 0.16);
  --rule-strong: rgba(28, 31, 27, 0.32);
  --rule-light: rgba(243, 238, 230, 0.22);
  --on-dark: rgba(243, 238, 230, 0.84);

  --serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --wrap: 90rem;
  --gutter: clamp(1.25rem, 4.5vw, 3rem);
  --section: clamp(5rem, 3rem + 8vw, 10.5rem);
  --cols: 2rem;              /* column gap of the 12-col grid */
  --radius: 2px;
  --focus: var(--clay);
}

/* Base ------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  position: relative;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Paper grain: a pre-rendered transparent tile, repeated over the page. */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: url("/img/grain.webp") repeat;
  background-size: 160px 160px;
  opacity: 0.5;
}

[hidden] { display: none !important; }

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

h1, h2, h3, p, ol, ul, figure, fieldset { margin: 0; }
ol, ul { padding: 0; }
[role="list"] { list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

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

::selection { background: var(--clay); color: #FFF9F2; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Type helpers ----------------------------------------------------------- */

.section-num,
.hero__kicker,
.next-steps__title {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 560;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.section-num {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.section-num span {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--clay-text);
}
.section-num span::after {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section-num--light { color: var(--on-dark); }
.section-num--light span { color: var(--clay-light); }

.section-title {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(2.375rem, 1.4rem + 3.6vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}

.section-lede {
  margin-top: 1.5rem;
  max-width: 32ch;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.section { padding-block: var(--section); }

/* Buttons ---------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--clay);
  border-radius: var(--radius);
  background: var(--clay);
  color: #FFF9F2;
  font: inherit;
  font-size: 1rem;
  font-weight: 580;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.button:hover { background: var(--clay-dark); border-color: var(--clay-dark); }

.button__arrow { display: inline-block; transition: transform 200ms ease; }
.button:hover .button__arrow { transform: translateX(0.25em); }

.button--small {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.button--large {
  min-height: 3.75rem;
  padding: 1rem 1.75rem;
  font-size: 1.0625rem;
}

@media (min-width: 48em) {
  .button--small { min-height: 3rem; padding-inline: 1.25rem; font-size: 0.9375rem; }
}

/* Header ----------------------------------------------------------------- */
/* Sits over the ink hero; it scrolls away with it. */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  color: var(--paper);
  --focus: var(--clay-light);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
}

.wordmark {
  margin-right: auto;
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 440;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 36, "SOFT" 50, "WONK" 0;
  white-space: nowrap;
  text-decoration: none;
  padding-block: 0.5rem;
}

.site-nav { display: none; }

.site-nav ul {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.75rem;
  font-size: 0.9375rem;
  color: var(--on-dark);
  text-decoration: none;
}
.site-nav a:hover { color: var(--paper); text-decoration: underline; }

@media (width < 48em) {
  .site-header__cta { padding: 0.5rem 0.75rem; font-size: 0.8125rem; }
}

@media (min-width: 48em) {
  .site-header__inner { min-height: 5.5rem; gap: 2.5rem; }
  .wordmark { font-size: 1.5rem; }
  .site-nav { display: block; }
}

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

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: clamp(38rem, 100svh, 64rem);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  --focus: var(--clay-light);
}

/* The chapel, as atmosphere only: dimmed, then washed back into the ink so
   the type does all the talking. */
.hero__texture {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__texture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  opacity: 0.5;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(28, 31, 27, 0.75) 0%, rgba(28, 31, 27, 0.35) 22%, rgba(28, 31, 27, 0.6) 48%, var(--ink) 78%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  padding-top: 7rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.hero__kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--on-dark);
}
.hero__kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule-light);
}

.hero__title {
  margin-top: clamp(2rem, 6vh, 4.5rem);
  max-width: 13em;
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(2.75rem, 0.9rem + 7.2vw, 8rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}

.hero__title em {
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--clay-light);
}

.hero__title { margin-bottom: clamp(3rem, 8vh, 6rem); }

.hero__foot {
  display: grid;
  gap: 1.75rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-light);
}

.hero__sub {
  max-width: 40ch;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.375rem);
  line-height: 1.5;
  color: var(--on-dark);
  text-wrap: pretty;
}

.hero__cta { justify-self: start; }

@media (width < 48em) {
  .hero { display: block; min-height: 0; }
  .hero__inner { display: block; }
  .hero__title { margin-bottom: 2.5rem; }
  .hero__foot { margin-top: 0; }
  .hero__texture img { opacity: 0.55; }
}

@media (max-width: 29.99em) {
  .hero__cta { justify-self: stretch; }
}

@media (min-width: 64em) {
  .hero__inner { padding-top: 9rem; }
  /* Let the chapel sit to the right, fading out under the headline. */
  .hero__texture { left: 32%; }
  .hero::before {
    background:
      linear-gradient(90deg, var(--ink) 32%, rgba(28, 31, 27, 0.55) 55%, rgba(28, 31, 27, 0.25) 80%, rgba(28, 31, 27, 0.45) 100%),
      linear-gradient(0deg, var(--ink) 0%, rgba(28, 31, 27, 0) 40%),
      linear-gradient(180deg, rgba(28, 31, 27, 0.6) 0%, rgba(28, 31, 27, 0) 22%);
  }
  .hero__foot {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--cols);
    align-items: end;
  }
  .hero__sub { grid-column: 1 / 7; }
  .hero__cta { grid-column: 9 / 13; justify-self: end; }
}

/* Thank-you / error pages: the hero band, shorter and untextured. */
.hero--notice { min-height: clamp(32rem, 78svh, 48rem); }
.hero--notice .hero__title { max-width: 16em; font-size: clamp(2.5rem, 1rem + 5.2vw, 6rem); }

/* Services --------------------------------------------------------------- */

.services__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 3.5rem);
}

.service-list {
  list-style: none;
  border-bottom: 1px solid var(--rule-strong);
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  column-gap: 0.75rem;
  row-gap: 0.4rem;
  align-items: center;
  padding-block: clamp(1.5rem, 2.4vw, 2.25rem);
  border-top: 1px solid var(--rule-strong);
}

.service__num {
  grid-row: 1 / span 2;
  align-self: start;
  padding-top: 0.6em;
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--clay-text);
}

.service__name {
  grid-column: 2;
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(1.625rem, 1.05rem + 2.3vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}

/* The link itself must stay untransformed and static so its ::after can
   stretch over the whole row; only the inner label moves. */
.service__name a {
  text-decoration: none;
  transition: color 180ms ease;
}

.service__label {
  display: inline-block;
  transition: transform 240ms ease;
}

/* The whole row is the link target. */
.service__name a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;  /* above the arrow and detail line, which transform on hover */
}
.service__name a:focus-visible { outline: none; }
.service__name a:focus-visible::after {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.service__detail {
  grid-column: 2;
  font-size: 1rem;
  color: var(--muted);
}

.service__go {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  font-size: 1.125rem;
  color: var(--ink);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 240ms ease;
  pointer-events: none;  /* clicks fall through to the row link */
}

.service:hover .service__name a,
.service:focus-within .service__name a { color: var(--clay-text); }
.service:hover .service__label,
.service:focus-within .service__label { transform: translateX(0.4rem); }
.service:hover .service__go,
.service:focus-within .service__go {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: translateX(0.25rem);
}

@media (min-width: 48em) {
  .service {
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    column-gap: 1.5rem;
  }
  .service__go { width: 3.25rem; height: 3.25rem; }
}

@media (min-width: 64em) {
  .services__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--cols);
  }
  .services__head {
    grid-column: 1 / 5;
    align-self: start;
    position: sticky;
    top: 7rem;
  }
  .services__body { grid-column: 5 / 13; }
  .service__go { opacity: 0.55; }
  .service:hover .service__go,
  .service:focus-within .service__go { opacity: 1; }
}

/* Unusual work ----------------------------------------------------------- */
/* A full-bleed loft, sunk into the ink like the hero chapel: mood, not
   portfolio. */

.unusual {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: max(420px, 64vh);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  --focus: var(--clay-light);
}

.unusual__texture {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.unusual__texture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  opacity: 0.7;
}

.unusual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, var(--ink) 0%, rgba(28, 31, 27, 0.8) 45%, rgba(28, 31, 27, 0.5) 75%, rgba(28, 31, 27, 0.5) 100%),
    linear-gradient(180deg, rgba(28, 31, 27, 0.4) 0%, rgba(28, 31, 27, 0) 18%);
}

.unusual__inner {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.unusual__label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 560;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-light);
}

.unusual__title {
  margin-top: 1.25rem;
  max-width: 14em;
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(2.375rem, 1.2rem + 4.4vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.032em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}

.unusual__text {
  margin-top: 1.5rem;
  max-width: 40ch;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.375rem);
  line-height: 1.5;
  color: var(--on-dark);
  text-wrap: balance;
}

.unusual__text + .unusual__text { margin-top: 0.875rem; }

.unusual__cta { margin-top: 2.25rem; }

@media (width < 48em) {
  .unusual { min-height: min(70svh, 40rem); }
  .unusual__texture img { object-position: 50% 40%; }
}

@media (max-width: 29.99em) {
  .unusual__cta { display: flex; }
}

@media (min-width: 64em) {
  /* Open up the right side; keep the ink deep under the type. */
  .unusual::before {
    background:
      linear-gradient(90deg, var(--ink) 0%, rgba(28, 31, 27, 0.8) 40%, rgba(28, 31, 27, 0.15) 75%, rgba(28, 31, 27, 0.1) 100%),
      linear-gradient(0deg, var(--ink) 0%, rgba(28, 31, 27, 0) 45%),
      linear-gradient(180deg, rgba(28, 31, 27, 0.4) 0%, rgba(28, 31, 27, 0) 18%);
  }
}

/* How it works ----------------------------------------------------------- */

.process {
  position: relative;
  isolation: isolate;
  background: var(--forest);
  color: var(--paper);
  --focus: var(--clay-light);
}

/* Wall-framing drafting elevation (studs 16" o.c., header, dimension chain) at the top right of the band;
   the SVG fades itself out on the left, and the mask fades it into plain forest toward the bottom. */
.process::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: clamp(16rem, 34vw, 30rem);
  z-index: -1;
  background-image: url("/img/framing.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right top;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 45%, transparent 100%);
}

@media (max-width: 40rem) {
  .process::before { opacity: 0.32; }
}

.process__head { margin-bottom: clamp(3.5rem, 8vw, 7rem); }

.steps {
  display: grid;
  list-style: none;
  border-bottom: 1px solid var(--rule-light);
}

.step {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 1rem;
  padding-block: 2rem;
  border-top: 1px solid var(--rule-light);
}

.step__num {
  grid-row: span 2;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 280;
  font-size: 3.5rem;
  line-height: 0.85;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--clay-light);
}

.step__title {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  font-variation-settings: "opsz" 96, "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}

.step__text {
  margin-top: 0.85rem;
  max-width: 34ch;
  font-size: 1rem;
  color: var(--on-dark);
}

@media (min-width: 64em) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--cols);
    border-bottom: 0;
  }
  .step {
    grid-template-columns: 1fr;
    align-content: start;
    padding-block: 1.75rem 0;
  }
  .step__num {
    grid-row: auto;
    margin-bottom: 2.5rem;
    font-size: clamp(6rem, 3rem + 5vw, 9.5rem);
    line-height: 0.75;
  }
}

/* Request a visit -------------------------------------------------------- */

/* Lifted above the body grain overlay (z-index 60) so no texture is drawn
   over the form fields; the section keeps only its own faint paper fill. */
.contact {
  position: relative;
  z-index: 61;
  isolation: isolate;
  background: var(--paper);
}

/* The chapel again, as a near-white paper duotone — barely there. */
.contact::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(100%, 60rem);
  z-index: -1;
  background-image: url("/img/chapel-paper-1920.jpg");
  background-image: image-set(url("/img/chapel-paper-1920.avif") type("image/avif"), url("/img/chapel-paper-1920.webp") type("image/webp"), url("/img/chapel-paper-1920.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: 50% 35%;
  opacity: 0.55;             /* keeps muted + clay-text labels above 4.5:1 */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 55%, transparent 100%);
}

.contact__grid {
  display: grid;
  gap: 3rem;
}

.next-steps {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  max-width: 28rem;
}

.next-steps__list {
  margin-top: 0.85rem;
  list-style: none;
  counter-reset: next;
  border-bottom: 1px solid var(--rule-strong);
}

.next-steps__list li {
  counter-increment: next;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  padding-block: 0.95rem;
  border-top: 1px solid var(--rule-strong);
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.next-steps__list li::before {
  content: counter(next, decimal-leading-zero);
  padding-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--clay-text);
}

@media (min-width: 64em) {
  .contact__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--cols);
  }
  .contact__intro {
    grid-column: 1 / 6;
    align-self: start;
    position: sticky;
    top: 7rem;
  }
  .form-panel { grid-column: 7 / 13; }
}

.form-panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 1px 0 rgba(28, 31, 27, 0.04), 0 30px 60px -40px rgba(28, 31, 27, 0.35);
}

.form-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72, "SOFT" 30, "WONK" 0;
}

.form-intro {
  font-size: 0.875rem;
  color: var(--muted);
}

.request-form { display: grid; gap: 1.5rem; }
.request-form > .form-intro { margin-top: -1rem; }

.field { display: grid; gap: 0.45rem; min-width: 0; align-content: start; }

.field-row { display: grid; gap: 1.5rem; }
@media (min-width: 40em) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.field label,
.field legend {
  font-size: 1rem;
  font-weight: 580;
  line-height: 1.3;
  color: var(--ink);
}

.req { color: var(--clay-text); margin-left: 0.15em; }
.optional { font-weight: 400; color: var(--muted); font-size: 0.9375rem; }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: #FFFDF9;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;  /* >=16px so iOS doesn't zoom */
  line-height: 1.4;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  -webkit-appearance: none;
  appearance: none;
}

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

.field input:hover,
.field textarea:hover { border-color: rgba(28, 31, 27, 0.55); }

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 1px;
  border-color: var(--ink);
}

.field [aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: inset 3px 0 0 var(--error);
}

.field__hint {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}
.field__hint--status:empty { display: none; }

.field__error {
  display: flex;
  gap: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 540;
  line-height: 1.4;
  color: var(--error);
}
.field__error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; margin-top: 0.05rem; border-radius: 50%; background: var(--error); color: #fff; font-size: 0.75rem; font-weight: 700; }

/* Type-of-work chips */
.chips { border: 0; padding: 0; }
.chips legend { padding: 0; margin-bottom: 0.65rem; }

.chips__set {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip { position: relative; cursor: pointer; }

.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: #FFFDF9;
  font-size: 1rem;
  line-height: 1.2;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.chip:hover span { border-color: var(--ink); }

.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip input:focus-visible + span {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
}

/* Availability: optional day/time chips + timing note */
.availability { border: 0; padding: 0; gap: 0; }
.availability > legend { padding: 0; margin-bottom: 0.9rem; }

.availability__groups {
  display: grid;
  gap: 1.25rem;
  container-type: inline-size;
}

.chips--sub { min-width: 0; }
.availability .chips--sub legend,
.availability .field label {
  font-size: 0.9375rem;
  font-weight: 520;
  color: var(--muted);
}
.chips--sub legend { margin-bottom: 0.5rem; }

/* Equal-width chips in a tidy grid: 3x2 / 2x2 when narrow, one row when there's room. */
.chips__set--days,
.chips__set--times { display: grid; }
.chips__set--days { grid-template-columns: repeat(3, 1fr); }
.chips__set--times { grid-template-columns: repeat(2, 1fr); }

.chips__set--days .chip span,
.chips__set--times .chip span {
  display: flex;
  justify-content: center;
  padding-inline: 0.5rem;
  text-align: center;
}

@container (min-width: 26rem) {
  .chips__set--days { grid-template-columns: repeat(6, 1fr); }
}
@container (min-width: 30rem) {
  .chips__set--times { grid-template-columns: repeat(4, 1fr); }
}

/* File input */
.field input[type="file"] {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--muted);
  padding: 0;
}
.field input[type="file"]::file-selector-button {
  min-height: 3rem;
  margin-right: 1rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 560;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.field input[type="file"]::file-selector-button:hover { background: var(--ink); color: var(--paper); }
.field input[type="file"]:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }

.form-submit {
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
.form-submit .button { width: 100%; }
.form-submit .button[disabled] { cursor: progress; opacity: 0.75; }

/* Form-level error (send failed, rate limited, …), styled like the field errors. */
.form-error {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  font-weight: 540;
  line-height: 1.4;
  color: var(--error);
}
.form-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; margin-top: 0.05rem; border-radius: 50%; background: var(--error); color: #fff; font-size: 0.75rem; font-weight: 700; }

.form-success__note { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--muted); }

@media (min-width: 40em) {
  .form-submit .button { width: auto; }
}

.form-success { padding-block: 1rem 2rem; }
.form-success:focus { outline: none; }
.form-success:focus-visible { outline: 3px solid var(--clay); outline-offset: 6px; }

.form-success__title {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.875rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}

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

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark);
  padding-block: clamp(4rem, 9vw, 8rem) 2rem;
  font-size: 0.9375rem;
}

/* Faint atmosphere at the right edge, fading out well above the base line
   so the small footer text stays on plain ink. */
.site-footer__texture {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(60%, 22rem);
  z-index: -1;
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 100% 20%, #000 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 100% 70% at 100% 20%, #000 20%, transparent 100%);
}
.site-footer__texture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  opacity: 0.22;
}

@media (min-width: 48em) {
  .site-footer__texture { width: 40%; }
  .site-footer__texture img { opacity: 0.45; }
}

.site-footer__mark {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 0.2rem + 10.4vw, 9.75rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 0;
  color: var(--paper);
  text-wrap: balance;
}

.site-footer__base {
  display: grid;
  gap: 0.35rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-light);
}

@media (min-width: 48em) {
  .site-footer__base {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--cols);
  }
  .site-footer__base p:last-child { text-align: right; }
}

/* Motion ----------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .service:hover .service__label,
  .service:focus-within .service__label,
  .service:hover .service__go,
  .service:focus-within .service__go,
  .button:hover .button__arrow { transform: none; }
}

/* Print ------------------------------------------------------------------ */

@media print {
  body::after, .hero__texture, .hero::before, .unusual__texture, .unusual::before, .process::before, .contact::before, .site-footer__texture { display: none; }
  .hero, .unusual, .process, .site-footer { background: none; color: var(--ink); }
  .unusual { min-height: 0; }
  .site-header { position: static; color: var(--ink); }
  .hero { min-height: 0; }
}
