/* Sidework redesign — base styles
   Matches live site spec exactly at desktop, fully responsive at mobile.
   - Gotham (substituted with Montserrat, the closest free family)
   - 980px container, 116px top hero breathing room (desktop)
   - #fff on #000, #8c8c8c body, #9f9f9f rules, #ff2c83 pink accent */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700&display=swap');

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8c8c8c;
  --gray:  #9f9f9f;
  --line:  #9f9f9f;
  --accent: #ff2c83;
  --transition-slow: 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --transition-med:  350ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --transition-fast: 180ms cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Responsive scales — overridden in media queries below */
  --gutter: 24px;          /* page side padding on mobile */
  --hero-top: 116px;
  --section-gap: 56px;
  --logo-size: 40px;
  --logo-track: 18px;
  --section-h-size: 24px;
  --body-caps-size: 18px;
  --body-caps-lh:  27px;
  --proj-size: 16px;
  --contact-size: 18px;
  --contact-lh: 27px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Montserrat', 'Gotham', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

/* ── 980 container, fluid on mobile ── */
.wrap {
  width: min(980px, 100%);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
}

/* ── NAV / TOP ── */
.top {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 50;
  flex-wrap: wrap;
}
.logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: var(--logo-size);
  letter-spacing: var(--logo-track);
  color: var(--fg);
  text-transform: uppercase;
  line-height: 1;
  margin-right: calc(var(--logo-track) * -1);
  white-space: nowrap;
}
.logo .dot {
  color: #ff4fa3;
  letter-spacing: 0;
  margin-left: calc(var(--logo-track) * -0.4);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.nav-links a {
  position: relative;
  transition: color var(--transition-fast);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-med);
}
@media (hover: hover) {
  .nav-links a:hover::after { transform: scaleX(1); }
}

/* ── PAGE STRUCTURE ── */
.page {
  margin-top: var(--hero-top);
  margin-bottom: 80px;
}

.section-h {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: var(--section-h-size);
  letter-spacing: 0.02em;
  color: var(--fg);
  text-transform: uppercase;
  margin: 10px 0 18px;
  line-height: 1.2;
}

.body-caps {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: var(--body-caps-size);
  line-height: var(--body-caps-lh);
  color: var(--muted);
  text-transform: uppercase;
  text-align: justify;
  margin-top: 10px;
}
.body-caps a { color: var(--accent); }

.body-sm {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 21px;
  color: var(--gray);
  text-align: justify;
  margin-top: 20px;
}

.negro {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: var(--body-caps-size);
  line-height: var(--body-caps-lh);
  color: var(--fg);
  text-transform: uppercase;
}

.company { margin-bottom: 60px; }

.kim-link {
  display: inline-block;
  margin-top: 28px;
  color: var(--accent);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: var(--body-caps-size);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ── CLIENTS GRID — 459 / 280 / 200 columns on desktop; stack on mobile ── */
.clients {
  padding-top: 36px;
  border-top: 1px solid var(--line);
  margin-top: var(--section-gap);
  padding-bottom: 80px;
}
.clients__title { margin-bottom: 36px; }

.clients-cols {
  display: grid;
  grid-template-columns: 459px 280px 200px;
  gap: 0;
}
.col { display: flex; flex-direction: column; }

.cat {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.01em;
  color: var(--fg);
  text-transform: uppercase;
  margin: 0 0 22px;
  line-height: 1.25;
}
.cat-block + .cat { margin-top: 36px; }

/* ── SERVICES — three columns, static capability lists ── */
.services {
  padding-top: 36px;
  border-top: 1px solid var(--line);
  margin-top: var(--section-gap);
}
.services__title { margin-bottom: 36px; }
.services-cols {
  display: grid;
  grid-template-columns: 459px 280px 200px;
  gap: 0;
}
.svc-col { display: flex; flex-direction: column; }
.svc-group + .svc-group { margin-top: 40px; }
.svc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.svc {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: var(--proj-size);
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--gray);
  text-transform: uppercase;
  padding: 2px 0;
}

/* Clients intro statement — full-width above the columns, like the company copy */
.clients__intro {
  margin-bottom: 44px;
}

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.proj {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: var(--proj-size);
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--gray);
  text-transform: uppercase;
  cursor: crosshair;
  transition: color var(--transition-fast), transform var(--transition-fast);
  padding: 4px 0;       /* generous tap target */
  /* Make sure touch listeners fire promptly */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ── CONTACT ── */
.contact {
  border-top: 1px solid var(--line);
  padding-top: 38px;
  margin-top: 30px;
  padding-bottom: 100px;
}
.contact__grid {
  display: grid;
  grid-template-columns: 459px 1fr;
  gap: 24px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: var(--contact-size);
  line-height: var(--contact-lh);
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 24px;
}
.contact__grid strong {
  display: block;
  color: var(--fg);
  font-weight: 700;
  font-size: var(--contact-size);
}
.contact__grid .k {
  color: var(--fg);
  font-weight: 700;
  display: inline-block;
  min-width: 18px;
}
.contact__grid .link-accent { color: var(--accent); }
@media (hover: hover) {
  .contact__grid a:hover { color: var(--accent); }
}

/* ── RESPONSIVE BREAKPOINTS ── */

/* Tablet: 740–1019px — shrink columns proportionally, keep 3 across */
@media (max-width: 1019px) {
  :root {
    --gutter: 32px;
    --logo-size: 32px;
    --logo-track: 14px;
    --section-h-size: 22px;
    --body-caps-size: 16px;
    --body-caps-lh: 24px;
    --hero-top: 80px;
    --section-gap: 48px;
    --contact-size: 15px;
    --contact-lh: 24px;
  }
  .clients-cols {
    grid-template-columns: 1.5fr 1fr 0.8fr;
    gap: 32px;
  }
  .services-cols {
    grid-template-columns: 1.5fr 1fr 0.8fr;
    gap: 32px;
  }
  .contact__grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

/* Phone: ≤ 739px — stack columns, big-friendly tap targets */
@media (max-width: 739px) {
  :root {
    --gutter: 24px;
    --logo-size: 24px;
    --logo-track: 10px;
    --section-h-size: 18px;
    --body-caps-size: 14px;
    --body-caps-lh: 22px;
    --proj-size: 15px;     /* slightly bigger for tap legibility */
    --hero-top: 56px;
    --section-gap: 36px;
    --contact-size: 13px;
    --contact-lh: 21px;
  }
  .top {
    padding-top: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .nav-links {
    gap: 18px;
    font-size: 10px;
    letter-spacing: 0.24em;
  }
  .page { margin-bottom: 48px; }
  .body-caps { text-align: left; }
  .body-sm { text-align: left; }
  .clients-cols {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .services-cols {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .svc-group + .svc-group { margin-top: 32px; }
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .proj {
    padding: 8px 0;       /* taller tap target */
    line-height: 1.4;
  }
  .clients { padding-bottom: 48px; }
  .contact { padding-bottom: 64px; }
  .kim-link { font-size: 14px; margin-top: 22px; }
}

/* image preload helper */
.img-prefetch {
  position: fixed;
  width: 0; height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Hide cursor-only artifacts on touch devices */
@media (hover: none) {
  .proj { cursor: pointer; }
}

/* ── Preloader (ticker variant) ── */
body.sw-loader-active { overflow: hidden; }
body.sw-loader-active .top,
body.sw-loader-active .page,
body.sw-loader-active main,
body.sw-loader-active header,
body.sw-loader-active .bg-stage,
body.sw-loader-active .meta { opacity: 0 !important; }
body.sw-loader-done .top,
body.sw-loader-done .page,
body.sw-loader-done main,
body.sw-loader-done header {
  opacity: 1;
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.sw-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 36px;
  pointer-events: none;
}
.sw-loader.is-gone {
  opacity: 0;
  transition: opacity 700ms cubic-bezier(0.6, 0, 0.2, 1);
}
.sw-loader__num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.5em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.sw-loader__num .slash { color: var(--accent); }
.sw-loader__name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 64px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  line-height: 1.05;
  width: 90%;
  max-width: 1100px;
  height: 1.1em;            /* lock height — names auto-scale to fit on one line */
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sw-loader__name .inner {
  display: inline-block;
  transform-origin: center;
  will-change: transform;
}
.sw-loader__brand {
  position: absolute;
  bottom: 36px;
  left: 48px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.sw-loader__brand .dot { color: var(--accent); letter-spacing: 0; }
.sw-loader__name .dot { color: var(--accent); letter-spacing: 0; }
.sw-loader.is-finale .sw-loader__brand { opacity: 0; transition: opacity 350ms ease; }
/* Finale renders as the actual wordmark — same tracking as the header logo */
.sw-loader.is-finale .sw-loader__name .inner { letter-spacing: 0.45em; margin-right: -0.45em; }
.sw-loader.is-finale .sw-loader__name .dot { margin-left: -0.18em; }
@media (max-width: 720px) {
  .sw-loader__brand { left: 20px; bottom: 24px; }
}

/* ── Pink circle cursor (shared) ── */
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: none; }
  a, button, .proj, [role="button"], input, textarea, select { cursor: none; }
  .sw-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #ff4fa3;
    pointer-events: none;
    z-index: 9999;
    transform: translate3d(-50%, -50%, 0);
    transition: width 200ms cubic-bezier(0.2, 0.7, 0.2, 1),
                height 200ms cubic-bezier(0.2, 0.7, 0.2, 1),
                background-color 200ms cubic-bezier(0.2, 0.7, 0.2, 1),
                opacity 200ms ease;
    will-change: transform;
    opacity: 0;
  }
  .sw-cursor.is-ready { opacity: 1; }
  .sw-cursor.is-hover {
    width: 44px; height: 44px;
    mix-blend-mode: screen;
  }
  .sw-cursor.is-down { width: 12px; height: 12px; }
}
