/* ============================================================
   RestAssured — Global Interactions Stylesheet
   Priority Group 1: CSS-only hover, focus, active, form states
   No GSAP dependency — pure CSS transitions
   ============================================================ */

/* --- BRAND COLOR SYSTEM (new palette) --- */
:root {
  --color-green: #7AB53A;
  --color-gray: #5F6B7A;
  --color-forest: #5F6B7A;
  --color-cream: #F7F4F0;
  --color-white: #FDFCFA;
  --color-green-dark: #5C8F28;
  --color-green-light: #A8D060;
  --color-forest-light: #5C8F28;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-widest: 0.15em;

  --shadow-sm: 0 1px 3px rgba(95, 107, 122, 0.06);
  --shadow-md: 0 4px 20px rgba(95, 107, 122, 0.08);
  --shadow-lg: 0 8px 40px rgba(95, 107, 122, 0.12);
  --shadow-xl: 0 12px 48px rgba(95, 107, 122, 0.16);
}


/* ============================================================
   1. PRIMARY CTA BUTTONS
   Hover: translateY(-2px), shadow increase, BG → #5C8F28
   Active: translateY(0), shadow reduces
   ============================================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-green);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 100px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(122, 181, 58, 0.25);
  transition: transform 150ms ease-out,
              box-shadow 150ms ease-out,
              background-color 150ms ease-out;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--color-green-dark);
  box-shadow: 0 6px 24px rgba(122, 181, 58, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 8px rgba(122, 181, 58, 0.2);
  transition-duration: 80ms;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-forest);
  outline-offset: 3px;
}


/* ============================================================
   2. SECONDARY / OUTLINE BUTTONS
   ============================================================ */

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--color-forest);
  padding: 0.9rem 1.8rem;
  border: 2px solid var(--color-green);
  border-radius: 100px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 150ms ease-out,
              box-shadow 150ms ease-out,
              background-color 200ms ease-out,
              color 200ms ease-out,
              border-color 200ms ease-out;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--color-green);
  color: white;
  border-color: var(--color-green);
  box-shadow: 0 4px 16px rgba(122, 181, 58, 0.2);
}

.btn-secondary:active {
  transform: translateY(0);
  transition-duration: 80ms;
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--color-forest);
  outline-offset: 3px;
}

/* Secondary on dark backgrounds (hero, CTA bands) */
.hero .btn-secondary,
.cta-band .btn-secondary,
.cta-band .btn-outline {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.hero .btn-secondary:hover,
.cta-band .btn-secondary:hover,
.cta-band .btn-outline:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: white;
  color: white;
}


/* ============================================================
   3. PLAN CARD INTERACTIONS
   Hover: translateY(-4px), shadow deepen, border → Brand Green
   Featured: persistent elevated state, Deep Forest border
   ============================================================ */

.plan-card {
  background: var(--color-white);
  border: 2px solid rgba(95, 107, 122, 0.12);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 250ms ease-out,
              box-shadow 250ms ease-out,
              border-color 250ms ease-out;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-green);
}

.plan-card.featured {
  border-color: var(--color-forest);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.plan-card.featured:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-forest);
}

.plan-card.featured::after {
  content: 'Recommended';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-forest);
  color: white;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  white-space: nowrap;
}


/* ============================================================
   4. SERVICE CARD INTERACTIONS
   ============================================================ */

.service-card {
  background: var(--color-white);
  border: 1px solid rgba(95, 107, 122, 0.1);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 250ms ease-out,
              box-shadow 250ms ease-out;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-green), var(--color-green-light));
  opacity: 0;
  transition: opacity 250ms ease-out;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  opacity: 1;
}


/* ============================================================
   5. NAV LINK INTERACTIONS
   ============================================================ */

.nav-links a {
  text-decoration: none;
  color: var(--color-gray);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.5rem 0;
  position: relative;
  transition: color 200ms ease-out;
}

/* Slide-in underline from left */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-green);
  transition: width 250ms ease-out;
}

.nav-links a:hover {
  color: var(--color-green);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:active {
  color: var(--color-green-dark);
}

/* Active page: persistent green underline + heavier weight */
.nav-links a.active {
  color: var(--color-green);
  font-weight: 600;
}
.nav-links a.active::after {
  width: 100%;
  background: var(--color-green);
}


/* ============================================================
   6. STICKY NAV STATE (CSS transition — JS toggles class)
   transparent → cream with backdrop blur, green border-bottom
   ============================================================ */

header {
  position: sticky;
  width: 100%;
  top: 0;
  z-index: 9999;
  background: rgba(253, 252, 250, 0.96);
  border-bottom: 1px solid transparent;
  transition: background-color 300ms ease,
              border-color 300ms ease,
              box-shadow 300ms ease,
              backdrop-filter 300ms ease;
}

header.scrolled {
  background: rgba(253, 252, 250, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--color-green);
  box-shadow: var(--shadow-sm);
}


/* ============================================================
   7. GENERAL LINK STYLES
   ============================================================ */

a {
  color: var(--color-forest);
  text-decoration-color: rgba(122, 181, 58, 0.4);
  text-underline-offset: 3px;
  transition: color 200ms ease-out,
              text-decoration-color 200ms ease-out;
}

a:hover {
  color: var(--color-green);
  text-decoration-color: var(--color-green);
}

/* Reset link styles for buttons and nav */
.btn-primary,
.btn-secondary,
.btn-outline,
.nav-links a,
.footer-nav a,
.phone-cta,
.logo-text {
  text-decoration: none;
}


/* ============================================================
   8. FORM INTERACTIONS
   Focus: soft green glow
   Valid: right-side green indicator
   Error: warm red, never harsh
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-forest);
  background: var(--color-white);
  border: 1.5px solid rgba(95, 107, 122, 0.25);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  width: 100%;
  transition: border-color 200ms ease-out,
              box-shadow 200ms ease-out,
              background-color 200ms ease-out;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-green);
  box-shadow: 0 0 0 4px rgba(122, 181, 58, 0.2);
}

/* Valid state */
input:valid:not(:placeholder-shown):not(:focus) {
  border-color: rgba(122, 181, 58, 0.5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238BC34A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* Error state — warm red, never harsh */
input:invalid:not(:placeholder-shown):not(:focus),
input.error {
  border-color: #C07A6B;
  box-shadow: 0 0 0 3px rgba(192, 122, 107, 0.15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C07A6B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* Placeholder styling */
input::placeholder,
textarea::placeholder {
  color: rgba(95, 107, 122, 0.45);
  font-weight: 300;
}

/* Labels */
label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-forest);
  margin-bottom: 0.4rem;
}


/* ============================================================
   9. FOOTER LINK INTERACTIONS
   ============================================================ */

.footer-nav a {
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--text-sm);
  transition: color 200ms ease-out;
}

.footer-nav a:hover {
  color: var(--color-green-light);
}

.footer-phone-link {
  color: var(--color-green-light);
  text-decoration: none;
  font-weight: 700;
  transition: color 200ms ease-out;
}

.footer-phone-link:hover {
  color: var(--color-green);
}


/* ============================================================
   10. MOBILE TOUCH FEEDBACK
   ============================================================ */

@media (hover: none) and (pointer: coarse) {
  .btn-primary:active {
    transform: scale(0.97);
    transition-duration: 80ms;
  }

  .btn-secondary:active {
    transform: scale(0.97);
    transition-duration: 80ms;
  }

  .plan-card:active {
    transform: scale(0.985);
    transition-duration: 120ms;
  }

  .service-card:active {
    transform: scale(0.985);
    transition-duration: 120ms;
  }

  .nav-links a:active {
    opacity: 0.7;
    transition-duration: 80ms;
  }

  /* Disable hover-dependent transforms on touch */
  .plan-card:hover,
  .service-card:hover {
    transform: none;
  }

  .plan-card.featured:hover {
    transform: none;
  }
}


/* ============================================================
   11. ACCESSIBILITY — FOCUS VISIBLE
   ============================================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 3px;
}

/* Remove outline for mouse/touch users */
:focus:not(:focus-visible) {
  outline: none;
}


/* ============================================================
   12. REDUCED MOTION OVERRIDES
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn-primary:hover,
  .btn-primary:active,
  .btn-secondary:hover,
  .btn-secondary:active {
    transform: none;
  }

  .plan-card:hover,
  .plan-card.featured:hover,
  .service-card:hover {
    transform: none;
  }

  .fade-up {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ============================================================
   13. SELECTION / HIGHLIGHT STYLING
   ============================================================ */

::selection {
  background: rgba(122, 181, 58, 0.2);
  color: var(--color-forest);
}

::-moz-selection {
  background: rgba(122, 181, 58, 0.2);
  color: var(--color-forest);
}


/* ============================================================
   14. EYEBROW / LABEL PATTERN
   ============================================================ */

.section-label,
.hero-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-green);
}


/* ============================================================
   15. SMOOTH SCROLL ANCHOR OFFSET
   (accounts for fixed header height)
   ============================================================ */

[id] {
  scroll-margin-top: 140px;
}
