/* Shared design system for Desert Coast secondary pages */

:root {
  --gold: #C9A96E;
  --sage: #A3B18A;
  --moon: #8BA7C7;
  --ink: #1C1C22;
  --stone: #F9F8F5;
  --text-secondary: #6B6B6B;
  --scroll-footer-reveal: 0.28;
}

* { box-sizing: border-box; }

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

body {
  background-color: var(--stone);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-family: 'DM Sans', sans-serif;
  overscroll-behavior-y: none;
}

.font-display { font-family: 'Fraunces', serif; font-weight: 350; }

/* Typography */
.text-heading-2 {
  font-family: 'Fraunces', serif;
  font-weight: 350;
  font-size: clamp(3.6rem, 9.13vw, 4rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.text-heading-4 {
  font-family: 'Fraunces', serif;
  font-weight: 350;
  font-size: clamp(2.1rem, 5.32vw, 2.8rem);
  letter-spacing: -0.02rem;
  line-height: 1.1;
}

.text-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.text-body-2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.4rem;
  line-height: 1.3;
}

.text-body-3 {
  font-size: 1.3rem;
  letter-spacing: 0.005em;
  line-height: 1.3;
  color: var(--text-secondary);
}

.text-nav { font-size: 1.5rem; line-height: 1; }

@media (min-width: 1024px) {
  .text-nav { font-size: 1.6rem; }
}

@media (min-width: 768px) {
  .text-heading-2 { font-size: clamp(5.6rem, 5.46vw, 6.6rem); }
  .text-heading-4 { font-size: clamp(2.8rem, 2.73vw, 3rem); }
  .text-subtitle { font-size: 2rem; }
  .text-body-2 { font-size: 1.6rem; }
  .text-body-3 { font-size: 1.4rem; }
}

@media (min-width: 1280px) {
  .text-heading-2 { font-size: clamp(5.18rem, 4.05vw, 7rem); }
  .text-heading-4 { font-size: clamp(2.22rem, 1.73vw, 3rem); }
  .text-body-2 { font-size: 1.7rem; }
}

/* Navigation */
.nav-pill {
  background: rgba(227, 221, 207, 0.4);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.8rem;
}

.nav-inner {
  height: 5.6rem;
  min-height: 5.6rem;
  padding: 0 0.8rem;
  flex-shrink: 0;
}

.nav-logo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 4.4rem;
  min-height: 4.4rem;
  padding: 0 1.4rem;
  border-radius: 1.2rem;
  background: #fff;
  flex-shrink: 0;
  overflow: visible;
  transition: background 0.3s ease;
  text-decoration: none;
}

.nav-logo-btn:hover { background: #E8E4DC; }

.nav-logo-btn img {
  height: 5.2rem;
  width: auto;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .nav-pill { border-radius: 2rem; }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 4.4rem;
  min-height: 4.4rem;
  padding: 0 1.8rem;
  border-radius: 1.2rem;
  color: var(--text-secondary) !important;
  text-decoration: none;
  transition: color 0.3s ease, background 0.3s ease;
}

.nav-link:hover { color: var(--ink) !important; }

.nav-link.is-active {
  background: #fff;
  color: var(--ink) !important;
}

.nav-link.is-active:hover { color: var(--ink) !important; }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  border-radius: 1.2rem;
  background: #fff;
  color: var(--ink) !important;
  font-size: 1.4rem;
  font-weight: 400;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.btn-primary:hover { background: var(--ink); color: #fff !important; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  border-radius: 1.2rem;
  background: transparent;
  color: var(--ink) !important;
  font-size: 1.4rem;
  border: 1px solid rgba(28, 28, 34, 0.15);
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(28, 28, 34, 0.05);
  border-color: rgba(28, 28, 34, 0.3);
}

.floating-contact .btn-primary,
.floating-contact .btn-secondary {
  padding: 1.45rem 2.8rem;
  font-size: 1.55rem;
}

.floating-contact .btn-primary:hover,
.floating-contact .btn-secondary:hover {
  background: var(--ink) !important;
  color: #fff !important;
  border-color: var(--ink);
}

/* Layout */
.section-pad { padding: 6rem 1.6rem; }

@media (min-width: 768px) {
  .section-pad { padding: 10rem 2.4rem; }
}

@media (min-width: 1280px) {
  .section-pad { padding: 16rem 3.2rem; }
}

.surface-card {
  background: #fff;
  border-radius: 1.6rem;
}

@media (min-width: 1024px) {
  .surface-card { border-radius: 3.2rem; }
}

.surface-card-pad {
  padding: 2.4rem;
  box-shadow: 0 12px 40px -16px rgba(28, 28, 34, 0.12);
}

@media (min-width: 768px) {
  .surface-card-pad { padding: 3.2rem; }
}

.accent-sage { color: var(--sage); }
.accent-gold { color: var(--gold); }
.text-secondary { color: var(--text-secondary); }

/* Provider profile layout (static feature-stage) */
.provider-profile-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 96rem;
  margin: 0 auto;
  gap: 2rem;
}

@media (min-width: 768px) {
  .provider-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
    gap: 4rem;
    align-items: center;
  }

  .provider-profile-layout .feature-stage {
    height: auto;
    max-width: 48rem;
    width: 100%;
    min-height: 0;
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  .provider-profile-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 36rem);
    gap: 5.6rem;
  }

  .provider-profile-layout .feature-stage {
    max-width: 52rem;
  }
}

.provider-profile-layout .feature-stage {
  aspect-ratio: 5 / 6;
  background: transparent;
  box-shadow: none;
}

.provider-profile-layout .feature-image-stack {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.provider-profile-layout .feature-image-stack picture {
  display: block;
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .provider-profile-layout .feature-stage {
    aspect-ratio: 4 / 5;
  }
}

.provider-profile-title {
  font-family: 'Fraunces', serif;
  font-weight: 350;
  font-size: clamp(2.6rem, 6.5vw, 3.2rem);
  letter-spacing: -0.01em;
  line-height: 1.12;
  max-width: 34rem;
}

@media (min-width: 768px) {
  .provider-profile-title {
    font-size: clamp(3rem, 3.2vw, 3.8rem);
    line-height: 1.08;
    max-width: 32rem;
  }
}

@media (min-width: 1280px) {
  .provider-profile-title {
    font-size: clamp(3.2rem, 2.5vw, 4.2rem);
    max-width: 36rem;
  }
}

.feature-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 20rem;
  aspect-ratio: 362 / 346;
  --feature-radius: 2.4rem;
  background: var(--stone);
  border-radius: var(--feature-radius);
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(28, 28, 34, 0.18);
}

@media (min-width: 768px) {
  .feature-stage {
    aspect-ratio: 975 / 614;
    --feature-radius: 5.6rem;
    border-radius: var(--feature-radius);
  }
}

@media (min-width: 1024px) {
  .feature-stage {
    aspect-ratio: 1100 / 693;
    --feature-radius: 6.4rem;
    border-radius: var(--feature-radius);
  }
}

.feature-image-stack {
  position: absolute;
  inset: 4%;
  width: 92%;
  height: 92%;
  border-radius: calc(var(--feature-radius) * 0.86);
  overflow: hidden;
}

.feature-image-stack img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.feature-image-stack .object-top {
  object-position: top;
}

.feature-image-stack iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.areas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .areas-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.areas-grid li {
  padding: 1.2rem 1.6rem;
  border-radius: 1.2rem;
  background: rgba(163, 177, 138, 0.08);
  color: var(--ink);
  font-size: 1.4rem;
}

@media (min-width: 768px) {
  .areas-grid li {
    font-size: 1.6rem;
  }
}

/* Footer reveal */
.footer-reveal-scroll {
  position: relative;
  z-index: 1;
  isolation: isolate;
  background: linear-gradient(180deg, #FFF4B0 0%, #FFE566 18%, #FFC93C 42%, #F5A623 68%, #E87820 88%, #D96510 100%);
}

.footer-reveal-sticky {
  position: sticky;
  top: 0;
  height: calc(var(--scroll-footer-reveal, 0.28) * 100svh);
  z-index: 0;
  pointer-events: none;
  margin-bottom: calc(var(--scroll-footer-reveal, 0.28) * -100svh);
}

.footer-reveal-panel {
  position: relative;
  z-index: 2;
}

.footer-reveal-sheet {
  position: relative;
  z-index: 2;
  background: #fff;
  color: var(--text-secondary);
  padding: 4rem 0 0;
  border-radius: 0;
  will-change: transform, border-radius;
}

@media (min-width: 768px) {
  .footer-reveal-sheet { padding: 6rem 0 0; }
}

@media (min-width: 1280px) {
  .footer-reveal-sheet { padding: 8rem 0 0; }
}

.footer-static .footer-reveal-sticky {
  display: none;
}

.footer-static .footer-reveal-sheet {
  transform: none !important;
  border-radius: 0 0 2.4rem 2.4rem;
}

@media (min-width: 768px) {
  .footer-static .footer-reveal-sheet {
    border-radius: 0 0 3.2rem 3.2rem;
  }
}

@media (min-width: 1024px) {
  .footer-static .footer-reveal-sheet {
    border-radius: 0 0 4rem 4rem;
  }
}

.footer-reveal-gradient {
  position: relative;
  z-index: 1;
  min-height: 12rem;
  margin-top: -2.4rem;
  padding-bottom: 1.6rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .footer-reveal-gradient {
    min-height: 14rem;
    margin-top: -3.2rem;
  }
}

@media (min-width: 1280px) {
  .footer-reveal-gradient {
    min-height: 16rem;
    margin-top: -4rem;
  }
}

.footer-reveal-watermark {
  font-family: 'Fraunces', serif;
  font-weight: 350;
  font-size: clamp(10rem, 24vw, 32rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  transform: translateY(0);
  margin-bottom: -0.05em;
}

/* Secondary pages: compact static footer gradient */
.footer-reveal-scroll.footer-static {
  padding-bottom: 2.4rem;
}

.footer-static .footer-reveal-gradient {
  min-height: 6rem;
  margin-top: -1.2rem;
}

@media (min-width: 768px) {
  .footer-static .footer-reveal-gradient {
    min-height: 7rem;
    margin-top: -1.6rem;
  }
}

@media (min-width: 1280px) {
  .footer-static .footer-reveal-gradient {
    min-height: 8rem;
    margin-top: -2rem;
  }
}

.footer-static .footer-reveal-watermark {
  font-size: clamp(4rem, 10vw, 7rem);
  max-height: 100%;
}

.footer-reveal-cta {
  position: relative;
  min-height: 36rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 1.6rem 3.2rem;
  border-radius: 2.4rem;
}

@media (min-width: 768px) {
  .footer-reveal-cta {
    min-height: 40rem;
    margin: 0 2.4rem 4rem;
    border-radius: 3.2rem;
  }
}

@media (min-width: 1280px) {
  .footer-reveal-cta {
    min-height: 44rem;
    margin: 0 3.2rem 4.8rem;
  }
}

.footer-reveal-cta-media {
  position: absolute;
  inset: 0;
}

.footer-reveal-cta-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-reveal-cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.footer-reveal-cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-reveal-sheet-inner {
  padding: 0 1.6rem 2.4rem;
}

@media (min-width: 768px) {
  .footer-reveal-sheet-inner { padding: 0 2.4rem 3.2rem; }
}

@media (min-width: 1280px) {
  .footer-reveal-sheet-inner { padding: 0 3.2rem 4rem; }
}

.footer-reveal-location {
  width: 100%;
  margin: 0 0 2.4rem;
}

.footer-reveal-location-layout {
  --location-pad-x: 1.6rem;
  --location-pad-x-md: 2.4rem;
  --location-pad-outer: clamp(1.6rem, calc((100vw - 120rem) / 2 + 1.6rem), 8rem);
  --location-pad-inner: clamp(2.4rem, 6vw, 8rem);
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 900px) {
  .footer-reveal-location-layout {
    grid-template-columns: 1fr 1fr;
    min-height: 28rem;
  }
}

.footer-reveal-location-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  padding: 2.4rem var(--location-pad-x) 2.4rem;
}

@media (min-width: 768px) {
  .footer-reveal-location-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.4rem;
    padding: 2.4rem var(--location-pad-x-md) 3.2rem;
  }
}

@media (min-width: 900px) {
  .footer-reveal-location-info {
    display: flex;
    flex-direction: column;
    padding: 2.4rem var(--location-pad-inner) 3.2rem var(--location-pad-outer);
    gap: 2.4rem;
  }
}

.footer-reveal-location-item {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.footer-reveal-location-label {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-reveal-location-value {
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--ink);
}

@media (min-width: 768px) {
  .footer-reveal-location-value { font-size: 1.5rem; }
}

.footer-reveal-location-name {
  font-family: 'Fraunces', serif;
  font-weight: 350;
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--ink);
}

@media (min-width: 768px) {
  .footer-reveal-location-name { font-size: 1.8rem; }
}

.footer-reveal-map-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 22rem;
  padding: 0 var(--location-pad-x);
}

@media (min-width: 768px) {
  .footer-reveal-map-card { padding: 0 var(--location-pad-x-md); }
}

@media (min-width: 900px) {
  .footer-reveal-map-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    padding: 2.4rem var(--location-pad-outer) 3.2rem var(--location-pad-inner);
  }
}

.footer-reveal-map-card iframe {
  display: block;
  width: 100%;
  height: 22rem;
  border: 0;
}

@media (min-width: 900px) {
  .footer-reveal-map-card iframe {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: auto;
  }
}

.footer-reveal-meta {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding-top: 2rem;
  border-top: 1px solid #E8E8E8;
  margin-bottom: 2.4rem;
}

@media (min-width: 900px) {
  .footer-reveal-meta {
    flex-direction: row;
    align-items: flex-start;
    gap: 3.2rem;
  }
}

.footer-reveal-meta-tagline {
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--text-secondary);
  flex: 0 0 auto;
  max-width: 28rem;
  margin: 0;
}

.footer-reveal-meta-links {
  flex: 1;
  min-width: 0;
}

.footer-reveal-meta-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem 2.4rem;
}

@media (min-width: 768px) {
  .footer-reveal-meta-links ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.footer-reveal-meta-links a,
.footer-reveal-meta-contact a {
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-reveal-meta-links a:hover,
.footer-reveal-meta-contact a:hover {
  color: var(--ink);
}

.footer-reveal-meta-contact {
  flex: 0 0 auto;
}

.footer-reveal-meta-contact ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-reveal-copyright {
  padding-top: 2rem;
  border-top: 1px solid #E8E8E8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-reveal-copyright {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-reveal-sticky {
    position: relative;
    height: auto;
    min-height: 0;
    margin-bottom: 0;
  }

  .footer-reveal-sheet {
    border-radius: 0 !important;
  }

  .footer-reveal-gradient {
    margin-top: 0;
  }

  .footer-reveal-watermark {
    transform: translateY(0);
  }
}

/* Reveal animations */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.active {
  animation: revealUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 0.06s; }
.delay-200 { animation-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }

  .reveal.active {
    animation: none;
  }
}

/* Site loader */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  background: var(--stone);
  transition: opacity 0.4s ease;
}

.site-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.site-loader-logo {
  width: 8rem;
  height: auto;
  animation: loaderPulse 1.8s ease-in-out infinite;
}

.site-loader-spinner {
  width: 3.2rem;
  height: 3.2rem;
  border: 2px solid rgba(28, 28, 34, 0.08);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes loaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

body.is-loading {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .site-loader-logo { animation: none; }
  .site-loader-spinner { animation: none; }
}

button[sendblue-phone-number],
button[title^="Chat: +"] { display: none !important; }

@media (max-width: 767px) {
  #main-nav {
    top: 1rem;
    max-width: calc(100% - 1.6rem);
  }

  .nav-inner {
    height: 5.4rem;
    min-height: 5.4rem;
    padding: 0 0.7rem;
    gap: 0.5rem;
  }

  .nav-logo-btn {
    height: 4.3rem;
    min-height: 4.3rem;
    padding: 0 1.1rem;
  }

  .nav-logo-btn img {
    height: 5rem;
  }

  .nav-link {
    height: 4.3rem;
    min-height: 4.3rem;
    padding: 0 1.3rem;
  }

  .text-nav {
    font-size: 1.45rem;
  }

  #main-nav,
  .nav-pill,
  .nav-inner,
  .nav-logo-btn {
    flex-shrink: 0;
  }

  .floating-contact {
    bottom: 0.75rem;
    right: 0.75rem;
    gap: 0.5rem;
  }

  .floating-contact .btn-primary,
  .floating-contact .btn-secondary {
    padding: 1.2rem 2.2rem;
    font-size: 1.45rem;
  }
}
