/* ============================================================
   OH SIR FOX — Global Stylesheet
   Cinematic Kids' Showcase Website
   Light theme: bright, energetic, fox-orange as hero accent
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */

:root {
  /* Colors */
  --color-bg:           #fafafa;       /* warm white */
  --color-text:         #1a1a1a;
  --color-accent:       #ff6b35;       /* fox orange — the star */
  --color-secondary:    #f7c948;       /* amber / gold */
  --color-highlight:    #4ade80;       /* tech green */
  --color-dark:         #1a1a2e;       /* dark section bands */
  --color-dark-text:    #ffffff;
  --color-muted:        #888888;
  --color-border:       #e0e0e0;

  /* Shadows */
  --shadow-card:        0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover:       0 8px 32px rgba(0, 0, 0, 0.15);

  /* Border Radii */
  --radius-sm:          8px;
  --radius-md:          12px;
  --radius-lg:          16px;
  --radius-full:        9999px;

  /* Transitions */
  --transition-fast:    0.2s ease;
  --transition-smooth:  0.4s cubic-bezier(0.16, 1, 0.3, 1);
}


/* ============================================================
   2. MODERN CSS RESET
   ============================================================ */

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

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
               sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

ul,
ol {
  list-style: none;
}

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

input,
textarea,
select {
  font: inherit;
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

p {
  font-size: 1rem;
  line-height: 1.7;
}

/* Subtitle — slightly larger, muted */
.subtitle {
  font-size: 1.15rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* Section title — centered with orange accent underline */
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  margin: 12px auto 0;
}


/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */

/* Centered max-width wrapper */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Standard section padding */
.section {
  padding: 100px 0;
}

/* Dark band section */
.section-dark {
  background-color: var(--color-dark);
  color: var(--color-dark-text);
}

.section-dark .subtitle,
.section-dark .text-muted {
  color: rgba(255, 255, 255, 0.6);
}

.section-dark .section-title::after {
  background: var(--color-accent);
}


/* ============================================================
   5. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background-color: var(--color-accent);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-accent);
  transition: background-color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn:hover,
.btn:focus-visible {
  background-color: #e55a27;          /* darkened orange */
  border-color: #e55a27;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Outlined variant — BEM modifier alias (.btn--outline) and legacy (.btn-outline) */
.btn--outline,
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background-color: transparent;
  color: var(--color-accent);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-accent);
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn--outline:hover,
.btn--outline:focus-visible,
.btn-outline:hover,
.btn-outline:focus-visible {
  background-color: var(--color-accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
}

.btn--outline:active,
.btn-outline:active {
  transform: translateY(0);
  box-shadow: none;
}


/* ============================================================
   6. CARDS
   ============================================================ */

.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-smooth),
              box-shadow var(--transition-smooth);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}


/* ============================================================
   7. PILLS / TAGS
   ============================================================ */

.pill {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  background-color: #f0f0f0;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  transition: background-color var(--transition-fast),
              color var(--transition-fast);
}

/* Active / selected pill */
.pill-active {
  background-color: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}


/* ============================================================
   8. TEXT HELPERS
   ============================================================ */

.text-accent {
  color: var(--color-accent);
}

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

/* Hidden — toggled by JS */
.hidden {
  display: none !important;
}

/* GSAP fade-up — JS sets initial hidden state; CSS shows by default as fallback */
.fade-up {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   9. NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  transition: background-color var(--transition-fast),
              backdrop-filter var(--transition-fast),
              border-color var(--transition-fast),
              padding var(--transition-fast);
}

/* Solid state — added by JS on scroll */
.nav--solid {
  background-color: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 40px;
}

/* Logo */
.nav__logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.01em;
  transition: opacity var(--transition-fast);
}

.nav__logo:hover {
  opacity: 0.8;
}

/* Nav links group */
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Individual link */
.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width var(--transition-smooth);
}

.nav__link:hover {
  color: var(--color-accent);
}

.nav__link:hover::after {
  width: 100%;
}

/* Active link */
.nav__link--active {
  color: var(--color-accent);
}

.nav__link--active::after {
  width: 100%;
}

/* Hamburger — hidden on desktop, visible on mobile */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  cursor: pointer;
  padding: 4px 0;
}

.nav__hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: transform var(--transition-smooth),
              opacity var(--transition-fast),
              width var(--transition-fast);
}

.nav__hamburger span:nth-child(2) {
  width: 70%;
}

/* Hamburger open state */
.nav__hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.is-open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav__hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ============================================================
   10. FOOTER
   ============================================================ */

.footer {
  padding: 60px 0 32px;
  border-top: 2px solid var(--color-border);
  background-color: #f5f5f5;
}

.footer__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
}

.footer__brand {
  max-width: 280px;
}

.footer__tagline {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 8px;
  line-height: 1.6;
}

/* Social / icon links — legacy selector */
.footer__links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer__links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 1rem;
  transition: color var(--transition-fast),
              border-color var(--transition-fast),
              background-color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background-color: rgba(255, 107, 53, 0.06);
}

/* Social links — HTML-aligned selectors */
.footer__social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 1rem;
  transition: color var(--transition-fast),
              border-color var(--transition-fast),
              background-color var(--transition-fast);
}

.footer__social-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background-color: rgba(255, 107, 53, 0.06);
}

/* Footer logo / fox emoji */
.footer__logo {
  font-size: 2.5rem;
  display: inline-block;
}

/* Footer newsletter block */
.footer__newsletter {
  margin-top: 24px;
}

.footer__newsletter-label {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.footer__newsletter-form {
  display: flex;
  gap: 8px;
}

.footer__newsletter-input {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  flex: 1;
  max-width: 280px;
}

.footer__newsletter-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.footer__copyright {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: center;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}


/* ============================================================
   11. RESPONSIVE — TABLET (max 1199px)
   ============================================================ */

@media (max-width: 1199px) {
  h1 {
    font-size: 2.8rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.35rem;
  }

  .container {
    padding: 0 32px;
  }

  .section {
    padding: 80px 0;
  }

  .nav {
    padding: 18px 32px;
  }

  .nav--solid {
    padding: 12px 32px;
  }
}


/* ============================================================
   12. RESPONSIVE — MOBILE (max 768px)
   ============================================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 20px;
  }

  .section {
    padding: 64px 0;
  }

  /* Nav collapses */
  .nav {
    padding: 16px 20px;
  }

  .nav--solid {
    padding: 12px 20px;
  }

  .nav__links {
    /* Mobile links — JS toggles .is-open to reveal */
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 20px 24px;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__link {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav__link:last-child {
    border-bottom: none;
  }

  .nav__link::after {
    display: none;
  }

  /* Show hamburger on mobile */
  .nav__hamburger {
    display: flex;
  }

  /* Footer stacks */
  .footer__content {
    flex-direction: column;
    gap: 32px;
  }

  .footer__brand {
    max-width: 100%;
  }
}


/* ============================================================
   13. RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================================ */

@media (max-width: 480px) {
  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 48px 0;
  }

  .btn,
  .btn--outline,
  .btn-outline {
    padding: 11px 22px;
    font-size: 0.9rem;
  }

  .footer {
    padding: 48px 0 24px;
  }
}


/* ============================================================
   14. UTILITIES
   ============================================================ */

/* Screen-reader only — visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Section title on dark backgrounds */
.section-title--light {
  color: #ffffff;
}

.section-title--light::after {
  background: var(--color-accent);
}
