/* =========================================================
   style_organized.css
   Layout + components only
   Rules:
   - Typography + tokens live in base.css
   - Footer styles live in footer.css
   - No global font overrides here
   ========================================================= */

/* ---------- Guardrails ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

/* Keep body clean. base.css owns font, size, weight. */
body{
  margin: 0;
  color: var(--color-text, #0f172a);
  background: var(--color-bg-light, #fff);
}

/* ---------- Header (image) ---------- */
.header{
  position: relative;
  height: 60vh;
  min-height: 300px;
  overflow: hidden;
  padding: 0;
}
.header-image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.text-normal{ font-weight: var(--font-weight-regular, 400); }

/* ---------- Carousel (logos) ---------- */
.carousel-wrapper{
  position: relative;
  background-color: #f7f7f7;
  padding: 20px 0;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

.carousel{
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 10px;
  width: 100%;
  max-width: 100vw;

  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.carousel img{
  flex: 0 0 auto;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 5px;
  scroll-snap-align: start;
}

.arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,.4);
  border: 0;
  color: #fff;
  font-size: 2rem;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
  border-radius: 10px;
}
.arrow.left{ left: 10px; }
.arrow.right{ right: 10px; }

.arrow:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.55);
}

/* ---------- Generic content block ---------- */
.content-section{
  padding: 40px 20px;
  background-color: var(--color-bg-light, #fff);
  max-width: 900px;
  margin: 0 auto;
}

/* Spacing only, do not force a global type system here */
.content-section h2{
  font-size: clamp(1.6rem, 1.3rem + 1vw, 1.95rem);
  margin: 0 0 1rem;
}

/* ---------- Dual-column hero (Home/About/Work intros) ---------- */
.dual-column-layout{
  display: flex;
  flex-direction: column;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}
.left-side{ flex: 1; color: var(--color-primary, #022351); }
.right-side{ flex: 1; color: var(--color-text, #0f172a); }

.right-side p{
  font-size: clamp(1.02rem, .98rem + .35vw, 1.12rem);
  line-height: 1.65;
  margin: 0 0 1rem;
}

/* CTA button (renamed to avoid collision with footer .email-link icon) */
.btn-email{
  display: inline-block;
  margin-top: 2rem;
  padding: 12px 24px;
  background-color: var(--color-primary, #022351);
  color: #fff;
  text-decoration: none;
  font-weight: var(--font-weight-bold, 700);
  border-radius: 10px;
  transition: background-color .2s ease, transform .2s ease;
}
@media (hover:hover){
  .btn-email:hover{
    background-color: #011a3c;
    transform: translateY(-1px);
  }
}
.btn-email:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(2,35,81,.25);
}

/* ---------- Buttons (system) ----------
   Works for: <a class="btn ...">, <button class="btn ...">, <input class="btn ...">
   Goal: one consistent CTA style across ribbon + forms
-------------------------------------- */

.btn{
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;

  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid transparent;

  font: inherit;
  font-weight: var(--font-weight-bold, 700);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;
  user-select: none;

  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(2,35,81,.25);
}

@media (hover:hover){
  .btn:hover{
    transform: translateY(-1px);
  }
}

/* Primary */
.btn-primary{
  background: var(--color-primary, #022351);
  color: #fff;
}

@media (hover:hover){
  .btn-primary:hover{
    background: #011a3c;
  }
}

/* Optional variants (safe to have even if unused) */
.btn-secondary{
  background: transparent;
  color: var(--color-primary, #022351);
  border-color: rgba(2,35,81,.25);
}

@media (hover:hover){
  .btn-secondary:hover{
    background: rgba(2,35,81,.06);
    border-color: rgba(2,35,81,.35);
  }
}

/* Layout helpers */
.btn-block{ width: 100%; }
.btn-row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Disabled states */
.btn[disabled],
.btn[aria-disabled="true"]{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* Legacy alias (optional)
   If older pages use .btn-email, keep it wired to the new system. */
.btn-email{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;

  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid transparent;

  font: inherit;
  font-weight: var(--font-weight-bold, 700);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;

  background: var(--color-primary, #022351);
  color: #fff;

  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

@media (hover:hover){
  .btn-email:hover{
    background: #011a3c;
    transform: translateY(-1px);
  }
}

.btn-email:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(2,35,81,.25);
}




/* ---------- Slab system (Make / Matter / Move etc.) ---------- */
.slab-hero{ padding: clamp(24px, 6vw, 80px) 0; }

.slab-grid{
  display: grid;
  grid-template-columns: minmax(260px, 540px) 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.slab-heading,
.stack-title{
  font-family: var(--font-family-heading, 'Barlow', system-ui, sans-serif);
  font-weight: var(--font-weight-heavy, 800);
  color: var(--color-primary, #022351);
  line-height: .95;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
  font-size: clamp(44px, 7.6vw, 112px);
}

.slab-heading span,
.stack-title span{ display: block; margin: 0; }

.slab-heading span:not(:last-child),
.stack-title  span:not(:last-child){ margin-bottom: 0.28em; }

.slab-copy{ max-width: 720px; }

/* Default: no animation */
.slab-heading span,
.stack-title span,
.hero-stack span{
  opacity: 1;
  transform: none;
  transition: none;
}

/* Optional animation (opt in only) */
.hero-stack--animated span{
  opacity: 0;
  transform: translateY(10px);
  animation: stack-in .54s cubic-bezier(.22,.61,.36,1) forwards;
}
.hero-stack--animated span:nth-child(1){ animation-delay: .04s; }
.hero-stack--animated span:nth-child(2){ animation-delay: .10s; }
.hero-stack--animated span:nth-child(3){ animation-delay: .16s; }

@keyframes stack-in{
  from{ opacity: 0; transform: translateY(16px); }
  to{ opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce){
  .hero-stack--animated span{
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- Section headline (Stuff I’m Proud Of.) ---------- */
.section-headline{
  font-family: var(--font-family-heading, 'Barlow', system-ui, sans-serif);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  font-weight: var(--font-weight-heavy, 800);
  color: var(--color-primary, #022351);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0 0 2rem 0;
  text-align: left;
}

/* ---------- Video gallery + modal ---------- */
.video-gallery{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.video-card{
  position: relative;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px;
}
.video-card img{
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* play overlay */
.video-card::after{
  content: "";
  position: absolute;
  inset: 0;
  width: 70px;
  height: 70px;
  margin: auto;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  transition: transform .25s ease, background .25s ease;
}
.video-card::before{
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  transform: translateX(6px);
}
@media (hover:hover){
  .video-card:hover::after{
    background: rgba(0,0,0,.65);
    transform: scale(1.1);
  }
}

/* modal */
.video-modal{ position: fixed; inset: 0; display: none; z-index: 9999; }
.video-modal[aria-hidden="false"]{ display: block; }
.video-modal__backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,.6); }

.video-modal__dialog{
  position: relative;
  width: min(960px, 92vw);
  margin: 6vh auto;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}

.video-modal__close{
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,.9);
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.video-modal__close:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.55);
}

.video-modal__aspect{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-modal__aspect iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Responsive tweaks ---------- */
@media (min-width: 900px){
  .dual-column-layout{
    flex-direction: row;
    align-items: flex-start;
  }
  .left-side,
  .right-side{ max-width: 50%; }
  .right-side{ padding-left: 40px; }
}
@media (max-width: 900px){
  .slab-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 768px){
  .header{ height: 40vh; min-height: 250px; }
  .carousel img{ width: 150px; height: 150px; }
}
@media (max-width: 480px){
  .carousel img{ width: 120px; height: 120px; }
  .arrow{ font-size: 1.5rem; padding: 6px; }
}
