/* ==========================================================================
   Scottsdale Pool Maids — site additions
   Loaded after theme.css on every page: type tweaks, light motion, contact form.
   ========================================================================== */

/* ---------- Typography ---------- */
html { font-family: 'Schibsted Grotesk', ui-sans-serif, system-ui, sans-serif; }
.font-\[\'Petrona\'\] { font-optical-sizing: auto; }
h1.font-\[\'Petrona\'\] { letter-spacing: -0.03em; }

/* ---------- Motion ---------- */
@keyframes spm-rise {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes spm-settle {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}
@keyframes spm-grow-x {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes spm-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero: staggered entrance on page load (CSS only, no flash) */
  main > section:first-child :is(h1, h1 ~ p, h1 ~ div) {
    animation: spm-rise .8s cubic-bezier(.2,.7,.2,1) both;
  }
  main > section:first-child h1        { animation-delay: .08s; }
  main > section:first-child h1 ~ p    { animation-delay: .2s; }
  main > section:first-child h1 ~ div  { animation-delay: .32s; }
  main > section:first-child h1 ~ div ~ div { animation-delay: .44s; }
  main > section:first-child p:has(+ h1) { animation: spm-rise .7s cubic-bezier(.2,.7,.2,1) both; }
  main > section:first-child p:has(+ h1) > span:first-child {
    transform-origin: left; animation: spm-grow-x .7s .25s cubic-bezier(.2,.7,.2,1) both;
  }
  /* Hero photo eases in from a slight zoom */
  main > section:first-child img[fetchpriority="high"] {
    animation: spm-settle 1.8s cubic-bezier(.2,.7,.2,1) both;
  }

  /* Scroll reveal (classes added by site.js only for off-screen elements) */
  .spm-reveal {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--spm-delay, 0ms);
  }
  .spm-reveal.is-in { opacity: 1; transform: none; }

  /* Gentle lift on images inside cards */
  main a img, main article img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
  main a:hover img, main article:hover img { transform: scale(1.03); }

  /* Slow water-like shimmer on the gold mobile call bar & accent band */
  .spm-shimmer {
    background-image: linear-gradient(110deg, #F5B335 0%, #F8C761 45%, #F5B335 70%);
    background-size: 220% 100%;
    animation: spm-shimmer 9s ease-in-out infinite;
  }
}

/* ---------- Contact page ---------- */
.spm-form { display: grid; gap: 1.25rem; }
.spm-form .spm-row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .spm-form .spm-row { grid-template-columns: 1fr 1fr; } }

.spm-field { display: grid; gap: .5rem; }
.spm-field label, .spm-field legend {
  font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #17497D;
}
.spm-field .spm-opt { font-weight: 500; text-transform: none; letter-spacing: 0; color: #5B7186; }
.spm-field :is(input, select, textarea) {
  width: 100%; min-height: 3rem; padding: .75rem .95rem;
  font: inherit; font-size: 1rem; color: #07192C;
  background: #FCFDFE; border: 1.5px solid #C6D5E2; border-radius: .625rem;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.spm-field textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }
.spm-field select {
  appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%2317497D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 1.1rem;
}
.spm-field :is(input, select, textarea):hover { border-color: #8FA9C0; }
.spm-field :is(input, select, textarea):focus {
  outline: none; border-color: #17497D; box-shadow: 0 0 0 4px rgba(23,73,125,.14);
}
.spm-field :is(input, textarea)::placeholder { color: #8A9DAF; }

.spm-chips { display: flex; flex-wrap: wrap; gap: .6rem; border: 0; padding: 0; margin: 0; }
.spm-chips legend { margin-bottom: .6rem; }
.spm-chip { position: relative; }
.spm-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.spm-chip span {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: .5rem 1rem;
  font-size: .9375rem; font-weight: 600; color: #30465B;
  background: #FCFDFE; border: 1.5px solid #C6D5E2; border-radius: 999px;
  transition: all .2s;
}
.spm-chip input:checked + span { background: #17497D; border-color: #17497D; color: #FCFDFE; }
.spm-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(23,73,125,.18); }

.spm-hp { position: absolute !important; left: -9999px !important; }

.spm-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; padding: .9rem 1.75rem; cursor: pointer;
  font: inherit; font-size: .9375rem; font-weight: 700; letter-spacing: .015em; color: #07192C;
  background: #F5B335; border: 0; border-radius: .625rem;
  box-shadow: 5px 5px 0 0 #07192C;
  transition: transform .2s, box-shadow .2s, background-color .2s;
}
.spm-submit:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 0 #07192C; background: #E5A126; }
.spm-submit:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 0 #07192C; }
.spm-submit:focus-visible { outline: none; box-shadow: 5px 5px 0 0 #07192C, 0 0 0 4px rgba(23,73,125,.3); }
.spm-submit svg { transition: transform .25s; }
.spm-submit:hover svg { transform: translateX(3px); }

.spm-steps { counter-reset: spm-step; display: grid; gap: 1.1rem; }
.spm-steps li { counter-increment: spm-step; display: grid; grid-template-columns: 2rem 1fr; gap: .9rem; align-items: start; }
.spm-steps li::before {
  content: counter(spm-step);
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .5rem;
  font-weight: 700; font-size: .875rem; color: #F5B335; background: #17497D; box-shadow: 2px 2px 0 0 #F5B335;
}

.spm-areas { display: flex; flex-wrap: wrap; gap: .5rem; }
.spm-areas li {
  padding: .4rem .8rem; border-radius: 999px; font-size: .875rem; font-weight: 600;
  color: #D7E3ED; background: rgba(215,227,237,.08); border: 1px solid rgba(215,227,237,.18);
}

.spm-contact-wrap { padding-bottom: 5rem; }
@media (min-width: 1024px) { .spm-contact-wrap { padding-bottom: 7rem; } }
.spm-contact-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 1024px) { .spm-contact-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: 2.5rem; } }
.spm-hero-text { max-width: 52rem; }
.spm-h2 { font-size: clamp(1.75rem, 3vw, 2.375rem); line-height: 1.1; letter-spacing: -0.025em; }
.spm-h3 { font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; }
.spm-lede { font-size: 1rem; line-height: 1.7; }
.spm-small, .spm-steps { font-size: .9375rem; line-height: 1.65; }
.spm-hours { display: grid; grid-template-columns: auto 1fr; column-gap: 1.5rem; row-gap: .5rem; font-size: .9375rem; }
.spm-dark-card { background-image: radial-gradient(circle at 85% 15%, rgba(23,73,125,.55), transparent 45%); }
.spm-chips .spm-chip { text-transform: none; letter-spacing: 0; font-size: inherit; }

/* ---------- Contextual links ---------- */
main a.spm-ctx {
  color: inherit; font-weight: 600;
  text-decoration: underline; text-decoration-color: #F5B335; text-decoration-thickness: 2px; text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}
main a.spm-ctx:hover { color: #17497D; text-decoration-color: #17497D; }
main [class*="bg-[#07192C]"] a.spm-ctx:hover, main [class*="bg-[#10314F]"] a.spm-ctx:hover, main [class*="bg-[#17497D]"] a.spm-ctx:hover { color: #F5B335; }

/* ---------- Shared layout for generated pages ---------- */
.spm-wrap { width: 100%; max-width: 90rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .spm-wrap { padding: 0 2rem; } }
@media (min-width: 1024px) { .spm-wrap { padding: 0 3rem; } }
.spm-section { padding: 4rem 0; }
@media (min-width: 1024px) { .spm-section { padding: 5.5rem 0; } }
.spm-tint { background: #EAF1F6; box-shadow: inset 0 1px 0 rgba(23,73,125,.08), inset 0 -1px 0 rgba(23,73,125,.08); }
.spm-dark { background: #07192C; color: #D7E3ED; background-image: radial-gradient(circle at 85% 15%, rgba(23,73,125,.55), transparent 40%); }
.spm-eyebrow { display: inline-flex; align-items: center; gap: .75rem; font-size: .8125rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #17497D; }
.spm-eyebrow::before { content: ""; width: 2rem; height: 2px; background: #F5B335; }
.spm-dark .spm-eyebrow { color: #F5B335; }
.spm-h2x { font-family: 'Petrona', serif; font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; color: #07192C; text-wrap: balance; margin-top: 1rem; }
.spm-dark .spm-h2x { color: #F7F9FB; }
.spm-body { font-size: 1.0625rem; line-height: 1.8; color: #30465B; text-wrap: pretty; }
.spm-body p + p { margin-top: 1.1rem; }
.spm-dark .spm-body { color: #C9D7E3; }
.spm-two { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 1024px) { .spm-two { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 4rem; } }

/* Breadcrumbs */
.spm-crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .8125rem; color: #5B7186; }
.spm-crumbs li + li::before { content: "/"; margin-right: .4rem; color: #A9B9C7; }
.spm-crumbs a { color: #17497D; font-weight: 600; text-decoration: none; }
.spm-crumbs a:hover { text-decoration: underline; text-decoration-color: #F5B335; text-underline-offset: 3px; }

/* Hero facts */
.spm-facts { display: grid; gap: .9rem; padding: 1.5rem; border-radius: 1rem; background: #EAF1F6; box-shadow: inset 0 0 0 1px rgba(23,73,125,.1); }
.spm-facts div { display: flex; justify-content: space-between; gap: 1rem; font-size: .9375rem; border-bottom: 1px dashed rgba(23,73,125,.18); padding-bottom: .7rem; }
.spm-facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.spm-facts dt { color: #5B7186; }
.spm-facts dd { font-weight: 700; color: #07192C; text-align: right; }
.spm-btns { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.spm-btn-ghost {
  display: inline-flex; align-items: center; min-height: 3.25rem; padding: .9rem 1.5rem; border-radius: .625rem;
  font-weight: 700; font-size: .9375rem; color: #07192C; background: #FCFDFE; border: 1px solid #17497D;
  box-shadow: 5px 5px 0 0 #07192C; transition: transform .2s, box-shadow .2s, background-color .2s;
}
.spm-btn-ghost:hover { transform: translate(2px,2px); box-shadow: 3px 3px 0 0 #07192C; background: #EAF1F6; }
a.spm-submit { text-decoration: none; }

/* Service cards */
.spm-cards { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .spm-cards { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .spm-cards { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.spm-card {
  display: block; padding: 1.4rem 1.5rem; border-radius: 1rem; background: #FCFDFE; color: #30465B; text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(23,73,125,.14), 0 18px 45px -30px rgba(7,25,44,.35);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s;
}
.spm-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(23,73,125,.3), 0 24px 50px -28px rgba(7,25,44,.45); }
.spm-card h3 { font-family: 'Petrona', serif; font-weight: 700; font-size: 1.3rem; line-height: 1.2; color: #07192C; }
.spm-card p { margin-top: .5rem; font-size: .9375rem; line-height: 1.65; }
.spm-card .spm-more { display: inline-flex; gap: .35rem; margin-top: .9rem; font-size: .875rem; font-weight: 700; color: #17497D; }
.spm-card.is-focus { box-shadow: inset 0 0 0 2px #F5B335, 0 18px 45px -30px rgba(7,25,44,.35); }
.spm-card .spm-tag { display: inline-block; margin-bottom: .6rem; padding: .2rem .55rem; border-radius: .4rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #FDF0D5; color: #8A5A00; }

/* Area section */
.spm-source { margin-top: 1.25rem; font-size: .8125rem; color: #5B7186; }
.spm-source a { color: #17497D; font-weight: 600; }
.spm-landmarks { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.spm-landmarks a {
  display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .85rem; border-radius: 999px;
  font-size: .875rem; font-weight: 600; color: #17497D; background: #FCFDFE; box-shadow: inset 0 0 0 1px rgba(23,73,125,.2);
  text-decoration: none; transition: background-color .2s;
}
.spm-landmarks a:hover { background: #FDF0D5; }

/* Maps */
.spm-map {
  position: relative; width: 100%; min-height: 22rem; border-radius: 1rem; overflow: hidden;
  background: #DCE7EF; box-shadow: inset 0 0 0 1px rgba(23,73,125,.14), 0 18px 45px -24px rgba(7,25,44,.35);
}
.spm-map.is-tall { min-height: 34rem; }
@media (min-width: 1024px) { .spm-map { min-height: 26rem; } .spm-map.is-tall { min-height: 40rem; } }
.spm-map-caption { margin-top: .75rem; font-size: .8125rem; color: #5B7186; }
.spm-pin {
  width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: #17497D; border: 3px solid #FCFDFE; box-shadow: 0 4px 10px rgba(7,25,44,.35); cursor: pointer;
}
.spm-pin.is-current { background: #F5B335; width: 28px; height: 28px; }
.leaflet-div-icon.spm-pin-wrap { background: none; border: 0; }
.spm-popup { font-family: 'Schibsted Grotesk', system-ui, sans-serif; font-size: .875rem; color: #30465B; }
.spm-popup strong { display: block; font-family: 'Petrona', serif; font-size: 1.05rem; color: #07192C; }
.spm-popup a { display: inline-block; margin-top: .35rem; font-weight: 700; color: #17497D; }

/* Area link grid (hub, nearby, service pages) */
.spm-area-grid { display: grid; gap: .75rem; margin-top: 2rem; }
@media (min-width: 640px) { .spm-area-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .spm-area-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.spm-area-link {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.15rem; border-radius: .75rem;
  font-weight: 600; color: #07192C; background: #FCFDFE; text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(23,73,125,.14); transition: box-shadow .2s, transform .2s;
}
.spm-area-link small { display: block; font-weight: 500; font-size: .8125rem; color: #5B7186; }
.spm-area-link::after { content: "→"; color: #17497D; transition: transform .2s; }
.spm-area-link:hover { box-shadow: inset 0 0 0 2px #F5B335; }
.spm-area-link:hover::after { transform: translateX(3px); }
.spm-dark .spm-area-link { background: rgba(215,227,237,.06); color: #F7F9FB; box-shadow: inset 0 0 0 1px rgba(215,227,237,.18); }
.spm-dark .spm-area-link small { color: #AFC2D2; }
.spm-dark .spm-area-link::after { color: #F5B335; }

/* FAQ on generated pages */
.spm-faq { display: grid; gap: .75rem; margin-top: 2rem; }
.spm-faq details { border-radius: 1rem; background: #10314F; padding: 0 1.5rem; box-shadow: inset 0 0 0 1px rgba(215,227,237,.16); }
.spm-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; }
.spm-faq summary::-webkit-details-marker { display: none; }
.spm-faq summary h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; color: #F7F9FB; }
.spm-faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: #F5B335; transition: transform .25s; }
.spm-faq details[open] summary::after { transform: rotate(45deg); }
.spm-faq details p { padding-bottom: 1.4rem; font-size: 1rem; line-height: 1.75; color: #D7E3ED; }

/* CTA band */
.spm-cta { background: #F5B335; color: #07192C; }
.spm-cta .spm-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.spm-cta p { font-family: 'Petrona', serif; font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; }
.spm-cta a { display: inline-flex; align-items: center; min-height: 3.25rem; padding: .9rem 1.6rem; border-radius: .625rem; font-weight: 700; background: #07192C; color: #F7F9FB; text-decoration: none; box-shadow: 5px 5px 0 0 #FCFDFE; transition: transform .2s, box-shadow .2s; }
.spm-cta a:hover { transform: translate(2px,2px); box-shadow: 3px 3px 0 0 #FCFDFE; }

/* Hub list */
.spm-hub-list { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 768px) { .spm-hub-list { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.spm-hub-item { display: grid; gap: .35rem; padding: 1.5rem; border-radius: 1rem; background: #FCFDFE; box-shadow: inset 0 0 0 1px rgba(23,73,125,.14); }
.spm-hub-item h3 a { font-family: 'Petrona', serif; font-weight: 700; font-size: 1.35rem; color: #07192C; text-decoration: none; }
.spm-hub-item h3 a:hover { text-decoration: underline; text-decoration-color: #F5B335; text-underline-offset: 4px; }
.spm-hub-item p { font-size: .9375rem; line-height: 1.65; color: #30465B; }
.spm-hub-item .spm-meta { font-size: .8125rem; font-weight: 600; color: #5B7186; }
