/* ============================================
   Lighthouse Lodge — Styles
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --navy: #1A2744;
  --navy-light: #263B5E;
  --slate: #4A5568;
  --slate-light: #718096;
  --warm-white: #FAF8F5;
  --cream: #F5F0EB;
  --gold: #C8963E;
  --gold-light: #D4A44C;
  --gold-soft: #E8D5B0;
  --red-accent: #B8544F;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-muted: #6b7280;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing */
  --section-padding: clamp(4rem, 8vw, 7rem);
  --container-max: 1100px;
  --container-padding: clamp(1.25rem, 4vw, 2rem);

  /* Easing */
  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);

  /* Borders */
  --border-hairline: 1px;
  --border-subtle: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

@media only screen and (min-device-pixel-ratio: 2),
  only screen and (min-resolution: 192dpi) {
  :root {
    --border-hairline: 0.5px;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: var(--font-weight-normal);
  color: var(--text-primary);
  background-color: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  text-wrap: balance;
  line-height: 1.2;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Intro Animation --- */
.intro-animate {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 600ms var(--ease-out-quart) forwards;
}

.intro-animate:nth-child(1) { animation-delay: 0ms; }
.intro-animate:nth-child(2) { animation-delay: 100ms; }
.intro-animate:nth-child(3) { animation-delay: 200ms; }
.intro-animate:nth-child(4) { animation-delay: 300ms; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* --- Skip intro if already seen --- */
.skip-intro .intro-animate {
  opacity: 1;
  transform: none;
  animation: none;
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border-hairline) solid rgba(0, 0, 0, 0.08);
  transition: background-color 200ms ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: var(--font-weight-bold);
  color: var(--navy);
  letter-spacing: -0.01em;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  transition: color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    color: var(--navy);
  }
}

.nav-links .btn-nav {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: var(--gold);
  color: white;
  border-radius: 6px;
  font-weight: var(--font-weight-semibold);
  font-size: 0.875rem;
  transition: background-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links .btn-nav:hover {
    background: var(--gold-light);
  }
}

.nav-links .btn-nav:active {
  transform: scale(0.97);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform 200ms var(--ease-out-cubic), opacity 150ms ease;
}

.nav-toggle span + span {
  margin-top: 5px;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    gap: 0;
    background: var(--warm-white);
    padding: 1rem 0;
    transform: translateX(100%);
    transition: transform 300ms var(--ease-out-quart);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 1rem var(--container-padding);
    font-size: 1.1rem;
  }

  .nav-links .btn-nav {
    margin: 1rem var(--container-padding);
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  @media (prefers-reduced-motion: reduce) {
    .nav-links {
      transition: none;
    }
  }
}

/* --- Hero Section --- */
.hero {
  padding-top: calc(64px + var(--section-padding));
  padding-bottom: var(--section-padding);
  background: linear-gradient(
    175deg,
    var(--navy) 0%,
    var(--navy-light) 45%,
    #34547A 100%
  );
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--warm-white), transparent);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: rgba(200, 150, 62, 0.15);
  border: var(--border-hairline) solid rgba(200, 150, 62, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
  color: var(--gold-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  color: white;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  font-weight: var(--font-weight-bold);
}

.hero h1 em {
  font-style: normal;
  color: var(--gold-light);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-lighthouse {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-lighthouse img {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-bottom: 5rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-lighthouse {
    order: -1;
  }

  .hero-lighthouse img {
    max-width: 360px;
    opacity: 0.9;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.75rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: var(--font-weight-semibold);
  border: none;
  cursor: pointer;
  transition: background-color 150ms ease, box-shadow 150ms ease;
  min-height: 44px;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .btn:active {
    transform: none;
  }
}

.btn-primary {
  background: var(--gold);
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(200, 150, 62, 0.25);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--gold-light);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(200, 150, 62, 0.3);
  }
}

.btn-outline {
  background: transparent;
  color: white;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.3);
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.5);
  }
}

.btn-dark {
  background: var(--navy);
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

@media (hover: hover) and (pointer: fine) {
  .btn-dark:hover {
    background: var(--navy-light);
  }
}

/* --- Section Shared --- */
.section {
  padding: var(--section-padding) 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.section-heading {
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  color: var(--navy);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtext {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* --- Mission Section --- */
.mission {
  background: var(--warm-white);
}

.mission-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.mission-content .section-label {
  justify-content: center;
}

.mission-content .section-label::before {
  display: none;
}

.mission-text {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 1.5rem;
}

.mission-text strong {
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

/* --- What We Do --- */
.services {
  background: var(--cream);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--border-subtle), 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover {
    box-shadow: var(--border-subtle), 0 4px 16px rgba(0, 0, 0, 0.08);
  }
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(200, 150, 62, 0.1), rgba(200, 150, 62, 0.05));
  color: var(--gold);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- True Story / Testimonial --- */
.story {
  background: var(--warm-white);
}

.story-card {
  max-width: 800px;
  margin: 3rem auto 0;
  background: white;
  border-radius: 16px;
  padding: clamp(2rem, 4vw, 3.5rem);
  box-shadow: var(--border-subtle), 0 4px 24px rgba(0, 0, 0, 0.06);
  position: relative;
}

.story-card::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 6rem;
  color: var(--gold-soft);
  position: absolute;
  top: 0.25rem;
  left: 1.5rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.story-quote {
  font-size: clamp(1.05rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.story-attribution {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: var(--border-hairline) solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.story-attribution-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.story-attribution p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.story-attribution strong {
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}

.story-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Recovery Support Stats --- */
.stats {
  background: var(--navy);
  color: white;
}

.stats-inner {
  text-align: center;
}

.stats-inner .section-label {
  justify-content: center;
  color: var(--gold-light);
}

.stats-inner .section-label::before {
  background: var(--gold-light);
}

.stats-inner .section-heading {
  color: white;
}

.stats-inner .section-subtext {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: var(--font-weight-bold);
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.375rem;
}

.stat-label {
  font-size: 0.925rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* --- Founder Section --- */
.founder {
  background: var(--cream);
}

.founder-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.founder-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px white, 0 4px 16px rgba(0, 0, 0, 0.1);
}

.founder-info .section-label {
  margin-bottom: 0.5rem;
}

.founder-name {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.founder-title {
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: var(--font-weight-medium);
  margin-bottom: 1rem;
}

.founder-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 600px) {
  .founder-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .founder-photo {
    margin: 0 auto;
    width: 140px;
    height: 140px;
  }

  .founder-info .section-label {
    justify-content: center;
  }

  .founder-info .section-label::before {
    display: none;
  }
}

/* --- Get Involved / CTA Section --- */
.cta-section {
  background: var(--warm-white);
}

.cta-card {
  background: linear-gradient(
    135deg,
    var(--navy) 0%,
    var(--navy-light) 100%
  );
  border-radius: 20px;
  padding: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 150, 62, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-card .section-heading {
  color: white;
  margin-bottom: 1rem;
}

.cta-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Contact Section --- */
.contact {
  background: var(--cream);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2.5rem;
}

.contact-info h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.contact-info h3:first-child {
  margin-top: 0;
}

.contact-info p,
.contact-info a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-info a {
  color: var(--gold);
  border-bottom: var(--border-hairline) solid var(--gold-soft);
  transition: border-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .contact-info a:hover {
    border-color: var(--gold);
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: var(--border-hairline) solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  background: white;
  color: var(--text-primary);
  transition: border-color 150ms ease, box-shadow 150ms ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 150, 62, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Footer --- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.5);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  color: white;
}

.footer-text {
  font-size: 0.825rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: white;
  }
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
