/* Oh, Hello Alzheimer's – purple-based theme, warm author/speaker feel */

:root {
  --color-bg: #f8f6fa;
  --color-bg-alt: #efeaf5;
  --color-text: #2c2c2c;
  --color-text-muted: #5a5460;
  --color-accent: #5c4a7a;
  --color-accent-hover: #44365c;
  --color-border: #e2dceb;
  --font-heading: "Cormorant Garamond", "Georgia", serif;
  --font-body: "Lato", "Helvetica Neue", sans-serif;
  --max-width: 960px;
  --space: 1.5rem;
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  max-width: 100vw;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space); }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-accent);
  transition: color 0.2s ease, background 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration-color: var(--color-accent-hover);
  background: rgba(92, 74, 122, 0.12);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

main {
  overflow-x: hidden;
  max-width: 100%;
}

/* Layout */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
  width: 100%;
  box-sizing: border-box;
}

/* Header / Nav */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space) 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space);
}

/* Hamburger toggle - hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  cursor: pointer;
  color: var(--color-text);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.menu-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header.menu-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-header.menu-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.site-title a {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}

.site-title a:hover {
  color: var(--color-accent);
  text-decoration: none;
  background: transparent;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-list a {
  color: var(--color-text-muted);
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--color-accent);
  background: transparent;
}

/* Mobile menu: collapse nav, show hamburger */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }

  .site-header.menu-open .main-nav {
    max-height: 320px;
    opacity: 1;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: var(--space);
  }

  .nav-list li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list a {
    display: block;
    padding: 0.75rem 0;
  }
}

/* Hero */
.hero {
  padding: 3rem 0 4rem;
  text-align: center;
}

.hero h1 {
  margin-bottom: 0.5rem;
}

.hero .tagline {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.hero .intro {
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
}

.hero .intro-justify {
  text-align: justify;
}

.hero .intro-quote p {
  margin-bottom: 0.75rem;
}

.hero .intro-quote p:last-child {
  margin-bottom: 0;
}

.hero .cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #fff !important;
  border-radius: var(--radius);
  font-weight: 600;
  margin-top: 0.5rem;
}

.hero .cta:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
  border-bottom-color: transparent;
}

/* Hero video (Lisa and Peter's story) */
.hero-video {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  text-align: center;
}

.hero-video .video-caption {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}

.story-video {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  background: #000;
  object-fit: contain;
}

.story-video-wrap {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}

.story-video-wrap .story-video {
  display: block;
  max-width: 100%;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* About page photo */
.about-photo {
  margin: 0 0 2rem;
  max-width: 100%;
}

.about-photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* Advocacy gallery */
.advocacy-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 2rem;
}

.advocacy-gallery .lightbox-link,
.appearances-gallery .lightbox-link {
  text-decoration: none;
  border: none;
}

.advocacy-gallery .lightbox-link:hover,
.appearances-gallery .lightbox-link:hover {
  background: transparent;
}

.advocacy-gallery a {
  display: block;
  text-decoration: none;
}

.advocacy-gallery a:hover img {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.advocacy-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease;
}

/* Appearances page gallery */
.appearances-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 2rem;
}

.appearances-gallery a {
  display: block;
  text-decoration: none;
}

.appearances-gallery a:hover img {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.appearances-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Book cover in card (home) and books page */
.card-with-cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  max-width: 42rem;
}

.card-with-cover .book-cover-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

@media (max-width: 480px) {
  .card-with-cover {
    grid-template-columns: 1fr;
  }
  .card-with-cover .book-cover-img {
    width: 100%;
    margin: 0 auto;
  }
}

.book-primary-cover {
  margin-bottom: 1rem;
  width: 100%;
}

.book-primary-cover img {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* Tools page */
.tools-cards {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.tools-resources {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.tools-resources li {
  margin-bottom: 0.5rem;
}

.tools-resources a {
  color: var(--color-text-muted);
}

.tools-resources a:hover {
  color: var(--color-accent);
}

.tools-media {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* Four A's of Self Care page */
.four-as h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.four-as h2:first-child {
  margin-top: 0;
}

.four-as-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.four-as-list {
  margin: 1rem 0 2rem;
  padding-left: 1.5rem;
  color: var(--color-text-muted);
}

.four-as-list li {
  margin-bottom: 1rem;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section:nth-child(even) {
  background: var(--color-bg-alt);
}

.section-heading {
  text-align: center;
  margin-bottom: 2rem;
}

/* Cards / Blocks */
.card-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.card-featured {
  max-width: 36rem;
  margin: 0 auto;
}

.other-book {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.other-book a {
  font-weight: 600;
}

.other-book-intro {
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.book-secondary {
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.book-secondary-cover {
  margin-bottom: 1rem;
  width: 100%;
}

.book-secondary-cover img {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.book-secondary h2 {
  margin-bottom: 0.75rem;
}

.card h3 {
  margin-top: 0;
}

/* Only actual buttons (hero CTA, card outline button) get no underline */
.hero .cta,
.card .btn,
.btn-primary {
  text-decoration: none !important;
  font-weight: 600;
}

.hero .cta:hover,
.card .btn:hover {
  text-decoration: none !important;
}

.card .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  font-weight: 600;
}

.card .btn:hover {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

/* Content page (about, books) */
.page-header {
  padding: 2rem 0 1rem;
  text-align: center;
}

.content-block {
  padding: 2rem 0 4rem;
}

.content-block .wrap {
  max-width: 720px;
}

.content-block blockquote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--color-accent);
  font-style: italic;
  color: var(--color-text-muted);
}

/* Contact form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}

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

.form-actions {
  margin-top: 1.5rem;
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.form-message-success {
  background: rgba(72, 120, 72, 0.15);
  color: #2d5a2d;
  border: 1px solid rgba(72, 120, 72, 0.35);
}

.form-message-error {
  background: rgba(160, 60, 60, 0.12);
  color: #721c24;
  border: 1px solid rgba(160, 60, 60, 0.3);
}

.honeypot-group {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--color-text-muted);
}

.site-footer a:hover {
  color: var(--color-accent);
}

.footer-social {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.footer-social-sep {
  margin: 0 0.35rem;
  opacity: 0.7;
}

/* Media list (About page) */
.media-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.media-list li {
  margin-bottom: 0.75rem;
}

.media-list a {
  color: var(--color-text-muted);
}

.media-list a:hover {
  color: var(--color-accent);
}

/* Service list (Consult page) */
.service-list {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.service-list .card {
  margin: 0;
}

.content-block .intro {
  font-size: 1.05rem;
}

/* Utilities */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
