/* Flat Top Trades — site styles
   Palette: Spruce #1F3A2E · Fog #E9ECE6 · Manila #E2C27A · Graphite #26292A · Iron #9C3B26
   Type: Barlow Condensed (display), Barlow (text), Caveat (handwriting on the tag only) */

:root {
  --spruce: #1F3A2E;
  --spruce-2: #2C4D3E;
  --fog: #E9ECE6;
  --fog-2: #DCE1D9;
  --paper: #F7F8F5;
  --manila: #E2C27A;
  --manila-2: #EFDCAE;
  --graphite: #26292A;
  --stone: #5B615C;
  --iron: #9C3B26;
  --rule: #C5CCC3;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
}

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

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

body {
  margin: 0;
  background: var(--fog);
  color: var(--graphite);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.55;
}

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

a { color: var(--spruce); text-underline-offset: 3px; }
a:hover { color: var(--iron); }

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

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

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--graphite); color: #fff; padding: 10px 14px; z-index: 10;
}
.skip:focus { left: 10px; top: 10px; }

h1, h2, h3 { font-family: var(--display); line-height: 1; margin: 0; }
h2 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); font-weight: 700; letter-spacing: -0.5px; }
h3 { font-size: 1.6rem; font-weight: 600; }
p { margin: 0 0 1em; }
.lead { font-size: 1.3rem; max-width: 36em; }
.muted { color: var(--stone); }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--graphite); }
.brand svg { flex: none; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: 0.3px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-weight: 500; }
.nav a { color: var(--graphite); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--spruce); text-decoration: underline; text-decoration-thickness: 2px; }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1.25rem;
  letter-spacing: 0.3px; text-decoration: none; padding: 12px 22px; border-radius: 3px;
  border: 2px solid var(--spruce); min-height: 48px;
}
.btn-solid { background: var(--spruce); color: #fff; }
.btn-solid:hover { background: var(--spruce-2); color: #fff; }
.btn-line { background: transparent; color: var(--spruce); }
.btn-line:hover { background: var(--spruce); color: #fff; }
.nav .btn { padding: 8px 16px; font-size: 1.1rem; color: #fff; }
.nav .btn:hover { text-decoration: none; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 {
  font-size: clamp(3.4rem, 9vw, 7.5rem); font-weight: 800; text-transform: uppercase;
  letter-spacing: -1px; line-height: 0.88; color: var(--spruce); margin-bottom: 28px;
}
.hero h1 .line2 { display: block; color: var(--graphite); }
.hero .lead { margin-bottom: 28px; }

/* The repair tag — the one loud element */
.tag-hang { display: flex; justify-content: center; padding-top: 20px; }
.tag {
  position: relative; width: min(100%, 340px); background: var(--manila);
  padding: 64px 28px 30px; color: var(--graphite);
  clip-path: polygon(18% 0, 82% 0, 100% 12%, 100% 100%, 0 100%, 0 12%);
  transform: rotate(4deg); transform-origin: 50% 0;
  box-shadow: inset 0 0 0 1px rgba(38,41,42,.08);
  animation: swing 2.4s ease-out 1;
}
.tag::before { /* grommet */
  content: ""; position: absolute; top: 18px; left: 50%; width: 22px; height: 22px; margin-left: -11px;
  border-radius: 50%; background: var(--fog); box-shadow: 0 0 0 5px #C9A85E;
}
.tag-string {
  position: absolute; top: -34px; left: 50%; width: 2px; height: 64px; background: var(--stone);
  transform: rotate(-12deg); transform-origin: bottom;
}
.tag-head { font-family: var(--display); font-weight: 700; font-size: 1.5rem; border-bottom: 2px solid var(--graphite); padding-bottom: 6px; margin-bottom: 14px; }
.tag dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: baseline; }
.tag dt { font-family: var(--display); font-weight: 600; font-size: 1rem; color: #4A4436; }
.tag dd { margin: 0; font-family: var(--hand); font-size: 1.6rem; line-height: 1.1; color: #1B2A6B; border-bottom: 1px solid rgba(38,41,42,.35); }
.tag .verdict { margin-top: 18px; font-family: var(--hand); font-size: 1.9rem; color: var(--iron); transform: rotate(-3deg); }

@keyframes swing {
  0% { transform: rotate(-6deg); }
  35% { transform: rotate(8deg); }
  65% { transform: rotate(2deg); }
  100% { transform: rotate(4deg); }
}

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-paper { background: var(--paper); }
.section-spruce { background: var(--spruce); color: #EEF1EC; }
.section-spruce a { color: var(--manila); }
.section-spruce a:hover { color: #fff; }
.section-head { max-width: 46em; margin-bottom: 40px; }
.section-head h2 { margin-bottom: 14px; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.pillars h3 { color: var(--spruce); margin-bottom: 8px; font-size: 1.9rem; }
.pillars p { margin: 0; }

/* Services ledger */
.ledger { border-top: 3px solid var(--graphite); }
.ledger-row {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--rule); align-items: start;
}
.ledger-row h3 { font-size: 1.75rem; }
.ledger-row p { margin: 0; }
.ledger-row .fix { color: var(--iron); font-weight: 600; }
.new-chip {
  display: inline-block; margin-left: 8px; vertical-align: middle; font-family: var(--hand); font-size: 1.3rem;
  background: var(--manila); color: var(--graphite); padding: 0 10px 2px; border-radius: 2px; transform: rotate(-3deg);
}

/* Ledger inside a half-width column */
.split .ledger-row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 6px 20px; }
.split .ledger-row h3 { grid-column: 1 / -1; }

/* Promise band */
.promise { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: center; }
.promise blockquote { margin: 0 0 18px; font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.4; max-width: 34em; }
.promise h2 { margin-bottom: 18px; color: #fff; }

/* Before / after */
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pair figcaption { grid-column: 1 / -1; font-size: 1rem; color: var(--stone); padding-top: 6px; }
.photo-slot {
  aspect-ratio: 4 / 3; background: var(--fog-2); border: 2px dashed #A9B2A7; display: flex;
  align-items: center; justify-content: center; text-align: center; padding: 14px; font-size: 0.95rem; color: var(--stone);
}
.photo-slot.tall { aspect-ratio: 4 / 5; }

/* Rate card */
.rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--paper); border: 3px solid var(--graphite); }
.rate { padding: 32px 28px; }
.rate + .rate { border-left: 1px solid var(--rule); }
.rate h3 { font-size: 1.55rem; margin-bottom: 10px; }
.rate .amount { font-family: var(--display); font-weight: 800; font-size: 4rem; line-height: 1; color: var(--spruce); margin-bottom: 14px; }
.rate .amount small { font-size: 1.5rem; font-weight: 500; color: var(--stone); }
.rate p { margin: 0 0 8px; }
.rate-main { background: var(--manila-2); }
.fine { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px; font-size: 1rem; }
.fine strong { display: block; font-family: var(--display); font-size: 1.2rem; }

/* Route line: service area drawn to scale */
.route { position: relative; margin: 56px 0 24px; height: 170px; }
.route .zone { position: absolute; top: 66px; height: 34px; }
.zone-in { background: #B9CBBE; }
.zone-25 { background: var(--manila-2); }
.zone-50 { background: var(--manila); }
.route .road { position: absolute; left: 0; right: 0; top: 82px; height: 3px; background: var(--graphite); }
.town { position: absolute; top: 0; bottom: 0; width: 0; }
.town .dot { position: absolute; top: 76px; left: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--graphite); }
.town .name { position: absolute; left: 0; transform: translateX(-50%); white-space: nowrap; font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.town .name small { display: block; text-align: center; font-family: var(--text); font-weight: 400; font-size: 0.85rem; color: var(--stone); }
.town.up .name { bottom: 116px; }
.town.down .name { top: 108px; }
.town.home .dot { background: var(--spruce); border-color: var(--spruce); width: 20px; height: 20px; left: -10px; top: 73px; }
.town.home .name { color: var(--spruce); }
.town .name a { color: inherit; }
.town .name a:hover { color: var(--iron); }
.footer-towns { flex-basis: 100%; }
.town.edge-l .name { transform: none; left: -6px; }
.town.edge-r .name { transform: translateX(-100%); left: 6px; }
.town.edge-r .name small { text-align: right; }
.town.edge-l .name small { text-align: left; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 1rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 28px; height: 14px; display: inline-block; }
.route-list { display: none; }

/* Steps (a real sequence, so numbered) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-weight: 800; font-size: 4rem; line-height: 1; color: var(--manila); -webkit-text-stroke: 2px var(--graphite); margin-bottom: 10px; }
.steps h3 { margin-bottom: 8px; }

/* Decide grid (repair-first page) */
.decide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 3px solid var(--graphite); }
.decide div { padding: 24px 22px 8px 0; }
.decide div + div { padding-left: 22px; border-left: 1px solid var(--rule); }
.decide h3 { margin-bottom: 8px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.checklist li strong { font-family: var(--display); font-size: 1.3rem; margin-right: 6px; }
.panel { background: var(--paper); border: 3px solid var(--graphite); padding: 32px; }
.panel-manila { background: var(--manila-2); }

/* Contact footer */
.contact { background: var(--graphite); color: #EEF1EC; padding: clamp(56px, 8vw, 96px) 0 0; }
.contact h2 { color: #fff; margin-bottom: 12px; }
.contact .phone { display: inline-block; font-family: var(--display); font-weight: 800; font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1; color: var(--manila); text-decoration: none; margin: 18px 0 10px; letter-spacing: -1px; }
.contact .phone:hover { color: #fff; }
.contact .email { color: #fff; font-size: 1.3rem; }
.contact .email:hover { color: var(--manila); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.footer-line { margin-top: 64px; border-top: 1px solid #44494A; padding: 20px 0; font-size: 0.95rem; color: #B9BFBA; }
.footer-line .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-line a { color: #B9BFBA; }

/* Brand badge */
.brand img { width: 56px; height: 56px; flex: none; }
.contact-badge { width: 200px; height: 200px; justify-self: end; }

/* Flat Tops band */
.vista { margin: 0; height: clamp(240px, 36vw, 520px); overflow: hidden; background: #6F8FB0; }
.vista img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }

/* Recent work gallery */
.gallery { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 20px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 3; border-radius: 3px; }
.gallery .g-main { grid-row: 1 / span 2; display: flex; flex-direction: column; }
.gallery .g-main img { flex: 1 1 0; height: 100%; aspect-ratio: auto; min-height: 0; }
.gallery figcaption { font-size: 1rem; color: var(--stone); padding-top: 8px; }

/* Fix-or-replace house game */
.game { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.house { position: relative; background: var(--paper); border: 3px solid var(--graphite); }
.house svg { display: block; width: 100%; height: auto; }
.spot {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0;
  border: 0; background: transparent; cursor: pointer; display: grid; place-items: center;
}
.spot::before {
  content: "+"; width: 28px; height: 28px; border-radius: 50%; background: var(--manila);
  border: 2px solid var(--graphite); font: 800 20px/24px var(--display); color: var(--graphite);
  box-shadow: 0 0 0 0 rgba(226,194,122,.7); animation: pulse 2.2s ease-out infinite;
}
.spot:hover::before, .spot.is-active::before { background: #fff; }
.spot.is-fix::before { content: "\2713"; background: var(--spruce); color: #fff; border-color: var(--spruce); animation: none; font-size: 16px; }
.spot.is-replace::before { content: "\00D7"; background: var(--iron); color: #fff; border-color: var(--iron); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(226,194,122,.8); } 70% { box-shadow: 0 0 0 12px rgba(226,194,122,0); } 100% { box-shadow: 0 0 0 0 rgba(226,194,122,0); } }
.game-side { position: sticky; top: 16px; }
.game-progress { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--stone); margin: 0 0 10px; }
.game-panel { background: var(--manila-2); border: 3px solid var(--graphite); padding: 28px; min-height: 260px; }
.game-panel h3 { font-size: 1.9rem; margin-bottom: 12px; outline: none; }
.game-q { font-family: var(--display); font-weight: 700; font-size: 1.4rem; margin: 18px 0 12px; }
.game-choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.game-choices .btn { cursor: pointer; font-size: 1.15rem; }
.game-verdict { font-family: var(--display); font-weight: 800; font-size: 1.6rem; margin: 0 0 10px; }
.v-fix { color: var(--spruce); }
.v-replace { color: var(--iron); }
.game-service { font-weight: 600; }
.game-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 0.95rem; color: var(--stone); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.about-photo { margin: 0; }
.about-photo img { width: 100%; height: auto; border: 3px solid var(--graphite); }
.about-photo figcaption { font-size: 1rem; color: var(--stone); padding-top: 8px; }
.about h2 { margin-bottom: 18px; }
.about .hablo { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--spruce); margin: 0; }

/* To-do list booking */
.booking { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px solid var(--graphite); }
.booking > div { padding: 24px 24px 4px 0; }
.booking > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.booking h3 { margin-bottom: 8px; }

/* Promise list */
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 3px solid var(--graphite); }
.promise-list li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.promise-list li:last-child { grid-column: 1 / -1; }
.promise-list strong { font-family: var(--display); font-size: 1.35rem; display: block; margin-bottom: 2px; }

/* Quote form */
.quote-form { background: #2F3335; padding: 28px; display: grid; gap: 14px; }
.quote-form h3 { color: #fff; font-size: 1.8rem; }
.quote-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quote-form label { display: grid; gap: 6px; font-size: 0.95rem; color: #D5DAD4; font-weight: 500; }
.quote-form input, .quote-form select, .quote-form textarea {
  font: inherit; font-size: 1rem; color: var(--graphite); background: var(--paper); border: 2px solid #5B615C; border-radius: 3px; padding: 10px 12px; min-height: 44px; width: 100%;
}
.quote-form textarea { resize: vertical; }
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus { outline: 3px solid var(--manila); outline-offset: 1px; }
.btn-manila { background: var(--manila); border-color: var(--manila); color: var(--graphite); cursor: pointer; justify-self: start; }
.btn-manila:hover { background: #fff; border-color: #fff; color: var(--graphite); }
.form-note { margin: 0; font-size: 0.95rem; color: #B9BFBA; }
.hp { position: absolute; left: -5000px; }
.contact .wrap.contact-grid { align-items: start; }

/* Phones and tablets */
@media (max-width: 900px) {
  .hero .wrap, .promise, .split, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .promise svg { width: 140px; height: 140px; }
  .pillars, .steps, .fine { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ledger-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rates { grid-template-columns: minmax(0, 1fr); }
  .rate + .rate { border-left: 0; border-top: 1px solid var(--rule); }
  .pairs { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .game { grid-template-columns: minmax(0, 1fr); }
  .about { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .booking, .promise-list { grid-template-columns: minmax(0, 1fr); }
  .booking > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .quote-form .row { grid-template-columns: minmax(0, 1fr); }
  .about-photo { max-width: 420px; }
  .game-side { position: static; }
  .spot { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .spot::before { width: 22px; height: 22px; font-size: 16px; line-height: 18px; }
  .gallery .g-main { grid-row: auto; }
  .gallery .g-main img { aspect-ratio: 4 / 3; }
  .contact-badge { justify-self: start; width: 150px; height: 150px; }
  .decide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decide div:nth-child(3) { padding-left: 0; border-left: 0; }
  .route, .legend { display: none; }
  .route-list { display: grid; gap: 14px; margin-top: 24px; }
  .route-list div { padding: 14px 16px; }
  .route-list h3 { font-size: 1.3rem; margin-bottom: 4px; }
  .route-list p { margin: 0; }
}
@media (max-width: 520px) {
  .decide { grid-template-columns: minmax(0, 1fr); }
  .decide div + div { padding-left: 0; border-left: 0; }
  .nav { gap: 4px 16px; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tag { animation: none; }
  .spot::before { animation: none; }
}
