/* ============================================================
   Tripi Media — landing page styles
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- NAV ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo img { height: 22px; }
.nav-ig {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-ig:hover { color: var(--fg); }
.nav-ig svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- EYEBROW ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow .num { color: var(--accent); }
.eyebrow .lab { color: var(--fg-muted); }

/* ---- SECTION ---- */
.section { padding: 96px 0; border-bottom: 1px solid var(--border); }
.section-head { padding-bottom: 32px; }
.section-head .h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 16px 0 0 0;
}

/* ---- HERO ---- */
.hero {
  padding: 120px 0 160px 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 245, 245, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 245, 245, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 140px;
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 32px 0 0 0;
}
.hero h1 .r {
  color: var(--accent);
  font-style: italic;
}
.hero-lead {
  margin: 40px 0 0 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--fg);
  max-width: 820px;
}
.hero-lead strong { color: var(--accent); font-weight: 700; }

/* ---- WHY ---- */
.why-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 72px;
  align-items: start;
}
.why-body p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 0 20px 0;
  max-width: 580px;
}
.why-body p strong { color: var(--fg); font-weight: 600; }
.why-body p.thesis {
  font-size: 22px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
  letter-spacing: -0.01em;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 32px;
}
.why-body p.thesis .r { color: var(--accent); font-weight: 600; }

/* ---- REFERENCES CAROUSEL ---- */
.refs-single {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.refs-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.ref-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms var(--ease-out);
  overflow: hidden;
}
.ref-card.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.ref-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.refs-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform-origin: left center;
  z-index: 3;
  pointer-events: none;
  animation: refs-progress 3000ms linear forwards;
}
.refs-progress.is-hidden { display: none; }
@keyframes refs-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.ref-overlay {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  padding: 24px 26px 26px 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(153, 0, 0, 0) 0%,
    rgba(153, 0, 0, 0.4) 40%,
    rgba(153, 0, 0, 0.95) 100%
  );
}
.ref-role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 8px;
}
.ref-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.025em;
  line-height: 1;
  color: #fff;
}

.refs-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
.refs-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.refs-counter .cur { color: var(--accent); font-weight: 600; }
.refs-counter .sep { margin: 0 4px; color: var(--border); }
.refs-dots {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.refs-dots .dot {
  width: 24px; height: 2px;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out);
}
.refs-dots .dot.is-active { background: var(--accent); }
.refs-nav { display: flex; gap: 8px; }
.refs-nav button {
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--fg-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.refs-nav button:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}
.refs-nav button:active { transform: translateY(1px); }
.refs-nav button svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- CLIENTS ---- */
.client-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: stretch;
}
.client-thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thumb-main,
.thumb-strip > a {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--ink-7);
  aspect-ratio: 16 / 9;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.thumb-main { border-radius: 10px; }
.thumb-strip > a { border-radius: 8px; }
.thumb-main img,
.thumb-strip > a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-slow) var(--ease-out);
}
.thumb-main:hover img,
.thumb-strip > a:hover img,
.thumb-main:active img,
.thumb-strip > a:active img {
  transform: scale(1.03);
}
.thumb-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.play-bubble {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none;
  z-index: 2;
}
.thumb-main:hover .play-bubble,
.thumb-strip > a:hover .play-bubble,
.thumb-main:active .play-bubble,
.thumb-strip > a:active .play-bubble,
.thumb-main:focus-visible .play-bubble,
.thumb-strip > a:focus-visible .play-bubble {
  opacity: 1;
}
.play-bubble::before {
  content: "";
  position: absolute;
  width: 72px; height: 72px;
  border-radius: var(--radius-pill);
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--dur-base) var(--ease-out);
}
.thumb-main:hover .play-bubble::before,
.thumb-strip > a:hover .play-bubble::before,
.thumb-main:active .play-bubble::before,
.thumb-strip > a:active .play-bubble::before {
  transform: scale(1.05);
}
.play-bubble svg {
  position: relative;
  width: 26px; height: 26px;
  margin-left: 4px;
  z-index: 1;
}
.thumb-strip > a .play-bubble::before { width: 52px; height: 52px; }
.thumb-strip > a .play-bubble svg {
  width: 18px; height: 18px;
  margin-left: 3px;
}

.client-body {
  display: flex;
  flex-direction: column;
}
.client-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 56px;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 16px 0;
}
.client-role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  line-height: 1.6;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.client-copy {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg);
  margin: 24px 0 16px 0;
}
.client-copy strong { color: var(--accent); font-weight: 600; }
.client-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
}
.client-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.client-stats .cstat {
  padding: 16px 16px 16px 0;
  border-right: 1px solid var(--border);
}
.client-stats .cstat:last-child {
  border-right: none;
  padding-right: 0;
}
.client-stats .cstat:not(:first-child) { padding-left: 16px; }
.cstat .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.cstat .v {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  margin-top: 8px;
}

/* ---- FOOTER ---- */
.foot-mini { padding: 56px 0 32px 0; }
.foot-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.foot-brand img { height: 28px; }
.foot-right a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.foot-right a:hover { color: var(--accent); }
.foot-right a svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.foot-legal-mini {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-soft);
  letter-spacing: 0.04em;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .why-body p { max-width: none; }

  .client-card {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero h1 { font-size: 96px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .hero { padding: 80px 0 96px 0; }
  .hero h1 { font-size: 64px; }
  .hero-lead { font-size: 20px; margin-top: 28px; }

  .section { padding: 64px 0; }
  .section-head .h2 { font-size: 36px; }

  .thumb-strip { grid-template-columns: 1fr; }
  .client-name { font-size: 42px; }
  .client-stats { grid-template-columns: 1fr; }
  .client-stats .cstat {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px 0 !important;
  }
  .client-stats .cstat:last-child { border-bottom: none; }

  .refs-controls { flex-wrap: wrap; }
  .refs-dots { order: 3; flex-basis: 100%; justify-content: flex-start; }
}
