/* Service pages (water, fire), loaded after home.css by templates/service.mjs.
   Scoped under .lp-svc. Brand rules hold: Montserrat, navy, gold, ember.
   Motion is decorative only and stops under prefers-reduced-motion. */

/* ---------- Hero ---------- */
.lp-svc .svc-hero {
  min-height: 0;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(15, 111, 176, 0.28), transparent 55%),
    radial-gradient(ellipse at 10% 100%, rgba(201, 150, 43, 0.12), transparent 50%),
    #071a33;
}
.lp-svc .svc-hero::after {
  display: none;
}
.lp-svc .svc-hero .wrap {
  padding-top: 64px;
  padding-bottom: 88px;
}
.lp-svc .svc-crumb {
  font-size: 0.85rem;
  color: var(--lp-faint);
}
.lp-svc .svc-crumb a {
  color: var(--lp-faint);
}
.lp-svc .svc-hero h1 {
  max-width: 16ch;
}
.lp-svc .svc-bottomline {
  max-width: 640px;
  padding: 18px 22px;
  border-left: 4px solid var(--lp-accent);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(2px);
}
.lp-svc .svc-bottomline .label,
.lp-svc .svc-takeaway .label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lp-accent-2);
}
.lp-svc .svc-bottomline p {
  margin: 0;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Page-load reveal, staggered */
.lp-svc .reveal > * {
  animation: svc-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.lp-svc .reveal > *:nth-child(2) { animation-delay: 0.06s; }
.lp-svc .reveal > *:nth-child(3) { animation-delay: 0.12s; }
.lp-svc .reveal > *:nth-child(4) { animation-delay: 0.2s; }
.lp-svc .reveal > *:nth-child(5) { animation-delay: 0.28s; }
.lp-svc .reveal > *:nth-child(6) { animation-delay: 0.36s; }
@keyframes svc-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Water art: two waves rising along the bottom, drops falling */
.svc-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.svc-art-water .wave {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 120px;
  bottom: -8px;
}
.svc-art-water .wave path {
  fill: rgba(15, 111, 176, 0.42);
}
.svc-art-water .wave-b path {
  fill: rgba(143, 208, 255, 0.12);
}
.svc-art-water .wave-a {
  animation: svc-wave 9s ease-in-out infinite alternate;
}
.svc-art-water .wave-b {
  animation: svc-wave 13s ease-in-out infinite alternate-reverse;
}
@keyframes svc-wave {
  from { transform: translateX(-4%) translateY(6px); }
  to { transform: translateX(4%) translateY(-10px); }
}
.svc-art-water .drops span {
  position: absolute;
  top: -20px;
  width: 2px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(rgba(143, 208, 255, 0), rgba(143, 208, 255, 0.55));
  animation: svc-drop 2.4s linear infinite;
}
@keyframes svc-drop {
  to { transform: translateY(110vh); }
}

/* The phoenix mark, right side of the hero */
.svc-art .svc-mark {
  position: absolute;
  right: 6%;
  top: 50%;
  width: min(30vw, 400px);
  height: auto;
  transform: translateY(-46%);
  opacity: 0.2;
  animation: svc-float 8s ease-in-out infinite alternate;
}
.svc-art-fire .svc-mark {
  filter: drop-shadow(0 0 40px rgba(226, 84, 10, 0.55));
  opacity: 0.32;
}
.svc-art-water .svc-mark {
  /* Brand mark keeps its true colors; only the glow is blue. */
  filter: drop-shadow(0 0 48px rgba(15, 111, 176, 0.75));
  opacity: 0.26;
}
@keyframes svc-float {
  from { transform: translateY(-46%); }
  to { transform: translateY(-52%); }
}

/* Fire art: embers drifting up from a low glow */
.svc-art-fire .glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -40%;
  height: 80%;
  background: radial-gradient(ellipse at 75% 100%, rgba(226, 84, 10, 0.62), rgba(201, 150, 43, 0.18) 40%, rgba(226, 84, 10, 0) 70%);
  animation: svc-flicker 3s ease-in-out infinite alternate;
}
.svc-art-fire span {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7d6 0%, #f6b53e 40%, rgba(226, 84, 10, 0) 72%);
  box-shadow: 0 0 12px 2px rgba(242, 140, 40, 0.55);
  animation: svc-ember linear infinite;
}
@keyframes svc-ember {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translate(-40px, -110vh); opacity: 0; }
}
@keyframes svc-flicker {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

/* ---------- Definition + why ---------- */
.lp-svc .svc-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.lp-svc .svc-split h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}
.lp-svc .svc-answer {
  margin: 18px 0 0;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #ffffff;
  padding-left: 18px;
  border-left: 3px solid var(--lp-accent);
}
.lp-svc .svc-why p {
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--lp-muted);
}

/* ---------- Cards ---------- */
.lp-svc .svc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.lp-svc .svc-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.lp-svc .svc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius);
  background: rgba(19, 51, 92, 0.32);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.lp-svc .svc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 150, 43, 0.6);
}
.lp-svc .svc-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.lp-svc .svc-card p {
  margin: 0;
  line-height: 1.6;
  color: var(--lp-muted);
}

/* ---------- Steps rail ---------- */
.lp-svc .svc-steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
  counter-reset: none;
}
.lp-svc .svc-steps li {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 26px 0;
  border-top: 2px solid var(--lp-line);
}
.lp-svc .svc-steps li:nth-child(-n + 3) {
  border-top-color: var(--lp-accent);
}
.lp-svc .svc-steps .n,
.lp-svc .svc-chain .n {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #071a33;
  background: var(--lp-accent);
}
.lp-svc .svc-steps h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.lp-svc .svc-steps p {
  margin: 0;
  line-height: 1.6;
  color: var(--lp-muted);
}

/* ---------- Work photos ---------- */
.lp-svc .svc-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  height: 340px;
}
.lp-svc .svc-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--lp-radius);
}

/* ---------- Timeline ---------- */
.lp-svc .svc-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 40px;
  position: relative;
}
.lp-svc .svc-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 9px;
  height: 2px;
  background: linear-gradient(90deg, var(--lp-accent), rgba(201, 150, 43, 0.15));
}
.lp-svc .svc-timeline .stage {
  position: relative;
  padding: 36px 28px 0 0;
}
.lp-svc .svc-timeline .stage::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #071a33;
  border: 3px solid var(--lp-accent);
}
.lp-svc .svc-timeline .label {
  font-weight: 700;
  font-size: 1.15rem;
  color: #ffffff;
}
.lp-svc .svc-timeline p {
  margin: 8px 0 0;
  line-height: 1.6;
  color: var(--lp-muted);
}

/* ---------- Insurance quote ---------- */
.lp-svc .svc-quote {
  margin: 0;
  padding: 28px;
  border-radius: var(--lp-radius);
  border: 1px solid rgba(201, 150, 43, 0.45);
  background: rgba(201, 150, 43, 0.07);
}
.lp-svc .svc-quote blockquote {
  margin: 12px 0 14px;
  font-size: 1.15rem;
  line-height: 1.55;
  color: #ffffff;
}
.lp-svc .svc-quote figcaption {
  font-size: 0.9rem;
}

/* ---------- Roof to rebuild ---------- */
.lp-svc .svc-chain ol {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.lp-svc .svc-chain li {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: var(--lp-radius);
  background: rgba(19, 51, 92, 0.32);
  border: 1px solid var(--lp-line);
}
.lp-svc .svc-chain strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.1rem;
}
.lp-svc .svc-chain li > span:last-child {
  color: var(--lp-muted);
  line-height: 1.5;
}

/* ---------- Takeaway ---------- */
.lp-svc .svc-takeaway {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  padding: 36px 32px;
  border-radius: var(--lp-radius);
  background:
    linear-gradient(135deg, rgba(201, 150, 43, 0.16), rgba(15, 111, 176, 0.12));
  border: 1px solid rgba(201, 150, 43, 0.4);
}
.lp-svc .svc-takeaway p {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
}

/* ---------- FAQ ---------- */
.lp-svc .svc-faq {
  max-width: 900px;
}
.lp-svc .svc-faq h2 {
  margin-bottom: 28px;
}
.lp-svc .svc-faq details {
  border-top: 1px solid var(--lp-line);
}
.lp-svc .svc-faq details:last-of-type {
  border-bottom: 1px solid var(--lp-line);
}
.lp-svc .svc-faq summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 22px 40px 22px 0;
  font-size: 1.12rem;
  font-weight: 600;
  color: #ffffff;
  min-height: 44px;
}
.lp-svc .svc-faq summary::-webkit-details-marker {
  display: none;
}
.lp-svc .svc-faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--lp-accent);
}
.lp-svc .svc-faq details[open] summary::after {
  content: "\2212";
}
.lp-svc .svc-faq summary:focus-visible {
  outline: 2px solid var(--lp-accent-2);
  outline-offset: 4px;
}
.lp-svc .svc-faq details p {
  margin: 0;
  padding: 0 0 24px;
  line-height: 1.65;
  color: var(--lp-muted);
}

/* ---------- Sources ---------- */
.lp-svc .svc-sources {
  padding-top: 40px !important;
  padding-bottom: 56px !important;
  font-size: 0.92rem;
  color: var(--lp-faint);
}
.lp-svc .svc-sources .small {
  font-size: 1rem;
  margin: 18px 0 8px;
}
.lp-svc .svc-sources ul {
  margin: 0;
  padding-left: 18px;
}
.lp-svc .svc-sources li {
  margin: 4px 0;
}
.lp-svc .svc-sources .more {
  margin-top: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .lp-svc .svc-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .lp-svc .svc-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lp-svc .svc-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lp-svc .svc-steps li:nth-child(3) {
    border-top-color: var(--lp-line);
  }
  .lp-svc .svc-chain ol {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1020px) {
  .svc-art .svc-mark {
    right: -6%;
    width: 46vw;
    opacity: 0.12;
  }
}
@media (max-width: 760px) {
  .svc-art-water .drops,
  .svc-art-fire span {
    display: none;
  }
  .lp-svc .svc-hero .wrap {
    padding-top: 40px;
    padding-bottom: 72px;
  }
  .lp-svc .svc-grid,
  .lp-svc .svc-grid-4,
  .lp-svc .svc-steps,
  .lp-svc .svc-timeline {
    grid-template-columns: 1fr;
  }
  .lp-svc .svc-steps li:nth-child(-n + 3) {
    border-top-color: var(--lp-line);
  }
  .lp-svc .svc-steps li:first-child {
    border-top-color: var(--lp-accent);
  }
  .lp-svc .svc-timeline::before {
    left: 7px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--lp-accent), rgba(201, 150, 43, 0.15));
  }
  .lp-svc .svc-timeline .stage {
    padding: 0 0 28px 36px;
  }
  .lp-svc .svc-gallery {
    grid-template-columns: 1fr 1fr;
    height: auto;
  }
  .lp-svc .svc-gallery img {
    height: 160px;
  }
  .lp-svc .svc-gallery img:first-child {
    grid-column: 1 / -1;
    height: 220px;
  }
  .lp-svc .svc-takeaway {
    padding: 28px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lp-svc .reveal > *,
  .svc-art-water .wave,
  .svc-art-water .drops span,
  .svc-art-fire span,
  .svc-art-fire .glow {
    animation: none !important;
  }
  .svc-art-water .drops,
  .svc-art-fire span {
    display: none;
  }
  .svc-art .svc-mark {
    animation: none !important;
  }
  .lp-svc .svc-card {
    transition: none;
  }
}
