/* ==========================================================================
   Chris Baker — site.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) Design tokens
   -------------------------------------------------------------------------- */
:root{
  --cb-bg: #ffffff;
  --cb-text: #121212;
  --cb-muted: #5b5b5b;
  --cb-line: rgba(0,0,0,.10);
  --cb-accent: #000;

  --cb-mint: #d2fcec;
  --cb-mint-strong: #05d584;
}

/* --------------------------------------------------------------------------
   2) Base / global
   -------------------------------------------------------------------------- */
html{ scroll-behavior: smooth; }

body{
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--cb-bg);
  color: var(--cb-text);
}

a{ color: var(--cb-mint-strong); }

.ratio iframe{ border: 0; }

/* keep (you had this blanket rule; safest to keep unless you want to refactor layout) */
.col-lg-6{ text-align: left; }

/* --------------------------------------------------------------------------
   3) Section + typography helpers
   -------------------------------------------------------------------------- */
.section{ padding: 3.25rem 0; }

.section-title{
  font-size: 2.5em;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0 0 10px;
  position: relative;
  display: inline-block;
}

.section-title::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0.15em;
  height: 0.55em;
  background: var(--cb-mint);
  z-index: -1;
  border-radius: 6px;
}

.leadish{
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--cb-muted);
}

/* --------------------------------------------------------------------------
   4) Reusable media cards
   -------------------------------------------------------------------------- */
.video-card{
  border: 1px solid var(--cb-line);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

/* --------------------------------------------------------------------------
   5) Hero (carousel background + overlay content)
   -------------------------------------------------------------------------- */
.hero-header{
  position: relative;
  height: min(860px, 78svh);
  min-height: 520px;
  max-height: 860px;
  overflow: hidden;
  background: #000;
  border-bottom: 3px solid var(--cb-mint);
}

/* Carousel fills hero frame */
.hero-header #heroCarousel,
.hero-header .carousel-inner,
.hero-header .carousel-item{
  position: absolute;
  inset: 0;
  height: 100%;
}

.hero-header .carousel,
.hero-header .carousel-inner,
.hero-header .carousel-item{ height: 100%; }

.hero-header .carousel-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: translateZ(0);
}

/* White overlay haze for readability */
.hero-header::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,1) 10%,
      rgba(255,255,255,.75) 28%,
      rgba(255,255,255,.35) 60%,
      rgba(255,255,255,0) 100%
    ),
    linear-gradient(
      180deg,
      rgba(255,255,255,.22) 0%,
      rgba(255,255,255,.22) 100%
    ),
    radial-gradient(
      1200px 650px at 35% 35%,
      rgba(255,255,255,.15) 0%,
      rgba(255,255,255,.72) 100%
    );
}

/* Overlay content */
.hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  padding: 2.5rem 0;
}

.hero-logo{
  width: min(360px, 78vw);
  height: auto;
  display: block;
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 10px 28px rgba(255,255,255,.45));
}

.hero-copy{
  text-align: center;
  padding: 0 1rem;
}

.hero-actions{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.hero-btn{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  text-decoration: none;
  color: #000;
  background: rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
}

.hero-btn:hover{
  color: #000;
  background: var(--cb-mint);
  border-color: var(--cb-mint);
}

.hero-video-wrap{
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 768px){
  .hero-video-wrap{ max-width: 92%; }
  
  #heroCarousel .carousel-indicators,
  #heroCarousel .carousel-control-prev,
  #heroCarousel .carousel-control-next {
    display: none !important;
  }
}

/* Hide hero controls + dots */
.hero-header .carousel-indicators,
.hero-header .carousel-control-prev,
.hero-header .carousel-control-next{
  display: none !important;
}

/* Short desktop windows: let hero expand so it doesn't clip */
@media (min-width: 769px) and (max-height: 720px){
  .hero-header{
    height: auto;
    max-height: none;
    overflow: visible;
    padding-bottom: 1.5rem;
  }
  .hero-overlay{
    position: relative;
    inset: auto;
    padding: 1.75rem 0 1.25rem;
  }
}

/* Wide-but-short (letterbox) — DESKTOP ONLY */
@media (min-width: 769px) and (min-aspect-ratio: 16/9){
  .hero-header{
    height: auto;
    max-height: none;
    overflow: visible;
    padding-bottom: 1.5rem;
  }
  .hero-overlay{
    position: relative;
    inset: auto;
    padding: 1.75rem 0 1.25rem;
  }
}
@media (max-width: 768px){
  .hero-overlay{ padding: 1.5rem 0; }     /* less vertical air */
  .hero-header{ min-height: 0; }          /* avoid forcing height */
}
/* --------------------------------------------------------------------------
   6) Services
   -------------------------------------------------------------------------- */
#services .row,
#services .col-12{ margin-top: 0; }

.service-card{
  border: 0;
  border-radius: 14px;
  padding: 0 1.25rem;
  background: #fff;
  height: 100%;
  text-align: center;
}

.service-icon{
  width: 88px;
  height: 88px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.service-icon i{ font-size: 2.6rem; }

.service-card h3{
  font-size: 1.2em;
  font-weight: 500;
  margin-bottom: 10px;
}

.service-card p{
  margin: .5rem 0 0;
  color: var(--cb-muted);
}

.service-card a{
  color: var(--cb-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   7) Credits + filters
   -------------------------------------------------------------------------- */
.credits{ text-align: left; }

.credits h3{
  font-style: italic;
  font-size: 1.667em;
  margin: 0 0 .5rem;
  clear: both;
  font-weight: 700;
  color: #1c1b1b;
}

.credits p{
  margin: 0 0 .65rem;
  color: #676767;
}

.credits small{ color: var(--cb-muted); }

/* Desktop / tablet: roles underneath */
.credits .credit-item small{
  display: block;
  margin-top: .15rem;
}

.credits .credit-item{
  white-space: normal;
  overflow: visible;
}

@media (max-width: 768px){
  .credits .credit-item{
    margin: 0 0 .65rem;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    padding-right: 1.25rem;
  }

  .credits .credit-item small{
    display: inline;
    font-size: .85em;
    color: var(--cb-muted);
  }

  .credits .credit-item::after{
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 2.25rem;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to right,
      rgba(255,255,255,0),
      rgba(255,255,255,1)
    );
  }
}

/* Chips */
.credit-filters{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .25rem 0 1.25rem;
}

.chip{
  appearance: none;
  border: 1px solid var(--cb-line);
  background: rgba(255,255,255,.9);
  color: var(--cb-text);
  padding: .45rem .75rem;
  border-radius: 999px;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

.chip:hover{
  background: var(--cb-mint);
  border-color: var(--cb-mint);
}

.chip:active{ transform: translateY(1px); }

.chip.is-active{
  background: var(--cb-mint);
  border-color: var(--cb-mint);
  font-weight: 600;
}

/* Filtering helpers */
.credit-item.is-hidden{ display: none; }
.is-hidden-group{ display: none !important; }

/* --------------------------------------------------------------------------
   8) Projects (grid / mobile carousel) + viewer
   -------------------------------------------------------------------------- */
.projects-carousel{ position: relative; }

.projects-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  margin-top: 1rem;
}

@media (max-width: 992px){
  .projects-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tiles */
.project-tile{
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

/* Card */
.project-card{
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--cb-line);
  background: #000;
  aspect-ratio: 1 / 1;
}

.project-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .98;
  transform: scale(1.001);
  transition: transform .35s ease;
}

.project-card:hover img{ transform: scale(1.04); }

.project-overlay{
  position: absolute;
  inset: auto 0 0 0;
  padding: .75rem .9rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.65));
  color: #fff;
}

.project-overlay h3{
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.project-tile.is-active .project-card{
  outline: 3px solid var(--cb-mint-strong);
  outline-offset: 2px;
}

/* Mobile: horizontal snap carousel */
@media (max-width: 576px){
  .projects-grid{
    display: flex;
    gap: .85rem;
    overflow-x: auto;

    padding: 0 3.1rem .75rem; /* space for overlay arrows */
    margin-top: 1rem;

    scroll-snap-type: x mandatory;
    scroll-padding-left: 3.1rem;
    scroll-padding-right: 3.1rem;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .projects-grid::-webkit-scrollbar{ display: none; }

  .projects-grid .project-tile{
    flex: 0 0 86%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .projects-grid .project-card{
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
  }

  .projects-grid .project-overlay{ padding: .65rem .85rem; }
}

/* Carousel arrows (only shown if JS decides there’s overflow; also only mobile displays them via media query) */
.projects-scroll-btn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--cb-line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);

  display: grid;
  place-items: center;
  cursor: pointer;
}

.projects-scroll-btn:hover{
  background: var(--cb-mint);
  border-color: var(--cb-mint);
}

.projects-scroll-btn:disabled{
  opacity: .35;
  cursor: default;
}

/* Desktop: no overlay arrows */
.projects-carousel .projects-scroll-btn{ display: none; }

/* Mobile: overlay arrows */
@media (max-width: 576px){
  .projects-carousel .projects-scroll-btn{
    display: grid;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
  }

  .projects-carousel #projScrollPrev{ left: .35rem; }
  .projects-carousel #projScrollNext{ right: .35rem; }
}

/* Viewer panel */
.project-viewer{
  margin-top: 1.5rem;
  border: 1px solid var(--cb-line);
  border-radius: 18px;
  background: #fff;

  overflow: visible; /* ✅ speech-bubble tail */
  position: relative;
  z-index: 0;
}

/* Clip internal content to rounded corners */
.project-viewer-body{
  position: relative;
  padding: 1.25rem;
  border-radius: 18px;
  overflow: hidden;   /* ✅ keeps inner content clipped */
  background: #fff;
}

.project-viewer-title{
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  padding-right: 160px; /* room for 3 buttons */
}

/* Floating controls */
.proj-controls{
  position: absolute;
  top: .85rem;
  right: .85rem;
  display: flex;
  gap: .5rem;
  z-index: 2;
}

.proj-view-nav,
.proj-view-close{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--cb-line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);

  display: grid;
  place-items: center;
  cursor: pointer;
}

.proj-view-nav:hover,
.proj-view-close:hover{
  background: var(--cb-mint);
  border-color: var(--cb-mint);
}

/* Viewer content helpers */
.project-detail p{
  margin-bottom: .9rem;
  line-height: 1.7;
}

.project-detail blockquote{
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--cb-mint-strong);
  background: rgba(0,0,0,.03);
  border-radius: 12px;
}

.project-detail img{
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--cb-line);
}

.project-detail .video-card{ border-radius: 14px; }

/* Speech-bubble tail */
.project-viewer::before,
.project-viewer::after{
  content:"";
  position: absolute;
  left: var(--proj-tail-x, 50%);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  pointer-events: none;
}

.project-viewer::before{
  top: -12px;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #fff;
  filter: drop-shadow(0 -6px 14px rgba(0,0,0,.10));
  z-index: 2;
}

.project-viewer::after{
  top: -13px;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 13px solid rgba(0,0,0,.10);
  z-index: 1;
}

@media (max-width: 576px){
  .project-viewer-body{ padding: 1rem; }
  .proj-controls{ top: .65rem; right: .65rem; }
  .project-viewer-title{
    padding-right: 130px;
    font-size: 1.15rem;
  }

  .project-viewer::before{
    top: -10px;
    border-left-width: 10px;
    border-right-width: 10px;
    border-bottom-width: 10px;
  }

  .project-viewer::after{
    top: -11px;
    border-left-width: 11px;
    border-right-width: 11px;
    border-bottom-width: 11px;
  }
}

/* --------------------------------------------------------------------------
   9) Kit list
   -------------------------------------------------------------------------- */
.kit-list{
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.kit-list li{
  padding: .5rem 0;
  border-bottom: 1px solid var(--cb-line);
  color: var(--cb-muted);
}

/* --------------------------------------------------------------------------
   10) Awards (watermark)
   -------------------------------------------------------------------------- */
.award{
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  background: #fff;
  text-align: center;
  height: 100%;
}

.award::before{
  content: "";
  position: absolute;
  inset: -10px;
  background-image: url("http://www.christopherbaker.me.uk/wp-content/uploads/2024/09/SeekPng.com_film-reel-png_88819.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 170px auto;
  opacity: 0.8;
  pointer-events: none;
}

.award > *{
  position: relative;
  z-index: 1;
}

.award p{
  margin: 0 0 .35rem;
  font-weight: 600;
}

.award cite{
  color: var(--cb-muted);
  font-style: normal;
}

/* --------------------------------------------------------------------------
   11) Footer
   -------------------------------------------------------------------------- */
footer{
  text-align: center;
  border-top: 1px solid var(--cb-line);
  padding: 2rem 0;
}

.footer-small{
  color: var(--cb-muted);
  line-height: 1.7;
}

footer a{
  color: var(--cb-muted);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   12) Floating CTA + back-to-top
   -------------------------------------------------------------------------- */
.floating-cta{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;

  display: flex;
  gap: .5rem;
  align-items: center;

  padding: .65rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--cb-line);

  background: var(--cb-mint);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);

  text-decoration: none;
  color: var(--cb-text);
  font-weight: 500;
}

.floating-cta i{ font-size: 1.1rem; }

.floating-cta:hover{ background-color: var(--cb-mint-strong); }

.to-top{
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1000;

  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--cb-line);

  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);

  display: grid;
  place-items: center;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.to-top:hover{ background-color: var(--cb-mint-strong); }

.to-top.show{
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   13) Small responsive tweaks
   -------------------------------------------------------------------------- */
@media (max-width: 650px){
  .hero-header{ min-height: 72vh; }
  .floating-cta span{ display: none; }
}





/* --------------------------------------------------------------------------
   Single pages: compact header (logo only)
   -------------------------------------------------------------------------- */
body.single-page .hero-header{
  height: auto;
  min-height: 0px;
  max-height: none;
  background: #fff;
  overflow: visible;
  padding: 0; /* let overlay handle padding */
}

/* remove the big white haze overlay on single pages */
body.single-page .hero-header::after{
  content: none;
}

/* Single pages: keep logo in same spot as homepage */
body.single-page .hero-overlay{
  position: relative;
  inset: auto;
  display: grid;          /* match homepage */
  padding: 2.5rem 0 0px;      /* match homepage */
}

/* if any hero-only elements accidentally exist on single pages, hide them */
body.single-page .hero-video-wrap,
body.single-page #heroCarousel,
body.single-page .hero-copy,
body.single-page .hero-actions{
  display: none !important;
}