/* ==========================================================================
   Tread Light Electric — Fayetteville, AR
   No existing website, no real photos, no logo — this palette and system is
   a from-scratch decision, deliberately distinct from every other build in
   this batch (1st Green Lawn: green/gold; Haley Electric: navy/amber) and
   from every real competitor in this market (all default to corporate blue).
   Plum + warm gold + cream, serif display face — matches the warmer,
   personal tone the real reviews actually use ("delightful," "kind,"
   "professional and careful"), not the standard trade-contractor register.
   ========================================================================== */

:root {
  --plum-950: #1f0e1f;
  --plum-900: #2e1330;
  --plum-800: #3d1b3d;
  --plum-700: #522650;
  --plum-600: #6b3768;
  --gold-600: #a9791f;
  --gold-500: #c9a227;
  --gold-400: #d9b94f;
  --gold-100: #f4e9c9;
  --cream: #faf3e8;
  --paper: #fffdf9;
  --ink: #241220;
  --ink-soft: #5c4a58;
  --border: rgba(36, 18, 32, 0.12);
  --border-strong: rgba(36, 18, 32, 0.24);
  --red-600: #a8283a;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --text-xs: 0.8rem; --text-sm: 0.875rem; --text-base: 1rem; --text-md: 1.0625rem;
  --text-lg: 1.25rem; --text-xl: 1.75rem; --text-2xl: 2.5rem;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 220ms;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-3);
  color: var(--plum-900);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 500; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--sp-4); color: var(--ink-soft); }
a { color: var(--plum-700); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--gold-600); outline-offset: 2px; border-radius: var(--radius-sm); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 var(--sp-5); }
.section { padding: var(--sp-8) 0; }
.section-alt { background: var(--paper); }
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: var(--sp-2);
  display: block;
}

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-3); padding-bottom: var(--sp-3); }
.brand { text-decoration: none; display: flex; align-items: center; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--plum-900); }
.brand-name span { color: var(--gold-600); }
.main-nav { display: flex; align-items: center; gap: var(--sp-6); }
.main-nav ul { list-style: none; display: flex; gap: var(--sp-5); margin: 0; padding: 0; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.main-nav a[aria-current="page"] { color: var(--plum-700); }
.nav-cta {
  background: var(--plum-800); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 0.9rem; padding: 10px 20px; border-radius: 999px;
  transition: background var(--dur-fast) var(--ease-out);
}
.nav-cta:hover { background: var(--plum-700); }
.nav-toggle { display: none; background: none; border: none; padding: var(--sp-2); cursor: pointer; color: var(--plum-900); }
.nav-toggle svg { width: 24px; height: 24px; display: block; }

@media (max-width: 860px) {
  .main-nav {
    display: none; position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw);
    background: var(--paper); flex-direction: column; align-items: stretch;
    padding: var(--sp-6) var(--sp-5); gap: var(--sp-5); box-shadow: -12px 0 30px rgba(0,0,0,.12);
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: var(--sp-4); }
  .nav-toggle { display: block; }
}

/* ---------- Hero (home) — typography + line-art led, no photo exists ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: var(--sp-9) 0 var(--sp-8);
  overflow: hidden;
  background: linear-gradient(150deg, var(--plum-950) 0%, var(--plum-800) 100%);
}
.hero-motif {
  position: absolute; inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(circle at 82% 20%, rgba(217,185,79,0.35), transparent 45%);
}
.hero-filament {
  position: absolute; right: -60px; top: -40px; width: 620px; height: 620px;
  opacity: 0.16; pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 660px; }
.hero h1, .hero .eyebrow { color: #fff; }
.hero .eyebrow { color: var(--gold-400); }
.hero .lede { font-size: 1.15rem; color: #f0e4ec; max-width: 540px; }
.hero-actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-6); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 15px 28px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; min-height: 44px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--gold-500); color: var(--plum-950); }
.btn-primary:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(201,162,39,.5); }
.btn-outline { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.7); color: #fff; backdrop-filter: blur(2px); }
.btn-outline:hover { background: rgba(255,255,255,0.18); }
.btn-secondary { background: var(--plum-800); color: #fff; }
.btn-secondary:hover { background: var(--plum-700); }

.hero-rating {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  background: rgba(0,0,0,0.28); backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px; padding: 10px 18px; margin-top: var(--sp-6);
}
.hero-rating .stars { color: var(--gold-400); letter-spacing: 2px; font-size: 1rem; }
.hero-rating .rating-text { font-size: 0.9rem; color: #fff; font-weight: 600; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  position: relative; color: #fff; padding: var(--sp-7) 0 var(--sp-6);
  background: linear-gradient(150deg, var(--plum-950) 0%, var(--plum-800) 100%);
}
.page-hero h1, .page-hero .eyebrow { color: #fff; }
.page-hero .eyebrow { color: var(--gold-400); }

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--plum-900); color: #fff; padding: var(--sp-4) 0; }
.trust-strip .container { display: flex; flex-wrap: wrap; gap: var(--sp-6); justify-content: center; }
.trust-item { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.92rem; font-weight: 600; }
.trust-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--gold-400); }

/* ---------- Service cards ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-top: var(--sp-6); }
.service-card {
  background: var(--paper); border-radius: var(--radius-md); border: 1px solid var(--border);
  border-top: 4px solid var(--gold-500);
  padding: var(--sp-5); box-shadow: 0 12px 28px -18px rgba(36,18,32,.25);
  transition: transform var(--dur-fast) var(--ease-out);
}
.service-card:hover { transform: translateY(-3px); }
.service-card .icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--plum-700); margin-bottom: var(--sp-3); }
.service-card h3 { margin-bottom: var(--sp-2); }
.service-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.service-card .story {
  margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px dashed var(--border-strong);
  font-size: 0.88rem; font-style: italic; color: var(--plum-700);
}

@media (max-width: 780px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ---------- Testimonial rotator ---------- */
.testimonial-rotator {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px -18px rgba(36,18,32,.3);
  padding: var(--sp-6);
  max-width: 620px;
  min-height: 200px;
  position: relative;
}
.testimonial-slide { display: none; }
.testimonial-slide.active { display: block; animation: testimonialFade .5s ease; }
.testimonial-slide .stars { color: var(--gold-500); letter-spacing: 2px; font-size: 1rem; margin-bottom: var(--sp-3); }
.testimonial-slide p { font-style: italic; color: var(--ink); margin-bottom: var(--sp-3); }
.testimonial-slide .who { font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); }
.testimonial-dots { display: flex; gap: 6px; margin-top: var(--sp-4); }
.testimonial-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none;
  background: var(--border); cursor: pointer; padding: 0;
}
.testimonial-dots button.active { background: var(--plum-700); }
@keyframes testimonialFade { from { opacity: 0; } to { opacity: 1; } }

.rating-stat { display: flex; align-items: center; gap: var(--sp-3); background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-4) var(--sp-5); box-shadow: 0 12px 28px -18px rgba(36,18,32,.25); }
.rating-stat .num { font-family: var(--font-display); font-size: 2.4rem; color: var(--plum-800); line-height: 1; }
.rating-stat .stars { color: var(--gold-500); letter-spacing: 2px; font-size: 1rem; }
.rating-stat .count { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Named-people trust section ---------- */
.people-block {
  background: var(--plum-900); color: #fff; border-radius: var(--radius-lg);
  padding: var(--sp-6); display: flex; gap: var(--sp-5); align-items: flex-start; flex-wrap: wrap;
}
.people-block .avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--gold-500); color: var(--plum-950);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; flex-shrink: 0;
}
.people-block h3 { color: #fff; }
.people-block p { color: #ecdff0; margin: 0; }

/* ---------- Owner CTA ("A Note From Kuhio Palms") ---------- */
.owner-cta { background: var(--gold-100); }
.owner-cta-row { display: flex; align-items: center; gap: var(--sp-7); }
.owner-cta-logo { flex-shrink: 0; }
.owner-cta-logo img { width: 200px; height: auto; filter: drop-shadow(0 8px 16px rgba(36,18,32,.25)) drop-shadow(0 2px 4px rgba(36,18,32,.15)); }
.owner-cta-copy { flex: 1; min-width: 280px; }
@media (max-width: 720px) {
  .owner-cta-row { flex-direction: column; text-align: center; }
}

/* ---------- Forms ---------- */
.form-timeline { font-size: 0.88rem; color: var(--ink-soft); background: var(--gold-100); border-radius: var(--radius-sm); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-5); }
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: var(--sp-2); color: var(--plum-900); }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--gold-600); outline-offset: 1px; }
.form-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: var(--sp-2); }
.form-status { min-height: 1.4em; font-size: 0.9rem; margin-top: var(--sp-3); }
.form-status.success { color: #2f6b45; }
.form-status.error { color: var(--red-600); }

.service-chip-group { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.service-chip {
  border: 1.5px solid var(--border-strong); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 8px 16px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.service-chip[aria-pressed="true"] { background: var(--plum-800); border-color: var(--plum-800); color: #fff; }

.contact-info-card { background: var(--plum-900); color: #fff; border-radius: var(--radius-lg); padding: var(--sp-6); }
.contact-info-card h3 { color: #fff; margin-bottom: var(--sp-4); }
.contact-info-row { display: flex; gap: var(--sp-3); align-items: flex-start; margin-bottom: var(--sp-4); }
.contact-info-row svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--gold-400); margin-top: 2px; }
.contact-info-row a { color: #fff; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--plum-950); color: #d8c9d6; padding: var(--sp-7) 0 var(--sp-5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-6); }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--sp-3); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-grid a { color: #d8c9d6; text-decoration: none; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: var(--sp-6); padding-top: var(--sp-4); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

.breadcrumbs { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: var(--sp-4); }
.breadcrumbs a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Cross-document view transitions ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(page-content) { animation-duration: .35s; animation-timing-function: ease; }
  ::view-transition-old(page-content) { animation-name: slide-out; }
  ::view-transition-new(page-content) { animation-name: slide-in; }
  main { view-transition-name: page-content; }
  @keyframes slide-out { to   { translate: -6vw 0; opacity: 0; } }
  @keyframes slide-in   { from { translate:  6vw 0; opacity: 0; } }
}
