/* ---------- Tokens ---------- */
:root {
  --blue-600: #1f81ea;
  --blue-500: #2886eb;
  --stone-900: #1c1917;
  --stone-500: #78716c;
  --stone-400: #a8a29e;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --zinc-100: #f4f4f5;
  --zinc-800: #27272a;
  --accent-yellow: #efe375;
  --white: #ffffff;

  --font-serif: 'Instrument Serif', serif;
  --font-sans: 'Instrument Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --blue-gradient: linear-gradient(173deg, var(--blue-600) 23%, var(--blue-500) 86%);
  --blue-gradient-text: linear-gradient(170deg, var(--blue-600) 32%, var(--blue-500) 71%);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--stone-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
h1, h2 { font-weight: 400; }
:focus-visible { outline: 2px solid #EFE375; outline-offset: 2px; }

.dot-grid {
  background-image: radial-gradient(circle, rgba(40, 134, 235, 0.07) 2px, transparent 2.2px);
  background-size: 16px 16px;
  background-position: 0 0;
  background-attachment: fixed;
}

/* ---------- Floating Nav ---------- */
.floating-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav-pill {
  display: flex;
  align-items: center;
  height: 32px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 4px 10px 0 rgba(77, 77, 77, 0.15);
}
.nav-pill--dots { gap: 8px; padding: 0 10px; }
.nav-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  transition: background 0.15s ease, transform 0.1s ease;
}
.nav-dot:hover { background: rgba(0, 0, 0, 0.2); }
.nav-dot:active { transform: scale(0.85); }
.nav-dot--active {
  background: linear-gradient(154deg, var(--blue-600) 32%, var(--blue-500) 71%);
  box-shadow: inset 0 4px 4px rgba(255, 255, 255, 0.25), 0 2px 8px rgba(102, 102, 102, 0.05);
}
.nav-dot--active:hover { background: linear-gradient(154deg, var(--blue-600) 32%, var(--blue-500) 71%); }
.nav-pill--links { gap: 6px; padding: 4px; }
.nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 46px;
  background: var(--zinc-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background 0.15s ease, transform 0.1s ease;
}
.nav-icon:hover { background: var(--stone-200); }
.nav-icon:active { background: var(--stone-200); transform: scale(0.92); }
.nav-icon--photo img { width: 14px; height: 12px; object-fit: cover; border-radius: 2px; }

.nav-icon-wrap { position: relative; display: flex; }
.nav-tooltip {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 12px; /* 8px gap below the nav pill (icon sits 4px inside it) */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0s linear 0.15s;
  z-index: 10;
}
.nav-icon-wrap:hover .nav-tooltip,
.nav-icon-wrap:focus-within .nav-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.15s ease;
}
.nav-tooltip__bubble {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 10px;
  /* drop-shadow (not box-shadow) so the caret's outline is shadowed too */
  filter: drop-shadow(0 1px 3px rgba(16, 24, 40, 0.1)) drop-shadow(0 1px 2px rgba(16, 24, 40, 0.06));
  white-space: nowrap;
  transform: translateY(-4px);
  transition: transform 0.15s ease;
}
.nav-icon-wrap:hover .nav-tooltip__bubble,
.nav-icon-wrap:focus-within .nav-tooltip__bubble {
  transform: translateY(0);
}
.nav-tooltip__caret {
  position: absolute;
  /* SVG's stroke baseline sits on the bubble's 1px top border */
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 6px;
}
.nav-tooltip__text {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  color: #3f3f46;
}
.nav-tooltip__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav-tooltip__copy img { width: 12px; height: 12px; }
.nav-resume {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px 0 6px;
  border-radius: 999px;
  background: var(--zinc-100);
  transition: background 0.15s ease, transform 0.1s ease;
}
.nav-resume:hover { background: var(--stone-200); }
.nav-resume:active { background: var(--stone-200); transform: scale(0.96); }
.nav-resume span {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 10px;
  color: var(--zinc-800);
}

/* ---------- Hero ---------- */
.hero {
  /* Fill the viewport so the card sits at the bottom, but never let the
     gap between title and card grow past --hero-max-gap on tall screens.
     Content height = top padding + title + card (card keeps 584:458). */
  --hero-pad-top: 152px;
  --hero-title-h: 144px;
  --hero-card-h: calc(min(48.95vw, 610px) * 458 / 584);
  --hero-max-gap: 100px;
  min-height: 100vh;
  min-height: min(100vh, calc(var(--hero-pad-top) + var(--hero-title-h) + var(--hero-card-h) + var(--hero-max-gap)));
  display: flex;
  align-items: stretch;
  background-color: var(--white);
}
.hero-b {
  padding-bottom: 106px;
}
.hero-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 152px;
}
.hero-title {
  line-height: 0;
}
.hero-title__img {
  display: block;
  width: 391px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.hero-top {
  width: 48.95%;
  max-width: 610px;
  height: auto;
  margin-top: auto;
}
.hero-bottom {
  width: 100%;
  max-width: 1244px;
  margin: 0 auto;
  margin-top: -2px;
}
.hero-quote { display: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  color: #A8A29E;
  margin-bottom: 6px;
}
/* ---------- Ticker ---------- */
.ticker {
  background: #FAFAF9;
  height: 48px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background-image: repeating-linear-gradient(90deg, #E7E5E4 0 1px, transparent 2px 14px);
  border: 1px solid #E7E5E4;
  border-right: 0;
  border-left: 0;
}
.ticker__track {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 18s linear infinite;
}
.ticker__group {
  display: flex;
  gap: 40px;
  padding-left: 40px;
  flex-shrink: 0;
}
.ticker__track span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.54px;
  text-transform: uppercase;
  color: var(--white);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
}

/* ---------- Case Study ---------- */
.case-study {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--white);
}
.case-study#work-2 {
  border-top: 1px solid var(--Zinc-Gray-200, #E4E4E7);
  background: #FFF;
  box-shadow: 0 -10px 15px -3px rgba(16, 24, 40, 0.08), 0 -4px 6px -2px rgba(16, 24, 40, 0.06);
}
.case-study__panel { display: flex; height: 100%; }
.case-study__content {
  width: 400px;
  flex-shrink: 0;
  border-right: 1px solid var(--stone-200);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.case-study__heading { display: flex; flex-direction: column; gap: 8px; }
.case-study__title {
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -1.2px;
  background: var(--blue-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tag-row { display: flex; gap: 4px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  color: var(--stone-400);
  border: 1px solid var(--stone-200);
  border-radius: 2px;
  padding: 2px 5px;
}
.case-study__body { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 2px; }
.field__copy {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: -0.36px;
  color: var(--stone-500);
}
.case-study__body hr { border: none; border-top: 1px solid var(--stone-200); }
.stat-row { display: flex; gap: 18px; }
.stat { flex: 1; }
.stat__num {
  font-family: var(--font-sans);
  font-size: 32px;
  letter-spacing: -0.96px;
  color: var(--stone-900);
}
.stat__label {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: -0.36px;
  color: var(--stone-500);
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 320px;
  max-width: 100%;
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(179deg, var(--blue-600) 23%, var(--blue-500) 86%);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: -0.36px;
  box-shadow: 0 1px 2px rgba(102, 102, 102, 0.15), inset 0 0 4px rgba(255, 255, 255, 0.5);
  transition: background 0.15s ease, box-shadow 0.15s ease, border-radius 0.15s ease;
}
.btn:hover {
  background: linear-gradient(179deg, rgb(21, 119, 224) 23%, rgb(22, 124, 233) 86%);
  box-shadow: 0 4px 3px rgba(16, 24, 40, 0.1), 0 2px 2px rgba(16, 24, 40, 0.06), inset 0 0 4px rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
.btn:active {
  background: linear-gradient(179deg, rgb(19, 109, 206) 23%, rgb(20, 114, 215) 86%);
  border-radius: 14px;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.5);
}
.case-study__visual {
  flex: 1;
  background: var(--stone-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.case-study__visual img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 0 120px;
  box-shadow: 0 2px 2px rgba(255, 255, 255, 0.25);
}
.case-study__visual--phone {
  justify-content: flex-start;
}
.case-study__visual--phone img {
  position: absolute;
  padding: 0;
  padding-top: 35px;
  padding-right: 35px;
}

/* ---------- Gallery ---------- */
.gallery { padding: 16px; }
.gallery-grid {
  max-width: 2560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--stone-100);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  &:hover {
    background-color: #F0F0EF;
  }
}
.gallery-item img.full-img {
  width: 100%;
  height: 100%;
}
.gallery-item.no-flex {
  justify-content: flex-end;
  .custom-img {
    width: 550px;
    float: right;
  }
} 

.gallery-item img { width: 100%; height: 100%; object-fit: contain; padding: 56px; }

.gallery-item {
  .img-2 {
    padding: 0;
  }

  .img-3 {
    padding-bottom: 0;
  }

  .img-duo {
    padding: 0 32px;
    height: auto !important;
    align-self: flex-end;
  }

  .img-8 {
      padding: 0;
      padding-right: 92px;
      height: auto;
  }
}

/* ==========================================================
   Tablet
   ========================================================== */
@media (max-width: 1199px) {
  .hero-title__img { width: 326px; }
  .hero { --hero-title-h: calc(326px * 144 / 391); }
  .case-study__content { width: 340px; padding: 32px; }
}

/* ==========================================================
   Merged hero + quote "blue card"
   ========================================================== */
@media (max-width: 1250px) {
  .hero-inner { padding-bottom: 0; }
  /* .hero-top { max-width: 343px; }
  .hero-bottom { display: none; } */
}

/* ==========================================================
   Mobile  (matches iPhone 375 design)
   ========================================================== */
@media (max-width: 767px) {
  .floating-nav { top: 16px; flex-wrap: wrap; justify-content: center; width: 100%; padding: 0 16px; }
  .nav-pill--dots { display: none; }
  .nav-icon { width: 38px; height: 38px; }
  .nav-pill { height: 46px; }
  .nav-icon img[src*="nav-linkedin"] { width: 16px; height: 16px; }
  .nav-icon--photo img { width: 19px; height: 16px; }
  .nav-icon img[src*="nav-frame.svg"] { width: 18px; height: 18px; }
  .nav-resume { height: 38px; padding: 0 12px 0 10px; }
  .nav-resume img { width: 18px; height: 18px; }

  .hero-inner { padding-top: 120px; }
  .hero-title__img { width: 347px; max-width: calc(100% - 32px); }

  .ticker__track { visibility: hidden; }

  .case-study { position: static; height: auto; overflow: visible; }
  .case-study__panel { flex-direction: column-reverse; height: auto; min-height: 0; }
  .case-study__content {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--stone-200);
    padding: 24px 16px;
    gap: 20px;
  }
  .case-study__title { font-size: 32px; }
  .stat__num { font-size: 24px;}
  .btn { width: 100%; padding: 12px 20px; }
  .case-study__visual { min-height: 300px; padding: 24px 0; }
  .case-study--reverse .case-study__panel { flex-direction: column; }

  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }

  .case-study__visual img {
    padding: 12px 16px 0;
  }

  .case-study__visual--phone img {
    padding-left: 0;
  }

  .hero-top {
    margin-top: 88px;
    max-width: unset;
    padding: 0 16px;
    width: 100%;
    
  }
  .hero-top__title {
    transform-box: fill-box;
    transform-origin: left top;
    transform: scale(1.28);
  }
  .hero {
    min-height: unset;
  }
  .hero-bottom { display: none;}
  .hero-quote {
    display: block;
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 24px;
    background: var(--blue-gradient);
    border-radius: 0 0 20px 20px;
  }
  .hero-quote__text {
    font-family: var(--font-serif);
    font-size: 24px;
    line-height: 1.2;
    text-transform: capitalize;
    color: var(--accent-yellow);
  }
}

/* ---------- Custom Cursor ---------- */

@media (pointer: fine) {
  body, a, button { cursor: none; }
}
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background-color: #1f81ea;
  border-radius: 50%;
  box-shadow: inset 0 4px 4px rgba(255, 255, 255, 0.25), 0 2px 8px rgba(102, 102, 102, 0.05);
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}
.cursor__follower {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  transition: transform 0.4s;
}

html {
  cursor: none;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

