/* ---------- fonts ---------- */
@font-face { font-family: "IBM Plex Sans Devanagari"; font-weight: 300; font-style: normal; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-devanagari-300.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Devanagari"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-devanagari-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Devanagari"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-devanagari-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Devanagari"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-devanagari-600.woff2") format("woff2"); }

/* ---------- tokens ---------- */
:root {
  --dark: #2F2F31;
  --light: #FCFBF8;
  --dark-raised: #38383B;
  --text-muted: rgba(252, 251, 248, 0.56);

  --bg: var(--dark);
  --text: var(--light);

  --ff: "IBM Plex Sans Devanagari", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --nav-h: 56px;
  --gutter: clamp(16px, 2.6vw, 32px);
  --outer: clamp(16px, 4.4vw, 64px);
  --max: 1360px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; font: inherit; }
::selection { background: var(--light); color: var(--dark); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--outer); }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 1000;
  background: var(--light); color: var(--dark); padding: 8px 12px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- logos (one-colour, inherit currentColor) ---------- */
.logo {
  display: block;
  background-color: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
  aspect-ratio: var(--ratio);
}
.logo--wordmark   { --src: url("/assets/logos/botflow-design.svg"); --ratio: 639.2 / 95.8; }
.logo--sns        { --src: url("/assets/logos/sweat-and-soak.svg"); --ratio: 1368 / 790; }
.logo--sns-white  { --src: url("/assets/logos/sweat-and-soak-white.svg"); --ratio: 1384 / 806; }
.logo--brewvita   { --src: url("/assets/logos/brewvita.svg");       --ratio: 355.48 / 100; }
.logo--botflow-io { --src: url("/assets/logos/botflow-io.svg");     --ratio: 634 / 107; }
.logo--ak         { --src: url("/assets/logos/ak.svg");             --ratio: 96.1 / 73; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 600;
  height: var(--nav-h);
  color: var(--text);
}
.site-header::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(47, 47, 49, 0.88);
  -webkit-backdrop-filter: blur(40px) saturate(1.2);
          backdrop-filter: blur(40px) saturate(1.2);
}
.site-header__inner {
  position: relative;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--gutter);
  padding: 0 clamp(16px, 1.6vw, 24px);
}
.branding { display: block; text-decoration: none; padding: 6px 0; }
.logo--wordmark { height: 19px; }

.site-nav { display: flex; align-items: center; }
.site-nav__link {
  font-size: 13px; font-weight: 600; line-height: 1;
  letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  padding: 10px 8px;
  transition: opacity .2s ease-in-out;
}
.site-nav__link:last-child { padding-right: 0; }
.site-nav:hover .site-nav__link,
.site-nav:focus-within .site-nav__link { opacity: .5; }
.site-nav .site-nav__link:hover,
.site-nav .site-nav__link:focus-visible { opacity: 1; }

/* ---------- pills ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center;
  border: 1px solid currentColor; border-radius: 999px;
  padding: 5px 11px 3px;
  font-size: 12px; font-weight: 600; line-height: 1.3;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  color: currentColor;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
a.pill:hover, a.pill:focus-visible {
  background: var(--light); border-color: var(--light); color: var(--dark);
}
.pill--small { font-size: 11px; padding: 4px 9px 2px; }

/* ---------- intro ---------- */
.intro {
  padding-top: clamp(80px, 17vh, 200px);
  padding-bottom: clamp(96px, 19vh, 220px);
}
.intro__statement {
  max-width: 21.5em;
  margin-bottom: 22px;
  font-size: clamp(32px, 4.4vw, 60px);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: -0.018em;
  text-wrap: pretty;
}

/* ---------- work ---------- */
.work { padding-bottom: clamp(72px, 12vw, 140px); }
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 2.6vw, 40px) clamp(14px, 1.6vw, 24px);
}

.card { display: block; text-decoration: none; color: var(--text); }
.card__hero {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark-raised);
  isolation: isolate;
}
.card__cover, .card__cover img {
  display: block; width: 100%; height: 100%;
}
.card__cover img { object-fit: cover; }
.card__cover { transition: transform .6s var(--ease); will-change: transform; }

/* constant scrim so the light logo always reads */
.card__hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 80% 55% at 50% 50%, rgba(30, 30, 32, 0.42), rgba(30, 30, 32, 0) 75%),
    rgba(30, 30, 32, 0.14);
  pointer-events: none;
}
/* hover darken */
.card__hero::before {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: rgba(47, 47, 49, 0.55);
  opacity: 0;
  transition: opacity .45s ease-in-out;
  pointer-events: none;
}
.card__logo {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  transform: translate(-50%, -50%);
  color: var(--light);
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, .18));
}
/* the plunge photo is bright (white tub, ice) — knock it back so the white sticker reads */
.card--sns .card__cover img { filter: brightness(.62) contrast(1.08) saturate(.9); }
.card__logo.logo--sns-white { width: 66%; }
.card__logo.logo--brewvita { width: 66%; }

.card__content { padding-top: 16px; }
.card__content h3 { margin-bottom: 14px; }
.card__content p {
  max-width: 24em;
  font-size: 16px; line-height: 1.4; font-weight: 400;
  color: var(--text);
}

.card .pill { transition: background-color .4s ease-in-out, color .4s ease-in-out, border-color .4s ease-in-out; }

@media (hover: hover) {
  .card:hover .card__cover { transform: scale(1.045); }
  .card:hover .card__hero::before { opacity: 1; }
  .card:hover .pill { background: var(--light); border-color: var(--light); color: var(--dark); }
}
.card:focus-visible { outline: none; }
.card:focus-visible .card__hero { outline: 2px solid var(--light); outline-offset: 4px; }

/* the "your project" card */
.card--next .card__hero {
  background: var(--dark-raised);
  border: 1px solid rgba(252, 251, 248, 0.12);
}
.card--next .card__hero::after { display: none; }
.card__next {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(20px, 2.4vw, 32px);
}
.card__next-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
}
.card__next-kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--light);
  animation: pulse 2.4s ease-in-out infinite;
}
.card__next-title {
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 300; line-height: 1.04; letter-spacing: -0.025em;
  transition: transform .6s var(--ease);
}
@media (hover: hover) {
  .card--next:hover .card__next-title { transform: translateY(-6px); }
  .card--next:hover .card__hero::before { opacity: .35; }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- clients ---------- */
.clients {
  margin: 0 clamp(8px, 1vw, 12px);
  padding: clamp(28px, 3vw, 40px) var(--outer) clamp(56px, 7vw, 104px);
  background: var(--light);
  color: var(--dark);
  border-radius: var(--radius);
}
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: clamp(40px, 6vw, 80px);
  padding: 5px 11px 3px;
  border-radius: 999px;
  background: var(--dark); color: var(--light);
  font-size: 11px; font-weight: 500; line-height: 1.3;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.tag__glyph { font-size: 9px; line-height: 1; transform: translateY(-1px); }

.logos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: clamp(48px, 6vw, 72px);
  column-gap: var(--gutter);
  max-width: 1180px;
  margin-inline: auto;
}
.logos li {
  display: flex; align-items: center; justify-content: center;
  min-height: 96px;
}
/* optically balanced sizes — same idea as a client wall: equal visual weight, not equal boxes */
.logos .logo--sns        { height: clamp(58px, 6.4vw, 84px); }
.logos .logo--brewvita   { height: clamp(34px, 3.6vw, 46px); }
.logos .logo--botflow-io { height: clamp(22px, 2.3vw, 30px); }
.logos .logo--ak         { height: clamp(38px, 3.9vw, 50px); }

/* ---------- footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding: 22px clamp(16px, 1.6vw, 24px) 26px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-muted);
}
.site-footer__nav { display: flex; gap: 16px; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--light); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 900;
  transform: translate(-50%, 12px);
  padding: 8px 14px 6px; border-radius: 999px;
  background: var(--light); color: var(--dark);
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.js [data-animate] {
  opacity: 0.01;
  transform: translateY(1rem);
  transition: transform .8s var(--ease) calc(var(--delay, 0ms) + 120ms), opacity .8s ease var(--delay, 0ms);
}
.js [data-animate].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-animate] { opacity: 1; transform: none; transition: none; }
  .card__cover, .card__next-title { transition: none; }
  .card__next-kicker::before { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work__grid > li:last-child .card__hero { aspect-ratio: 16 / 9; }
  .work__grid > li:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .logo--wordmark { height: 16px; }
  .site-nav__link { font-size: 12px; padding: 10px 6px; }
  .work__grid { grid-template-columns: 1fr; }
  .work__grid > li:last-child .card__hero { aspect-ratio: 4 / 3; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos li { min-height: 80px; }
  .logos .logo--sns { height: 60px; }
  .logos .logo--brewvita { height: auto; width: min(100%, 150px); }
  .logos .logo--botflow-io { height: auto; width: min(100%, 140px); }
  .logos .logo--ak { height: 38px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
