/* ============================================
   KOKOPELLI SOUNDSTUDIO
   Editorial design system — restrained, confident
   ============================================ */

:root {
  /* Foundation */
  --black: #0a0908;
  --black-soft: #131110;
  --black-lifted: #1a1816;

  /* Bone white scale - for text hierarchy */
  --bone: #f4ede3;
  --bone-90: rgba(244, 237, 227, 0.92);
  --bone-70: rgba(244, 237, 227, 0.72);
  --bone-50: rgba(244, 237, 227, 0.5);
  --bone-30: rgba(244, 237, 227, 0.3);
  --bone-15: rgba(244, 237, 227, 0.15);
  --bone-08: rgba(244, 237, 227, 0.08);

  /* Logo-matched red — used sparingly */
  --red: #b50901;
  --red-bright: #d62820;

  /* Type families */
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --display: 'Bebas Neue', 'Helvetica Neue', sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: var(--red); color: var(--bone); }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--black);
  color: var(--bone-90);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
a { color: inherit; }

/* ============ LAYOUT ============ */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
}

section {
  padding: 140px 0;
  position: relative;
}

@media (max-width: 768px) {
  section { padding: 80px 0; }
}

/* Subtle bone-tone horizontal divider — design motif */
.divider {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  height: 1px;
  background: var(--bone-15);
}

.divider-short {
  width: 60px;
  height: 1px;
  background: var(--red);
  margin-bottom: 28px;
}

/* ============ TYPOGRAPHY ============ */

/* Display headlines */
.h-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--bone);
}
.h-display em {
  font-style: italic;
  font-weight: 400;
  color: var(--bone);
}

/* Section titles */
.h-section {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--bone);
}
.h-section em {
  font-style: italic;
  color: var(--bone);
}

/* Sub-section */
.h-sub {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--bone);
}
.h-sub em { font-style: italic; }

/* Eyebrow labels — micro typography */
.eyebrow {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--bone-50);
  text-transform: uppercase;
  display: inline-block;
}

.eyebrow-red {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--red-bright);
  text-transform: uppercase;
  display: inline-block;
}

/* Body text */
.lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.5;
  color: var(--bone-90);
}

.body-text {
  font-size: 17px;
  line-height: 1.75;
  color: var(--bone-70);
  font-weight: 300;
}

/* ============ NAVIGATION ============ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s, padding 0.4s, border-bottom 0.4s;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 40px;
  border-bottom: 1px solid var(--bone-15);
}

@media (max-width: 768px) {
  nav, nav.scrolled { padding: 14px 24px; }
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  height: 44px;
  position: relative;
}
.logo img {
  height: 100%;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  transition: transform 0.5s ease;
}
.logo:hover img { transform: scale(1.04); }

@media (max-width: 768px) {
  .logo { height: 32px; }
}

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

.nav-links a {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.25em;
  color: var(--bone-70);
  text-decoration: none;
  text-transform: uppercase;
  padding: 4px 0;
  position: relative;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--bone); }

.nav-links a.active { color: var(--bone); }
.nav-links a.active::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--bone);
  cursor: pointer;
  padding: 8px;
  font-size: 20px;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--black);
    border-top: 1px solid var(--bone-15);
    border-bottom: 1px solid var(--bone-15);
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 24px; width: 100%; }
  .nav-links a.active::before { display: none; }
  .nav-links a.active { color: var(--red-bright); }
  .menu-toggle { display: block; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-decoration: none;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.btn-primary {
  background: var(--red);
  color: var(--bone);
}
.btn-primary:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--bone-30);
  color: var(--bone);
}
.btn-ghost:hover {
  border-color: var(--bone);
  background: var(--bone-08);
}

.btn-text {
  background: none;
  padding: 0;
  color: var(--bone);
  border-bottom: 1px solid var(--red);
  padding-bottom: 4px;
  letter-spacing: 0.22em;
}
.btn-text:hover { color: var(--red-bright); border-color: var(--red-bright); }

.btn .arrow {
  display: inline-block;
  transition: transform 0.4s;
}
.btn:hover .arrow { transform: translateX(4px); }

/* ============ PAGE HERO (interior pages) ============ */
.page-hero {
  padding: 180px 0 90px;
  border-bottom: 1px solid var(--bone-15);
}

.page-hero .eyebrow-red { margin-bottom: 24px; }
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 84px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--bone);
  margin-bottom: 32px;
  max-width: 900px;
}
.page-hero h1 em { font-style: italic; }

.page-hero p {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.5;
  color: var(--bone-70);
  max-width: 700px;
}

@media (max-width: 768px) {
  .page-hero { padding: 130px 0 64px; }
  .page-hero h1 { font-size: 44px; line-height: 1; margin-bottom: 24px; }
  .page-hero p { font-size: 17px; }
}

@media (max-width: 400px) {
  .page-hero h1 { font-size: 38px; }
}

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--bone-15);
  padding: 100px 0 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 80px;
}

@media (max-width: 800px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 500px) { .footer-top { grid-template-columns: 1fr; } }

.footer-logo {
  display: block;
  width: 200px;
  margin-bottom: 28px;
}
.footer-logo img { width: 100%; height: auto; }

.footer-brand p {
  color: var(--bone-50);
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h5 {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--bone-50);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }

.footer-col a, .footer-col button {
  color: var(--bone-70);
  text-decoration: none;
  font-size: 15px;
  font-weight: 300;
  transition: color 0.3s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  line-height: 1.5;
}
.footer-col a:hover, .footer-col button:hover { color: var(--red-bright); }

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--bone-15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--bone-50);
}

.footer-bottom-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-bottom-links button {
  background: none; border: none;
  color: var(--bone-50);
  font-size: 12px; letter-spacing: 0.15em;
  cursor: pointer; font-family: inherit;
  text-transform: uppercase;
  transition: color 0.3s;
}
.footer-bottom-links button:hover { color: var(--red-bright); }

/* ============ MODALS ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 2, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--black-soft);
  border: 1px solid var(--bone-15);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 56px;
  position: relative;
}

@media (max-width: 600px) { .modal { padding: 32px 24px; } }

.modal-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: none;
  color: var(--bone-50);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}
.modal-close:hover { color: var(--red-bright); }

.modal h2 {
  font-family: var(--serif);
  font-size: 40px;
  color: var(--bone);
  margin-bottom: 8px;
  line-height: 1;
}
.modal h2 em { font-style: italic; }

.modal-effective {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--red-bright);
  margin-bottom: 32px;
}

.modal h3 {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--bone);
  margin: 32px 0 12px;
}

.modal p, .modal li {
  color: var(--bone-70);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.modal ul { padding-left: 20px; margin-bottom: 16px; }
.modal strong { color: var(--bone); }
.modal a { color: var(--red-bright); text-decoration: underline; text-underline-offset: 4px; }

/* ============ ANIMATIONS — WORLD-CLASS LIBRARY ============ */

/* Smooth easings used throughout */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes maskReveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes imageReveal {
  from { transform: scale(1.15); filter: brightness(0.4); }
  to { transform: scale(1); filter: brightness(1); }
}

@keyframes redLineGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.fade-up { animation: fadeUp 1.2s var(--ease-out-expo) both; }
.fade-in { animation: fadeIn 1.4s ease both; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
.delay-5 { animation-delay: 0.75s; }
.delay-6 { animation-delay: 0.9s; }

/* Basic reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal — slide from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1.1s var(--ease-out-expo), transform 1.1s var(--ease-out-expo);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal — slide from right */
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 1.1s var(--ease-out-expo), transform 1.1s var(--ease-out-expo);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal — image with scale + brightness (cinematic) */
.reveal-image {
  overflow: hidden;
}
.reveal-image > * {
  transform: scale(1.18);
  filter: brightness(0.3);
  transition: transform 1.6s var(--ease-out-expo), filter 1.6s var(--ease-out-expo);
}
.reveal-image.visible > * {
  transform: scale(1);
  filter: brightness(1);
}

/* Reveal — text mask (sweeps in from left like a wipe) */
.reveal-mask {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s var(--ease-out-expo);
}
.reveal-mask.visible {
  clip-path: inset(0 0 0 0);
}

/* Reveal — word-by-word stagger (use with data-split attribute) */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out-expo);
}
.reveal-split.visible .split-word > span {
  transform: translateY(0);
}
.reveal-split.visible .split-word:nth-child(1) > span { transition-delay: 0s; }
.reveal-split.visible .split-word:nth-child(2) > span { transition-delay: 0.05s; }
.reveal-split.visible .split-word:nth-child(3) > span { transition-delay: 0.10s; }
.reveal-split.visible .split-word:nth-child(4) > span { transition-delay: 0.15s; }
.reveal-split.visible .split-word:nth-child(5) > span { transition-delay: 0.20s; }
.reveal-split.visible .split-word:nth-child(6) > span { transition-delay: 0.25s; }
.reveal-split.visible .split-word:nth-child(7) > span { transition-delay: 0.30s; }
.reveal-split.visible .split-word:nth-child(8) > span { transition-delay: 0.35s; }
.reveal-split.visible .split-word:nth-child(9) > span { transition-delay: 0.40s; }
.reveal-split.visible .split-word:nth-child(n+10) > span { transition-delay: 0.45s; }

/* Animated count-up */
.count-up { display: inline-block; }

/* Hover-lift effect on cards */
.hover-lift {
  transition: transform 0.6s var(--ease-out-expo);
}
.hover-lift:hover { transform: translateY(-6px); }

/* Magnetic-feeling buttons */
.btn {
  transition: transform 0.4s var(--ease-out-expo), background 0.3s, border 0.3s, color 0.3s, box-shadow 0.4s;
}

/* Image hover with zoom + brightness shift */
.img-hover {
  overflow: hidden;
}
.img-hover > * {
  transition: transform 1.4s var(--ease-out-expo), filter 0.8s ease;
}
.img-hover:hover > * {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* Marquee text scroll */
.marquee-text {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  display: flex;
}
.marquee-text-track {
  display: inline-flex;
  align-items: center;
  gap: 60px;
  animation: textMarquee 60s linear infinite;
  flex-shrink: 0;
}
@keyframes textMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Text underline draw effect */
.draw-underline {
  position: relative;
  display: inline-block;
}
.draw-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out-expo);
}
.draw-underline:hover::after,
.draw-underline.active::after {
  transform: scaleX(1);
}

/* Reduced motion fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-image, .reveal-mask {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}
