/* ==========================================================================
   Built By Fred — design tokens
   Palette pulled from the trade itself: joint compound, primer, raw sienna
   wood stain, slate primer coat. Not the default cream/terracotta combo.
   ========================================================================== */

:root {
  --ink: #211e19;
  --ink-soft: #4a453c;
  --paper: #e8e2d4;
  --paper-deep: #dcd3bf;
  --paper-card: #f1ecdf;
  --deep: #1b2a2d;
  --deep-soft: #24393d;
  --accent: #a6672e;
  --accent-bright: #c98a3e;
  --line: rgba(33, 30, 25, 0.14);
  --line-deep: rgba(232, 226, 212, 0.16);

  --display: "Zilla Slab", Georgia, serif;
  --body: "Work Sans", "Segoe UI", sans-serif;
  --label: "Work Sans", "Segoe UI", sans-serif;

  --max: 1160px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: 22px; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 10px;
}

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { background: var(--accent-bright); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-light { background: var(--paper); color: var(--deep); }
.btn-light:hover { background: var(--accent-bright); color: var(--deep); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(232, 226, 212, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  width: 12px;
  height: 12px;
  background: var(--accent);
  transform: rotate(45deg);
  flex: none;
}
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.main-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-bottom: 2px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.main-nav a:hover::after { width: 100%; }
.nav-phone {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  display: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 3px; }

/* ---------- hero ---------- */
.hero {
  padding: 64px 0 80px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 60px);
}
.hero .lede {
  font-size: 18px;
  max-width: 46ch;
}
.hero .cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero .trust-strip {
  margin-top: 40px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-soft);
}
.hero .trust-strip li { list-style: none; display: flex; align-items: center; gap: 6px; }
.hero .trust-strip li::before { content: "✓"; color: var(--accent); }

/* ---------- swatch reveal (signature element) ---------- */
.reveal {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: ew-resize;
  border: 1px solid var(--line);
  user-select: none;
  touch-action: none;
}
.reveal-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}
.reveal-before {
  background: repeating-linear-gradient(135deg, #cfc4a8 0 3px, #d9d0b8 3px 7px), #d3c8ab;
}
.reveal-before::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(33,30,25,0.18) 0 2px, transparent 3px),
    radial-gradient(circle at 65% 55%, rgba(33,30,25,0.14) 0 3px, transparent 4px),
    radial-gradient(circle at 40% 75%, rgba(33,30,25,0.16) 0 2px, transparent 3px);
}
.crack {
  position: absolute;
  stroke: rgba(33,30,25,0.4);
  stroke-width: 1.5;
  fill: none;
}
.reveal-after {
  background: linear-gradient(160deg, #24393d, #1b2a2d 70%);
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}
.reveal-tag {
  font-family: var(--label);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  margin: 14px;
  border-radius: 2px;
}
.reveal-before .reveal-tag { background: rgba(33,30,25,0.85); color: var(--paper); }
.reveal-after .reveal-tag { background: var(--accent); color: var(--paper); }
.reveal-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--paper);
  transform: translateX(-1px);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.reveal-handle::after {
  content: "◂▸";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 3px;
  padding: 7px 8px 7px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.reveal-caption {
  text-align: center;
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 12px;
}

/* ---------- trust badges band ---------- */
.badges {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.badges ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-soft);
}
.badges li { display: flex; align-items: center; gap: 8px; }
.badges li::before { content: ""; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); flex: none; }

/* ---------- section shell ---------- */
section { padding: 88px 0; }
.section-head {
  max-width: 620px;
  margin: 0 0 48px;
}

/* ---------- services (paint-swatch cards) ---------- */
.swatches {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.swatch-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.swatch-chip {
  height: 120px;
  position: relative;
}
.swatch-chip.painting { background: linear-gradient(120deg, #b5793c, #8f5424); }
.swatch-chip.drywall { background: linear-gradient(120deg, #3a4f52, #1b2a2d); }
.swatch-chip .chip-code {
  position: absolute;
  bottom: 12px; left: 16px;
  font-family: var(--label);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(232,226,212,0.85);
}
.swatch-body { padding: 26px 26px 30px; }
.swatch-body ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.swatch-body li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
}
.swatch-body li::before { content: "—"; color: var(--accent); flex: none; }

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.job-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  position: relative;
}
.job-card img { width: 100%; height: 100%; object-fit: cover; }
.job-card .job-tag {
  position: absolute;
  left: 10px; bottom: 10px;
  font-family: var(--label);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(27,42,45,0.85);
  color: var(--paper);
  padding: 5px 8px;
  border-radius: 2px;
}
.job-card.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: var(--label);
  font-weight: 600;
  font-size: 11px;
  text-align: center;
  padding: 14px;
  background:
    repeating-linear-gradient(45deg, var(--paper-card) 0 10px, var(--paper-deep) 10px 20px);
}

/* ---------- testimonials (work-order cards) ---------- */
.testimonials {
  background: var(--deep);
  color: var(--paper);
}
.testimonials .section-head p { color: rgba(232,226,212,0.7); }
.testimonials .eyebrow { color: var(--accent-bright); }
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.ticket {
  background: var(--deep-soft);
  border: 1px solid var(--line-deep);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ticket-stamp {
  font-family: var(--label);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent-bright);
  border: 1px solid var(--accent-bright);
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 2px;
  align-self: flex-start;
}
.ticket p.quote {
  color: rgba(232,226,212,0.92);
  font-size: 15px;
  flex: 1;
}
.ticket-meta {
  font-family: var(--label);
  font-weight: 600;
  font-size: 11px;
  color: rgba(232,226,212,0.55);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line-deep);
  padding-top: 12px;
}

/* ---------- cta band ---------- */
.cta-band {
  background: var(--accent);
  color: var(--paper);
  text-align: center;
  padding: 70px 0;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: rgba(232,226,212,0.85); }

/* ---------- contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}
.work-order {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--label);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 2px;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hp-field { position: absolute; left: -9999px; }
.form-status {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  margin-top: 4px;
  min-height: 18px;
}
.form-status.ok { color: #4f7a3f; }
.form-status.err { color: #a63a2e; }

.info-card {
  background: var(--deep);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 20px;
}
.info-card h4 {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 12px;
}
.info-card a { text-decoration: none; }
.info-card a:hover { color: var(--accent-bright); }
.info-line { display: block; margin-bottom: 8px; font-size: 15px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--deep);
  color: rgba(232,226,212,0.75);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-deep);
}
.site-footer .logo { color: var(--paper); }
.footer-grid h4 {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: 14px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--accent-bright); }
.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  color: rgba(232,226,212,0.5);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- responsive ---------- */
@media (min-width: 860px) {
  .nav-phone { display: block; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .reveal { max-width: 420px; }
  .swatches { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .ticket-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-nav ul { display: none; }
  .nav-toggle { display: block; }
  /* The header CTA has no room next to the hamburger at this width and
     wraps/squishes badly — drop it. Plenty of other "Get a Quote" buttons
     on the page (hero, CTA band, contact form itself) cover it. */
  .main-nav > a.btn { display: none; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- dynamic content states (public page) ---------- */
.empty-note {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 20px 0;
}
.testimonials .empty-note { color: rgba(232,226,212,0.6); }

/* ---------- admin panel ---------- */
.admin-shell { min-height: 100vh; }
.admin-header {
  background: var(--deep);
  color: var(--paper);
  padding: 20px 0;
}
.admin-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.admin-header .logo { color: var(--paper); }
.admin-main { padding: 48px 0 88px; }

.login-card {
  max-width: 360px;
  margin: 88px auto;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.login-card h2 { font-size: 24px; }

.tab-row {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.tab-btn {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 18px;
  cursor: pointer;
  color: var(--ink-soft);
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.admin-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.admin-card .row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.admin-card .row-actions { display: flex; gap: 8px; flex: none; }
.icon-btn {
  font-family: var(--label);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.danger:hover { border-color: #a63a2e; color: #a63a2e; }

.add-form {
  background: var(--paper-deep);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}
.add-form h4 {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.admin-gallery-grid .job-card { aspect-ratio: 1; }
.admin-gallery-grid .job-card img { width: 100%; height: 100%; object-fit: cover; }
.admin-gallery-grid .job-card .row-actions { position: absolute; top: 8px; right: 8px; }

.admin-toast {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.admin-toast.ok { background: #e4ecdd; color: #4f7a3f; }
.admin-toast.err { background: #f3ddd8; color: #a63a2e; }

