/* Trimtone Woodworks — concept redesign
   Idea: the page is trimmed out like a room. A crown-moulding
   "cornice" band caps the hero, the about section and the footer. */

:root {
  --white: #F8F7F3;     /* trim-paint white */
  --plaster: #ECE7DE;   /* plaster wall */
  --slate: #23313A;     /* deep painted millwork */
  --slate-2: #33454F;
  --oak: #C8A06E;       /* white oak, accent on dark */
  --oak-ink: #855D32;   /* oak dark enough for text on light (5.4:1) */
  --ink: #1A1D1F;
  --muted: #565C61;
  --line: #D3CCBF;

  --f-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Newsreader", Georgia, "Times New Roman", serif;

  --s--1: clamp(.9rem, .87rem + .1vw, .95rem);
  --s-0: clamp(1.06rem, 1rem + .2vw, 1.2rem);
  --s-1: clamp(1.2rem, 1.1rem + .4vw, 1.45rem);
  --s-2: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --s-3: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem);
  --s-hero: clamp(2.8rem, 1.6rem + 5vw, 5.6rem);

  --wrap: 1260px;
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  --section: clamp(4rem, 8vw, 7.5rem);
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--f-body); font-size: var(--s-0); line-height: 1.65;
  overflow-x: hidden;
}
h1, h2, h3, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--f-head); font-stretch: 112%; letter-spacing: -.01em; line-height: 1.02; }
h2 { font-size: var(--s-3); font-weight: 700; }
h3 { font-size: var(--s-1); font-weight: 650; line-height: 1.15; }

:focus-visible { outline: 3px solid var(--oak); outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--slate); color: var(--white); padding: .75rem 1rem; font-family: var(--f-head); }
.skip:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Cornice: the signature element ----------
   Read top to bottom like a crown moulding in elevation:
   fillet, crown, shadow line, cove, bed moulding. */
.cornice {
  height: 34px;
  background:
    linear-gradient(180deg,
      var(--slate) 0 4px,
      transparent 4px 7px,
      var(--slate) 7px 16px,
      var(--slate-2) 16px 18px,
      transparent 18px 20px,
      rgba(35,49,58,.55) 20px,
      rgba(35,49,58,0) 30px,
      transparent 30px 31px,
      var(--slate) 31px 34px);
}
.cornice--light {
  background:
    linear-gradient(180deg,
      var(--oak) 0 3px,
      transparent 3px 6px,
      rgba(248,247,243,.9) 6px 14px,
      transparent 14px 17px,
      rgba(248,247,243,.35) 17px,
      rgba(248,247,243,0) 28px,
      transparent 28px 30px,
      rgba(248,247,243,.6) 30px 32px);
}

/* ---------- Photo placeholders (replace with <img>) ---------- */
.ph { background-color: #CFC6B6; }
.ph--paint {
  background-image:
    linear-gradient(90deg, transparent 0 8%, rgba(0,0,0,.06) 8% 8.6%, transparent 8.6% 46%, rgba(0,0,0,.06) 46% 46.6%, transparent 46.6% 84%, rgba(0,0,0,.06) 84% 84.6%, transparent 84.6%),
    linear-gradient(180deg, #E4DED3 0 12%, #CFC7B9 12% 14%, #EDE8DF 14% 62%, #D8D0C2 62% 64%, #E9E3D9 64%);
}
.ph--oak {
  background-image:
    repeating-linear-gradient(90deg, rgba(120,80,40,.10) 0 1px, transparent 1px 7px, rgba(120,80,40,.06) 7px 9px, transparent 9px 23px),
    linear-gradient(90deg, #C9A577, #B48C5C 40%, #C79F6D 70%, #AD845A);
}
.ph--walnut {
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.14) 0 1px, transparent 1px 9px, rgba(255,220,180,.06) 9px 12px, transparent 12px 27px),
    linear-gradient(90deg, #5A3D29, #6F4C33 50%, #4E3424);
}
.ph--beam {
  background-image:
    linear-gradient(90deg, transparent 0 18%, #8E6A44 18% 26%, transparent 26% 58%, #8E6A44 58% 66%, transparent 66%),
    linear-gradient(180deg, #E8E2D7 0 70%, #CFC6B6 70%);
}
.ph--arch {
  background-image:
    radial-gradient(ellipse 34% 40% at 50% 46%, #6B5B4A 0 96%, #F2EEE7 97% 100%, transparent 100%),
    linear-gradient(180deg, transparent 46%, #6B5B4A 46% 100%),
    linear-gradient(90deg, #E4DED3 0 30%, #F2EEE7 30% 32%, transparent 32% 68%, #F2EEE7 68% 70%, #E4DED3 70%);
  background-color: #E4DED3;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.35rem;
  font-family: var(--f-head); font-stretch: 105%; font-weight: 600; font-size: .98rem; line-height: 1.2;
  text-decoration: none; border: 1.5px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--lg { min-height: 54px; padding: .85rem 1.7rem; font-size: 1.05rem; }
.btn--slate { background: var(--slate); color: var(--white); }
.btn--slate:hover { background: var(--ink); }
.btn--oak { background: var(--oak); color: var(--ink); }
.btn--oak:hover { background: #D6B285; }
.btn--line { border-color: var(--slate); color: var(--slate); }
.btn--line:hover { background: var(--slate); color: var(--white); }
.btn--line-light { border-color: var(--oak); color: var(--white); }
.btn--line-light:hover { background: var(--oak); color: var(--ink); }

.text-link {
  display: inline-flex; min-height: 44px; align-items: center;
  font-family: var(--f-head); font-weight: 600; color: var(--oak-ink);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px;
}

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--slate); }
.wordmark-mark { width: 34px; height: 34px; fill: none; stroke: var(--oak-ink); stroke-width: 2.4; }
.wordmark span { font-family: var(--f-head); font-stretch: 120%; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; line-height: 1; display: flex; flex-direction: column; }
.wordmark em { font-style: normal; font-weight: 500; font-size: .78rem; letter-spacing: .02em; color: var(--muted); margin-top: .15rem; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { display: flex; gap: 1.5rem; }
.site-nav ul a { font-family: var(--f-head); font-weight: 550; font-size: .98rem; text-decoration: none; padding: .5rem 0; border-bottom: 1.5px solid transparent; }
.site-nav ul a:hover { border-bottom-color: var(--oak); }
.nav-phone { font-family: var(--f-head); font-weight: 600; text-decoration: none; color: var(--oak-ink); white-space: nowrap; }

.nav-toggle { display: none; position: relative; width: 48px; height: 48px; background: none; border: 1.5px solid var(--slate); border-radius: var(--radius); cursor: pointer; color: var(--slate); }
.bars, .bars::before, .bars::after { position: absolute; left: 12px; width: 22px; height: 2px; background: currentColor; transition: transform .2s, top .2s; }
.bars { top: 22px; }
.bars::before, .bars::after { content: ""; left: 0; }
.bars::before { top: -7px; } .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1.5rem; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: flex; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line); font-size: 1.35rem; font-stretch: 112%; }
  .nav-phone { display: flex; align-items: center; min-height: 54px; font-size: 1.1rem; }
  .site-nav .btn { margin-top: .5rem; }
}

/* ---------- Hero ---------- */
.hero { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); padding-top: clamp(2.5rem, 6vw, 5rem); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1fr 1.05fr; } }
.hero-where { font-family: var(--f-head); font-weight: 550; font-size: var(--s--1); color: var(--oak-ink); margin-bottom: 1.25rem; }
.hero h1 { font-size: var(--s-hero); font-weight: 750; font-stretch: 118%; color: var(--slate); line-height: .98; max-width: 12ch; }
.hero-lede { margin-top: 1.5rem; font-size: var(--s-1); line-height: 1.55; max-width: 32rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.hero-figure { position: relative; }
.hero-figure .ph, .hero-figure img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }
@media (min-width: 900px) { .hero-figure .ph, .hero-figure img { aspect-ratio: 5 / 6; } }
.hero-figure figcaption { margin-top: .75rem; font-size: var(--s--1); color: var(--muted); font-style: italic; }
.profile {
  position: absolute; width: clamp(64px, 9vw, 104px); left: clamp(-.75rem, -2vw, -2.25rem); bottom: 3.5rem;
  background: var(--white); padding: .6rem; border: 1px solid var(--line);
  fill: none; stroke: var(--slate); stroke-width: 2;
}
.profile .hatch { stroke: var(--oak-ink); stroke-width: 1; }
@media (max-width: 899px) { .profile { left: auto; right: .75rem; bottom: 3.25rem; } }

.facts { display: grid; gap: 0; margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; }
@media (min-width: 760px) { .facts li { border-bottom: 0; padding-right: 1.5rem; } .facts li + li { border-left: 1px solid var(--line); padding-left: 1.5rem; } }
.facts strong { font-family: var(--f-head); font-weight: 650; color: var(--slate); }
.facts span { color: var(--muted); font-size: var(--s--1); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section--plaster { background: var(--plaster); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); max-width: 40rem; }
.section-head h2 { color: var(--slate); }
.section-head p { margin-top: .9rem; color: var(--muted); font-size: var(--s-1); }

/* ---------- Work ---------- */
.work { display: grid; gap: clamp(.75rem, 1.5vw, 1.25rem); grid-template-columns: 1fr; }
@media (min-width: 640px) { .work { grid-template-columns: repeat(2, 1fr); } }
.work figure { display: grid; grid-template-rows: 1fr auto; height: 100%; }
.work .ph, .work img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.work figcaption { padding-top: .6rem; font-size: var(--s--1); color: var(--muted); }
@media (min-width: 1000px) {
  .work { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 300px; }
  .w--lg { grid-row: span 2; }
  .w--wide { grid-column: 1 / -1; }
  .work .ph, .work img { aspect-ratio: auto; min-height: 0; }
}

/* ---------- Services ---------- */
@media (min-width: 900px) {
  .services-grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 4rem; align-items: start; }
  .section-head--side { position: sticky; top: 110px; }
}
.section-head--side .text-link { margin-top: 1rem; }
.services { border-top: 2px solid var(--slate); }
.services li {
  display: grid; gap: .25rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) { .services li { grid-template-columns: 17rem 1fr; gap: 1.5rem; align-items: baseline; } }
.services h3 { color: var(--slate); }
.services p { color: var(--muted); }

/* ---------- About ---------- */
.about { background: var(--slate); color: var(--white); padding-bottom: var(--section); }
.about-grid { display: grid; gap: clamp(2rem, 5vw, 5rem); padding-top: var(--section); align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1.15fr; } }
.about-photo { aspect-ratio: 4 / 5; width: 100%; }
.about h2 { font-size: var(--s-3); margin-bottom: 1.5rem; }
.about-copy p { color: rgba(248,247,243,.86); max-width: 36rem; }
.about-copy p + p { margin-top: 1rem; }
.quote { margin: 2rem 0 0; padding-left: 1.25rem; border-left: 3px solid var(--oak); }
.quote p { font-size: var(--s-1); line-height: 1.45; color: var(--white); font-style: italic; }
.quote cite { display: block; margin-top: .6rem; font-family: var(--f-head); font-style: normal; font-weight: 600; font-size: .95rem; color: var(--oak); }
.promises { margin-top: 2rem; border-top: 1px solid rgba(248,247,243,.2); }
.promises li {
  display: flex; align-items: center; gap: .9rem; padding: .95rem 0; border-bottom: 1px solid rgba(248,247,243,.2);
  font-family: var(--f-head); font-weight: 600; font-size: var(--s-1);
}
.promises li::before { content: ""; width: 18px; height: 2px; background: var(--oak); flex: none; }

/* ---------- Process ---------- */
.steps { display: grid; gap: 2rem; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.steps li { border-top: 1px solid var(--slate); padding-top: 1.25rem; }
.steps .n { display: block; font-family: var(--f-head); font-weight: 700; font-stretch: 120%; font-size: 2.6rem; line-height: 1; color: var(--oak-ink); margin-bottom: .9rem; }
.steps h3 { color: var(--slate); margin-bottom: .4rem; }
.steps p { color: var(--muted); }

/* ---------- Builders ---------- */
.builders { background: var(--slate-2); color: var(--white); padding-block: clamp(3rem, 6vw, 4.5rem); }
.builders-inner { display: grid; gap: 1.25rem 3rem; align-items: center; }
@media (min-width: 900px) { .builders-inner { grid-template-columns: auto 1fr auto; } }
.builders h2 { font-size: var(--s-2); }
.builders p { color: rgba(248,247,243,.86); max-width: 34rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.7fr 1fr; gap: 5rem; } }
.contact h2 { color: var(--slate); }
.contact-sub { margin: .9rem 0 2rem; color: var(--muted); font-size: var(--s-1); }
.form { display: grid; gap: 1.1rem 1.25rem; }
@media (min-width: 600px) { .form { grid-template-columns: 1fr 1fr; } .field--full, .form-error, .form .btn, .form-status { grid-column: 1 / -1; } .form .btn { justify-self: start; } }
.field { display: flex; flex-direction: column; gap: .4rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-family: var(--f-head); font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .7rem .85rem; font: inherit; font-size: 1rem;
  color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--oak); outline-offset: 1px; border-color: var(--slate); }
.field [aria-invalid="true"] { border-color: #A23B2A; }
.field legend { margin-bottom: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips label {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: .4rem .9rem;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer;
  font-family: var(--f-head); font-weight: 500; font-size: .95rem;
}
.chips label:has(input:checked) { border-color: var(--slate); background: var(--plaster); }
.chips input { width: 18px; height: 18px; margin: 0; accent-color: var(--slate); }
.form-error { background: #F5E0DA; color: #6E2216; padding: .75rem 1rem; font-family: var(--f-head); font-size: .95rem; }
.form-status { font-family: var(--f-head); font-weight: 600; color: var(--slate); }
.form-status:empty { display: none; }

.contact-info { border-top: 2px solid var(--slate); padding-top: 1.5rem; align-self: start; }
.contact-info h3 { color: var(--slate); }
.contact-phone { display: inline-flex; min-height: 48px; align-items: center; margin-top: .4rem; font-family: var(--f-head); font-stretch: 115%; font-weight: 700; font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.3rem); color: var(--oak-ink); text-decoration: none; }
.contact-phone:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact-info dl { margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.contact-info dt { font-family: var(--f-head); font-weight: 600; font-size: .9rem; color: var(--muted); }
.contact-info dd { margin: .15rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate); color: rgba(248,247,243,.85); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-block: 3rem 2.5rem; }
.footer-name { font-family: var(--f-head); font-stretch: 118%; font-weight: 750; font-size: 1.4rem; color: var(--white); margin-bottom: .4rem; }
.site-footer a { text-decoration-color: var(--oak); text-underline-offset: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.footer-links a { display: inline-flex; min-height: 44px; align-items: center; font-family: var(--f-head); font-weight: 550; text-decoration: none; }
.footer-links a:hover { color: var(--oak); }
.footer-base { border-top: 1px solid rgba(248,247,243,.15); padding-block: 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; font-size: var(--s--1); }
.concept-note { color: rgba(248,247,243,.6); max-width: 36rem; }

/* ---------- Mobile bar ---------- */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  .mobile-bar { display: grid; grid-template-columns: 1fr 2fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--slate); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; min-height: 62px; font-family: var(--f-head); font-weight: 600; text-decoration: none; color: var(--white); }
  .mobile-bar-cta { background: var(--oak); color: var(--ink) !important; }
}

/* ---------- Load moment ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .cornice { transform-origin: left; transform: scaleX(0); transition: transform .9s cubic-bezier(.6,.05,.2,1); }
  .js .hero-copy > * { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
  .js .hero.is-ready .cornice { transform: none; }
  .js .hero.is-ready .hero-copy > * { opacity: 1; transform: none; }
  .js .hero.is-ready .hero-copy > :nth-child(1) { transition-delay: .35s; }
  .js .hero.is-ready .hero-copy > :nth-child(2) { transition-delay: .42s; }
  .js .hero.is-ready .hero-copy > :nth-child(3) { transition-delay: .5s; }
  .js .hero.is-ready .hero-copy > :nth-child(4) { transition-delay: .58s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Illustrated mockups in place of photos (inline style supplies the image) */
.ph.has-img { background-size: cover; background-position: center; background-repeat: no-repeat; }
