/* Broken Arrow Tree Care. Palette lifted from the logo: the outline green, the canopy
   green, the trunk brown. The one loud thing is the hi-vis orange of tree crew
   gear, used only on the action that gets a lead. */
:root {
  --forest: #173a1a;
  --canopy: #5e9a45;
  --bark: #7b4a26;
  --mist: #eef4ea;
  --paper: #ffffff;
  --ink: #1d261c;
  --muted: #4d5a4a;
  --hivis: #f25c05;
  --hivis-dark: #c94a00;
  --line: #d4e0cd;
  --display: "Oswald", "Arial Narrow", Impact, system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--canopy); }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--paper); padding: 8px 12px; }

h1, h2, h3 { font-family: var(--display); color: var(--forest); line-height: 1.1; letter-spacing: -0.01em; }
h1 { font-weight: 800; font-size: clamp(2.2rem, 5.2vw, 3.6rem); margin: 0 0 0.4em; }
h2 { font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); margin: 1.6em 0 0.5em; }
h3 { font-weight: 600; font-size: 1.25rem; margin: 1.4em 0 0.3em; }
p { margin: 0 0 1em; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); margin-right: auto; }
.brand span { font: 800 1.25rem/1.05 var(--display); }
.brand small { display: block; font: 400 0.8rem/1.3 var(--body); color: var(--muted); }
.top nav { display: flex; gap: 20px; }
.top nav a { text-decoration: none; font-weight: 700; font-size: 1rem; color: var(--ink); }
.top nav a[aria-current] { color: var(--canopy); }
.top-call { text-decoration: none; font-weight: 800; color: #fff; background: var(--hivis); padding: 10px 16px; border-radius: 999px; font-size: 1rem; white-space: nowrap; }
.top-call:hover { color: #fff; background: var(--hivis-dark); }

/* Buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.btn { display: inline-block; text-decoration: none; font: 800 1.1rem/1 var(--display); padding: 18px 26px; border-radius: 999px; }
.btn-go { background: var(--hivis); color: #fff; }
.btn-go:hover { background: var(--hivis-dark); color: #fff; }
.btn-call { background: var(--paper); color: var(--forest); box-shadow: inset 0 0 0 2px var(--forest); }
.btn-call:hover { background: var(--mist); color: var(--forest); }

/* Emergency alert bar: on every page, above everything. */
.alert { background: var(--hivis); color: #fff; font-size: 1rem; }
.alert-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 46px; padding: 6px 0; }
.alert span { opacity: 0.95; }
.alert a { margin-left: auto; color: var(--hivis); background: #fff; font: 800 1rem/1 var(--display); text-decoration: none; padding: 10px 16px; border-radius: 999px; white-space: nowrap; }
.alert a:hover { color: var(--hivis-dark); }

/* Hero: a real storm photo under a dark wash, headline on top. */
.hero { position: relative; color: #fff; background: #111 var(--hero) center 60% / cover no-repeat; padding: clamp(64px, 11vw, 150px) 0 clamp(56px, 9vw, 120px); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,22,10,0.88) 0%, rgba(10,22,10,0.7) 45%, rgba(10,22,10,0.25) 100%); }
.hero-inner { position: relative; }
.hero h1 { color: #fff; max-width: 13ch; font-size: clamp(2.6rem, 6.6vw, 5rem); line-height: 1.02; }
.hero .lede { color: #e6efe1; font-size: 1.3rem; max-width: 44ch; }
.hero .btn-quiet { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.85); }
.hero .btn-quiet:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* First steps beside a photo */
.first-steps { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; padding-top: 56px; }
.first-steps figure, .page-photo { margin: 0; }
.first-steps img { border-radius: 18px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.first-steps h2 { margin-top: 0; }
.steps { padding-left: 1.3em; margin: 0 0 8px; }
.steps li { margin-bottom: 0.7em; padding-left: 4px; }
.steps li::marker { font: 800 1.1rem var(--display); color: var(--hivis); }

/* Photo cards for services and areas */
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cards a { display: block; text-decoration: none; color: var(--ink); }
.cards img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }
.cards strong { display: block; font: 800 1.3rem/1.2 var(--display); color: var(--forest); margin-bottom: 4px; }
.cards span { color: var(--muted); font-size: 1rem; }
.cards a:hover strong { color: var(--canopy); }

.storm-band { background: var(--mist); border-radius: 22px; padding: 8px clamp(18px, 3vw, 36px) 36px; margin-top: 48px; }
.band-lede { margin-top: -6px; color: var(--muted); }
.cards { grid-template-columns: repeat(4, 1fr); }

/* Inner page header with photo */
.page-head.has-photo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; }
.page-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.btn-quiet { background: transparent; color: var(--forest); box-shadow: inset 0 0 0 2px var(--forest); }
.btn-quiet:hover { background: var(--mist); color: var(--forest); }

/* Bands */
.band { padding: 8px 0 8px; }
.band > h2:first-child { margin-top: 1.4em; }
.prose { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

/* Service list: a ruled list, not a card grid. */
.svc-list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--forest); display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
.svc-list li { border-bottom: 1px solid var(--line); }
.svc-list a { display: block; padding: 18px 0; text-decoration: none; color: var(--ink); }
.svc-list strong { display: block; font: 800 1.3rem/1.2 var(--display); color: var(--forest); }
.svc-list span { color: var(--muted); font-size: 1rem; }
.svc-list a:hover strong { color: var(--canopy); }

.town-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.town-list a { display: inline-block; padding: 8px 16px; border: 2px solid var(--canopy); border-radius: 999px; text-decoration: none; font-weight: 700; }

/* Inner pages */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 0 0; margin: 0; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.page { padding: 24px 0 48px; }
.page .lede { font-size: 1.25rem; color: var(--muted); max-width: 56ch; }
.related { margin-top: 40px; }
.link-list { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.link-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.link-list a { font-weight: 700; }
.link-list span { display: block; color: var(--muted); font-size: 0.95rem; }

.closer { background: var(--forest); color: #dbe8d3; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 36px clamp(20px, 4vw, 48px); margin: 56px 0; border-radius: 18px; }
.closer h2 { margin: 0 0 6px; color: #fff; }
.closer p { margin: 0; max-width: 56ch; }
.closer .btn-quiet { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.8); }

.estimate-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.form-box { background: var(--mist); border-radius: 16px; padding: 12px; }
.form-missing { padding: 28px; }

/* Footer */
.foot { background: var(--forest); color: #dbe8d3; padding: 48px 0 24px; margin-top: 48px; font-size: 1rem; }
.foot a { color: var(--paper); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr; gap: 28px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 6px; }
.foot-brand { font: 800 1.3rem/1.2 var(--display); color: var(--paper); }
.foot-head { font: 800 1.05rem/1.2 var(--display); color: var(--paper); }
.foot-legal { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(255,255,255,0.15); margin-top: 32px; padding-top: 16px; font-size: 0.9rem; }

/* Phone-first: a sticky action bar on small screens only. */
.sticky-call { display: none; }

@media (max-width: 860px) {
  .top nav { display: none; }
  .first-steps, .page-head.has-photo { grid-template-columns: 1fr; }
  .first-steps img { aspect-ratio: 3 / 2; }
  .cards { grid-template-columns: 1fr 1fr; }
  .alert span { display: none; }
  .svc-list { grid-template-columns: 1fr; }
  .estimate-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  body { padding-bottom: 72px; }
  .sticky-call { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 5; text-align: center; background: var(--hivis); color: #fff; text-decoration: none; font: 800 1.1rem/1 var(--display); padding: 18px; border-radius: 999px; box-shadow: 0 6px 20px rgba(23,58,26,0.3); }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .top-call { display: none; }
  .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- Storm effects: lightning over the hero, a flicker on the storm band.
   One orchestrated moment, at uneven intervals so it doesn't feel looped.
   Off entirely for prefers-reduced-motion. ---- */
.hero-storm { overflow: hidden; background-position: center 45%; }
.hero-storm::before { background: linear-gradient(90deg, rgba(6,12,20,0.86) 0%, rgba(6,12,20,0.62) 48%, rgba(6,12,20,0.2) 100%); }
.storm-fx { position: absolute; inset: 0; pointer-events: none; }
.storm-fx { display: none; } .storm-fx .flash { position: absolute; inset: 0; background: radial-gradient(ellipse at 75% 10%, rgba(235,242,255,0.75), rgba(200,220,255,0.28) 40%, rgba(200,220,255,0.12) 75%); opacity: 0; mix-blend-mode: screen; animation: flash 9.5s infinite; }
.bolt { position: absolute; top: -1%; width: 260px; height: 92%; opacity: 0; overflow: visible; }
.bolt path { fill: none; stroke-linejoin: miter; stroke-linecap: round; }
.bolt .g { stroke: #9fc0ff; stroke-width: 22; opacity: .45; filter: blur(6px); }
.bolt .c { stroke: #ffffff; stroke-width: 5; filter: drop-shadow(0 0 4px #e6efff) drop-shadow(0 0 12px #a9c6ff); }
.bolt-a { right: 18%; animation: strike 9.5s infinite; }
.bolt-b { right: 4%; height: 62%; animation: strike 13s 3.2s infinite; }
.bolt-c { right: 36%; height: 46%; width: 170px; animation: strike 17s 6.8s infinite; }
@keyframes strike {
  0%, 86% { opacity: 0; }
  87% { opacity: 1; }
  88% { opacity: .15; }
  89.5% { opacity: 1; }
  92% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes flash {
  0%, 86% { opacity: 0; }
  87% { opacity: 1; }
  88% { opacity: .2; }
  89.5% { opacity: .85; }
  93% { opacity: 0; }
  100% { opacity: 0; }
}
/* Opening strike on page load, then the loop takes over. */
.hero-storm .storm-fx .flash, .hero-storm .bolt-a { animation-delay: .6s; }
.hero-inner { z-index: 1; }

.storm-band { position: relative; overflow: hidden; }
.storm-band > *:not(.band-flash) { position: relative; }
.band-flash { display: none; }

@media (max-width: 860px) {
  .bolt-b, .bolt-c { display: none; }
  .bolt-a { right: 2%; width: 110px; height: 55%; }
}
@media (prefers-reduced-motion: reduce) {
  .storm-fx, .band-flash { display: none; }
}

/* Real lightning footage behind the hero. The poster frame shows first and
   stays for reduced-motion users. */
.hero-video .hero-bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero-video::before { z-index: 1; background: linear-gradient(90deg, rgba(8,8,20,0.82) 0%, rgba(8,8,20,0.55) 50%, rgba(8,8,20,0.15) 100%); }
.hero-video .hero-inner { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .hero-video .hero-bg { display: none; } }

/* Oswald: the condensed contractor standard. Caps on the hero headline,
   buttons and the alert so the emergency message reads from across a room. */
h1, h2, h3 { letter-spacing: 0.005em; }
h1 { font-weight: 700; }
h2 { font-weight: 600; }
h3 { font-weight: 600; }
.hero h1 { text-transform: uppercase; max-width: 17ch; font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: 0.98; letter-spacing: 0.01em; }
.page h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); }
.btn, .top-call, .alert a, .sticky-call { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.btn { font-size: 1.1rem; }
.alert strong { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.brand span { font-weight: 700; letter-spacing: 0.01em; }
.cards strong, .svc-list strong { font-weight: 600; }

/* Short hero line instead of a paragraph. */
.hero-line { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #fff; font-size: clamp(1.4rem, 3.4vw, 2rem); margin: 4px 0 8px; }
/* iPhone Low Power Mode blocks autoplay: hide the native play badge, keep the
   poster, and run a lightning flash over it instead. */
.hero-bg::-webkit-media-controls-start-playback-button,
.hero-bg::-webkit-media-controls { display: none !important; -webkit-appearance: none; }
.hero-flash { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 45% 25%, rgba(235,225,255,.7), rgba(200,190,255,.25) 45%, transparent 75%); }
.no-video .hero-flash { animation: none; }
@media (prefers-reduced-motion: reduce) { .hero-flash { display: none; } }

/* Lightning that crawls, never flashes. Each bolt draws itself along its
   path over 1.6s, holds, then fades over 1.8s. Thin lines, small area, no
   sudden brightness: within the WCAG three-flashes rule. Off for
   prefers-reduced-motion. */
.crawl-wrap { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.crawl { position: absolute; top: -1%; width: 240px; height: 80%; overflow: visible; opacity: 0; }
.crawl path { fill: none; stroke-linejoin: miter; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.crawl .g { stroke: #a9c2ff; stroke-width: 18; opacity: .28; filter: blur(6px); }
.crawl .c { stroke: #f2f6ff; stroke-width: 3.5; filter: drop-shadow(0 0 5px #c9d9ff); }
.crawl-a { right: 14%; animation: crawl-fade 12s 1s infinite; }
.crawl-b { right: 34%; height: 58%; width: 190px; animation: crawl-fade 12s 7s infinite; }
.crawl-a path { animation: crawl-draw 12s 1s infinite; }
.crawl-b path { animation: crawl-draw 12s 7s infinite; }
@keyframes crawl-draw {
  0% { stroke-dashoffset: 1; }
  14% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
@keyframes crawl-fade {
  0% { opacity: 0; }
  13% { opacity: .9; }
  32% { opacity: .9; }
  47% { opacity: 0; }
  100% { opacity: 0; }
}
@media (max-width: 860px) { .crawl-a { right: 4%; width: 170px; height: 58%; } .crawl-b { display: none; } }
@media (prefers-reduced-motion: reduce) { .crawl-wrap { display: none; } }

/* Real-texture bolts (rendered lightning on black). Screen blend drops the
   black so only the bolt shows. Each one grows top-down over 1.8s via
   clip-path, holds, and fades over 2s. No sudden brightness. */
.crawl { display: none; }
.rbolt { position: absolute; top: 0; opacity: 0; clip-path: inset(0 0 100% 0); pointer-events: none; }
.rbolt-a { right: 8%; width: min(34vw, 440px); animation: rb-grow 12s 1s infinite, rb-fade 12s 1s infinite; }
.rbolt-b { right: 30%; width: min(30vw, 380px); animation: rb-grow 12s 7s infinite, rb-fade 12s 7s infinite; }
@keyframes rb-grow { 0% { clip-path: inset(0 0 100% 0); } 15% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); } }
@keyframes rb-fade { 0% { opacity: 0; } 12% { opacity: .95; } 34% { opacity: .95; } 50% { opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 860px) { .rbolt-a { right: -4%; width: 70vw; } .rbolt-b { display: none; } }
@media (prefers-reduced-motion: reduce) { .rbolt { display: none; } }
