/* ==========================================================================
   Karlis Kah — shared system
   Measurements taken from the live site at 1440x900 and 1100x800.
   Gutter is a fixed 70px; display type scales in vw.
   ========================================================================== */

@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Montreal";
  src: url("fonts/NeueMontreal-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Basis Grotesque Pro Mono";
  src: url("fonts/BasisGrotesqueProMono.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1d184f;
  --bg-charcoal: #131313;
  --fg: #ffffff;
  --hairline: rgba(255, 255, 255, 0.28);

  --font-display: "Neue Montreal", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Basis Grotesque Pro Mono", "Courier New", monospace;

  --gutter: 70px;
  --nav-h: 70px;
  --grid-gap: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }

/* --------------------------------------------------------------------------
   Custom cursor — the live site hides the native cursor entirely
   -------------------------------------------------------------------------- */
@media (pointer: fine) {
  body { cursor: none; }
  body a, body button { cursor: none; }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor.is-active { opacity: 1; }

.cursor-dot {
  width: 15px;
  height: 15px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transition: transform 0.25s ease;
}

.cursor.is-hovering .cursor-dot { transform: scale(2.4); }

@media (pointer: coarse) {
  .cursor { display: none; }
}

/* --------------------------------------------------------------------------
   Preloader — full-screen logo card that slides up off-screen once the
   page is ready. Injected by script.js so every page gets it for free.
   -------------------------------------------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #121212;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  transform: translate3d(0, 0, 0);
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}

.preloader.is-hidden {
  transform: translate3d(0, -100vh, 0);
  pointer-events: none;
}

.preloader img {
  max-width: 30%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
}

/* --------------------------------------------------------------------------
   Nav — four links, left aligned, nothing else
   -------------------------------------------------------------------------- */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  background: rgba(29, 24, 79, 0.77);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--hairline);
}

/* Case-study pages and Misc run on charcoal, so the nav loses its navy
   tint too — matches the live site's separate dark nav-bar variant. */
body.charcoal .nav-bar {
  background: rgba(0, 0, 0, 0.65);
  border-bottom-color: #555;
}

.menu { display: flex; gap: 50px; }

.menu-link {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 20px;
  filter: blur(0px);
  transition: opacity 0.25s ease, filter 0.3s cubic-bezier(0.608, 0.007, 0.25, 1);
}

.menu-link:hover { opacity: 0.5; filter: blur(1px); }

/* Case-study pages and the Misc canvas run on a charcoal ground instead
   of the navy used on Home/About. */
body.charcoal { background: var(--bg-charcoal); }

/* --------------------------------------------------------------------------
   Shared page grid — 2fr 1fr 1fr, 14px gap.
   At any width column 2 begins at exactly 50%.
   -------------------------------------------------------------------------- */
.grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--grid-gap);
}

.label {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.5px;
  color: var(--fg);
}

/* 10px mono three-column strip, used under the hero and as the footer */
.small-type {
  padding: 0 var(--gutter);
  margin: 0;
}

.small-type p,
.small-type div {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 12px;
  color: var(--fg);
}

.small-type a { transition: opacity 0.25s ease; }
.small-type a:hover { opacity: 0.5; }

/* --------------------------------------------------------------------------
   "Let's Talk" banner + contact pill
   -------------------------------------------------------------------------- */
.banner {
  padding: 128px 0 0;
}

.banner-wrap {
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow: hidden;
}

.banner-line {
  display: flex;
  width: max-content;
  font-size: 10vw;
  font-weight: 400;
  line-height: 0.8;
  white-space: nowrap;
  will-change: transform;
}

.banner-line span { padding-right: 0.25em; }

.banner-line.top { opacity: 1; }
.banner-line.bottom { opacity: 0.5; }

.banner-cta {
  display: flex;
  justify-content: center;
  padding: 80px 0 140px;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 45px;
  border: 2px solid var(--fg);
  border-radius: 40px;
  overflow: hidden;
  background: transparent;
  transition: background-color 0.35s ease;
}

.btn span {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 20px;
  transition: transform 0.35s ease;
}

.btn .btn-txt-1 { color: var(--fg); transform: translateY(0); }
.btn .btn-txt-2 { color: #000; transform: translateY(50px); }

.btn:hover { background-color: var(--fg); }
.btn:hover .btn-txt-1 { transform: translateY(-50px); }
.btn:hover .btn-txt-2 { transform: translateY(0); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-bottom: 70px;
}

/* --------------------------------------------------------------------------
   Smooth-scroll wrapper (luxy-style easing on the live site)
   -------------------------------------------------------------------------- */
.smooth-wrap.smooth-active {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

@media (max-width: 767px) {
  .banner-wrap { gap: 16px; }
}

/* --------------------------------------------------------------------------
   Small screens — the live site drops to a single column
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  :root { --gutter: 24px; }

  .menu { gap: 24px; }
  .menu-link { font-size: 13px; }

  .grid-3 { grid-template-columns: 1fr; gap: 24px; }

  .banner-line { font-size: 16vw; }
  .banner { padding-top: 64px; }
  .banner-cta { padding: 48px 0 80px; }
}
