/* ============================================================
   Delano Propane Inc — shared styles & animations
   Tailwind (via CDN) handles layout/utility classes.
   This file adds: design tokens, buttons, scroll-reveal,
   parallax, the fleet gallery, and the animated orchard scene.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap');

:root {
  --brand: #1D4ED8;        /* American / premium blue */
  --brand-dark: #1E40AF;
  --brand-darker: #1E3A8A;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --flame1: #fff3b0;
  --flame2: #ffb020;
  --flame3: #ff6a00;
  --flame4: #ff3d00;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* Anchored sections clear the sticky header */
[id] { scroll-margin-top: 6.5rem; }

:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; border-radius: 4px; }

.gradient-text {
  background: linear-gradient(90deg, #93c5fd, #ffffff 50%, #bae6fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Brand logo lockup (recreated from the truck wordmark) ---------- */
.brand { position: relative; display: inline-block; line-height: 1; padding: 12px 28px 10px 4px; text-decoration: none; white-space: nowrap; }
.brand__word {
  display: flex; align-items: center;
  font-family: Helvetica, Arial, sans-serif; font-weight: 800; font-size: 25px;
  letter-spacing: .5px; color: var(--brand-darker);
}
.brand__drop { width: 16px; height: 22px; margin: 0 1.5px; flex: 0 0 auto; }
.brand__delano, .brand__inc {
  font-family: 'Kaushan Script', cursive; color: var(--brand);
  position: absolute; font-weight: 400;
}
.brand__delano { font-size: 18px; top: -5px; left: 12px; transform: rotate(-4deg); }
.brand__inc { font-size: 13px; right: 4px; bottom: -4px; }
.brand:hover .brand__word { color: var(--brand-dark); }
@media (max-width: 380px) { .brand__word { font-size: 21px; } .brand { padding-right: 24px; } }

/* ---------- Buttons (shared across all pages) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; border-radius: .7rem; padding: .8rem 1.3rem; line-height: 1;
  text-decoration: none; cursor: pointer; border: 0;
  transition: background-color .2s ease, color .2s ease, transform .12s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(29,78,216,.8); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-white { background: #fff; color: var(--brand-dark); }
.btn-white:hover { background: #eff6ff; }
.btn-ghost { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.btn-ghost:hover { background: #eff6ff; }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.75); }
.btn-outline-white:hover { background: rgba(255,255,255,.14); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* ---------- Parallax hero background ---------- */
.hero-bg {
  position: absolute; left: 0; right: 0; top: -12%; height: 124%;
  background-size: cover; background-position: center;
  will-change: transform;
}

/* ---------- Fleet gallery (graceful image placeholders) ---------- */
.shot { position: relative; overflow: hidden; background: linear-gradient(135deg, #1e3a8a, #1d4ed8); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.shot:hover img { transform: scale(1.06); }
.shot.is-missing img { display: none; }
.shot .ph {
  display: none; position: absolute; inset: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: .5rem;
  color: #dbeafe; text-align: center; padding: 1rem; font-size: .82rem;
}
.shot.is-missing .ph { display: flex; }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.5rem .9rem .8rem; color: #fff; font-weight: 600; font-size: .9rem;
  background: linear-gradient(to top, rgba(2,6,23,.78), rgba(2,6,23,0));
}

/* ============================================================
   Animated orchard-heater scene (Central Valley frost protection)
   ============================================================ */
.orchard {
  position: relative; width: 100%; height: 420px;
  border-radius: 1rem; overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(2,6,23,.65);
}
@media (max-width: 640px) { .orchard { height: 330px; } }

.orchard__sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #0b1026 0%, #161a44 34%, #3b2a63 60%, #7c3a52 82%, #c75b3b 100%);
}
.orchard__glow {
  position: absolute; left: 50%; bottom: 14%; width: 150%; height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center bottom, rgba(255,138,76,.5), rgba(255,138,76,0) 62%);
  filter: blur(6px);
}
.orchard__stars { position: absolute; inset: 0; }
.orchard__stars i {
  position: absolute; background: #fff; border-radius: 50%;
  opacity: .8; animation: twinkle 3s infinite ease-in-out;
}
.orchard__hills { position: absolute; left: 0; right: 0; bottom: 16%; width: 100%; height: 42%; }
.orchard__trees { position: absolute; left: 0; right: 0; bottom: 14%; width: 100%; height: 34%; }
.orchard__ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 16%;
  background: linear-gradient(180deg, #1b1206, #0a0703);
}
.orchard__mist {
  position: absolute; bottom: 9%; width: 60%; height: 64px;
  background: radial-gradient(ellipse at center, rgba(180,200,255,.16), rgba(180,200,255,0) 70%);
  filter: blur(8px); animation: drift 20s linear infinite;
}
.orchard__mist--2 { bottom: 24%; width: 50%; opacity: .7; animation-duration: 28s; animation-direction: reverse; }

.heaters { position: absolute; inset: 0; }
.heater { position: absolute; bottom: 16%; transform-origin: bottom center; }
.heater__pot {
  position: absolute; left: 50%; bottom: -9px; width: 26px; height: 15px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #3b3b46, #15151b);
  border-radius: 4px 4px 3px 3px; box-shadow: 0 3px 6px rgba(0,0,0,.55);
}
.heater__glow {
  position: absolute; left: 50%; bottom: -4px; width: 96px; height: 96px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,150,40,.55), rgba(255,150,40,0) 65%);
  filter: blur(3px); animation: pulse 2.4s ease-in-out infinite;
}
.flame {
  position: absolute; left: 50%; bottom: 0; width: 22px; height: 36px; margin-left: -11px;
  background: linear-gradient(180deg, var(--flame1), var(--flame2) 34%, var(--flame3) 70%, var(--flame4));
  border-radius: 50% 50% 50% 50% / 72% 72% 38% 38%;
  filter: blur(.5px) drop-shadow(0 0 11px rgba(255,110,0,.9));
  transform-origin: 50% 92%;
  animation: flicker 1.1s ease-in-out infinite alternate;
}
.flame--core {
  width: 11px; height: 21px; margin-left: -5.5px;
  background: linear-gradient(180deg, #ffffff, #ffe27a 50%, #ff9a3c);
  filter: blur(.3px); opacity: .95; animation-duration: .8s;
}

/* Heater placement & relative scale */
.heater--a { left: 12%; transform: scale(1.15); }
.heater--b { left: 30%; transform: scale(.82); }
.heater--c { left: 50%; transform: scale(1.32); }
.heater--d { left: 70%; transform: scale(.95); }
.heater--e { left: 86%; transform: scale(1.05); }
.heater--b .flame, .heater--b .flame--core { animation-delay: -.30s; }
.heater--c .flame, .heater--c .flame--core { animation-delay: -.62s; }
.heater--d .flame, .heater--d .flame--core { animation-delay: -.15s; }
.heater--e .flame, .heater--e .flame--core { animation-delay: -.45s; }
.heater--b .heater__glow { animation-delay: -.5s; }
.heater--c .heater__glow { animation-delay: -1s; }
.heater--d .heater__glow { animation-delay: -.2s; }

.orchard__caption {
  position: absolute; left: 16px; top: 14px; color: #fff;
  font-size: .82rem; line-height: 1.35; text-shadow: 0 1px 6px rgba(0,0,0,.65);
}
.orchard__caption strong { display: block; font-size: .98rem; margin-top: 6px; }
.orchard__time {
  display: inline-block; background: rgba(2,6,23,.5);
  border: 1px solid rgba(255,255,255,.22); padding: 2px 9px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* "Vivian" written in the stars (a little tribute) */
.orchard__name {
  position: absolute; left: 50%; top: 19%;
  width: 78%; max-width: 470px; transform: translateX(-50%);
  pointer-events: none;
}
.orchard__name circle {
  animation: nameTwinkle 2.6s ease-in-out infinite;
  filter: drop-shadow(0 0 3px rgba(255,255,255,.85));
}
@keyframes nameTwinkle { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

@keyframes flicker {
  0%   { transform: scaleY(1)    scaleX(1)   translateY(0)    skewX(0deg); }
  20%  { transform: scaleY(1.08) scaleX(.96) translateY(-1px) skewX(2deg); }
  40%  { transform: scaleY(.94)  scaleX(1.05) translateY(0)   skewX(-2deg); }
  60%  { transform: scaleY(1.07) scaleX(.97) translateY(-2px) skewX(1deg); }
  80%  { transform: scaleY(.97)  scaleX(1.03) translateY(0)   skewX(-1deg); }
  100% { transform: scaleY(1.04) scaleX(.98) translateY(-1px) skewX(1deg); }
}
@keyframes pulse  { 0%,100% { opacity:.55; transform:translateX(-50%) scale(1); } 50% { opacity:.85; transform:translateX(-50%) scale(1.12); } }
@keyframes twinkle{ 0%,100% { opacity:.18; } 50% { opacity:.95; } }
@keyframes drift  { 0% { transform: translateX(-35%); } 100% { transform: translateX(135%); } }

/* ---------- Respect reduced-motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-bg { transform: none !important; }
}
