/* src/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&family=Inter:wght@400;700&display=swap');

/* 1. A Modern CSS Reset (No changes) */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; }
html:focus-within { scroll-behavior: smooth; }
body { min-height: 100vh; text-rendering: optimizeSpeed; line-height: 1.5; }
a:not([class]) { text-decoration-skip-ink: auto; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; }

/* 2. Lunari Design System Foundation (UPDATED) */
:root {
  /*
    ========================================
    C-SUITE APPROVED: LUNARI DESIGN TOKENS V2.0
    SOURCE: THE 'AESTHETIC PIVOT'
    ========================================
  */

  /* CORE PALETTE */
  --color-background: #ECE4DA;         /* Primary off-white */
  --color-surface: #F6F3EC;            /* Secondary lighter off-white */
  --color-text-primary: #36302A;       /* Darkest brown */
  --color-text-secondary: #574C3F;     /* Mid brown */
  --color-accent: #B9A590;             /* Muted accent */
  --color-border: #DCD3C8;             /* Subtle border derived from background */

  /* FONT & TYPOGRAPHY */
  --font-family-serif: 'Lora', 'Georgia', serif;
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Sizing & Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 1rem;
  --spacing-4: 2rem;
  --spacing-5: 4rem;
  --spacing-6: 6rem; /* Added larger spacing */

  /* Effects */
  --border-radius: 12px; /* Softened radius */
  --transition-fast: 200ms ease-in-out;
}

/* 3. Global Styles (Minor Additions) */
body {
  background-color: var(--color-background); /* CHANGED */
  color: var(--color-text-primary);        /* CHANGED */
  font-family: var(--font-family-sans);
}

h1, h2, h3 {
  font-family: var(--font-family-serif);
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: var(--spacing-3);
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-3);
  max-width: 65ch; /* Improves readability */
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* NEW CONTAINER CLASS */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--spacing-3) var(--spacing-4);
}

/* 4. Component Styles */

/* === HERO SECTION (REFACTORED FOR AESTHETIC PIVOT) === */
.hero {
  text-align: center;
  padding: var(--spacing-6) var(--spacing-4); /* Generous vertical spacing */
}

.hero__headline {
  font-family: var(--font-family-serif);
  font-size: clamp(4rem, 3vw, 3rem); /* Larger, more impactful typography */
  line-height: 1.1;
  color: var(--color-text-primary);
  max-width: 800px; /* Constrain headline width for readability */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-3);
}

.hero__subheadline {
  font-family: var(--font-family-sans);
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-4);
}

.hero__cta {
  display: inline-block;
  background-color: var(--color-text-primary); /* Dark button */
  color: var(--color-background); /* Light text */
  font-weight: 700;
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: 50px; /* Pill-shaped button */
  transition: background-color var(--transition-fast);
  border: 1px solid transparent; /* for hover effect */
}

.hero__cta:hover {
  background-color: var(--color-background);
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
}

/* === HEADER (REFINED FOR FINAL PIVOT) === */
.site-header {
  padding: var(--spacing-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.site-header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--spacing-4);
  display: grid; /* CHANGED */
  grid-template-columns: 1fr auto 1fr; /* CHANGED */
  align-items: center;
  gap: var(--spacing-4);
}

.site-header__nav {
  justify-self: start; /* Align to the left of its grid area */
}

.site-header__logo {
  font-family: var(--font-family-serif); /* CHANGED */
  font-size: 2rem; /* CHANGED */
  font-weight: 400; /* Regular weight for serif */
  color: var(--color-text-primary);
  text-decoration: none;
  justify-self: center; /* Align to the center of its grid area */
}
.site-header__logo:hover {
  color: var(--color-text-primary);
}

.site-header__nav ul {
  display: flex;
  gap: var(--spacing-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__nav a {
  position: relative;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding-bottom: var(--spacing-1);
}

.site-header__nav a:hover {
  color: var(--color-text-primary);
}

.site-header__nav-link--active {
  color: var(--color-text-primary);
  font-weight: 700;
}
.site-header__nav-link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-text-primary);
}

.site-header__socials {
  display: flex;
  gap: var(--spacing-3);
  justify-self: end; /* Align to the right of its grid area */
}

.site-header__socials a {
  color: var(--color-text-secondary);
}

.site-header__socials a:hover {
  color: var(--color-text-primary);
}

/* === WAITLIST FORM (REFACTORED FOR AESTHETIC PIVOT) === */
.waitlist-form {
  padding: var(--spacing-6) 0;
  text-align: center;
}

.waitlist-form__title {
  font-family: var(--font-family-serif);
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin-bottom: var(--spacing-3);
}

.waitlist-form__subtitle {
  color: var(--color-text-secondary);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-4);
}

.waitlist-form__form {
  display: flex;
  flex-direction: column; /* Mobile first stack */
  gap: var(--spacing-2);
  max-width: 500px;
  margin: 0 auto;
}

@media (min-width: 550px) {
  .waitlist-form__form {
    flex-direction: row; /* Desktop side-by-side */
  }
}

.waitlist-form__form input[type="email"] {
  flex-grow: 1;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px; /* Pill-shaped input */
  padding: var(--spacing-3);
  color: var(--color-text-primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.waitlist-form__form input[type="email"]::placeholder {
  color: var(--color-accent);
}

.waitlist-form__form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-text-secondary);
  box-shadow: 0 0 0 3px rgba(87, 76, 63, 0.2); /* Subtle focus ring */
}

.waitlist-form__form button {
  background-color: var(--color-text-primary);
  color: var(--color-background);
  font-weight: 700;
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: 50px; /* Pill-shaped button */
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.waitlist-form__form button:hover {
  background-color: var(--color-background);
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
}

/* Post Layout */
.post {
  padding: var(--spacing-4) 0;
}
.post__header {
  text-align: center;
  margin-bottom: var(--spacing-5);
}
.post__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}
.post__meta {
  color: var(--color-text-secondary);
}
.post__content {
  max-width: 75ch;
  margin: 0 auto;
}
.post__content h2 {
  font-size: 1.8rem;
  margin-top: var(--spacing-4);
}
.post__content a {
  text-decoration: underline;
}

/* === POST LIST (REFACTORED FOR AESTHETIC PIVOT) === */
.post-list {
  /* This class is added to the wrapping section */
  max-width: 75ch; /* Align with post content width */
  margin: 0 auto;
}

.post-list__item {
  /* Each item is now a card */
  background-color: var(--color-background);
  border-radius: var(--border-radius);
  padding: var(--spacing-4);
  margin-bottom: var(--spacing-4); /* Space between cards */
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.post-list__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.post-list__item h2 {
  margin-bottom: var(--spacing-2);
}

.post-list__item h2 a {
  text-decoration: none;
  color: var(--color-text-primary);
}

.post-list__item p {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-3);
}

.post-list__item time {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* App CTA Section */
.app-cta {
  text-align: center;
  padding: var(--spacing-5) 0;
}

.app-stores {
  display: flex;
  justify-content: center;
  gap: var(--spacing-3);
  margin-top: var(--spacing-3);
}

.app-store-button img {
  height: 50px;
  width: auto;
}

/* === SOCIAL PROOF (REFACTORED FOR AESTHETIC PIVOT) === */
.social-proof {
  /* This class is now the containing card */
  background-color: var(--color-background);
  border-color: var(--color-text-primary);
  border-radius: var(--border-radius);
  padding: var(--spacing-5) var(--spacing-4);
}

.social-proof h2 {
  text-align: center;
  font-family: var(--font-family-serif);
  font-size: 1.75rem;
  margin-bottom: var(--spacing-5); /* More space */
}

.testimonials {
  display: grid;
  grid-template-columns: 1fr; /* Mobile-first */
  gap: var(--spacing-5); /* More gap */
}

/* Activate two columns on larger screens */
@media (min-width: 768px) {
  .testimonials {
    grid-template-columns: 1fr 1fr;
  }
}

.testimonials figure {
  margin: 0;
}

.testimonials blockquote {
  margin: 0 0 var(--spacing-2) 0;
  font-family: var(--font-family-serif);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.4;
  border-left: 3px solid var(--color-accent);
  padding-left: var(--spacing-3);
  color: var(--color-text-primary);
}

.testimonials figcaption {
  color: var(--color-text-secondary);
  padding-left: calc(var(--spacing-3) + 3px); /* Align with blockquote text */
}

/* === APP SHOWCASE (REFACTORED FOR DYNAMIC SLIDER V1) === */
.app-showcase {
  padding: var(--spacing-6) 0;
  position: relative; /* Needed for positioning nav buttons */
}

.app-showcase__grid {
  /* No grid needed at the top level now */
}

.showcase-slider {
  position: relative;
  min-height: 500px; /* Give it a consistent height */
}

.showcase-slide {
  /* All slides are layered on top of each other */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr; /* Mobile: text over image */
  gap: var(--spacing-4);

  /* Animation */
  opacity: 0;
  transition: opacity 400ms ease-in-out;
}

@media (min-width: 900px) {
  .showcase-slide {
    grid-template-columns: 1fr 1fr; /* Desktop: side-by-side */
    align-items: center;
  }
}

.showcase-slide.is-active {
  opacity: 1;
}

.showcase-slide__text h3 {
  font-family: var(--font-family-serif);
  color: var(--color-text-primary);
  font-size: 2rem;
  margin-bottom: var(--spacing-3);
}

.showcase-slide__text p {
  max-width: 45ch;
}

.showcase-slide__image {
  display: flex;
  justify-content: center;
}

.showcase-slide__image img {
  max-width: 320px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
}

/* Slider Navigation */
.slider-nav {
  margin-top: var(--spacing-4);
  display: flex;
  justify-content: center; /* Center buttons */
  gap: var(--spacing-3);
}

@media (min-width: 900px) {
  .slider-nav {
    /* Position buttons over the text area on desktop */
    position: absolute;
    bottom: var(--spacing-4);
    left: calc( (100% - 1100px) / 2 + var(--spacing-4) ); /* Align with container */
    margin-top: 0;
    justify-content: flex-start;
  }
}

.slider-nav__button {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-nav__button:hover {
  background: var(--color-text-primary);
  color: var(--color-surface);
  border-color: var(--color-text-primary);
}


/* === AUTHORITY GRID (NEW) === */
.authority-grid {
  padding: var(--spacing-5) 0;
}

.authority-grid__title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: var(--spacing-4);
}

.authority-grid__layout {
  display: grid;
  grid-template-columns: 1fr; /* Mobile first: single column */
  gap: var(--spacing-4);
}

/* Tablet and larger: Activate the 2-column asymmetrical grid */
@media (min-width: 768px) {
  .authority-grid__layout {
    grid-template-columns: 1fr 1fr;
  }
}

/* === OBJECTION HANDLER (NEW) === */
.objection-handler {
  padding: var(--spacing-5) 0;
}

.objection-handler__card {
  /* Make this card feel more significant */
  padding: var(--spacing-4) var(--spacing-5);
}

.objection-handler__title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: var(--spacing-4);
}

.objection-handler__content {
  display: grid;
  grid-template-columns: 1fr; /* Mobile-first stack */
  gap: var(--spacing-4);
}

.objection-handler__divider {
  display: none; /* Hide decorative divider on mobile */
}

@media (min-width: 768px) {
  .objection-handler__content {
    grid-template-columns: 1fr auto 1fr; /* Problem | Divider | Solution */
    gap: var(--spacing-5);
  }

  .objection-handler__divider {
    display: block;
    width: 1px;
    background-color: var(--color-border);
    align-self: stretch; /* Make the divider line full height */
  }
}

.objection-handler__column {
  text-align: center;
}

.objection-handler__column h4 {
  font-family: var(--font-family-serif);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-2);
}

.objection-handler__column p {
  color: var(--color-text-primary); /* Make this text stronger than normal p tags */
  max-width: 100%; /* Override the global 'ch' limit for this specific layout */
  margin-bottom: 0;
}
/* =========================== */

/* === ANIMATIONS (NEW) === */

/* Define the starting state for our animated sections */
.fade-in-section {
  opacity: 0; /* RE-ENABLED */
  transform: translateY(30px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

/* Define the final, visible state */
.fade-in-section.is-visible {
opacity: 1;
transform: translateY(0);
}

/* Utility Class to hide honeypot */
.hidden {
  display: none;
}

/* === FOOTER (REFACTORED FOR AESTHETIC PIVOT) === */
.site-footer {
  background-color: var(--color-background);
  border-top: 4px solid var(--color-border);
  padding: var(--spacing-5) 0 var(--spacing-3) 0;
  margin-top: var(--spacing-6); /* Give space above the footer */
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile first */
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-4);
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr; /* Asymmetrical columns on desktop */
    gap: var(--spacing-5);
  }
}

.site-footer__brand h3 {
  font-family: var(--font-family-serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: var(--spacing-2);
}

.site-footer__brand p {
  font-size: 0.9rem;
  max-width: 45ch;
  color: var(--color-text-secondary);
}

.site-footer__contact h4 {
  font-family: var(--font-family-serif);
  font-size: 1.25rem;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-2);
}

.site-footer__contact a {
  color: var(--color-text-secondary);
  text-decoration: none;
}
.site-footer__contact a:hover {
  color: var(--color-text-primary);
}

.site-footer__legal {
  border-top: 1px solid var(--color-border);
  padding-top: var(--spacing-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.site-footer__legal p {
  margin: 0;
  font-size: inherit; /* Inherit small size */
}

.site-footer__legal a {
  color: var(--color-text-secondary);
  text-decoration: underline;
}
.site-footer__legal a:hover {
  color: var(--color-text-primary);
}
/* === LIVING QUESTIONS (NEW) === */
.living-questions {
  padding: var(--spacing-5) 0;
  text-align: center;
}

.living-questions__prompt {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-3);
  font-size: 2rem; /* Increased font size */
  font-weight: 700;      /* Made text bold */
}

.living-questions__question-container {
  min-height: 80px; /* Give it space so the layout doesn't jump */
  display: flex;
  justify-content: center;
  align-items: center;
}

.living-questions__question {
  font-family: var(--font-family-serif);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.3;
  color: var(--color-text-primary);
  max-width: 60ch;

  /* Animation Setup */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 400ms ease-in-out, transform 400ms ease-in-out;
}

.living-questions__question.is-hidden {
  opacity: 0;
  transform: translateY(10px);
}
/* === PAGINATION (NEW) === */
.pagination-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 75ch; /* Align with post list */
  margin: var(--spacing-5) auto; /* Give it space */
  padding: 0 var(--spacing-4);
}

.pagination-nav__link {
  display: inline-block;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-weight: 700;
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: 50px; /* Pill-shaped buttons */
  transition: all var(--transition-fast);
}

.pagination-nav__link:hover {
  background-color: var(--color-text-primary);
  color: var(--color-surface);
  border-color: var(--color-text-primary);
}
