/* Toronto Decks & Fences, main stylesheet
   Palette: spruce green, cedar accent, cool paper white
   Type: Big Shoulders Display (headings), Public Sans (body)
   Signature motif: site-plan dimension lines and lot-line dashes */

@font-face {
  font-family: 'Big Shoulders';
  src: url('../fonts/big-shoulders-latin-wght.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('../fonts/public-sans-latin-wght.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('../fonts/public-sans-latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --spruce: #21402F;
  --spruce-deep: #152B20;
  --cedar: #B0512B;
  --cedar-dark: #8F3F1F;
  --paper: #F3F5F0;
  --board: #FFFFFF;
  --ink: #1C2620;
  --ink-soft: #4A574E;
  --line: #C9D2C6;
  --stake: #E6EBE2;
  --display: 'Big Shoulders', 'Arial Narrow', sans-serif;
  --body: 'Public Sans', Arial, sans-serif;
  --max: 1120px;
  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.0625rem;
}

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

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

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

h1, h2, h3, .display {
  font-family: var(--display);
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 800; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 750; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 700; letter-spacing: 0.03em; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cedar);
  margin-bottom: 14px;
}

.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 46ch; }

a { color: var(--cedar-dark); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--cedar);
  outline-offset: 2px;
}

/* ---------- Signature: dimension line ---------- */

.dim {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 22px;
}
.dim::before, .dim::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink-soft);
  position: relative;
}
.dim span { white-space: nowrap; }
@media (max-width: 640px) {
  .dim span { white-space: normal; text-align: center; }
}
.dim .tick-l, .dim .tick-r {
  width: 1px; height: 14px; background: var(--ink-soft); flex: none;
}
.dim.cedar { color: var(--cedar); }
.dim.cedar::before, .dim.cedar::after, .dim.cedar .tick-l, .dim.cedar .tick-r { background: var(--cedar); }
.dim.light { color: rgba(255,255,255,0.85); }
.dim.light::before, .dim.light::after, .dim.light .tick-l, .dim.light .tick-r { background: rgba(255,255,255,0.6); }

/* Lot line divider */
.lot-line {
  border: none;
  border-top: 2px dashed var(--line);
  margin: 0;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--spruce-deep);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--cedar);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}
.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
  line-height: 1;
}
.logo em { font-style: normal; color: var(--cedar); }
.logo small {
  display: block;
  font-family: var(--body);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: rgba(255,255,255,0.65);
  margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.nav a:hover, .nav a[aria-current="page"] { color: #fff; box-shadow: 0 2px 0 var(--cedar); }
.nav .btn { box-shadow: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--spruce-deep);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 24px;
    gap: 4px;
    border-bottom: 3px solid var(--cedar);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; }
  .nav a:hover, .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--cedar); padding-left: 12px; }
}

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

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-cedar { background: var(--cedar); color: #fff; }
.btn-cedar:hover { background: var(--cedar-dark); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.btn-ghost-light:hover { background: #fff; color: var(--spruce-deep); }

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

.hero {
  background: var(--spruce);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--cedar); }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 46ch; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Ruler edge along hero bottom */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 12px;
  background:
    repeating-linear-gradient(to right,
      rgba(255,255,255,0.55) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(to right,
      rgba(255,255,255,0.9) 0 2px, transparent 2px 100px);
  opacity: 0.5;
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 56px; }
}

/* ---------- Photo slots (placeholders until real photos drop in) ---------- */

.photo-slot {
  background:
    repeating-linear-gradient(-45deg, var(--stake) 0 14px, #DDE3D8 14px 28px);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 20px;
  min-height: 260px;
}
.photo-slot.tall { min-height: 380px; }
.hero .photo-slot {
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.08) 0 14px, rgba(255,255,255,0.03) 14px 28px);
  border-color: rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.75);
}

/* ---------- Real site photos ---------- */

.site-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.hero .site-photo {
  aspect-ratio: auto;
  height: 100%;
  min-height: 340px;
  max-height: 540px;
}
.service-panel .site-photo {
  border-radius: 0;
  aspect-ratio: 3 / 2;
}

/* ---------- Sections ---------- */

.section { padding: 84px 0; }
.section.tight { padding: 56px 0; }
.section.green { background: var(--spruce); color: #fff; }
.section.green h2, .section.green h3 { color: #fff; }
.section.green p { color: rgba(255,255,255,0.85); }
.section.white { background: var(--board); }
.section-head { max-width: 62ch; margin-bottom: 44px; }

/* ---------- Cards and grids ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--board);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }
.card .price {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--spruce);
  margin: 12px 0 2px;
  line-height: 1;
}
.card .price-note {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

/* Service split panels on home */
.service-panel {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--board);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-panel .photo-slot { border: none; border-radius: 0; min-height: 300px; }
.service-panel .panel-body { padding: 26px 28px 30px; }
.service-panel h3 { font-size: 2rem; }
.service-panel p { color: var(--ink-soft); margin-top: 8px; }
.service-panel .go {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cedar-dark);
}
.service-panel:hover { border-color: var(--cedar); }
.service-panel:hover .go { text-decoration: underline; }

/* Process steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: step; border-top: 3px solid var(--cedar); padding-top: 16px; }
.step::before {
  content: 'Step ' counter(step);
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cedar);
  margin-bottom: 8px;
}
.step h3 { font-size: 1.25rem; margin-bottom: 8px; }
.step p { font-size: 0.95rem; color: var(--ink-soft); }
.section.green .step p { color: rgba(255,255,255,0.82); }
.section.green .step { border-top-color: var(--cedar); }

/* Spec table */
.spec-table { width: 100%; border-collapse: collapse; background: var(--board); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 0.98rem; }
.spec-table th {
  background: var(--spruce);
  color: #fff;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td strong { color: var(--spruce); }
.table-scroll { overflow-x: auto; }

/* FAQ */
details {
  background: var(--board);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 12px;
}
summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  position: relative;
}
summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--cedar);
}
details[open] summary::after { content: '\2013'; }
details .answer { padding: 0 22px 20px; color: var(--ink-soft); }

/* Note / bylaw callout */
.callout {
  border-left: 4px solid var(--cedar);
  background: var(--board);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.callout strong { color: var(--spruce); }
.callout p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- CTA band ---------- */

.cta-band { background: var(--cedar); color: #fff; }
.cta-band .wrap {
  padding-top: 60px;
  padding-bottom: 60px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.9); margin-top: 8px; }
.cta-band .btn { background: #fff; color: var(--cedar-dark); }
.cta-band .btn:hover { background: var(--spruce-deep); color: #fff; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.88rem; letter-spacing: 0.04em; }
.field input, .field select, .field textarea {
  font-family: var(--body);
  font-size: 1rem;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--board);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--cedar);
  outline-offset: 0;
  border-color: var(--cedar);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Quiz ---------- */

.quiz-shell {
  max-width: 680px;
  margin: 0 auto;
  background: var(--board);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
@media (max-width: 640px) { .quiz-shell { padding: 24px 18px; } }

.quiz-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.quiz-progress span {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--stake);
}
.quiz-progress span.done { background: var(--cedar); }

.quiz-step h3 { margin-bottom: 6px; }
.quiz-step .hint { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 20px; }

.quiz-options { display: grid; gap: 12px; }
.quiz-options.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .quiz-options.cols-2 { grid-template-columns: 1fr; } }

.quiz-opt {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
}
.quiz-opt small { display: block; font-weight: 400; color: var(--ink-soft); margin-top: 3px; }
.quiz-opt:hover { border-color: var(--cedar); }
.quiz-opt.selected { border-color: var(--cedar); background: #FBF1EB; }

.quiz-nav { display: flex; justify-content: space-between; margin-top: 28px; gap: 12px; }
.quiz-back {
  background: none;
  border: none;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 12px 6px;
}
.quiz-back:hover { color: var(--ink); }

.quiz-result { text-align: center; }
.quiz-result .range {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4rem);
  color: var(--spruce);
  line-height: 1;
  margin: 18px 0 6px;
}
.quiz-result .range-note {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.quiz-result .breakdown {
  text-align: left;
  margin: 26px 0;
  border-top: 2px dashed var(--line);
  padding-top: 18px;
}
.quiz-result .breakdown li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 0.96rem;
  color: var(--ink-soft);
}
.quiz-result .breakdown li strong { color: var(--ink); }

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

.site-footer {
  background: var(--spruce-deep);
  color: rgba(255,255,255,0.8);
  padding: 56px 0 32px;
  font-size: 0.95rem;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 12px;
}
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer .legal {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 22px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/* ---------- Utility ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--cedar);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 28px; }
.mt-4 { margin-top: 44px; }
.center { text-align: center; }
.hidden { display: none !important; }
