/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
html, body { background: #f6f6f6; color: #000; }

/* ─────────────────────────
   TYPOGRAPHY HELPERS
───────────────────────── */
.t-switzer-medium   { font-family: 'Switzer', sans-serif; font-weight: 500; }
.t-switzer-semibold { font-family: 'Switzer', sans-serif; font-weight: 600; }
.t-switzer-light    { font-family: 'Switzer', sans-serif; font-weight: 300; }
.t-switzer-regular  { font-family: 'Switzer', sans-serif; font-weight: 400; }
.t-mono-regular     { font-family: 'Geist Mono', monospace; font-weight: 400; }
.t-mono-light       { font-family: 'Geist Mono', monospace; font-weight: 300; }
.t-jetbrains        { font-family: 'JetBrains Mono', monospace; font-weight: 400; }

/* ─────────────────────────
   SITE HEADER (sticky nav)
───────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: 78px;
  background: #f6f6f6;
  border-bottom: 0.5px solid #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 218px;
}

.site-name {
  font-family: 'Switzer', sans-serif;
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -2.16px;
  color: #000;
  text-decoration: none;
  line-height: normal;
}

.header-nav { display: flex; gap: 51px; align-items: center; }

.header-nav a {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -1.6px;
  color: #000;
  text-decoration: none;
  line-height: normal;
}

.header-nav a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   MASTER 4-COLUMN GRID
   margin: 0 200px creates the outer rails.
   Each column = (1920 - 400) / 4 = 380px.
   Column starts (from viewport): 200, 580, 960, 1340, 1720.
   Content text indent = +18px per column start.
══════════════════════════════════════════ */
main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 200px;

  --inner-line-start: 1290px; /* fallback; JS sets from meta-strip bottom */

  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.8) 1px, transparent 1px),
    linear-gradient(to left,  rgba(0, 0, 0, 0.8) 1px, transparent 1px),
    linear-gradient(to right,
      transparent 25%,  rgba(0, 0, 0, 0.15) 25%,  rgba(0, 0, 0, 0.15) calc(25% + 1px),  transparent calc(25% + 1px),
      transparent 50%,  rgba(0, 0, 0, 0.15) 50%,  rgba(0, 0, 0, 0.15) calc(50% + 1px),  transparent calc(50% + 1px),
      transparent 75%,  rgba(0, 0, 0, 0.15) 75%,  rgba(0, 0, 0, 0.15) calc(75% + 1px),  transparent calc(75% + 1px)
    );
  background-size:
    100% 100%,
    100% 100%,
    100% calc(100% - var(--inner-line-start));
  background-position:
    left top,
    right top,
    left var(--inner-line-start);
  background-repeat:   no-repeat;
  background-origin:   content-box;
  background-clip:     content-box;
}

/* ─────────────────────────
   CASE STUDY HEADER BOX
───────────────────────── */
.cs-header {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: end;
  background: #f6f6f6;
  border-left:   0.5px solid #000;
  border-right:  0.5px solid #000;
  border-bottom: 0.5px solid #000;
  padding-top:    148px;
  padding-bottom: 18px;
  position: relative;
}

.cs-title-col {
  grid-column: 1 / 3;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.cs-date-row {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  line-height: normal;
  white-space: nowrap;
}

.cs-title {
  font-family: 'Switzer', sans-serif;
  font-weight: 500;
  font-size: 128px;
  line-height: 1;
  letter-spacing: -3.84px;
  color: #000;
  white-space: nowrap;
}

.cs-desc {
  grid-column: 4;
  padding-left: 18px;
  font-size: 16px;
  line-height: normal;
  color: #000;
  align-self: end;
  padding-bottom: 2px;
}

.corner-cross {
  position: absolute;
  bottom: -5.5px;
  width: 11px; height: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-weight: 300;
  font-size: 11px;
  line-height: 1;
  color: #000;
  user-select: none;
}
.corner-cross::before  { content: '+'; }
.corner-cross--left    { left:  -5.5px; }
.corner-cross--right   { right: -5.5px; }

/* ─────────────────────────
   HERO VIDEO
───────────────────────── */
.hero-section {
  grid-column: 1 / -1;
  padding: 18px 18px 0;
}

.hero-media {
  width: 100%;
  aspect-ratio: 1734 / 918;
  background: #d9d9d9;
  overflow: hidden;
  position: relative;
}

.hero-media video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Video controls ── */
.vid-center-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  background: rgba(246, 246, 246, 0.92);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 4;
  transition: background 0.15s;
}
.vid-center-play::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-35%, -50%);
  width: 0; height: 0;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent #000;
}
.vid-center-play:hover { background: #fff; }
.hero-media.vid-playing .vid-center-play { opacity: 0; pointer-events: none; }

.vid-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.54));
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 3;
  pointer-events: none;
}
.hero-media:hover .vid-controls { opacity: 1; pointer-events: auto; }

.vid-pp {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: none; border: none;
  cursor: pointer;
  position: relative;
}
.vid-pp[data-state="paused"]::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #fff;
}
.vid-pp[data-state="playing"]::before {
  content: '';
  position: absolute;
  left: 5px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 16px;
  background: #fff;
}
.vid-pp[data-state="playing"]::after {
  content: '';
  position: absolute;
  right: 5px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 16px;
  background: #fff; border: none;
}

.vid-scrub {
  flex: 1;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.vid-scrub::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.35);
  border-radius: 1px;
}
.vid-scrub-fill {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  height: 2px; width: 0;
  background: #fff;
  border-radius: 1px;
  pointer-events: none;
}

.vid-fs {
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: none; border: none;
  cursor: pointer;
  position: relative;
}
.vid-fs::before {
  content: '';
  position: absolute;
  top: 1px; left: 1px;
  width: 9px; height: 9px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
}
.vid-fs::after {
  content: '';
  position: absolute;
  bottom: 1px; right: 1px;
  width: 9px; height: 9px;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}

/* ─────────────────────────
   SECTION DIVIDERS
───────────────────────── */
.section-divider {
  grid-column: 1 / -1;
  height: 0.5px;
  background: #000;
  position: relative;
}

.divider-mark {
  position: absolute;
  top: -5.5px;
  width: 11px; height: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-weight: 300;
  font-size: 11px;
  line-height: 1;
  color: #000;
  user-select: none;
}
.divider-mark::before  { content: '+'; }
.divider-mark--left    { left:  -5.5px; }
.divider-mark--right   { right: -5.5px; }

/* ─────────────────────────
   METADATA STRIP
───────────────────────── */
.meta-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  padding-top: 15px;
  padding-bottom: 19px;
  border-left:  0.5px solid #000;
  border-right: 0.5px solid #000;
  position: relative;
  z-index: 2;
}

.meta-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #f6f6f6;
  z-index: -1;
}

.meta-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 18px;
}

.meta-label {
  font-size: 16px;
  line-height: normal;
  color: #636363;
  white-space: nowrap;
}

.meta-value {
  font-size: 16px;
  line-height: normal;
  color: #000;
}

/* ─────────────────────────
   SECTION LABELS
───────────────────────── */
.section-label {
  grid-column: 1;
  padding-left: 18px;
  font-size: 16px;
  line-height: normal;
  color: #000;
  white-space: nowrap;
}

/* ─────────────────────────
   SECTION LABEL — right cols (3–4)
   Used for [Problem identification] which
   sits in the right half per Figma.
───────────────────────── */
.section-label-right {
  grid-column: 3 / -1;
  padding-left: 18px;
  font-size: 16px;
  line-height: normal;
  color: #000;
  white-space: nowrap;
}

/* ─────────────────────────
   GALLERIES
───────────────────────── */

/* Full-width single image or video (16:9) */
.gallery-full {
  grid-column: 1 / -1;
  padding: 0 18px;
  overflow: hidden;
  aspect-ratio: 1920 / 1080;
}

/* Full-width wide image (talkcustom 2:1 ratio) */
.gallery-wide {
  grid-column: 1 / -1;
  padding: 0 18px;
  overflow: hidden;
  aspect-ratio: 1484 / 708;
}

.gallery-wide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-full img,
.gallery-full video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 2-column paired gallery */
.gallery-2col {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  padding: 0 18px;
}

.gallery-img {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3-column portrait gallery (ring product photos) */
.gallery-portrait-3col {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding: 0 18px;
}

.gallery-portrait-cell {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 4;
}

.gallery-portrait-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─────────────────────────
   BODY TEXT (cols 3–4)
───────────────────────── */
.body-text-col {
  grid-column: 3 / -1;
  padding: 0 18px;
}

.body-text {
  font-size: 20px;
  line-height: normal;
  color: #000;
}

/* ─────────────────────────
   HORIZONTAL CLICK-TO-ADVANCE SLIDESHOWS
   Width = full content area (1484px via margin: 0 18px).
   aspect-ratio is set inline per slider to match Figma heights.
   JS advances the track with translateX, counter updates.
───────────────────────── */
.content-slider {
  grid-column: 1 / -1;
  margin: 0 18px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
  height: 100%;
}

.slide-cell {
  flex: 0 0 100%;
  height: 100%;
}

/* Slide counter — bottom right, Figma: left=calc(75%+231px) ≈ right edge */
.slide-counter {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 20px;
  line-height: normal;
  color: #000;
  padding-bottom: 16px;
  pointer-events: none;
}

/* Two-column layout inside a slide */
.slide-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  height: 100%;
}

.slide-col {
  display: flex;
  flex-direction: column;
  gap: 36px;
  height: 100%;
}

/* Image cell inside a slide — flex-grows to fill available height */
.slide-img {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.slide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Side-by-side pair within a slide column */
.slide-pair {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  min-height: 0;
}

.slide-pair .slide-img {
  flex: none;
}

/* Single full-width image slide (systems slide 1) */
.slide-single {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slide-single img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 2×2 grid slide (user testing, coha ring) */
.slide-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 36px;
  height: 100%;
}

.slide-grid-2x2 .slide-img {
  flex: none;
  height: 100%;
}

/* ─────────────────────────
   FOOTER (inside main grid)
───────────────────────── */
.footer {
  grid-column: 1 / -1;
  padding: 0 18px;
}

.footer-headline {
  font-size: 96px;
  letter-spacing: -2.88px;
  line-height: normal;
  color: #000;
  white-space: nowrap;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 36px;
}

.footer-left { display: flex; flex-direction: column; }

.footer-contact {
  display: block;
  font-size: 20px;
  line-height: normal;
  color: #000;
  white-space: nowrap;
  text-decoration: none;
}
.footer-contact + .footer-contact { margin-top: 45px; }
.footer-contact:hover { text-decoration: underline; }

.footer-btt {
  display: flex;
  justify-content: flex-end;
}

.footer-credits {
  grid-column: 1 / -1;
  padding: 13px 0 40px 18px;
  font-size: 12px;
  line-height: normal;
  color: #000;
  display: flex;
  flex-direction: column;
  gap: 16.5px;
}

.back-to-top {
  font-family: 'Geist Mono', monospace;
  font-weight: 300;
  font-size: 20px;
  line-height: normal;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.back-to-top:hover { text-decoration: underline; }

/* ─────────────────────────
   CUSTOM CURSOR
───────────────────────── */
.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: #fff;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.12s;
  user-select: none;
}

/* ─────────────────────────
   SPACING TOKENS
───────────────────────── */
.mt-18  { margin-top: 18px; }
.mt-sm  { margin-top: 24px; }
.mt-md  { margin-top: 40px; }
.mt-lg  { margin-top: 56px; }
.mt-xl  { margin-top: 80px; }
.mt-2xl { margin-top: 120px; }
.mb-sm  { margin-bottom: 24px; }
.mb-md  { margin-bottom: 40px; }
