/* Juno Beach Digital — mobile layout fixes */
html, body { overflow-x: hidden; }

.hero-subline {
  font-size: clamp(0.7rem, 2vw, 0.875rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: rgba(234, 234, 234, 0.52);
}

/* ── Service grid expand overlay ───────────────────────────── */
.services-grid-stage {
  position: relative;
  isolation: isolate;
}

.services-grid-stage.has-expanded {
  z-index: 5;
}

#services-grid.is-expanded .service-card {
  opacity: 0.14;
  filter: blur(0.8px);
  transform: scale(0.98);
  pointer-events: none;
  transition:
    opacity 0.22s ease-out,
    filter 0.22s ease-out,
    transform 0.22s ease-out;
}

#services-grid.is-expanded .service-card.is-active {
  opacity: 0;
  filter: none;
}

.service-details-panel {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border-radius: 0.75rem;
  background: rgba(42, 15, 53, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(135, 206, 235, 0.45);
  box-shadow:
    0 0 0 1px rgba(135, 206, 235, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.4),
    0 0 32px rgba(135, 206, 235, 0.1);
  transition:
    top 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease-out,
    border-radius 0.28s ease-out;
}

.service-details-panel.is-animating {
  will-change: top, left, width, height, opacity;
}

.service-details-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  border-radius: 1rem;
}

.service-details-panel.is-closing {
  opacity: 0;
  transition-duration: 0.2s;
}

.service-details-panel__inner {
  height: 100%;
  overflow: hidden;
  padding: 2.5rem 0.85rem 0.85rem;
  text-align: left;
}

.service-details-panel__layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
}

.service-details-panel__content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
  transition: opacity 0.15s ease-out;
}

.service-details-panel.is-swapping .service-details-panel__content {
  opacity: 0.4;
}

.service-details-panel__nav {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  order: -1;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.service-details-panel__nav-btn {
  flex-shrink: 0;
  border: 1px solid rgba(135, 206, 235, 0.28);
  background: rgba(18, 18, 18, 0.35);
  color: rgba(234, 234, 234, 0.78);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.4rem 0.55rem;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.service-details-panel__nav-btn:hover {
  background: rgba(135, 206, 235, 0.14);
  color: #fff;
}

.service-details-panel__nav-btn.is-active {
  background: rgba(135, 206, 235, 0.22);
  border-color: rgba(135, 206, 235, 0.55);
  color: #87ceeb;
}

@media (min-width: 640px) {
  .service-details-panel__inner {
    padding: 2.5rem 1rem 1rem 1.15rem;
  }

  .service-details-panel__layout {
    flex-direction: row;
    gap: 0;
  }

  .service-details-panel__content {
    flex: 1;
    padding-right: 1rem;
    border-right: none;
  }

  .service-details-panel__nav {
    width: 10.5rem;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 0.3rem;
    padding: 0 0 0 0.75rem;
    border-left: 1px solid rgba(135, 206, 235, 0.18);
    order: 0;
  }

  .service-details-panel__nav-btn {
    width: 100%;
    text-align: left;
    border-radius: 0.45rem;
    font-size: 0.78rem;
    padding: 0.45rem 0.55rem;
    white-space: normal;
  }
}

.service-details-panel__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(135, 206, 235, 0.35);
  border-radius: 0.5rem;
  background: rgba(18, 18, 18, 0.55);
  color: #87ceeb;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.service-details-panel__close:hover {
  background: rgba(135, 206, 235, 0.2);
  color: #fff;
  transform: scale(1.05);
}

#details-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0 2rem 0.85rem 0;
  transition: opacity 0.2s ease;
}

@media (min-width: 640px) {
  #details-title { font-size: 1.6rem; }
}

#details-list {
  list-style: disc;
  list-style-position: inside;
  margin: 0;
  padding: 0;
  color: rgba(234, 234, 234, 0.9);
  transition: opacity 0.2s ease;
}

#details-list li {
  margin-bottom: 0.45rem;
  line-height: 1.5;
  font-size: 0.9rem;
}

@media (min-width: 640px) {
  #details-list li { font-size: 0.95rem; }
}

html.theme-sunrise .service-details-panel {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(30, 111, 175, 0.35);
  box-shadow:
    0 0 0 1px rgba(30, 111, 175, 0.08),
    0 20px 50px rgba(30, 111, 175, 0.12);
}

html.theme-sunrise .service-details-panel__close {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(30, 111, 175, 0.28);
  color: #1e6faf;
}

html.theme-sunrise .service-details-panel__nav-btn {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(30, 111, 175, 0.22);
  color: rgba(44, 62, 80, 0.75);
}

html.theme-sunrise .service-details-panel__nav-btn.is-active {
  background: rgba(61, 143, 212, 0.16);
  border-color: rgba(30, 111, 175, 0.45);
  color: #1e6faf;
}

html.theme-sunrise .service-details-panel__nav {
  border-left-color: rgba(30, 111, 175, 0.16);
}

html.theme-sunrise #details-title { color: #1a2b3c; }
html.theme-sunrise #details-list { color: rgba(44, 62, 80, 0.88); }

/* ── Site footer ───────────────────────────────────────────── */
.site-footer {
  position: relative;
  margin-top: 4rem;
  background: linear-gradient(180deg, #141414 0%, #0c0c0c 100%);
  border-top: 1px solid rgba(135, 206, 235, 0.1);
  box-shadow: 0 -12px 40px -12px rgba(0, 0, 0, 0.45);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(135, 206, 235, 0.55) 35%,
    rgba(255, 105, 180, 0.35) 65%,
    transparent 100%
  );
}

.site-footer__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3.25rem 1.25rem 2rem;
}

@media (min-width: 640px) {
  .site-footer__inner { padding: 3.5rem 1.5rem 2rem; }
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.35fr 1.1fr 0.75fr 1fr;
    gap: 2rem 3rem;
    align-items: start;
  }
}

.site-footer__logo {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #87ceeb;
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s, text-shadow 0.2s;
}

.site-footer__logo:hover {
  color: #fff;
  text-shadow: 0 0 18px rgba(135, 206, 235, 0.45);
}

.site-footer__tagline {
  margin: 0.85rem 0 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(234, 234, 234, 0.52);
  max-width: 22rem;
}

.site-footer__cta,
.site-footer__all-link {
  display: inline-flex;
  margin-top: 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(135, 206, 235, 0.9);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}

.site-footer__cta:hover,
.site-footer__all-link:hover {
  color: #87ceeb;
  transform: translateX(2px);
}

.site-footer__heading {
  margin: 0 0 1.1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(135, 206, 235, 0.95);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(135, 206, 235, 0.14);
}

.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__links li { margin-bottom: 0.45rem; }

.site-footer__links a {
  font-size: 0.84rem;
  color: rgba(234, 234, 234, 0.68);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.site-footer__links a:hover {
  color: #87ceeb;
  transform: translateX(3px);
}

.site-footer__links--cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.25rem;
}

.site-footer__links--span {
  grid-column: 1 / -1;
}

.site-footer__contact-card {
  background: rgba(135, 206, 235, 0.035);
  border: 1px solid rgba(135, 206, 235, 0.12);
  border-radius: 0.75rem;
  padding: 1.15rem 1.2rem;
}

.site-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(234, 234, 234, 0.78);
}

.site-footer__contact-item + .site-footer__contact-item {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(135, 206, 235, 0.08);
}

.site-footer__contact-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  color: #87ceeb;
  opacity: 0.85;
}

.site-footer__muted {
  font-size: 0.78rem;
  color: rgba(234, 234, 234, 0.45);
}

.site-footer__email {
  color: rgba(234, 234, 234, 0.78);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s;
}

.site-footer__email:hover { color: #87ceeb; }

.site-footer__bottom {
  margin-top: 2.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(135, 206, 235, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

@media (min-width: 640px) {
  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.site-footer__bottom p {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(234, 234, 234, 0.38);
}

.site-footer__bottom-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.site-footer__bottom-links a {
  font-size: 0.78rem;
  color: rgba(234, 234, 234, 0.42);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer__bottom-links a:hover { color: #87ceeb; }

#mobile-nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(234, 234, 234, 0.85);
}
#mobile-nav a:hover { color: #fff; background: rgba(135, 206, 235, 0.1); }

@media (max-width: 639px) {
  .service-card svg { width: 2rem; height: 2rem; }
}

@media (max-width: 767px) {
  .contact-stack > div { margin-bottom: 0; }
}
