/* ==========================================================================
   Contractor Site Template — Core Stylesheet
   Design concept: "work order" / estimate-ticket motif — dashed tear
   dividers, mono ticket tags, corner-notch cards — grounded in how
   contractors already think (job tickets, estimates, work orders).
   Brand color is injected per-contractor via --brand / --accent.
   ========================================================================== */

:root {
  /* Neutral scaffold */
  --paper: #F6F7F5;
  --paper-sunken: #EDEFEA;
  --surface: #FFFFFF;
  --ink: #12151A;
  --ink-soft: #4B5158;
  --ink-faint: #868D93;
  --line: #E0E3DD;
  --line-strong: #C7CBC3;

  /* Brand — injected per-contractor by Template Assembly.
     Fallbacks below only show if injection fails. */
  --brand: #000000;
  --brand-fallback: #1E6F5C;
  --accent: #FFFFFF;
  --accent-fallback: #FFFFFF;
  --brand-ink: #FFFFFF; /* text color on top of --brand; TODO: Template Assembly can compute this from luminance later */

  /* Type */
  --font-display: 'Instrument Sans', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Scale */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem);
  --step-3: clamp(2.25rem, 1.85rem + 2vw, 3.5rem);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shadow-card: 0 1px 2px rgba(18,21,26,0.04), 0 8px 24px -12px rgba(18,21,26,0.12);
  --shadow-lift: 0 4px 8px rgba(18,21,26,0.06), 0 20px 40px -16px rgba(18,21,26,0.18);

  --container: 1180px;
}

/* Fallback chain in case a hex fails to inject cleanly */
:root:has(body[data-brand-missing]) { --brand: var(--brand-fallback); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; }
img { max-width: 100%; display: block; }

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

section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--brand);
  display: inline-block;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-card); }
.btn-primary:hover { box-shadow: var(--shadow-lift); }
.btn-secondary { background: #111; color: #fff; border-color: #111; }
.btn-secondary:hover { background: #2a2a2a; border-color: #2a2a2a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; padding-left: 4px; padding-right: 4px; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-label-short { display: none; }

/* ---------- Ticket / signature component ---------- */
.ticket {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.ticket-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.ticket-tear {
  position: relative;
  height: 1px;
  border-top: 1px dashed var(--line-strong);
  margin: 20px 0;
}
.ticket-tear::before, .ticket-tear::after {
  content: '';
  position: absolute;
  top: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
}
.ticket-tear::before { left: -31px; }
.ticket-tear::after { right: -31px; }
.ticket-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #0c0d10;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-header .brand-mark { color: #fff; }
.brand-mark .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); display: inline-block; }
.site-header .brand-mark .dot,
.site-footer .brand-mark .dot { background: #fff; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  position: relative;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.call-pill {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  text-decoration: none;
  color: #fff;
}
.call-pill:hover { border-color: #fff; }
.site-header .btn-primary {
  background: #fff;
  color: #111;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .call-pill span.txt { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header .container {
    height: auto;
    min-height: 64px;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 12px;
  }
  .brand-mark {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.95rem;
    line-height: 1.2;
  }
  .header-actions { flex: 0 0 auto; gap: 8px; }
  body.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: auto 0 0 0;
    top: var(--header-bottom, 76px);
    background: #0c0d10;
    padding: 28px 24px;
    gap: 4px;
    align-items: flex-start;
    overflow-y: auto;
  }
  body.nav-open .main-nav a { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.12); width: 100%; color: #fff; }
  body.nav-open .main-nav a::after { display: none; }
}
@media (max-width: 480px) {
  .site-header .btn-label-full { display: none; }
  .site-header .btn-label-short { display: inline; }
}

/* ---------- Hero / body1 ---------- */
.hero {
  padding: 64px 0 96px;
}
.body1 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  padding: 72px 0 100px;
}
.body1-bg {
  position: absolute;
  inset: -6%;
  z-index: -2;
  background: url('../images/modern-home-interior.jpg') center center / cover no-repeat;
  animation: body1-drift 32s ease-in-out infinite alternate;
}
.body1::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8,9,11,0.78) 0%, rgba(8,9,11,0.62) 48%, rgba(8,9,11,0.74) 100%);
  pointer-events: none;
}
.body1 h1,
.body1 .live-pill { color: #fff; }
.body1 .eyebrow { color: #fff; }
.body1 .eyebrow::before { background: #fff; }
.body1 .hero-sub { color: rgba(255,255,255,0.86); }
.body1 .hero-badge { color: rgba(255,255,255,0.84); }
.body1 .hero-badge .dot { background: #fff; }
.body1.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 48px;
  perspective: 1400px;
}
.body1-copy {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.body1 .eyebrow,
.body1 .live-pill { justify-content: center; }
.body1 .hero-sub { margin-left: auto; margin-right: auto; }
.body1 .hero-ctas,
.body1 .hero-badges { justify-content: center; }
.body1 .quote-stage { width: min(560px, 100%); }
.body1 .quote-ticket { text-align: left; }
.body1 .hero-ctas .btn-primary { background: #fff; color: #111; }
.body1 .hero-ctas .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.body1 .hero-ctas .btn-secondary:hover {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.body1 .quote-ticket {
  background: #0e0f12;
  color: #f7f7f5;
  border-color: #2a2c31;
  box-shadow: 0 28px 70px -24px rgba(0,0,0,0.65);
}
.body1 .quote-ticket h3 { color: #fff; }
.body1 .quote-ticket p,
.body1 .quote-ticket .form-note { color: rgba(255,255,255,0.78); }
.body1 .quote-ticket .ticket-tag,
.body1 .quote-ticket .ticket-num { color: rgba(255,255,255,0.55); }
.body1 .quote-ticket .ticket-tear { border-top-color: rgba(255,255,255,0.28); }
.body1 .quote-ticket .field label { color: #fff; }
.body1 .quote-ticket .field input,
.body1 .quote-ticket .field textarea {
  background: #17181c;
  color: #fff;
  border-color: rgba(255,255,255,0.22);
}
.body1 .quote-ticket .field input:focus,
.body1 .quote-ticket .field textarea:focus {
  background: #1e2026;
  border-color: #fff;
}
.body1 .quote-ticket .btn-primary { background: #fff; color: #111; }
.body1 .quote-ticket .ticket-tear::before,
.body1 .quote-ticket .ticket-tear::after {
  background: #0e0f12;
}
.quote-stage { transform-style: preserve-3d; }
.body1 .quote-ticket { transition: transform 0.2s ease; will-change: transform; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  margin-bottom: 16px;
  background: rgba(0,0,0,0.28);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61,220,132,0.65);
  animation: live-pulse 1.8s ease-out infinite;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.hero h1 { margin-bottom: 20px; }
.hero-sub { font-size: 1.1rem; max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-badges {
  display: flex;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
}

/* ---------- Quote form (ticket style) ---------- */
.quote-ticket { padding: 28px; }
.quote-ticket .ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.quote-ticket h3 { margin-bottom: 4px; }
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
}
.field textarea { resize: vertical; min-height: 84px; }
.form-note { font-size: 0.78rem; color: var(--ink-faint); margin-top: 10px; text-align: center; }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: #0e0f12;
  border: 1px solid #2a2c31;
  border-radius: var(--radius-md);
  padding: 26px;
  color: #f7f7f5;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.service-card:hover {
  box-shadow: 0 18px 40px -20px rgba(0,0,0,0.6);
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.38);
}
.service-card .ticket-tag { display: block; margin-bottom: 14px; color: rgba(255,255,255,0.55); }
.service-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: #fff; }
.service-card p { font-size: 0.92rem; margin-bottom: 0; color: rgba(255,255,255,0.78); }

.section-head { max-width: 640px; }
.section-head.center { margin: 0 auto; text-align: center; }

/* ---------- About / info strip ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.info-stub { padding: 22px; }
.info-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 0.88rem; }
.info-row span:last-child { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; }
.info-row span:last-child { font-weight: 600; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial-card { padding: 26px; }
.testimonial-card p.quote { color: var(--ink); font-size: 1rem; margin-bottom: 0; }
.testimonial-name { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 240px at 50% -20%, color-mix(in srgb, var(--brand) 35%, transparent), transparent);
  pointer-events: none;
}
.cta-band h2 { color: #fff; }
.cta-band .btn-primary { background: #fff; color: #111; }
.cta-band .eyebrow::before { background: #fff; }
.cta-band p { color: rgba(246,247,245,0.72); max-width: 52ch; margin-left: auto; margin-right: auto; }
.cta-band .hero-ctas { justify-content: center; }
@media (max-width: 600px) { .cta-band { padding: 44px 24px; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(246,247,245,0.7);
  padding: 64px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(246,247,245,0.12);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer p { color: rgba(246,247,245,0.72); }
.footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid a { text-decoration: none; color: inherit; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(246,247,245,0.45);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Chat widget ---------- */
.chat-launcher {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: var(--shadow-lift);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-launcher::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  animation: chat-ping 2.4s ease-out infinite;
  pointer-events: none;
}
.chat-panel {
  position: fixed;
  bottom: 92px;
  right: 22px;
  z-index: 60;
  width: min(340px, calc(100vw - 44px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  display: none;
  overflow: hidden;
}
body.chat-open .chat-panel { display: block; }
.chat-panel-head {
  background: var(--ink);
  color: #fff;
  padding: 16px 18px;
}
.chat-panel-head p { color: rgba(255,255,255,0.65); margin: 2px 0 0; font-size: 0.82rem; }
.chat-panel-body { padding: 18px; }
.chat-confirm { display: none; font-size: 0.88rem; color: var(--ink); background: var(--paper-sunken); border-radius: var(--radius-sm); padding: 12px 14px; }
body.chat-sent .chat-confirm { display: block; }
body.chat-sent .chat-form { display: none; }

/* ---------- Gallery placeholder ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}
@media (max-width: 800px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-tile {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  border: 1px solid #2a2c31;
  background: #0e0f12;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.78);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
  padding: 16px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.gallery-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.38);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,0.6);
}

/* ---------- Blog ---------- */
.post-list { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; }
.post-card {
  padding: 28px;
  cursor: pointer;
}
.post-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.post-card summary::-webkit-details-marker { display: none; }
.post-card h3 { margin-bottom: 6px; }
.post-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.post-excerpt { margin-top: 4px; margin-bottom: 0; }
.post-body { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* ---------- Simple page hero (interior pages) ---------- */
.page-hero { padding: 56px 0 20px; }
.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero p.lead { font-size: 1.05rem; max-width: 60ch; }

/* ---------- Map placeholder ---------- */
.map-placeholder {
  aspect-ratio: 16/7;
  border-radius: var(--radius-md);
  border: 1px solid #2a2c31;
  background: #0e0f12;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.78);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: center;
  padding: 20px;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Black boxes (quote form stays white) ---------- */
.ticket:not(.quote-ticket) {
  background: #0e0f12;
  border-color: #2a2c31;
  color: #f7f7f5;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ticket:not(.quote-ticket):hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.38);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,0.6);
}
.ticket:not(.quote-ticket) h3,
.ticket:not(.quote-ticket) .info-row span:last-child { color: #fff; }
.ticket:not(.quote-ticket) p,
.ticket.testimonial-card p.quote { color: rgba(255,255,255,0.78); }
.ticket:not(.quote-ticket) .ticket-tag,
.ticket:not(.quote-ticket) .ticket-num,
.ticket:not(.quote-ticket) .testimonial-name,
.ticket:not(.quote-ticket) .post-meta,
.ticket:not(.quote-ticket) .info-row span:first-child { color: rgba(255,255,255,0.55); }
.ticket:not(.quote-ticket) .ticket-tear { border-top-color: rgba(255,255,255,0.28); }
.ticket:not(.quote-ticket) .info-row { border-bottom-color: rgba(255,255,255,0.16); }
.ticket:not(.quote-ticket) .post-body { border-top-color: rgba(255,255,255,0.2); }
.quote-ticket { background: #fff; color: var(--ink); }

/* ---------- Motion ---------- */
@keyframes body1-drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.6%, -1.2%, 0); }
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(61,220,132,0.65); }
  70% { box-shadow: 0 0 0 8px rgba(61,220,132,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); }
}
@keyframes chat-ping {
  0% { transform: scale(0.86); opacity: 0.75; }
  100% { transform: scale(1.28); opacity: 0; }
}
@keyframes rise {
  from { opacity: 0; translate: 0 22px; }
  to { opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .body1 .container > div:first-child > * { animation: rise 0.75s ease both; }
  .body1 .container > div:first-child > *:nth-child(2) { animation-delay: 0.08s; }
  .body1 .container > div:first-child > *:nth-child(3) { animation-delay: 0.16s; }
  .body1 .container > div:first-child > *:nth-child(4) { animation-delay: 0.24s; }
  .body1 .container > div:first-child > *:nth-child(5) { animation-delay: 0.32s; }
  .quote-stage { animation: rise 0.85s 0.18s ease both; }
  .page-hero .container { animation: rise 0.7s ease both; }
  .service-card,
  .testimonial-card,
  .info-stub,
  .post-card,
  .gallery-tile,
  .cta-band,
  .map-placeholder,
  .section-head {
    animation: rise 0.75s ease both;
  }
  .services-grid .service-card:nth-child(3n + 2),
  .testimonial-grid .testimonial-card:nth-child(2) { animation-delay: 0.08s; }
  .services-grid .service-card:nth-child(3n + 3),
  .testimonial-grid .testimonial-card:nth-child(3) { animation-delay: 0.16s; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .service-card,
    .testimonial-card,
    .info-stub,
    .post-card,
    .gallery-tile,
    .cta-band,
    .map-placeholder,
    .section-head {
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .body1-bg,
  .live-dot,
  .chat-launcher::after { animation: none; }
  .body1-bg { inset: 0; transform: none; }
}
