/* ===================================================
   NorthStar Pool — Bohemian (Boho) Design System
   =================================================== */

:root {
  --terra: #C27245;
  --terra-light: #D4956E;
  --terra-dark: #A05A30;
  --sage: #7A9A7E;
  --sage-light: #9AB89E;
  --sage-dark: #5C7B60;
  --accent: #D4A98C;
  --boho-dark: #3D2B1F;
  --boho-cream: #FAF0E4;
  --boho-light: #FDF6EE;
  --boho-muted: #B8A99A;
  --dusty-rose: #C9918B;
  --gold: #C6A96C;

  --pico-primary: var(--terra);
  --pico-primary-hover: var(--terra-dark);
  --pico-primary-focus: rgba(194, 114, 69, 0.2);
  --pico-background-color: var(--boho-light);
  --pico-color: var(--boho-dark);
  --pico-border-radius: 0.5rem;
  --pico-font-family: "Nunito", sans-serif;
}

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", serif;
  color: var(--boho-dark);
  line-height: 1.2;
}

body {
  font-family: "Nunito", sans-serif;
  color: var(--boho-dark);
  background-color: var(--boho-light);
  line-height: 1.7;
}

/* ---- Logo Mark ---- */

.boho-logo {
  font-size: 1.75rem;
  color: var(--terra);
  line-height: 1;
}

/* ---- Navigation ---- */

.site-header {
  backdrop-filter: blur(8px);
  background-color: rgba(250, 240, 228, 0.92);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--boho-dark);
  border-radius: 2rem;
  transition: color 0.25s, background-color 0.25s;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--terra);
  background-color: rgba(194, 114, 69, 0.08);
}

.nav-link.active {
  color: var(--terra);
  background-color: rgba(194, 114, 69, 0.12);
}

.nav-cta {
  margin-left: 0.5rem;
}

/* ---- Main CTA Button ---- */

.main-cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--terra), var(--terra-dark));
  border: none;
  border-radius: 3rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
  box-shadow: 0 4px 14px rgba(194, 114, 69, 0.3);
}

.main-cta:hover,
.main-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(194, 114, 69, 0.4);
  color: #fff;
  background: linear-gradient(135deg, var(--terra-light), var(--terra));
}

.cta-outline {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--terra);
  background: transparent;
  border: 2px solid var(--terra);
  border-radius: 3rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s, color 0.3s;
}

.cta-outline:hover,
.cta-outline:focus-visible {
  background: var(--terra);
  color: #fff;
  transform: translateY(-2px);
}

/* ---- Hero Section ---- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(122, 154, 126, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(194, 114, 69, 0.1) 0%, transparent 60%),
    linear-gradient(170deg, var(--boho-cream) 0%, var(--boho-light) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -40px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 2px dashed var(--boho-muted);
  opacity: 0.25;
  animation: spin-slow 60s linear infinite;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 2px dashed var(--sage-light);
  opacity: 0.2;
  animation: spin-slow 45s linear infinite reverse;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

.hero .tagline {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--terra);
  margin-bottom: 2.5rem;
}

/* ---- Boho Decorative Elements ---- */

.boho-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--boho-muted),
    var(--terra),
    var(--boho-muted),
    transparent
  );
  border: none;
}

.boho-ornament {
  display: inline-block;
  font-size: 1.5rem;
  color: var(--terra);
  letter-spacing: 0.5rem;
  opacity: 0.6;
}

.boho-section {
  position: relative;
  padding: 5rem 1.5rem;
}

.boho-section:nth-child(even) {
  background-color: var(--boho-cream);
}

/* ---- Service Cards ---- */

.service-card {
  position: relative;
  padding: 2rem;
  background: white;
  border: 1px solid rgba(184, 169, 154, 0.3);
  border-radius: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(61, 43, 31, 0.08);
}

.service-card .service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(194, 114, 69, 0.12), rgba(122, 154, 126, 0.12));
  border-radius: 50%;
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--boho-muted);
  line-height: 1.6;
}

/* ---- Feature / Value Prop Blocks ---- */

.value-block {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.value-block .value-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.value-block h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.value-block p {
  font-size: 0.9rem;
  color: var(--boho-muted);
}

/* ---- Contact Form ---- */

.boho-form input,
.boho-form select,
.boho-form textarea {
  background-color: white;
  border: 1px solid var(--boho-muted);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font-family: "Nunito", sans-serif;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.boho-form input:focus,
.boho-form select:focus,
.boho-form textarea:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(194, 114, 69, 0.15);
  outline: none;
}

.boho-form label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--boho-dark);
}

/* ---- About Page ---- */

.about-highlight {
  position: relative;
  padding: 2.5rem;
  background:
    linear-gradient(135deg, rgba(194, 114, 69, 0.06), rgba(122, 154, 126, 0.06));
  border-left: 4px solid var(--terra);
  border-radius: 0 1rem 1rem 0;
}

/* ---- 404 Page ---- */

.four-oh-four {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 4rem 1.5rem;
}

.four-oh-four h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--terra);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Floating leaf animation for 404 */
.leaf {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0;
  animation: leaf-fall linear infinite;
}

@keyframes leaf-fall {
  0% { opacity: 0; transform: translateY(-10vh) rotate(0deg); }
  10% { opacity: 0.7; }
  90% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(80vh) rotate(360deg); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- Hamburger Menu ---- */

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--boho-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* ---- Mobile Navigation ---- */

@media (max-width: 767px) {
  .primary-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--boho-cream);
    padding: 5rem 2rem 2rem;
    box-shadow: -8px 0 32px rgba(61, 43, 31, 0.15);
    transition: right 0.35s ease;
    z-index: 100;
    overflow-y: auto;
  }

  .primary-nav.is-open {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-link {
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    border-radius: 0.75rem;
  }

  .nav-cta-wrap {
    margin-top: 1rem;
  }

  .nav-cta {
    margin-left: 0;
    text-align: center;
    width: 100%;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(61, 43, 31, 0.4);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .mobile-overlay.is-visible {
    opacity: 1;
    pointer-events: all;
  }
}

@media (min-width: 768px) {
  .mobile-overlay {
    display: none !important;
  }
}

/* ---- Page Transition Fade-in ---- */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fade-up 0.6s ease-out both;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ---- Utility ---- */

.text-terra { color: var(--terra); }
.text-sage { color: var(--sage); }
.bg-sage-soft { background-color: rgba(122, 154, 126, 0.08); }
