/* =========================================================================
   THEME — change colors/fonts here and it updates the whole site.
   ========================================================================= */
:root {
  --color-primary: #FF6B6B;   /* coral */
  --color-secondary: #4ECDC4; /* teal */
  --color-accent: #FFD166;    /* sunny yellow */
  --color-ink: #2B2D42;       /* dark text */
  --color-bg: #FFFDF9;        /* warm off-white page background */
  --color-surface: #FFFFFF;   /* cards, nav bar */
  --color-border: #ECE6DC;

  --font-heading: "Fredoka", sans-serif;
  --font-body: "Fredoka", sans-serif;

  --container-width: 1200px;
  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;

  --radius: 16px;
  --shadow-card: 0 12px 30px rgba(43, 45, 66, 0.12);

  --transition-speed: 0.6s;
}

/* =========================================================================
   FONTS — Fredoka, self-hosted (SIL Open Font License, free commercial use).
   Single variable file covers weight 300-700; font-weight below picks the
   right instance automatically. See assets/fonts/OFL.txt for the license.
   ========================================================================= */
@font-face {
  font-family: "Fredoka";
  src: url("../assets/fonts/Fredoka-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* =========================================================================
   RESET & BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 var(--space-md);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
p { margin: 0 0 var(--space-md); }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section { padding: var(--space-xl) 0; }

/* =========================================================================
   NAV — injected by js/partials.js into <div id="site-nav">
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}
.site-logo {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--color-ink);
}
.nav-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}
.nav-links a {
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.social-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.social-row a {
  width: 22px;
  height: 22px;
  color: var(--color-ink);
  transition: color 0.2s ease, transform 0.2s ease;
}
.social-row a:hover,
.social-row a:focus-visible {
  color: var(--color-primary);
  transform: translateY(-2px);
}
.social-row svg { width: 100%; height: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-ink);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    background: var(--color-surface);
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
  }
  .nav-links.is-open { display: flex; }
  .nav-right .social-row { display: none; }
  .nav-links.is-open ~ .nav-right .social-row,
  .nav-links.is-open .mobile-social-row { display: flex; }
}

/* =========================================================================
   FOOTER — injected by js/partials.js into <div id="site-footer">
   ========================================================================= */
.site-footer {
  background: var(--color-ink);
  color: #FFFFFF;
  padding: var(--space-lg) 0;
  margin-top: var(--space-xl);
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}
.site-footer .social-row a { color: #FFFFFF; }
.site-footer .social-row a:hover { color: var(--color-accent); }
.footer-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a { opacity: 0.85; }
.footer-links a:hover { opacity: 1; color: var(--color-accent); }
.copyright {
  font-size: 0.85rem;
  opacity: 0.7;
  max-width: 40ch;
}

/* =========================================================================
   REVEAL-ON-SCROLL ANIMATION (js/partials.js toggles .is-visible)
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.reveal.reveal-left { transform: translateX(-40px); }
.reveal.reveal-right { transform: translateX(40px); }
.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.reveal-left, .reveal.reveal-right {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* =========================================================================
   LANDING PAGE
   ========================================================================= */
.hero {
  padding: var(--space-xl) 0;
  text-align: center;
}
.hero img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin: var(--space-lg) auto 0;
}
.hero-intro {
  max-width: 60ch;
  margin: 0 auto;
  font-size: 1.15rem;
}

/* =========================================================================
   THE CHARACTERS PAGE
   ========================================================================= */
.character-block {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: flex-start;
  padding: var(--space-lg) 0;
}
.character-block:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}
.character-block.reverse { flex-direction: row-reverse; }
.character-media { flex: 1 1 320px; }
.character-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.character-copy { flex: 1 1 320px; }
.fast-facts {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-md);
  margin-top: var(--space-md);
}
.fast-facts h3 {
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}
.fast-facts ul li {
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--color-border);
}
.fast-facts ul li:last-child { border-bottom: none; }

/* =========================================================================
   OUR STORY PAGE
   ========================================================================= */
.story-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg) 0;
}
.story-copy { flex: 1 1 380px; }
.story-media { flex: 1 1 380px; }

.story-carousel {
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.story-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: story-fade 20s infinite;
  border-radius: 0;
  box-shadow: none;
}
.story-carousel img:nth-child(1) { animation-delay: 0s; }
.story-carousel img:nth-child(2) { animation-delay: 4s; }
.story-carousel img:nth-child(3) { animation-delay: 8s; }
.story-carousel img:nth-child(4) { animation-delay: 12s; }
.story-carousel img:nth-child(5) { animation-delay: 16s; }

@keyframes story-fade {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  20%  { opacity: 1; }
  24%  { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .story-carousel img { animation: none; opacity: 0; }
  .story-carousel img:first-child { opacity: 1; }
}

/* =========================================================================
   BEHIND THE ART PAGE
   ========================================================================= */
.artist-block {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: center;
}
.artist-photo { flex: 1 1 320px; }
.artist-photo img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.artist-copy { flex: 1 1 380px; }

/* =========================================================================
   CONTACT PAGE
   ========================================================================= */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-weight: 500; }
.form-field input,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-ink);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 1px;
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn-submit {
  align-self: flex-start;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.05rem;
  color: #FFFFFF;
  background: var(--color-primary);
  border: none;
  border-radius: 999px;
  padding: 0.85rem 2.25rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn-submit:hover { background: #ff5252; transform: translateY(-2px); }
.btn-submit:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }

.form-note { font-size: 0.9rem; opacity: 0.75; }

/* =========================================================================
   FAQ PLACEHOLDER
   ========================================================================= */
.faq-placeholder {
  text-align: center;
  padding: var(--space-xl) 0;
  opacity: 0.7;
}

/* =========================================================================
   RESPONSIVE TWEAKS
   ========================================================================= */
@media (max-width: 640px) {
  section { padding: var(--space-lg) 0; }
  .character-block,
  .story-row,
  .artist-block { gap: var(--space-md); }
}
