@import url('colors_and_type.css');

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-ink);
}

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

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; gap: 8px;
  border-radius: 12px; border: 0; cursor: pointer;
  font: 600 14px/1 var(--font-body);
  text-decoration: none; transition: background 120ms ease;
  white-space: nowrap;
}
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover { background: #1f1f1f; }
.btn-secondary {
  background: var(--color-canvas); color: var(--color-ink);
  border: 1px solid var(--color-hairline);
}
.btn-secondary:hover { background: var(--color-surface-soft); }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13px; }

/* Type ------------------------------------------------------------------ */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--color-muted);
}
.display-xl {
  font-family: var(--font-display); font-weight: 500;
  font-size: 80px; line-height: 1.0; letter-spacing: -3px;
  color: var(--color-ink); margin: 0;
}
.display-lg {
  font-family: var(--font-display); font-weight: 500;
  font-size: 56px; line-height: 1.05; letter-spacing: -2px;
  color: var(--color-ink); margin: 0;
}
.display-md {
  font-family: var(--font-display); font-weight: 500;
  font-size: 40px; line-height: 1.1; letter-spacing: -1px;
  color: var(--color-ink); margin: 0;
}
.display-sm {
  font-family: var(--font-display); font-weight: 500;
  font-size: 32px; line-height: 1.15; letter-spacing: -0.5px;
  color: var(--color-ink); margin: 0;
}
.lead {
  font: 400 18px/1.55 var(--font-body);
  color: var(--color-body); margin: 0;
}

/* Wordmark -------------------------------------------------------------- */
.wordmark {
  display: inline-flex; align-items: baseline; text-decoration: none;
}
.wordmark .name {
  font-family: var(--font-display); font-weight: 500;
  font-size: 24px; line-height: 1; letter-spacing: -1.1px;
  color: var(--color-ink);
}
.wordmark .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-brand-pink); margin-left: 3px;
}

/* Top nav -------------------------------------------------------------- */
.top-nav {
  position: sticky; top: 0; z-index: 50;
  height: 64px; background: var(--color-canvas);
  display: flex; align-items: center;
}
.top-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.top-nav .links { display: flex; gap: 28px; }
.top-nav .links a {
  font: 500 14px/1 var(--font-body); color: var(--color-ink); text-decoration: none;
}
.top-nav .right { display: flex; align-items: center; gap: 14px; }

/* Horizontal-scroll case studies ------------------------------------- */
/* Outer wrapper is tall enough to give the section room to translate the
   track horizontally while the inner pin stays fixed to the viewport. */
.hscroll-wrap {
  position: relative;
  height: 320vh; /* tune: longer = slower horizontal travel */
}
.hscroll-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hscroll-viewport {
  flex: 1;
  min-height: 0;
  padding-top: 4px;
  overflow: hidden;
  padding-bottom: 64px;
}
.hscroll-track {
  display: flex;
  gap: 24px;
  height: 100%;
  align-items: stretch;
  /* Align the first card with the page container's left edge (container has
     max-width 1200px + 32px inner padding, centered). */
  padding-left: max(32px, calc((100vw - 1200px) / 2 + 32px));
  padding-right: 64px;
  will-change: transform;
}
.case-card.hcase {
  flex: 0 0 520px;
  width: 520px;
  aspect-ratio: 520 / 440;
  height: auto;
  max-height: 420px;
  min-height: 360px;
  margin: 0;
}
/* Brand logo overlay — sits in the card's flexible middle band so it scales
   with the card and never collides with the title/description or footer row. */
.hcase-mid {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}
.case-logo {
  width: clamp(170px, 54%, 300px);
  height: auto;
  display: block;
  opacity: 0.96;
}
.case-logo.case-logo-wide {
  width: clamp(240px, 82%, 440px);
  opacity: 1;
}
.hscroll-end {
  flex: 0 0 320px;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 32px;
}

/* Reduced motion / small viewports: fall back to a vertical stack ----- */
@media (prefers-reduced-motion: reduce), (max-width: 900px) {
  .hscroll-wrap { height: auto; }
  .hscroll-pin { position: relative; height: auto; overflow: visible; }
  .hscroll-viewport { overflow: visible; padding-bottom: 32px; }
  .hscroll-track {
    flex-direction: column;
    transform: none !important;
    padding-left: 32px;
    padding-right: 32px;
    height: auto;
  }
  .case-card.hcase {
    flex-basis: auto; width: 100%; height: auto;
    min-height: 0; max-height: none; aspect-ratio: auto;
  }
  .hscroll-end { display: none; }
}
/* Case-study card ------------------------------------------------------- */
.case-card {
  border-radius: 24px; padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 380px; text-decoration: none;
  transition: transform 160ms ease;
}
.case-card:hover { transform: translateY(-2px); }
.case-card.dark { color: #ffffff; }
.case-card.light { color: var(--color-ink); }
.case-card .eyebrow.dark { color: rgba(255,255,255,0.7); }
.case-card .eyebrow.light { color: rgba(10,10,10,0.65); }
.case-card .title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 30px; line-height: 1.1; letter-spacing: -0.8px;
  margin: 0;
  color: inherit;
}
.case-card .desc {
  font-family: var(--font-body); font-size: 14px; line-height: 1.55;
  margin: 0; max-width: 380px;
}
.case-card.dark .desc { color: rgba(255,255,255,0.78); }
.case-card.light .desc { color: rgba(10,10,10,0.7); }
.case-card .preview {
  margin-top: auto; padding-top: 16px;
}
.case-card .arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
}

/* Skill / tool pills --------------------------------------------------- */
.pill {
  padding: 8px 14px; border-radius: 9999px;
  background: var(--color-surface-card);
  font: 500 13px/1.2 var(--font-body); color: var(--color-ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.pill-outline {
  background: transparent; border: 1px solid var(--color-hairline);
  color: var(--color-ink);
}

/* Cream card ---------------------------------------------------------- */
.cream-card {
  background: var(--color-surface-card); border-radius: 16px;
  padding: 24px;
}

/* Outlined card ------------------------------------------------------- */
.outlined-card {
  background: var(--color-canvas); border: 1px solid var(--color-hairline);
  border-radius: 16px; padding: 24px;
}

/* Footer -------------------------------------------------------------- */
.footer {
  background: var(--color-surface-soft);
  padding-top: 72px;
}
.footer a { color: var(--color-muted); text-decoration: none; font-size: 14px; }
.footer a:hover { color: var(--color-ink); }

/* Responsive layout ---------------------------------------------------- */
/* Inline grids in the JSX set their desktop columns; these rules collapse
   them on smaller viewports (override inline styles with !important). */
@media (max-width: 900px) {
  .display-xl { font-size: 52px; letter-spacing: -1.8px; }
  .display-lg { font-size: 40px; letter-spacing: -1.2px; }
  .display-md { font-size: 30px; letter-spacing: -0.6px; }

  .hero-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .hero-grid .hero-media { display: none !important; }
  .resp-2col { grid-template-columns: 1fr !important; gap: 40px !important; }
  .resp-3col { grid-template-columns: 1fr 1fr !important; }
  .resp-footer { grid-template-columns: 1fr 1fr !important; row-gap: 40px !important; }

  /* Nav: drop the center links, keep wordmark + actions */
  .top-nav .links { display: none; }

  /* Work section header: stack title and let it wrap, drop carousel dots
     below the title instead of pinning them to the right edge. */
  .work-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding-top: 56px !important;
    padding-bottom: 28px !important;
  }
  .work-title { white-space: normal !important; }
}

@media (max-width: 560px) {
  .display-xl { font-size: 40px; letter-spacing: -1.4px; }
  .display-lg { font-size: 32px; letter-spacing: -1px; }
  .container { padding: 0 20px; }
  .resp-3col { grid-template-columns: 1fr !important; }
  .resp-footer { grid-template-columns: 1fr !important; }
  .cta-card { padding: 48px 28px !important; }
  .section { padding: 64px 0; }
}
