/* ============================================================
   StepUp Landing Page — styles.css
   Canadian Gerontological Association's McMaster University Chapter
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');
@import url('https://fonts.cdnfonts.com/css/peace-sans');

/* ---------- Design Tokens ---------- */
:root {
  /* Colors — sampled from reference */
  --gold-bg: #ECBE72;
  --white: #FFFFFF;
  --pine-green: #345D4A;
  --champagne: #E0C283;
  --espresso: #381606;
  --warm-sand: #E3B999;

  /* Derived */
  --pine-green-hover: #2a4d3d;
  --gold-bg-light: #f0cb87;
  --cream: #FFF8ED;
  --cream-semi: rgba(255, 248, 237, 0.92);

  /* Typography */
  --font-display: 'Peace Sans', 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;

  /* Spacing */
  --nav-height: 72px;
  --section-padding: 80px 24px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.3s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--espresso);
  background: var(--gold-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* ---------- Skip Link (Accessibility) ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--pine-green);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  z-index: 10000;
  transition: top var(--duration) var(--ease-out);
}

.skip-link:focus {
  top: 0;
}

/* ---------- Focus States (Accessibility) ---------- */
:focus-visible {
  outline: 3px solid var(--pine-green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1200px;
  background: var(--cream-semi);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 100px;
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow:
    0 4px 24px rgba(56, 22, 6, 0.08),
    0 1px 4px rgba(56, 22, 6, 0.04);
  z-index: 1000;
  transition: box-shadow var(--duration) var(--ease-out);
}

.navbar:hover {
  box-shadow:
    0 8px 32px rgba(56, 22, 6, 0.12),
    0 2px 8px rgba(56, 22, 6, 0.06);
}

/* Home button */
.nav-home {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pine-green);
  color: var(--white);
  transition: background var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out);
  flex-shrink: 0;
}

.nav-home:hover {
  background: var(--pine-green-hover);
  transform: scale(1.05);
}

.nav-home svg {
  width: 20px;
  height: 20px;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--pine-green);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 10px 18px;
  border-radius: 100px;
  transition: background var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out);
  white-space: nowrap;
}

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

/* Social icons */
.nav-socials {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pine-green);
  border: 2px solid var(--pine-green);
  transition: background var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out);
  flex-shrink: 0;
}

.nav-socials a:hover {
  background: var(--pine-green);
  color: var(--white);
  transform: scale(1.08);
}

.nav-socials svg {
  width: 18px;
  height: 18px;
}

/* Hamburger menu (mobile) */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--pine-green);
  color: var(--white);
  flex-shrink: 0;
}

.hamburger svg {
  width: 22px;
  height: 22px;
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(56, 22, 6, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease-out);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  position: absolute;
  top: 16px;
  right: 16px;
  left: 16px;
  background: var(--cream);
  border-radius: 28px;
  padding: 72px 32px 32px;
  transform: translateY(-20px);
  transition: transform var(--duration) var(--ease-out);
}

.mobile-menu.is-open .mobile-menu-content {
  transform: translateY(0);
}

.mobile-menu-content a {
  display: block;
  color: var(--pine-green);
  font-size: 22px;
  font-weight: 700;
  padding: 16px 0;
  border-bottom: 1px solid rgba(52, 93, 74, 0.1);
  transition: padding-left var(--duration) var(--ease-out);
}

.mobile-menu-content a:hover {
  padding-left: 12px;
}

.mobile-menu-content a:last-child {
  border-bottom: none;
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pine-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background: var(--gold-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* z-index 1 — Wordmark behind product stack
   Must be MASSIVE to fill the hero like "SWEEEEET!" in the reference.
   The product image (z-index 2) sits on top and visually crops over this text.
   Text MUST extend visibly beyond the image on left & right sides. */
.hero-wordmark {
  position: absolute;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  text-align: center;
  line-height: 0.82;
  letter-spacing: -0.04em;
  font-size: clamp(150px, 26vw, 380px);
  user-select: none;
  pointer-events: none;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 100vw;
  text-shadow:
    0 8px 32px rgba(56, 22, 6, 0.08),
    0 2px 6px rgba(255, 255, 255, 0.2);
}

.hero-wordmark span {
  display: block;
}

/* z-index 2 — Product stack image */
.hero-product-stack {
  position: relative;
  z-index: 2;
  width: clamp(240px, 32vw, 440px);
  max-width: 85vw;
  height: auto;
  margin-top: -1vh;
  filter: drop-shadow(0 20px 40px rgba(56, 22, 6, 0.22));
  transition: transform 0.6s var(--ease-out);
}

.hero-product-stack:hover {
  transform: scale(1.025) translateY(-4px);
}

/* z-index 3 — Tagline & trust */

/* Hero bottom bar — wrapper for tagline & trust */
.hero-bottom {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
}

.hero-bottom > * {
  pointer-events: auto;
}

/* Tagline — bottom left */
.hero-tagline {
  position: absolute;
  z-index: 3;
  bottom: 44px;
  left: 48px;
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(56, 22, 6, 0.15);
}

/* Trust badge — bottom center */
.hero-trust {
  position: absolute;
  z-index: 3;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(56, 22, 6, 0.15);
}

.hero-trust-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.hero-trust-caption {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ============================================================
   BELOW-THE-FOLD SECTIONS
   ============================================================ */

/* Shared section styles */
.section {
  padding: var(--section-padding);
  scroll-margin-top: 80px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 52px);
  margin-bottom: 16px;
  line-height: 1.1;
}

.section-subtitle {
  font-size: 20px;
  font-weight: 400;
  max-width: 640px;
  line-height: 1.6;
  margin-bottom: 48px;
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

/* ---------- Our Mission ---------- */
.mission {
  background: var(--cream);
  text-align: center;
}

.mission .section-title {
  color: var(--pine-green);
}

.mission .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  color: var(--espresso);
}

.mission-highlight {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--pine-green);
  color: var(--white);
  padding: 16px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 18px;
  margin-top: 8px;
  box-shadow: 0 4px 20px rgba(52, 93, 74, 0.2);
}

.mission-partners {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.partner-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 16px;
  background: var(--gold-bg);
  font-weight: 700;
  font-size: 15px;
  color: var(--espresso);
}

.partner-badge svg {
  width: 28px;
  height: 28px;
  color: var(--pine-green);
}

/* ---------- Get Involved ---------- */
.get-involved {
  background: var(--gold-bg);
  text-align: center;
}

.get-involved .section-title {
  color: var(--espresso);
}

.get-involved .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  color: var(--espresso);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.card {
  background: var(--cream);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(56, 22, 6, 0.06);
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(56, 22, 6, 0.12);
}

.card-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--pine-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 32px;
}

.card-icon svg {
  width: 32px;
  height: 32px;
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--pine-green);
  margin-bottom: 12px;
}

.card p {
  font-size: 16px;
  color: var(--espresso);
  margin-bottom: 24px;
  line-height: 1.5;
}

.card-btn {
  display: inline-block;
  background: var(--pine-green);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  transition: background var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out);
}

.card-btn:hover {
  background: var(--pine-green-hover);
  transform: scale(1.04);
}

/* ---------- Merchandise ---------- */
.merchandise {
  background: var(--cream);
}

.merchandise .section-title {
  color: var(--pine-green);
  text-align: center;
}

.merchandise .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: var(--espresso);
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.merch-item {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(56, 22, 6, 0.05);
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}

.merch-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(56, 22, 6, 0.1);
}

.merch-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--gold-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--espresso);
}

.merch-img svg {
  width: 56px;
  height: 56px;
  opacity: 0.4;
}

.merch-info {
  padding: 20px;
}

.merch-info h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--espresso);
  margin-bottom: 4px;
}

.merch-info p {
  font-size: 14px;
  color: var(--warm-sand);
  font-weight: 600;
}

/* ---------- Contact / Footer ---------- */
.contact {
  background: var(--espresso);
  color: var(--white);
  padding: 80px 24px 40px;
}

.contact .section-title {
  color: var(--champagne);
  text-align: center;
}

.contact .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label {
  font-weight: 700;
  font-size: 14px;
  color: var(--champagne);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color var(--duration) var(--ease-out),
              background var(--duration) var(--ease-out);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--champagne);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

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

.contact-submit {
  align-self: flex-start;
  background: var(--champagne);
  color: var(--espresso);
  padding: 14px 36px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: background var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out);
}

.contact-submit:hover {
  background: var(--gold-bg);
  transform: scale(1.04);
}

.contact-info h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--champagne);
  margin-bottom: 16px;
}

.contact-info p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 12px;
}

.contact-info a {
  color: var(--champagne);
  font-weight: 700;
  transition: opacity var(--duration);
}

.contact-info a:hover {
  opacity: 0.8;
}

.contact-social-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.contact-social-links a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background var(--duration) var(--ease-out),
              border-color var(--duration) var(--ease-out);
}

.contact-social-links a:hover {
  background: var(--champagne);
  border-color: var(--champagne);
  color: var(--espresso);
}

.contact-social-links svg {
  width: 20px;
  height: 20px;
}

/* Footer credits */
.footer-credits {
  text-align: center;
  padding-top: 48px;
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-credits strong {
  color: var(--champagne);
}

/* ============================================================
   ANIMATIONS — Fade-in on scroll
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 1023px) {
  .hero-wordmark {
    font-size: clamp(130px, 22vw, 280px);
  }

  .hero-product-stack {
    width: clamp(240px, 42vw, 380px);
  }

  .hero-tagline {
    left: 32px;
    bottom: 36px;
    font-size: 15px;
  }

  .hero-trust {
    bottom: 36px;
  }

  .hero-trust-value {
    font-size: 24px;
  }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 767px) {
  :root {
    --section-padding: 56px 20px;
  }

  /* Nav: show hamburger, hide links */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .navbar {
    padding: 8px 10px 8px 14px;
    width: calc(100% - 24px);
    top: 10px;
  }

  /* Hero adjustments */
  .hero {
    min-height: 100dvh;
    padding-top: var(--nav-height);
  }

  .hero-wordmark {
    font-size: clamp(80px, 22vw, 150px);
    transform: translate(-50%, -52%);
    max-width: 96vw;
  }

  .hero-product-stack {
    width: clamp(200px, 58vw, 300px);
    margin-top: -2vh;
  }

  /* Move bottom elements to stack neatly below hero on mobile */
  .hero-bottom {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 16px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 3;
  }

  .hero-tagline {
    position: static;
    text-align: center;
    font-size: 14px;
  }

  .hero-trust {
    position: static;
    transform: none;
  }

  .hero-trust-value {
    font-size: 20px;
  }

  /* Sections */
  .section-title {
    font-size: clamp(28px, 8vw, 42px);
  }

  .section-subtitle {
    font-size: 17px;
  }

  /* Cards */
  .cards {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  /* Merch */
  .merch-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .mission-partners {
    flex-direction: column;
    gap: 16px;
  }
}

/* ============================================================
   RESPONSIVE — Small Mobile (375px)
   ============================================================ */
@media (max-width: 400px) {
  .hero-wordmark {
    font-size: clamp(65px, 18vw, 90px);
  }

  .hero-product-stack {
    width: 190px;
  }

  .merch-grid {
    grid-template-columns: 1fr;
  }

  .nav-socials a {
    width: 36px;
    height: 36px;
  }

  .nav-socials svg {
    width: 16px;
    height: 16px;
  }
}

/* ============================================================
   PREFERS-REDUCED-MOTION — Accessibility
   ============================================================ */
@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;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .hero-product-stack:hover {
    transform: none;
  }

  .card:hover {
    transform: none;
  }

  .merch-item:hover {
    transform: none;
  }
}
