@tailwind base;
@tailwind components;
@tailwind utilities;

/* Definition of the design system. All colors, gradients, fonts, etc should be defined here. 
All colors MUST be HSL.
*/

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;

    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;

    --radius: 0.5rem;

    --sidebar-background: 0 0% 98%;

    --sidebar-foreground: 240 5.3% 26.1%;

    --sidebar-primary: 240 5.9% 10%;

    --sidebar-primary-foreground: 0 0% 98%;

    --sidebar-accent: 240 4.8% 95%;

    --sidebar-accent-foreground: 240 5.9% 10%;

    --sidebar-border: 220 13% 91%;

    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
  }

  /* Global keyboard focus visibility for interactive elements */
  a:focus-visible,
  button:focus-visible,
  [role="menuitem"]:focus-visible,
  [role="tab"]:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  summary:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
    border-radius: 4px;
  }
}

/* Landscaping Style Picker page tokens */
.landscaping-page {
  --ls-primary: #1b4332;
  --ls-accent: #d2691e;
  --ls-secondary: #52796f;
  --ls-bg-alt: #f4f6f4;
  --ls-text: #1a1a1a;
  --ls-muted: #6b7280;
  --ls-gold: #fbbf24;
  --ls-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --ls-radius: 12px;
}

.landscaping-page h1,
.landscaping-page h2,
.landscaping-page h3,
.landscaping-page h4 {
  font-family: "Inter", sans-serif;
}

.landscaping-page h1 {
  font-family: "Playfair Display", serif;
}

.landscaping-page body,
.landscaping-page p,
.landscaping-page span,
.landscaping-page a,
.landscaping-page button,
.landscaping-page li {
  font-family: "Inter", sans-serif;
}

/* ========================================
   Homepage Reusable Component Classes
   ======================================== */

@layer components {
  /* Hero gradient overlay — desktop (left-to-right navy fade) */
  .hero-overlay-desktop {
    background: linear-gradient(
      90deg,
      rgba(8, 29, 51, 0.98) 0%,
      rgba(8, 29, 51, 0.95) 25%,
      rgba(8, 29, 51, 0.8) 38%,
      rgba(8, 29, 51, 0.45) 48%,
      rgba(8, 29, 51, 0.12) 58%,
      rgba(8, 29, 51, 0) 70%
    );
  }

  /* Hero gradient overlay — mobile (wider navy for readability) */
  .hero-overlay-mobile {
    background: linear-gradient(
      90deg,
      rgba(8, 29, 51, 0.98) 0%,
      rgba(8, 29, 51, 0.95) 40%,
      rgba(8, 29, 51, 0.85) 60%,
      rgba(8, 29, 51, 0.6) 80%,
      rgba(8, 29, 51, 0.45) 100%
    );
  }

  /* Hero benefit icon container — translucent white circle */
  .hero-benefit-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
  }

  /* Primary blue CTA button shadow + hover */
  .btn-blue-shadow {
    box-shadow: 0 4px 16px rgba(29, 78, 216, 0.4);
    transition: box-shadow 0.3s ease;
  }
  .btn-blue-shadow:hover {
    box-shadow: 0 6px 24px rgba(29, 78, 216, 0.5);
  }

  /* White CTA button shadow + hover */
  .btn-white-shadow {
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
    transition: box-shadow 0.3s ease;
  }
  .btn-white-shadow:hover {
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.35);
  }

  /* Final CTA section — left image fade (nursery) */
  .cta-image-left {
    mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  /* Final CTA section — right image fade (landscaping) */
  .cta-image-right {
    mask-image: linear-gradient(
      to left,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-image: linear-gradient(
      to left,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  /* FAQ widget — responsive height to avoid excessive empty space on mobile */
  .faq-widget-wrapper {
    height: 1100px;
  }
  @media (max-width: 1024px) {
    .faq-widget-wrapper {
      height: 1400px;
    }
  }
  @media (max-width: 768px) {
    .faq-widget-wrapper {
      height: 1800px;
    }
  }
  @media (max-width: 480px) {
    .faq-widget-wrapper {
      height: 2200px;
    }
  }
}
