/* ==========================================================================
   Chapter One Studio — design tokens
   ========================================================================== */
:root{
  /* brand (sampled from Chapter One Films logo) */
  --brand: #180880;
  --brand-600: #2c17ad;
  --brand-700: #100560;
  --brand-100: #edeafb;
  --brand-50: #f6f4fd;

  --ink: #0b0b0e;
  --ink-soft: #201f29;
  --muted: #625f6e;
  --muted-2: #6b6775;
  --border: #e6e3ef;

  --bg: #faf9fc;
  --surface: #ffffff;

  --white: #ffffff;

  --font-head: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  /* type scale */
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --fs-2xl: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem);
  --fs-hero: clamp(2.6rem, 1.7rem + 4.2vw, 4.6rem);

  /* spacing (4/8pt rhythm) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(11,11,14,0.06), 0 1px 1px rgba(11,11,14,0.04);
  --shadow-md: 0 12px 32px -12px rgba(16,5,96,0.28);
  --shadow-lg: 0 24px 64px -20px rgba(16,5,96,0.35);

  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: 220ms;

  --container: 1200px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
svg{ display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,p{ margin: 0; }
h1,h2,h3{ font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
button{ font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea{ font: inherit; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible{
  outline: 2.5px solid var(--brand-600);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link{
  position: fixed;
  top: -100px;
  left: var(--space-3);
  z-index: 1000;
  background: var(--ink);
  color: var(--white);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus{ top: var(--space-3); }

.wrap{
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1;
  min-height: 44px;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:active{ transform: translateY(1px) scale(.99); }

.btn-primary{
  background: var(--brand);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover{ background: var(--brand-600); }

.btn-ghost-dark{
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost-dark:hover{ border-color: var(--brand); color: var(--brand); }

.btn-lg{ padding: 15px 30px; font-size: var(--fs-md); }
.btn-sm{ padding: 10px 18px; font-size: 0.85rem; min-height: 40px; }
.btn-block{ width: 100%; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header{
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding-block: var(--space-3);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand{ display: inline-flex; align-items: center; }
.brand-mark{ height: 30px; width: auto; }
.brand-mark--white{ display: block; }
.brand-mark--color{ display: none; }

.site-nav ul{ display: flex; align-items: center; gap: var(--space-5); }
.site-nav a{
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  padding-block: var(--space-1);
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-nav a:hover, .site-nav a.is-active{ border-bottom-color: currentColor; }

.header-actions{ display: flex; align-items: center; gap: var(--space-3); }

.nav-toggle{
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav-toggle span{
  width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.mobile-nav{
  display: none;
}

/* header color states: default = over hero video (light text, transparent) */
.site-header{ color: var(--white); }

.site-header.is-scrolled{
  /* Solid (no backdrop-filter): blurring the hero video behind the header
     triggers a Chrome compositor bug that freezes the video on-screen. */
  background: rgba(250,249,252,0.98);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}
.site-header.is-scrolled .site-nav a{ color: var(--ink-soft); }
.site-header.is-scrolled .brand-mark--color{ display: block; }
.site-header.is-scrolled .brand-mark--white{ display: none; }
.site-header.is-scrolled .btn-sm.btn-primary{ box-shadow: none; }
.site-header.is-scrolled .nav-toggle{ color: var(--ink); }
.nav-toggle{ color: var(--white); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
}
.hero-media{
  /* No z-index here (relies on DOM order instead): a negative z-index on
     the video's container, inside an isolated stacking context, is one
     more input to the same class of Chrome bug that can freeze a playing
     video's on-screen frame. */
  position: absolute; inset: 0;
  background: var(--ink);
}
.hero-video, .hero-fallback{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-scrim{
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,11,14,0.55) 0%, rgba(11,11,14,0.3) 30%, rgba(11,11,14,0.55) 72%, rgba(11,11,14,0.86) 100%),
    linear-gradient(100deg, rgba(16,5,96,0.5) 0%, rgba(16,5,96,0.05) 45%);
}

.hero-inner{
  position: relative;
  width: 100%;
  padding-block: calc(var(--space-8) + 64px) var(--space-7);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.eyebrow{
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  margin-bottom: var(--space-3);
}
.eyebrow-dark{ color: var(--brand); }

.hero-copy h1{
  font-size: var(--fs-hero);
  line-height: 1.04;
  color: var(--white);
  max-width: 16ch;
}
.hero-copy h1 .accent{ color: #b7a6ff; }

.hero-sub{
  margin-top: var(--space-4);
  max-width: 46ch;
  font-size: var(--fs-md);
  color: rgba(255,255,255,0.88);
}

.hero-actions{
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero-card{
  justify-self: start;
  width: min(360px, 100%);
  /* Solid (no backdrop-filter): blurring the hero video behind this card
     triggers a Chrome compositor bug that freezes the video on-screen
     while it keeps playing internally. */
  background: rgba(9,8,20,0.82);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.hero-card-label{ font-size: var(--fs-sm); font-weight: 600; color: rgba(255,255,255,0.75); }
.hero-card-price{ font-family: var(--font-head); font-size: 2.5rem; font-weight: 700; margin-top: var(--space-1); }
.hero-card-price span{ font-family: var(--font-body); font-size: var(--fs-md); font-weight: 500; color: rgba(255,255,255,0.7); }

.hero-card-list{ margin-top: var(--space-4); display: grid; gap: var(--space-2); }
.hero-card-list li{
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  padding-left: 22px;
  position: relative;
}
.hero-card-list li::before{
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: #b7a6ff;
}

.hero-card-loc{
  margin-top: var(--space-4);
  display: flex; align-items: center; gap: var(--space-2);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  padding-block: var(--space-3);
  border-block: 1px solid rgba(255,255,255,0.18);
}
.hero-card-loc svg{ width: 18px; height: 18px; flex-shrink: 0; }

.hero-card .btn{ margin-top: var(--space-4); }

/* ==========================================================================
   Sections (shared)
   ========================================================================== */
.section{ padding-block: var(--space-8); }
.section-alt{ background: var(--brand-50); }

.section-head{ max-width: 62ch; margin-bottom: var(--space-6); }
.section-head h2{ font-size: var(--fs-2xl); line-height: 1.08; margin-top: var(--space-2); }
.section-lead{ margin-top: var(--space-3); font-size: var(--fs-md); color: var(--muted); max-width: 56ch; }

/* ==========================================================================
   Studio gallery
   ========================================================================== */
.gallery{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.gallery-item{
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.gallery-item img{
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}
.gallery-item:hover img{ transform: scale(1.035); }
.gallery-item figcaption{
  position: absolute; inset-inline: 0; bottom: 0;
  padding: var(--space-4);
  font-size: 0.9rem;
  color: var(--white);
  background: linear-gradient(0deg, rgba(11,11,14,0.75), rgba(11,11,14,0));
}

/* ==========================================================================
   Feature grid
   ========================================================================== */
.feature-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.feature-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.feature-icon{
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--brand-100);
  color: var(--brand);
  margin-bottom: var(--space-4);
}
.feature-icon svg{ width: 24px; height: 24px; }
.feature-card h3{ font-size: var(--fs-md); }
.feature-card p{ margin-top: var(--space-2); color: var(--muted); font-size: 0.95rem; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing-card{
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  box-shadow: var(--shadow-lg);
}
.pricing-rate{ font-family: var(--font-head); font-size: clamp(2.4rem, 2rem + 1.5vw, 3.4rem); font-weight: 700; }
.pricing-rate span{ font-family: var(--font-body); font-size: var(--fs-md); font-weight: 500; color: rgba(255,255,255,0.65); }
.pricing-desc{ margin-top: var(--space-3); color: rgba(255,255,255,0.78); max-width: 50ch; }
.pricing-list{ margin-top: var(--space-5); display: grid; gap: var(--space-3); }
.pricing-list li{
  font-size: 0.95rem;
  padding-left: 26px;
  position: relative;
}
.pricing-list li::before{
  content: "";
  position: absolute; left: 0; top: 3px;
  width: 16px; height: 16px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.85);
}
.pricing-list .tag{
  display: inline-block;
  margin-left: var(--space-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  padding: 2px 8px;
  border-radius: 999px;
  color: rgba(255,255,255,0.85);
}
.pricing-card-cta{
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-self: end;
}
.pricing-card-cta .btn-ghost-dark{
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.pricing-card-cta .btn-ghost-dark:hover{ border-color: var(--white); color: var(--white); background: rgba(255,255,255,0.08); }

/* ==========================================================================
   Booking
   ========================================================================== */
.booking-wrap{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.booking-fallback{ padding: var(--space-5); text-align: center; color: var(--muted); }

/* ==========================================================================
   Contact / map
   ========================================================================== */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: stretch;
}
.contact-info{
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.contact-row{
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.contact-row svg{ width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; margin-top: 3px; }
.contact-label{ font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); margin-bottom: 2px; }
.text-link{ color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.contact-row + .btn{ align-self: flex-start; }

.contact-map{
  min-height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.contact-map iframe{ width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding-top: var(--space-7);
}
.footer-inner{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .brand-mark{ height: 28px; margin-bottom: var(--space-3); }
.footer-brand p{ max-width: 32ch; font-size: 0.9rem; }
.footer-nav ul{ display: grid; gap: var(--space-2); }
.footer-nav a{ font-size: 0.9rem; transition: color var(--dur) var(--ease); }
.footer-nav a:hover{ color: var(--white); }
.footer-contact p{ font-size: 0.9rem; margin-bottom: var(--space-2); }
.footer-contact a:hover{ color: var(--white); }

.footer-bottom{ padding-block: var(--space-4); font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* ==========================================================================
   Lightbox (studio gallery)
   ========================================================================== */
.lightbox{
  position: fixed; inset: 0;
  background: rgba(11,11,14,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-5);
  z-index: 200;
}
.lightbox[hidden]{ display: none; }
.lightbox img{ max-width: min(1100px, 100%); max-height: 85vh; border-radius: var(--radius-md); }
.lightbox-close{
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 44px; height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover{ background: rgba(255,255,255,0.22); }

/* ==========================================================================
   Breakpoints
   ========================================================================== */
@media (min-width: 640px){
  .gallery{ grid-template-columns: 1.4fr 1fr; }
  .footer-inner{ grid-template-columns: 1.3fr 1fr 1fr; }
}

@media (min-width: 768px){
  .feature-grid{ grid-template-columns: repeat(2, 1fr); }
  .contact-grid{ grid-template-columns: 1fr 1.1fr; }
  .pricing-card{ grid-template-columns: 1.5fr 1fr; align-items: center; }
}

@media (min-width: 1024px){
  .feature-grid{ grid-template-columns: repeat(4, 1fr); }
  .hero-inner{ grid-template-columns: 1.15fr 0.85fr; align-items: end; }
  .hero-card{ justify-self: end; }
}

@media (max-width: 900px){
  .site-nav{ display: none; }
  .header-actions .btn-sm{ display: none; }
  .nav-toggle{ display: inline-flex; }

  .mobile-nav{
    position: fixed;
    inset-inline: 0;
    top: 64px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
  .mobile-nav[hidden]{ display: none; }
  .mobile-nav ul{ display: grid; gap: var(--space-1); }
  .mobile-nav a{
    display: block;
    padding: var(--space-3) var(--space-2);
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--ink-soft);
    border-radius: var(--radius-sm);
  }
  .mobile-nav a:hover{ background: var(--brand-50); }
}

@media (max-width: 420px){
  .hero-card{ padding: var(--space-4); }
  .wrap{ padding-inline: var(--space-3); }
}
