/* ==========================================================================
   Maili Contractors Ltd — London & surrounding areas
   --------------------------------------------------------------------------
   Gold on near-black, taken off their van livery, where the monogram is a
   warm metallic on a black oval and the company name is set in a serif. That
   is a more formal register than the other trades sites in this portfolio,
   so the type follows it: a serif for headings rather than a heavy grotesque.

   Worth knowing: their van advertises contractorswestlondon.co.uk, which is
   currently a Hostinger parked-domain placeholder. They are paying for a
   domain that serves a hosting advert.
   ========================================================================== */

:root {
  color-scheme: dark;

  --gold:       #B08D57;
  --gold-lit:   #D4B483;
  --gold-deep:  #8A6B3C;
  --ink:        #0E0E0D;
  --ink-soft:   #171614;
  --card:       #1C1A17;
  --card-lift:  #262320;

  --cream:      #F3EFE7;
  --muted:      #9C948A;
  --muted-dim:  #6E675E;
  --on-dark:    #F3EFE7;
  --on-dark-mu: #9C948A;
  --text:       #F3EFE7;

  --oat:        #0E0E0D;
  --stone:      #171614;
  --paper:      #1C1A17;
  --red:        #B08D57;
  --red-deep:   #8A6B3C;
  --timber:     #B08D57;
  --timber-lit: #D4B483;

  --line:       rgba(243,239,231,0.14);
  --line-dark:  rgba(243,239,231,0.14);

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 14px 40px rgba(0,0,0,0.55);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

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

*, *::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(--gold); color: #17120A; padding: 12px 18px; text-decoration: none; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold); 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: 600;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.1; letter-spacing: -0.012em;
  color: var(--cream); margin: 0 0 14px;
}
.h2 em { font-style: italic; color: var(--gold); }
.h2.light { color: var(--on-dark); }

.kicker {
  font-weight: 700; font-size: 0.74rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); 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(--gold); color: #17120A; border-color: var(--red); }
.btn-red:hover { background: var(--gold-lit); border-color: var(--gold-lit); }
.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(--cream); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

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

.nav { position: sticky; top: 0; z-index: 100; background: rgba(14,14,13,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: 40px; height: auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.12; }
.brand-top { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--cream); }
.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.88rem; font-weight: 500; letter-spacing: 0.03em; color: var(--cream); padding: 6px 0; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--gold); 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(--cream); 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(--ink); }
.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(--gold); color: #17120A; 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: 600;
  font-size: clamp(2.2rem, 5.6vw, 4.2rem);
  line-height: 1.06; letter-spacing: -0.015em;
  color: #fff; margin: 0 0 18px; max-width: 18ch;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.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(--gold); 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(--gold); background: var(--card-lift); }
.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: 600; font-size: 1.35rem; margin: 8px 0 8px; color: var(--cream); }
.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: 9px; height: 9px; background: var(--gold); 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: 2px solid var(--gold); }
.step b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--cream); 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(--cream); margin: 0; text-decoration: none; }
.cdetail a:hover { color: var(--gold); }

.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(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; width: 100%; color: var(--cream);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field select option { background: #1C1A17; color: #F3EFE7; }
.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(176,141,87,0.14); border: 1px solid rgba(176,141,87,0.42); }
.form-ok strong { display: block; margin-bottom: 3px; }
.form-err { background: rgba(176,52,40,0.16); border: 1px solid rgba(176,52,40,0.5); color: #E8B4AC; }

/* ============================== 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: 600; 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(--gold); }
.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; }

/* What you get for making contact — the one part of the old "how it works"
   strip that was a reason to act rather than a description of the obvious. */
.promise { margin: 0 0 22px; }
.promise li { padding-left: 28px; font-size: 0.95rem; color: var(--muted); }
.promise li b { color: var(--text); }

/* ==========================================================================
   Polish pass — service cards with photography, areas, lightbox, hero motion
   ========================================================================== */

/* --- hero: a slow push in, so the page is not dead on arrival ------------- */
.hero-media img { animation: kenburns 26s ease-out both; transform-origin: 55% 50%; }
@keyframes kenburns { from { transform: scale(1.0); } to { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .hero-media img { animation: none; } }

/* --- services: photo, name, and what is actually included ---------------- */
.svc-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.svc { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.svc-shot { aspect-ratio: 16/10; border-radius: 0; }
.svc-body { padding: 22px 24px 26px; }
.svc h3 { margin: 0 0 12px; }
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc-list li { position: relative; padding: 5px 0 5px 18px; font-size: 0.92rem; color: var(--muted); }
.svc-list li::before { content: ""; position: absolute; left: 0; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

/* --- areas ---------------------------------------------------------------- */
.areas-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px,3.5vw,44px); align-items: start; }
.sub-h { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 14px; color: var(--text); }
.pills { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 9px; }
.pills li {
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 100px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text);
}
.pills li:nth-child(-n+2) { border-color: var(--red); color: var(--red); }

/* --- lightbox ------------------------------------------------------------- */
.shot.zoomable { cursor: zoom-in; }
.shot.zoomable::after {
  content: "";
  position: absolute; right: 12px; bottom: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(10,10,10,0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E") center/18px no-repeat;
  opacity: 0; transition: opacity 0.2s var(--ease);
  pointer-events: none;
}
.shot.zoomable:hover::after, .shot.zoomable:focus-visible::after { opacity: 1; }

.lb { position: fixed; inset: 0; z-index: 500; display: none; background: rgba(8,8,8,0.94); }
.lb[open], .lb.on { display: flex; align-items: center; justify-content: center; }
.lb figure { margin: 0; max-width: min(1200px, 92vw); max-height: 88vh; display: flex; flex-direction: column; gap: 12px; }
.lb img { max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: var(--radius-lg); object-fit: contain; }
.lb figcaption { color: rgba(255,255,255,0.72); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.26);
  color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s var(--ease);
}
.lb-btn:hover { background: rgba(255,255,255,0.22); }
.lb-prev { left: max(14px, 3vw); }
.lb-next { right: max(14px, 3vw); }
.lb-close { top: 18px; right: 18px; transform: none; width: 46px; height: 46px; font-size: 1.3rem; }

@media (max-width: 980px) { .areas-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .lb-btn { width: 44px; height: 44px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}
