/* ============================================================
   SOLID START JA — STYLES
   Palette (from the logo):
   --green   forest green (book cover)
   --gold    sun yellow
   --beige   book-page tan
   --cream   page background
   ============================================================ */

:root {
  --green: #1b6b44;
  --green-dark: #14522f;
  --gold: #f2b705;
  --gold-soft: #f7cf5e;
  --beige: #e8ddd0;
  --cream: #fdf9f0;
  --ink: #2e3a2f; /* soft charcoal-green body text */
  --ink-light: #5c6b5d;

  --font-body: "Nunito", "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-script: "Caveat", cursive;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
}

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

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 5vw;
}

.nav-brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-brand span {
  color: var(--gold);
}

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

.nav-links a {
  color: var(--cream);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.nav-cta {
  background: var(--gold);
  color: var(--green-dark) !important;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  opacity: 1 !important;
}

.nav-cta:hover {
  background: var(--gold-soft);
  text-decoration: none !important;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--green-dark);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    width: 100%;
    text-align: center;
    padding: 0.6rem 0;
  }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(15, 45, 80, 0.35),
    rgba(15, 45, 80, 0.0)
  );
  z-index: -1;
}

.hero-inner {
  padding: 4rem 6vw 8rem;
  max-width: 720px;
}

.hero-quote {
  color: var(--cream);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

/* Two display options — body class picks one (see font toggle) */
body.font-script .hero-quote {
  font-family: var(--font-script);
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 1.1;
  font-weight: 700;
}

body.font-serif .hero-quote {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.15;
  font-weight: 600;
  font-style: italic;
}

.hero-subline {
  margin-top: 1rem;
  color: var(--cream);
  font-size: 1.15rem;
  opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-cta {
  display: inline-block;
  margin-top: 2rem;
  background: var(--gold);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.85rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s;
}

.hero-cta:hover {
  background: var(--gold-soft);
  transform: translateY(-2px);
}

/* Torn / soft edge between hero and page body */
.hero-edge {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 90px;
  z-index: 1;
}

/* Font comparison toggle — TEMPLATE HELPER ONLY.
   Delete .font-toggle from index.html once you've chosen. */
.font-toggle {
  position: absolute;
  bottom: 110px;
  right: 5vw;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
  background: rgba(253, 249, 240, 0.85);
  padding: 0.35rem;
  border-radius: 8px;
}

.font-toggle button {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
}

.font-toggle button.active {
  background: var(--green);
  color: var(--cream);
}

/* ---------- JOURNEY ---------- */
.journey {
  padding: 4rem 5vw 6rem;
  max-width: 1150px;
  margin: 0 auto;
}

.journey-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--green-dark);
  text-align: center;
  max-width: 22ch;
  margin: 0 auto 4rem;
  line-height: 1.25;
}

.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  padding: 3.5rem 2.5rem;
  border-radius: 18px;
  margin-bottom: 2.5rem;
}

.step:nth-child(odd) {
  background: var(--beige);
}

/* Alternate photo side for visual rhythm */
.step:nth-child(even) .step-photos {
  order: -1;
}

.step-label {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--gold);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.step-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 0.3rem;
}

.step-date {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-light);
  margin-bottom: 1rem;
}

.step-desc {
  white-space: pre-line;
  font-size: 1.05rem;
}

/* ----- Photo stack + hover fan ----- */
.step-photos {
  display: flex;
  justify-content: center;
}

.photo-stack {
  position: relative;
  width: min(320px, 80%);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.photo-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(30, 50, 35, 0.25);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: bottom center;
}

/* Fan out on hover / keyboard focus (max 4 preview photos) */
.photo-stack:hover img:nth-child(2),
.photo-stack:focus-visible img:nth-child(2) {
  transform: rotate(-9deg) translate(-14%, -3%);
}

.photo-stack:hover img:nth-child(3),
.photo-stack:focus-visible img:nth-child(3) {
  transform: rotate(8deg) translate(13%, -5%);
}

.photo-stack:hover img:nth-child(4),
.photo-stack:focus-visible img:nth-child(4) {
  transform: rotate(-16deg) translate(-26%, -10%);
}

.photo-stack:hover img:nth-child(1),
.photo-stack:focus-visible img:nth-child(1) {
  transform: scale(1.03);
}

/* Photos stack in reverse so child 1 (cover) is on top */
.photo-stack img:nth-child(1) { z-index: 4; }
.photo-stack img:nth-child(2) { z-index: 3; }
.photo-stack img:nth-child(3) { z-index: 2; }
.photo-stack img:nth-child(4) { z-index: 1; }

.photo-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 5;
  background: rgba(20, 40, 25, 0.75);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .photo-stack img {
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 820px) {
  .step {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.5rem;
  }
  .step:nth-child(even) .step-photos {
    order: 0;
  }
}

/* ---------- LIGHTBOX GALLERY ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 42, 32, 0.55);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  display: none;
  overflow-y: auto;
  padding: 4.5rem 5vw 3rem;
}

.lightbox.open {
  display: block;
}

.lightbox-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 101;
  background: var(--cream);
  color: var(--green-dark);
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
  background: var(--gold);
}

.lightbox-title {
  font-family: var(--font-serif);
  color: var(--cream);
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 0.2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.lightbox-date {
  color: var(--cream);
  text-align: center;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 2rem;
}

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

.lightbox-grid img,
.lightbox-grid video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.no-scroll {
  overflow: hidden;
}

/* ---------- SIMPLE PAGES (games / resources) ---------- */
.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 5vw 6rem;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  color: var(--green-dark);
  margin-bottom: 0.4rem;
}

.page-intro {
  color: var(--ink-light);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--beige);
  border-radius: 16px;
  padding: 1.8rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(30, 50, 35, 0.18);
}

.card h3 {
  font-family: var(--font-serif);
  color: var(--green-dark);
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.98rem;
  color: var(--ink-light);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--green-dark);
  color: var(--cream);
  text-align: center;
  padding: 2.2rem 5vw;
  font-size: 0.95rem;
}

.footer a {
  color: var(--gold);
}

/* ---------- LEAF DECOR (journey margins + corners) ---------- */
.journey-wrap {
  position: relative;
  overflow: hidden;
  padding-bottom: 6rem; /* room for the bottom corner leaves */
}

.journey-wrap .journey {
  position: relative;
  z-index: 1;
}

.leaves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2; /* leaves sit over the bands, like the mockup */
}

.leaf {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(30, 60, 35, 0.15));
}

.leaf-top-right {
  top: 1.5rem;
  right: -3.5rem;
  width: clamp(150px, 17vw, 260px);
  transform: rotate(-8deg);
}

.leaf-right-mid {
  top: 30%;
  right: -4.5rem;
  width: clamp(110px, 12vw, 190px);
  transform: rotate(18deg);
}

.leaf-left-upper {
  top: 24%;
  left: -4rem;
  width: clamp(150px, 16vw, 250px);
  transform: rotate(8deg);
}

.leaf-left-mid {
  top: 55%;
  left: -4.5rem;
  width: clamp(160px, 17vw, 270px);
  transform: rotate(-12deg);
}

.leaf-bottom-left {
  bottom: -2rem;
  left: -4rem;
  width: clamp(170px, 18vw, 290px);
  transform: rotate(-28deg);
}

.leaf-bottom-right {
  bottom: 0;
  right: 0;
  width: clamp(170px, 19vw, 300px);
}

/* Narrower screens: no side margins, so keep only the corner leaves, smaller */
@media (max-width: 1100px) {
  .leaf-right-mid,
  .leaf-left-mid {
    display: none;
  }
}

@media (max-width: 820px) {
  .leaf-left-upper {
    display: none;
  }
  .leaf-top-right {
    width: 90px;
    top: -1.2rem;
    right: -2.2rem;
  }
  .leaf-bottom-left {
    width: 120px;
  }
  .leaf-bottom-right {
    width: 130px;
  }
}

.lightbox-grid video {
  object-fit: contain;
  background: #000;
}

/* ---------- CONTACT BUBBLE ("Get involved") ---------- */
.contact-bubble {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 50;
  width: min(320px, calc(100vw - 3rem));
  background: var(--green);
  color: var(--cream);
  padding: 1.4rem 1.6rem;
  border-radius: 28px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-bubble.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* little speech-bubble tail pointing up at the button */
.contact-bubble::before {
  content: "";
  position: absolute;
  top: -10px;
  right: 2.2rem;
  border: 10px solid transparent;
  border-top: 0;
  border-bottom-color: var(--green);
}

.contact-bubble h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.contact-bubble p {
  margin-bottom: 0.4rem;
}

.contact-bubble a {
  color: var(--gold-soft);
  word-break: break-all;
}

.contact-bubble-close {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  background: none;
  border: 0;
  color: var(--cream);
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- FULL-SIZE IMAGE VIEWER ---------- */
.lightbox-grid img {
  cursor: zoom-in;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 18, 12, 0.92);
  display: none;
  overflow: auto;
  align-items: center;
  justify-content: center;
}

.viewer.open {
  display: flex;
}

.viewer img {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  margin: auto;
  cursor: zoom-in;
}

.viewer.zoomed {
  display: block;
}

.viewer.zoomed img {
  max-width: none;
  max-height: none;
  width: 100%; /* fill the screen width; scroll down for the rest */
  cursor: zoom-out;
}

.viewer-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 201;
  background: var(--cream);
  color: var(--green-dark);
  border: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}
