/* =========================================================
   SITE CSS — streamlined, iOS-safe, and fast
   Notes:
   - Keeps your visual design intact
   - Fixes minor bugs (e.g., invalid values, duplicate rules)
   - Single global “13-inch & down” stack (<=1280px) that centers everything
   - Tightens transitions for performance
========================================================= */

/* =======================================
   VARIABLES & BASE STYLES
======================================= */
:root{
  /* Brand */
  --brand-orange: #ec3b82;
  --brand-blue:   #021e28;
  --brand-white:  #FFF0E1;
  --brand-brown:  #a04e40;

  /* Text */
  --text-on-light:          var(--brand-blue);
  --text-on-dark-primary:   var(--brand-orange);
  --text-on-dark-secondary: var(--text-on-dark-primary);

  /* Typography */
  --font-body:    "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body-weight:    400;
  --heading-weight: 700;

  /* Layout shell (tokens) */
  --max-content: 1760px;
  --page-padding: clamp(16px, 3vw, 80px);

  /* Legacy (only if referenced somewhere) */
  --container-max-width: 1140px;

  /* Fluid type */
  --font-s:   clamp(0.95rem, 0.90rem + 0.25vw, 1.05rem);
  --font-m:   clamp(1.05rem, 1.00rem + 0.45vw, 1.25rem);
  --font-l:   clamp(1.25rem, 1.10rem + 0.90vw, 1.60rem);
  --font-xl:  clamp(2.25rem, 1.60rem + 2.50vw, 3.50rem);
  --font-xxl: clamp(3.00rem, 2.00rem + 4.00vw, 5.00rem);

  /* Fluid spacing */
  --space-xs: clamp( 6px, 0.50vw, 10px);
  --space-s:  clamp(10px, 0.80vw, 14px);
  --space-m:  clamp(16px, 1.40vw, 24px);
  --space-l:  clamp(24px, 2.20vw, 40px);
  --space-xl: clamp(36px, 3.20vw, 64px);

  /* Misc */
  --focus-outline:    rgba(243, 255, 0, 0.5);
  --transition-speed: 0.3s;

  /* Footer inlinebar dials */
  --inlinebar-gap: clamp(12px, 1.6vw, 28px);
  --inlinebar-link-size: clamp(1.125rem, 0.7rem + 1.2vw, 1.95rem);
  --inlinebar-icon-size: clamp(1.5rem, 1.0rem + 2.2vw, 2.6rem);
  --inlinebar-logo-h: clamp(60px, 4.2vw, 100px);
}

/* === Global type unification for 24" screens and up (≥1920px) === */
@media (min-width: 1920px){
  :root{
    --font-xxl: 10rem;  /* big display headlines (e.g., section-headline) */
    --font-l:   2.5rem; /* large headings / question titles */
    --font-m:   2rem;   /* body copy scale */
  }
}


/* =======================================
   CONTAINER HELPERS
======================================= */
.section-container{
  width: 100%;
  padding-inline: var(--section-gutter, var(--page-padding));
  margin-inline: 0;
}
.constrain > .section-container,
.section-container.constrain{
  max-width: var(--max-content);
  margin-inline: auto;
  width: 100%;
}
.full-bleed[data-gutter="tight"]{ --section-gutter: clamp(12px, 2.5vw, 32px); }
.full-bleed[data-gutter="loose"]{ --section-gutter: clamp(24px, 4vw, 64px); }


/* =======================================
   GLOBAL RESET & BASE
======================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body{
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-weight: var(--body-weight);
  line-height: 1.6;
  letter-spacing: 0.005em;
  background-color: var(--brand-white);
  color: var(--text-on-light);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

main { flex: 1 0 auto; }

img{ max-width: 100%; height: auto; display: block; border: 0; }

h1, h2, h3, h4, h5, h6{
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  margin: 0 0 0.75rem 0;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

a{
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-speed), text-underline-offset var(--transition-speed);
}
a:hover, a:focus{ color: var(--brand-orange); text-underline-offset: 3px; }

body > section:last-of-type { margin-bottom: 0; padding-bottom: 0; }


/* =======================================
   LAYOUT SHELL (FULL-BLEED GRID)
======================================= */
.page{
  display: grid;
  grid-template-columns:
    [full-start]   minmax(var(--page-padding), 1fr)
    [content-start] minmax(0, var(--max-content))
    [content-end]   minmax(var(--page-padding), 1fr)
    [full-end];
}
.content{ grid-column: content-start / content-end; }
.full-bleed{ grid-column: full-start / full-end; }
.prose{ max-width: 72ch; }
.section{ padding-block: clamp(48px, 8vw, 120px); }
.content img, .content video{ width: 100%; height: auto; display: block; }


/* =======================================
   UTILITIES
======================================= */
.font-heading{ font-family: var(--font-heading) !important; }
.font-body{    font-family: var(--font-body) !important; }
.fw-300{ font-weight: 300 !important; }
.fw-400{ font-weight: 400 !important; }
.fw-500{ font-weight: 500 !important; }
.fw-700{ font-weight: 700 !important; }
.text-brand-orange{ color: var(--brand-orange) !important; }
.text-brand-blue{   color: var(--brand-blue) !important; }
.text-brand-white{  color: var(--brand-white) !important; }
.text-brand-brown{  color: var(--brand-brown) !important; }
.bg-brand-orange{ background-color: var(--brand-orange) !important; }
.bg-brand-blue{   background-color: var(--brand-blue) !important; }
.bg-brand-white{  background-color: var(--brand-white) !important; }
.bg-brand-brown{  background-color: var(--brand-brown) !important; }
.bg-brand-tan{    background-color: var(--brand-tan, var(--brand-white)) !important; }
.highlight{ color: var(--brand-orange); }
.pt-6{ padding-top: 5rem; }
.pt-7{ padding-top: 7rem; }
.pt-8{ padding-top: 10rem; }


/* =======================================
   DISPLAY TYPE / SECTIONS
======================================= */
.section-headline{
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
}


/* =======================================
   BUTTONS — tighten transitions (perf)
======================================= */
.btn{
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  transition:
    background-color var(--transition-speed),
    color           var(--transition-speed),
    border-color    var(--transition-speed),
    transform       var(--transition-speed);
  border-radius: 50rem;
}
.btn-on-light{ background-color: var(--brand-orange); color: var(--brand-blue); border: none; }
.btn-on-light:hover, .btn-on-light:focus{ background-color: var(--brand-blue); color: var(--brand-white); outline: none; }
.btn-on-blue{ background-color: var(--brand-orange); color: var(--brand-blue); border: 3px solid transparent; }
.btn-on-blue:hover, .btn-on-blue:focus{ background-color: var(--brand-blue); color: var(--brand-white); border-color: var(--brand-white); outline: none; }
.btn-on-orange{ background-color: var(--brand-blue); color: var(--brand-orange); border: 3px solid transparent; }
.btn-on-orange:hover, .btn-on-orange:focus{ background-color: var(--brand-orange); color: var(--brand-blue); border-color: var(--brand-blue); outline: none; }


/* Pills */
.pill {
  display: inline-block;
  padding: .3rem .6rem;
  border-radius: 9999px;
  background: rgba(2,30,40,.06);             /* brand-blue @ low alpha */
  color: var(--brand-blue, #021e28);
  font-size: .85rem;
  line-height: 1;
  font-weight: 700;                           /* Satoshi 700 */
  white-space: nowrap;
}
.pill-date {
  background: var(--brand-orange, #ec3b82);
  color: #fff;
}

/* Labels */
.meta-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: rgba(2,30,40,.65);
  margin-bottom: .35rem;
}

/* Overview clamp */
.overview.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;                      /* show ~5 lines before expand */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.overview.expanded { -webkit-line-clamp: unset; }

/* Optional: tighter spacing on top area */
.project-top p { margin-bottom: .75rem; }


/* =========================
   NAV — custom, Bootstrap-free
========================= */
.site-nav{
  position: sticky; top: 0; z-index: 999;
  padding-block: 0.75rem;
  background: var(--brand-white);
  color: var(--brand-blue);
}
.nav-container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 2vw, 16px);
  padding-inline: clamp(12px, 3vw, 32px);
  flex-wrap: wrap;
}
.nav-brand{ display: inline-flex; align-items: center; min-width: 0; }
.nav-logo{ height: clamp(36px, 7vw, 60px); width: auto; display: block; }

/* Toggler */
.nav-toggle{
  border: 0; background: transparent; padding: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; cursor: pointer;
}
.nav-toggle:focus-visible{ outline: 2px solid var(--brand-blue); outline-offset: 3px; }

/* Hamburger icon (3 bars → X) */
.nav-icon,
.nav-icon::before,
.nav-icon::after{
  content: ""; display: block; width: 24px; height: 2px;
  background: var(--brand-blue); border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease, background-color .25s ease;
}
.nav-icon{ position: relative; }
.nav-icon::before{ position: absolute; top: -7px; left: 0; }
.nav-icon::after{  position: absolute; top:  7px; left: 0; }

/* Open state via aria-expanded (prevents breakpoint flicker) */
.nav-toggle[aria-expanded="true"] .nav-icon{ background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-icon::before{ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-icon::after{  transform: translateY(-7px) rotate(-45deg); }

/* Menu container */
.nav-menu{
  flex-basis: 100%;
  width: 100%;
  overflow: hidden;
  transition: max-height .25s ease;
  max-height: 0;
}

/* Stacked content inside the collapse */
.nav-stack{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.5vw, 20px);
  padding-top: 0.5rem;
}

/* Socials + CTAs */
.nav-socials{
  display: inline-flex; align-items: center;
  gap: clamp(10px, 1.4vw, 22px);
}
.nav-socials a{ font-size: clamp(1.6rem, 2.2vw, 2.4rem); color: var(--brand-blue); transition: color .25s; }
.nav-socials a:hover{ color: var(--brand-orange); }
.nav-ctas{ display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: nowrap; }

/* Reveal menu when open */
.site-nav.is-open .nav-menu{ max-height: 80vh; }

/* Desktop ≥ 992px: inline on right; hide toggler */
@media (min-width: 992px){
  .nav-toggle{ display: none; }
  .nav-menu{ flex-basis: auto; width: auto; max-height: none; overflow: visible; }
  .nav-stack{
    flex-direction: row; align-items: center; justify-content: flex-end;
    gap: clamp(12px, 2.5vw, 24px); padding-top: 0;
  }
}

/* Extra tiny phones */
@media (max-width: 360px){
  .nav-logo{ height: 32px; }
}

/* Email in nav (sits left of socials on desktop, stacks nicely on mobile) */
.nav-email{ display: inline-flex; align-items: center; }
.nav-email-link{
  font-weight: 600;
  font-size: clamp(0.95rem, 0.6rem + 1vw, 1.25rem);
  color: var(--brand-blue);
  text-decoration: none;
  line-height: 1;
}
.nav-email-link:hover,
.nav-email-link:focus{
  color: var(--brand-orange);
  text-decoration: underline;
}

/* Keep email on one line on desktop, allow wrapping on small screens if needed */
@media (min-width: 992px){
  .nav-email{ white-space: nowrap; }
}


/* =======================================
   HERO (Bootstrap-free, center-locked)
======================================= */
.hero-section{
  position: relative;
  width: 100%;
  min-height: 80vh;                    /* keeps the hero tall on mobile too */
  display: flex;
  align-items: center;
  background: linear-gradient(-45deg, #fff0e1, #ec3b82, #021e28, #ec3b82);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  color: var(--brand-white, #fff0e1);
  overflow: hidden;
}

@keyframes gradient{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

.hero-content{ padding-top: 2rem; }

/* Center the headline + tagline together */
.hero-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(0.3rem, 0.9vw, 0.9rem);   /* adjust this to tighten/loosen H1↔H2 */
}

/* Headline */
.hero-xl{
  /* Fills big monitors, shrinks safely on phones */
  font-size: clamp(3rem, 12vw, 12rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;                           /* gap controls spacing */
  text-wrap: balance;
  overflow-wrap: anywhere;              /* prevents overflow on tiny screens */
}

/* Subhead (tracks the headline’s feel) */
.hero-subtitle{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.125rem, 4.2vw, 2.5rem);
  line-height: 1.28;
  max-width: 60ch;                      /* keep as-is design wise */
  margin: 0;                            /* gap controls spacing */
}

/* Scroll hint */
.scroll-down{ 
  text-align: center; 
  margin-top: clamp(0.9rem, 2.6vw, 1.75rem);
}
.scroll-down .bi{
  font-size: 4rem; 
  color: #FFF0E1;
  display: inline-block; 
  animation: bounceDown 1.5s infinite;
}
@keyframes bounceDown{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(8px); }
}

/* Entrance animation */
.hero-content h1,
.hero-content h2{
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease-out forwards;
  will-change: opacity, transform;
}
.hero-content h2{ animation-delay: 0.3s; }
@keyframes fadeUp{ to{ opacity:1; transform: translateY(0);} }
@media (prefers-reduced-motion: reduce){
  .hero-content h1, .hero-content h2{ animation: none; opacity: 1; transform: none; }
}

/* Keep the hero tall and centered on mobile (no overrides that unset height) */
@media (max-width: 767px){
  .hero-section{ align-items: center; padding-top: 40px; }
}

/* =======================================
   PORTFOLIO GRID (3-col cards)
======================================= */
.portfolio-grid-section{
  padding-block: clamp(2rem, 6vw, 5rem);
}
.portfolio-grid-3col{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 32px);
}
.project-card{
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background-color: var(--brand-blue);
  color: var(--brand-white);
}
.project-card .project-img,
.project-card .project-video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay button — translucent pill */
.video-overlay-btn{
  position: absolute;
  inset: 0;
  margin: auto;
  height: fit-content;
  width: fit-content;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: rgba(2, 30, 40, 0.55);
  color: var(--brand-white);
  border: 2px solid rgba(255, 240, 225, 0.9);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  -webkit-backdrop-filter: saturate(140%) blur(2px);
  backdrop-filter: saturate(140%) blur(2px);
  font-weight: 700;
  letter-spacing: .01em;
  opacity: 0;
  transform: translateY(0);
  transition: opacity var(--transition-speed) ease, transform .2s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.project-card:hover .video-overlay-btn,
.video-overlay-btn:focus-visible{
  opacity: 1;
  transform: translateY(-1px);
  outline: none;
}
.video-overlay-btn:active{
  transform: translateY(0);
  box-shadow: 0 4px 18px rgba(0,0,0,.25);
}

/* Responsive columns */
@media (max-width: 991px){
  .portfolio-grid-3col{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px){
  .portfolio-grid-3col{ grid-template-columns: 1fr; }
}

/* Video helpers */
.project-video{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
}
.video-container{ position: relative; overflow: hidden; border-radius: 1rem; }

.video-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--brand-white, #FFF0E1);
}

.project-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;

  border: 0;
  outline: 0;
  border-radius: inherit;
  background-color: inherit;

  box-shadow: none;
  filter: none;

  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.deliverables-list {
  /* allow wrapping to the next line cleanly */
  white-space: normal;
}

.deliverables-list .list-inline-item {
  /* tighten spacing a touch */
  margin-right: .25rem;
}

.deliverables-list .list-inline-item:not(:last-child)::after {
  content: "•";
  margin-left: .5rem;
  color: rgba(2, 30, 40, 0.35); /* brand-blue, low alpha */
}


/* =======================================
   TESTIMONIALS — vertical cards on a horizontal rail
======================================= */
.t-rail{
  --gap: clamp(18px, 2.2vw, 28px);
  --card-w: clamp(340px, 26vw, 560px);
  --card-h: clamp(200px, 22vh, 300px);
  --card-pad: clamp(14px, 1.8vw, 22px);
  --card-gap: clamp(8px, 1.2vw, 14px);
  --avatar: clamp(56px, 5.5vw, 80px);

  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  gap: var(--gap);
  padding: var(--card-pad) 4px var(--card-pad) 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;

  /* soft edges */
  mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}
.t-rail::-webkit-scrollbar{ display: none; }
#tRail{ cursor: grab; }
#tRail.is-dragging{ cursor: grabbing; }

.t-card{
  flex: 0 0 var(--card-w);
  scroll-snap-align: start;
  border: 0;
}
.t-card-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--card-gap);
  padding: var(--card-pad);
  min-height: var(--card-h);
}
.t-avatar{ width: var(--avatar); height: var(--avatar); border-radius: 50%; object-fit: cover; }
.t-name{
  margin: 4px 0 2px 0;
  font-weight: 700;
  line-height: 1.15;
  font-size: clamp(1.05rem, 0.6rem + 1.1vw, 1.5rem);
}
/* Subhead sits between name and quote, sized between them */
.t-subhead{
  margin: 0 0 4px 0;
  font-weight: 500;
  opacity: .85;
  /* between .t-name and .t-quote */
  font-size: clamp(1rem, 0.55rem + 1.0vw, 1.35rem);
  line-height: 1.25;
}


.t-quote{
  margin: 0;
  line-height: 1.4;
  opacity: .95;
  font-size: clamp(0.95rem, 0.5rem + 0.9vw, 1.25rem);
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
  -webkit-line-clamp: 2;
}
@media (min-width: 1600px){
  .t-quote{ -webkit-line-clamp: 3; }
}
.t-stars{
  color: var(--brand-orange, #FFA048);
  font-size: clamp(1.1rem, 0.6rem + 1vw, 1.6rem);
  white-space: nowrap;
  margin-top: 2px;
}
@media (hover:hover){
  .t-card{ transition: transform .2s ease; }
  .t-card:hover{ transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce){
  .t-card, .t-rail{ scroll-behavior: auto; }
}


/* =======================================
   FAQ + ABOUT/CONTACT — unified 2-col grid
======================================= */
.faq-section,
.about-contact-section{
  padding-block: clamp(3rem, 6vw, 6.5rem);
}
.faq-section > .section-container,
.about-contact-section > .section-container{
  width: 100%;
  padding-inline: var(--page-padding);
  margin: 0;
}

/* Shared grid */
.faq-grid,
.duo-grid{
  --split-gap: var(--footer-gap, clamp(20px, 3vw, 48px));
  display: grid;
  align-items: start;
  gap: var(--split-gap);
  grid-template-columns: 1fr;               /* mobile */
}
.faq-grid > *, .duo-grid > *{ min-width: 0; }

/* Tablet: 2 equal columns (stable mid zone) */
@media (min-width: 768px){
  .faq-grid, .duo-grid{
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }
}

/* Desktop: asymmetric split at 1100px+ */
@media (min-width: 1100px){
  .faq-grid, .duo-grid{
    grid-template-columns:
      minmax(720px, 2fr)
      minmax(360px, 1.5fr);
  }
}

/* FAQ specifics */
.faq-left .section-headline{
  margin: 0;
  font-size: var(--font-xxl);
  text-wrap: balance;
  word-break: keep-all;
  hyphens: auto;
}
.faq-right .custom-accordion{ width: 100%; max-width: none !important; margin: 0; }
.accordion-item{ border-bottom: 1px solid rgba(2,30,40,.16); }
.accordion-header{
  -webkit-appearance: none; appearance: none;
  background: none; border: 0; width: 100%; text-align: left;
  font-weight: 700; font-size: var(--font-l);
  padding: clamp(12px, 1.2vw, 22px) 0;
  color: var(--brand-blue); cursor: pointer; position: relative;
  transition: color .25s ease;
}
.accordion-header:hover{ color: var(--brand-orange); }
.accordion-header:focus-visible{ outline: 2px solid var(--brand-orange); outline-offset: 2px; border-radius: 4px; }
.accordion-header::after{
  content: "▸"; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%); transition: transform .25s ease, opacity .2s ease; opacity: .6;
}
.accordion-item.open .accordion-header::after{ transform: translateY(-50%) rotate(90deg); opacity: .9; }
.accordion-body{
  height: 0; overflow: hidden; opacity: 0;
  font-size: var(--font-m); color: #555; padding-right: 2.25rem;
  transition: height .35s ease, opacity .25s ease, padding-top .25s ease; will-change: height, opacity;
}
.accordion-item.open .accordion-body{ opacity: 1; padding-top: .5rem; }
@media (prefers-reduced-motion: reduce){
  .accordion-body{ transition: none; }
  .accordion-header::after{ transition: none; }
}


/* =======================================
   FAQ — true center for accordion headers on mobile
   (keeps desktop left-align; no design changes)
======================================= */
@media (max-width: 767.98px){
  .accordion-header{
    /* space reserved for chevron on the right; mirror it on the left */
    --acc-icon: 2.25rem;            /* matches your .accordion-body padding-right */
    text-align: center;             /* center the title to the full row */
    padding-left: var(--acc-icon);  /* balance the chevron space */
    padding-right: var(--acc-icon); /* preserve tap target by the chevron */
    min-width: 0;                   /* prevent intrinsic overflow */
    overflow-wrap: anywhere;        /* long words won’t nudge the layout */
  }

  /* Chevron stays pinned to the edge; no layout influence */
  .accordion-header::after{
    right: 0;                       /* keep your current visual */
  }
}






/* About & Contact specifics */
.about-contact-section{ background-color: var(--brand-blue); color: var(--brand-white); }
.about-contact-section .section-headline{
  margin: 0 0 .5rem 0;
  font-size: var(--font-xxl);
}
.about-contact-section .section-subtitle{
  font-size: var(--font-l);
  line-height: 1.4;
  margin: 0.25rem 0 0 0;
}

/* Make About body copy span full left column (match FAQ left) */
.about-contact-section .ac-left .about-copy{
  max-width: 115ch;
  width: 100%;
}
.about-contact-section p{ font-size: var(--font-m); }

/* Contact form */
.ac-form{
  display: grid;
  gap: clamp(12px, 1.6vw, 18px);
  max-width: 66ch;
  width: 100%;
}
.ac-form .form-row{ display: grid; gap: 6px; }
.ac-form label{ font-weight: 600; font-size: var(--font-m); }
.ac-form input, .ac-form textarea{
  width: 100%; appearance: none; font: inherit;
  color: var(--brand-blue); background: var(--brand-white);
  border: 2px solid rgba(255,255,255,.2); border-radius: 12px;
  padding: 0.75rem 1rem; transition: border-color .2s ease, box-shadow .2s ease;
}
.ac-form textarea{ resize: vertical; min-height: 140px; }
.ac-form input:focus, .ac-form textarea:focus{
  outline: none; border-color: var(--brand-orange); box-shadow: 0 0 0 3px rgba(236,59,130,.25);
}

/* Large screens: form fills right track; copy remains comfortable */
@media (min-width: 1920px){
  .ac-right .ac-form{ max-width: none; width: 100%; }
}

/* ===== Fix: make Contact form full-width on stack (≤1280px) ===== */
@media (max-width: 1280px){
  /* Let stacked grids stretch to the container edges */
  .duo-grid,
  .faq-grid{
    grid-template-columns: 1fr !important;
    justify-items: stretch; /* not center — children fill width */
  }

  /* Remove desktop cap from the form and its wrapper */
  .about-contact-section .ac-right,
  .about-contact-section .form-wrapper,
  .about-contact-section .ac-form{
    max-width: none;
    width: 100%;
  }

  /* Ensure inner controls actually span the form */
  .ac-form .form-row,
  .ac-form input,
  .ac-form textarea{
    width: 100%;
  }
}


/* =======================================
   TRUE FOOTER — 2-col grid (inlinebar + fine print)
======================================= */
.site-footer{
  background-color: var(--brand-blue);
  color: var(--brand-white);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

/* Divider */
.footer-divider{
  border-top: 6px solid var(--brand-orange);
  width: 100vw;
  margin: 0 0 clamp(1rem, 2vw, 1.5rem) 0;
  position: relative;
  left: 50%;
  margin-left: -50vw;
}

/* Footer grid container */
.site-footer .section-container{
  --split-gap: var(--footer-gap, clamp(20px, 3vw, 48px));
  width: 100%;
  padding-inline: var(--page-padding);
  margin: 0;
  display: grid;
  align-items: center;
  gap: var(--split-gap);
  grid-template-columns: 1fr;
}
@media (min-width: 768px){
  .site-footer .section-container{
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }
}
@media (min-width: 1100px){
  .site-footer .section-container{
    grid-template-columns:
      minmax(720px, 2fr)
      minmax(360px, 1.5fr);
  }
}

/* Left group: inlinebar */
.footer-inlinebar{ min-width: 0; }
.inlinebar-row{
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(12px, 1.4vw, 24px);
}
.inlinebar-nav{
  display: inline-flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 20px);
  padding: 0;
  margin: 0;
  list-style: none;
}
.inlinebar-nav a{
  color: var(--brand-white);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(.85rem, .55rem + 1.0vw, 1.25rem);
  line-height: 1;
  transition: color .25s ease, text-decoration-color .25s ease;
}
.inlinebar-nav a:hover{ color: var(--brand-orange); text-decoration: underline; }
.inlinebar-socials{
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
}
.inlinebar-socials a{
  font-size: clamp(1.1rem, .8rem + 1.5vw, 2.2rem);
  color: var(--brand-white);
  line-height: 1;
  transition: color .25s ease;
}
.inlinebar-socials a:hover{ color: var(--brand-orange); }
.inlinebar-logo{
  height: clamp(28px, 3.5vw, 64px);
  width: auto;
  display: inline-block;
}

/* Right group: fine print */
.footer-fineprint{
  margin: 0;
  text-align: center;
  font-size: var(--font-s);
  opacity: .9;
}
.footer-fineprint a{
  color: var(--brand-orange);
  font-weight: 600;
  text-decoration: underline;
  transition: color .3s ease, text-decoration-color .3s ease;
}
.footer-fineprint a:hover{ color: var(--brand-white); }
@media (min-width: 1100px){
  .footer-fineprint{ text-align: right; justify-self: end; }
}

/* =======================================
   FOOTER — mobile overflow fix (non-visual)
   Keeps left group order & right fine print intact
======================================= */

/* Guard against min-content overflow in the 2 grid columns */
.site-footer .section-container,
.footer-inlinebar,
.footer-fineprint{
  min-width: 0;
}

/* Let long tokens (email/URLs) break instead of widening the viewport */
.site-footer a,
.site-footer p,
.site-footer li{
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

/* On phones, allow the left inlinebar to wrap WITHOUT changing its order/alignment */
@media (max-width: 767.98px){
  .inlinebar-row{
    flex-wrap: wrap;           /* enables wrapping on small screens */
    justify-content: flex-start; /* keep the left grouping/feel */
    gap: clamp(12px, 1.4vw, 24px);
  }

  /* Make children shrink/wrap cleanly, never forcing horizontal scroll */
  .inlinebar-row > *{
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;            /* preserve order; allow wrap when needed */
  }

  /* Ensure logo never pushes width */
  .inlinebar-logo{
    max-width: 100%;
    height: clamp(28px, 3.5vw, 64px); /* same visual sizing as your base */
  }
}





/* =======================================
   13" & DOWN (≤1280px): global center + stack
   (forces any stragglers to center-align)
======================================= */
@media (max-width: 1280px){
  /* Stack shared grids */
  .faq-grid, .duo-grid, .site-footer .section-container{
    grid-template-columns: 1fr !important;
    justify-items: center;
  }

  /* Center key blocks & text */
  .section-container,
  .faq-left, .faq-right,
  .about-contact-section .ac-left, .about-contact-section .ac-right,
  .about-copy, .ac-form,
  .hero-inner,
  .portfolio-left, .portfolio-right,
  .site-footer .footer-inlinebar, .site-footer .footer-fineprint{
    text-align: center;
    margin-inline: auto;
  }

  /* Center all headings and paragraphs site-wide for small screens */
  h1, h2, h3, h4, h5, h6,
  .section-headline,
  p, li{
    text-align: center;
  }

  /* Keep FAQ chevron space when centered */
  #faq .accordion-header{
    text-align: center;
    padding-right: 2.25rem;
  }

  /* Footer inlinebar wraps & centers */
  .inlinebar-row{ justify-content: center; }
}



/* MODALS */


.project-grid { display: grid; gap: clamp(16px, 2vw, 32px); }
@media (min-width: 992px){
  .project-grid { grid-template-columns: minmax(360px, 520px) 1fr; align-items: start; }
}

.project-right video,
.project-right img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px; /* match rounded-4 */
}

.pill {
  display: inline-block;
  padding: .3rem .6rem;
  border-radius: 9999px;
  background: rgba(2,30,40,.06);
  color: var(--brand-blue, #021e28);
  font-size: .85rem;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}
.pill-date { background: var(--brand-orange, #ec3b82); color: #fff; }

.meta-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: rgba(2,30,40,.65);
  margin-bottom: .35rem;
}

.overview.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.overview.expanded { -webkit-line-clamp: unset; }



/* 1-col mobile, 2-col desktop */
.project-grid { display: grid; gap: clamp(16px, 2vw, 32px); }
@media (min-width: 992px){
  .project-grid { grid-template-columns: minmax(360px, 520px) 1fr; align-items: start; }
}

/* Right column becomes a simple vertical stack you can keep appending to */
.project-right { display: grid; gap: clamp(12px, 1.2vw, 16px); }

/* Unified media styling (images & videos) */
.media-block{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;       /* match rounded-4 */
  background: var(--brand-white, #FFF0E1);
  box-shadow: 0 2px 8px rgba(2,30,40,.08);
  overflow: hidden;
}




/* Top text block */
.project-top p { margin-bottom: .75rem; }

/* Responsive gallery grid: 1-col mobile, 2-col desktop, consistent 16:9 tiles */
.project-gallery {
  display: grid;
  gap: clamp(12px, 1.2vw, 18px);
  grid-template-columns: 1fr;
}
@media (min-width: 992px) {
  .project-gallery { grid-template-columns: 1fr 1fr; }
}

/* Optional: make a tile span both columns (hero moments) */
@media (min-width: 992px) {
  .project-gallery .span-2 { grid-column: 1 / -1; }
}

/* 16:9 media cards */
.media-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px; /* match rounded-4 */
  overflow: hidden;
  background: var(--brand-white, #FFF0E1);
  box-shadow: 0 2px 8px rgba(2,30,40,.08);
  margin: 0;
}

/* Ensure img/video fill the frame */
.media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 0;
  outline: 0;
  backface-visibility: hidden;
  transform: translateZ(0);
}




/* ================================
   UNIVERSAL 16:9 LOCK (Grid + Modals)
   — no HTML changes, no layout changes
================================ */

/* GRID: the card dictates 16:9; media fills the box */
.portfolio-grid-3col .project-card{
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}
.portfolio-grid-3col .project-card .project-img,
.portfolio-grid-3col .project-card .project-video{
  width: 100%;
  height: 100%;          /* fill the ratio box */
  display: block;
  object-fit: cover;
  border-radius: inherit;
  contain-intrinsic-size: 720px 405px; /* 16:9 placeholder to reduce CLS */
  content-visibility: auto;
}

/* If a wrapper is used (e.g., .video-container) in grid, make it fill too */
.portfolio-grid-3col .project-card .video-container{
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

/* MODALS: the media itself imposes 16:9 based on its width */
.modal .project-img,
.modal .project-video{
  display: block;
  width: 100%;
  height: auto;          /* height derived from aspect-ratio */
  aspect-ratio: 16 / 9;  /* single source of truth in modals */
  object-fit: cover;
  contain-intrinsic-size: 1280px 720px; /* larger placeholder for modal context */
  content-visibility: auto;
}

/* If you wrap videos in .video-container inside modals, support that too */
.modal .video-container{
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}
.modal .video-container > video,
.modal .video-container > img,
.modal .video-container > iframe{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 0;
}


