/* ==========================================================================
   Tom's Building & Carpentry — London & surrounding areas
   --------------------------------------------------------------------------
   Red is his, off the van. Everything else is deliberately warm — oat, stone
   and timber — because the portfolio already has a red-on-white trades site
   (Guyva Brickwork, #c8202e on #ffffff) and two near-identical red builders
   would be hard to tell apart. Warm neutrals also suit the carpentry half of
   the business, which is the part that separates him from every general
   builder in London.
   ========================================================================== */

:root {
  color-scheme: light;

  --red:        #D21F26;
  --red-deep:   #A8161C;
  --ink:        #1C1A17;
  --ink-soft:   #2E2A24;
  --timber:     #8A5A2B;
  --timber-lit: #B27C44;

  --oat:        #F5F1E9;
  --stone:      #E8E2D5;
  --paper:      #FFFDF9;

  --text:       #211E19;
  --muted:      #6B6459;
  --muted-dim:  #938B7D;
  --on-dark:    #F5F1E9;
  --on-dark-mu: #B4AB9C;

  --line:       rgba(33,30,25,0.14);
  --line-dark:  rgba(245,241,233,0.16);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 6px;
  --radius-lg: 14px;
  --shadow: 0 12px 36px rgba(33,30,25,0.14);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --wrap: 1180px;
  --gutter: 20px;
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--oat); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: var(--on-dark); padding: 12px 18px; text-decoration: none; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ============================== Type ============================== */

.h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.04; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 14px;
}
.h2 em { font-style: normal; color: var(--red); }
.h2.light { color: var(--on-dark); }

.kicker {
  font-weight: 700; font-size: 0.74rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--red); margin: 0 0 10px;
}
.kicker.light { color: var(--timber-lit); }

.sub { font-size: 1.05rem; color: var(--muted); max-width: 60ch; margin: 0 0 30px; }
.sub.light { color: var(--on-dark-mu); }
.small { font-size: 0.88rem; color: var(--muted); }

/* ============================== Buttons ============================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px; border: 2px solid transparent; border-radius: var(--radius);
  font-weight: 700; font-size: 0.96rem; text-decoration: none; cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 10px 17px; font-size: 0.85rem; }
.btn-lg { padding: 18px 34px; font-size: 1.02rem; }
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-ink { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.btn-ink:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* ============================== Nav ============================== */

.nav { position: sticky; top: 0; z-index: 100; background: rgba(245,241,233,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav.stuck { box-shadow: 0 6px 22px rgba(33,30,25,0.10); }
.nav-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: var(--nav-h); display: flex; align-items: center; gap: 22px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 50px; height: auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.12; }
.brand-top { font-family: var(--font-display); font-weight: 800; font-size: 1.04rem; letter-spacing: -0.01em; color: var(--ink); }
.brand-sub { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }

.nav-links { display: flex; gap: 24px; }
.nav-links a { text-decoration: none; font-size: 0.9rem; font-weight: 600; color: var(--text); padding: 6px 0; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--red); transition: width 0.22s var(--ease); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; gap: 10px; align-items: center; }

.burger { display: none; width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform 0.22s var(--ease), opacity 0.22s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer { display: flex; flex-direction: column; padding: 8px var(--gutter) 22px; border-top: 1px solid var(--line); background: var(--oat); }
.drawer[hidden] { display: none; }
.drawer a { padding: 14px 0; text-decoration: none; font-size: 1.04rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.drawer a:last-child { border-bottom: 0; }
.drawer-call { color: var(--red); }
.drawer-quote { margin-top: 14px; background: var(--red); color: #fff; text-align: center; border-radius: var(--radius); border-bottom: 0 !important; }

/* ============================== Hero ============================== */

.hero { position: relative; isolation: isolate; background: var(--ink); overflow: hidden; min-height: min(80vh, 680px); display: flex; align-items: flex-end; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media.no-img::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(138,90,43,0.22) 0 14px, transparent 14px 28px), linear-gradient(150deg, #37302a, #1C1A17); }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(95deg, rgba(14,12,10,0.93) 0%, rgba(14,12,10,0.78) 38%, rgba(14,12,10,0.38) 70%, rgba(14,12,10,0.26) 100%); }
.hero-in { position: relative; max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 120px var(--gutter) 48px; }

.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  line-height: 1.02; letter-spacing: -0.028em;
  color: #fff; margin: 0 0 18px; max-width: 18ch;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lede { font-size: clamp(1rem, 1.5vw, 1.14rem); color: rgba(245,241,233,0.84); max-width: 52ch; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.trust { background: var(--ink); border-top: 1px solid var(--line-dark); }
.trust-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); }
.trust-in div { padding: 18px 0; color: var(--on-dark-mu); font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.trust-in b { color: var(--on-dark); font-weight: 700; }
.trust-in i { width: 8px; height: 8px; background: var(--red); transform: rotate(45deg); flex: none; }

/* ============================== Bands ============================== */

.band { padding: clamp(50px, 6vw, 84px) 0; background: var(--oat); }
.band-stone { background: var(--stone); }
.band-ink { background: var(--ink); }

/* ============================== Photos ============================== */

.shot { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--stone); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.shot-sq { aspect-ratio: 1/1; }
.shot-4x3 { aspect-ratio: 4/3; }
.shot-tall { aspect-ratio: 3/4; }
.shot:hover img { transform: scale(1.04); }
.shot.no-img img { display: none; }
.shot.no-img::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(138,90,43,0.16) 0 12px, transparent 12px 24px), linear-gradient(150deg, #3A322A, #221F1A); }
.shot.no-img::after { content: attr(data-label); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: clamp(0.95rem,1.8vw,1.3rem); letter-spacing: 0.04em; text-transform: uppercase; color: var(--timber-lit); }

/* ============================== Services ============================== */

.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 18px; }
.svc {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 24px; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--red); }
.svc-num { font-family: var(--font-display); font-weight: 800; font-size: 0.8rem; color: var(--red); letter-spacing: 0.1em; }
.svc h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.015em; margin: 8px 0 8px; color: var(--ink); }
.svc p { margin: 0; font-size: 0.94rem; color: var(--muted); }

/* ============================== Split ============================== */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,4vw,56px); align-items: start; }
.split-rev .split-copy { order: 2; }
.tick { list-style: none; margin: 0 0 24px; padding: 0; }
.tick li { position: relative; padding: 8px 0 8px 30px; font-size: 0.99rem; }
.tick li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 10px; height: 10px; background: var(--red); transform: rotate(45deg); }
.tick.light li { color: var(--on-dark-mu); }
.tick.light li b { color: var(--on-dark); }

/* ============================== Gallery ============================== */

.gal { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 14px; }

/* ============================== Steps ============================== */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 20px; }
.step { padding-top: 20px; border-top: 3px solid var(--red); }
.step b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); margin-bottom: 6px; }
.step span { font-size: 0.93rem; color: var(--muted); }

/* ============================== Contact ============================== */

.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(26px,4vw,52px); align-items: start; }
.cdetail { margin-bottom: 20px; }
.cdetail span { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-dim); margin-bottom: 4px; }
.cdetail a, .cdetail p { font-size: 1.08rem; font-weight: 600; color: var(--ink); margin: 0; text-decoration: none; }
.cdetail a:hover { color: var(--red); }

.form { margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field label span { letter-spacing: 0.02em; text-transform: none; font-weight: 400; color: var(--muted-dim); }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); }
.field textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.8rem; color: var(--muted-dim); margin: 12px 0 0; }
.form-ok, .form-err { margin: 16px 0 0; padding: 15px 17px; border-radius: var(--radius); font-size: 0.96rem; }
.form-ok { background: rgba(42,120,60,0.12); border: 1px solid rgba(42,120,60,0.4); }
.form-ok strong { display: block; margin-bottom: 3px; }
.form-err { background: rgba(210,31,38,0.1); border: 1px solid rgba(210,31,38,0.4); color: var(--red-deep); }

/* ============================== Footer ============================== */

.foot { background: var(--ink); color: var(--on-dark-mu); padding: 44px 0 28px; }
.foot-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; align-items: start; }
.foot-brand img { width: 62px; margin-bottom: 12px; }
.foot-brand p { margin: 0; font-size: 0.9rem; }
.foot h4 { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark); margin: 0 0 12px; }
.foot-links { display: flex; flex-direction: column; gap: 8px; }
.foot-links a, .foot-meta a { text-decoration: none; font-size: 0.9rem; }
.foot-links a:hover, .foot-meta a:hover { color: var(--red); }
.foot-meta p { margin: 0 0 7px; font-size: 0.9rem; }
.foot-bottom { display: flex; justify-content: center; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-dark); }
.foot-bottom p { margin: 0; font-size: 0.8rem; color: rgba(180,171,156,0.7); }

/* ============================== Reveal ============================== */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .svc:hover { transform: none; }
  .shot img { transition: none; }
}

/* ============================== Responsive ============================== */

@media (max-width: 980px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: flex; }
  .split { grid-template-columns: 1fr; }
  .split-rev .split-copy { order: initial; }
  .contact-grid { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: auto; }
  .hero-in { padding: 96px var(--gutter) 40px; }
  .hero h1 { max-width: 100%; }
  .hero-actions .btn { width: 100%; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .foot-in { grid-template-columns: 1fr; }
}

/* ============================== Coverage map ============================== */

.map-wrap { margin-top: clamp(30px, 4vw, 48px); }
.map-cap {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 10px;
}
/* A definite height. Google's embed cannot size against a ratio-derived or
   percentage box — it draws a small map in the corner of a correct frame. */
.map {
  height: clamp(260px, 30vw, 380px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--stone);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
