/* =====================================================
   ALMAROOF DESIGNS — style.css
   Global styles, typography, layout, sections, components.
   Motion lives in animations.css, breakpoints in responsive.css.
===================================================== */

/* ===============================
   TOKENS
================================ */
:root {
  --bg: #0b0b0b;
  --bg-soft: #141414;
  --text: #ffffff;
  --text-body: rgb(216, 216, 216);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-faint: rgba(255, 255, 255, 0.38);
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.35);
  --accent: #ff3c00;
  --glow: rgba(63, 63, 63, 0.6);

  /* Corner glows: one fixed size everywhere (so halves meet seamlessly at
     section edges) with a soft eased falloff into the --bg base. */
  --glow-size: clamp(216px, 34.2vw, 624px); /* rounded to whole px below where supported */
  /* Gaussian-like curve: soft core, long diffused tail */
  --glow-falloff:
    rgba(46, 46, 46, 0.95) 0%,
    rgba(46, 46, 46, 0.9) 10%,
    rgba(46, 46, 46, 0.8) 20%,
    rgba(46, 46, 46, 0.66) 30%,
    rgba(46, 46, 46, 0.51) 40%,
    rgba(46, 46, 46, 0.37) 50%,
    rgba(46, 46, 46, 0.25) 60%,
    rgba(46, 46, 46, 0.15) 70%,
    rgba(46, 46, 46, 0.08) 80%,
    rgba(46, 46, 46, 0.03) 90%,
    rgba(46, 46, 46, 0) 100%;
  --status: #22c55e; /* "available" indicator */

  --container: 1400px;
  --gutter: clamp(20px, 5vw, 72px);
  --radius: 999px;
  --radius-sm: 6px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
  --nav-top: 40px;
  --nav-h: 64px;
  --noise-opacity: 0.11;

  --section-space: clamp(5rem, 8vw, 7rem);
}

/* ===============================
   RESET / BASE
================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-top) + var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--bg);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  /* no background here: html paints it, so the lights (z-index -1) show through */
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@supports (overflow: clip) {
  body {
    overflow-x: clip;
  }
}

/* Lenis smooth scroll (from lenis.css). Native smooth scrolling is
   switched off while Lenis runs so the two don't fight. */
html.lenis,
html.lenis body {
  height: auto;
}

html.lenis {
  scroll-behavior: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* Scroll lock while the mobile menu is open */
.menu-open,
.menu-open body {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  line-height: 1.05;
}

::selection {
  background: var(--accent);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.top-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 80px;
  pointer-events: none;
}

/* ===============================
   BACKGROUND — radial lighting + grain
   (the original Almaroof corner-lit gradients)
================================ */
/* One continuous full-page background that scrolls with the content.
   Soft lights alternate right / left / right down the whole page.
   Sections have no backgrounds of their own, so there are no seams.
   The repeating tile is exactly 2 × --glow-size tall, so every light fades
   to nothing before the tile edge (or joins its other half across it). */
.background {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: clip; /* a shifted light layer never adds scroll height */
  pointer-events: none;
}

/* While the Selected Work cards are pinned, the background holds still
   (js/projects.js toggles .is-frozen), then continues from the same spot. */
.background.is-frozen {
  position: fixed;
}

.background-lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--page-h, 100%);
  transform: translate3d(0, var(--bg-shift, 0px), 0);
  background-image:
    radial-gradient(circle var(--glow-size) at 100% 0%, var(--glow-falloff)),
    radial-gradient(circle var(--glow-size) at 0% 50%, var(--glow-falloff)),
    radial-gradient(circle var(--glow-size) at 100% 100%, var(--glow-falloff));
  background-size: 100% calc(var(--glow-size) * 2);
  background-repeat: repeat-y;
}

/* Whole-pixel light size → the repeating pattern joins without hairlines */
@supports (width: round(1.5px, 1px)) {
  :root {
    --glow-size: round(clamp(216px, 34.2vw, 624px), 1px);
  }
}
/* Film grain: the original noise7 texture, pre-flattened to a light greyscale tile.
   Rendered at half size, exactly like the original SVG (0.5px grain). */
.background-noise {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background-image: url("../assets/textures/noise.png");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: var(--noise-opacity);
  transform: translateZ(0);
}

/* ===============================
   LAYOUT
================================ */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

section {
  position: relative;
}

.section {
  padding-block: var(--section-space);
}

/* ===============================
   TYPOGRAPHY HELPERS
================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow .index {
  color: var(--text);
  letter-spacing: 0.04em;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.dot--available {
  background: var(--status);
}

.accent {
  color: var(--accent);
}

.muted {
  color: var(--text-faint);
}

/* Line-mask structure used by the heading reveals */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.line > span {
  display: block;
}

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 22px;
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 100px);
}

.section-head .eyebrow {
  grid-column: 1 / -1;
}

.section-title {
  grid-column: 1 / span 7;
  font-size: clamp(2.75rem, 7.4vw, 7.25rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.section-head__text {
  grid-column: 9 / -1;
  max-width: 38ch;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

/* ===============================
   ICONS
================================ */
.icon {
  width: 0.72em;
  height: 0.72em;
  flex-shrink: 0;
  transform: rotate(var(--icon-rotate, 0deg));
  transition: transform 0.45s var(--ease-out);
}

.icon--right { --icon-rotate: 45deg; }
.icon--down { --icon-rotate: 135deg; }
.icon--up { --icon-rotate: -45deg; }

/* ===============================
   BUTTONS
================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 30px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

.btn-primary {
  background: var(--text);
  color: #000000;
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--text);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--large {
  padding: 19px 36px;
  font-size: 1.0625rem;
}

.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 500;
  padding-bottom: 6px;
  position: relative;
}

/* ===============================
   NAVIGATION (floating pill)
================================ */
.header-wrap {
  position: fixed;
  top: var(--nav-top);
  left: 0;
  right: 0;
  z-index: 100;
  width: min(90%, var(--container));
  height: var(--nav-h);
  margin-inline: auto;
  padding: 8px 10px 8px 18px;
  display: flex;
  align-items: center;

  background: rgba(120, 120, 120, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  /* transitions + entrance: see animations.css */
}

.site-header.is-scrolled .header-wrap {
  top: calc(var(--nav-top) * 0.5);
  background: rgba(60, 60, 60, 0.42);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-logo {
  perspective: 1000px;
  flex-shrink: 0;
  border-radius: 6px;
}

.header-logo img {
  width: 35px;
  height: auto;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform 1s var(--ease-smooth);
}

.header-logo:hover img {
  transform: rotateY(-360deg);
}

.nav__list {
  display: flex;
  gap: clamp(20px, 2.4vw, 36px);
}

/* Original text slide-up hover */
.nav__link {
  position: relative;
  display: block;
  height: 18px;
  overflow: hidden;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.nav__link span {
  display: block;
  line-height: 18px;
  transition: transform 0.4s var(--ease-out);
}

.nav__link span:nth-child(2) {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(100%);
  color: var(--text);
}

.nav__link:hover span:nth-child(1),
.nav__link:focus-visible span:nth-child(1) {
  transform: translateY(-100%);
}

.nav__link:hover span:nth-child(2),
.nav__link:focus-visible span:nth-child(2) {
  transform: translateY(0);
}

.nav__link.is-active {
  color: var(--text);
}

.nav__link:focus-visible {
  overflow: visible;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.header-cta .arrow {
  display: flex;
  transform: translateY(1px);
}

.header-cta .icon {
  width: 13px;
  height: 13px;
}

/* Menu button (mobile / tablet) */
.nav__toggle {
  display: none;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
}

.nav__toggle-lines {
  position: relative;
  width: 18px;
  height: 8px;
}

.nav__toggle-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.5s var(--ease-out), top 0.5s var(--ease-out);
}

.nav__toggle-lines span:first-child { top: 0; }
.nav__toggle-lines span:last-child { top: calc(100% - 1.5px); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle var(--glow-size) at 100% 0%, var(--glow-falloff)),
    radial-gradient(circle var(--glow-size) at 0% 100%, var(--glow-falloff)),
    var(--bg);
  visibility: hidden;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition:
    clip-path 0.8s var(--ease-out),
    opacity 0.4s ease,
    visibility 0s linear 0.8s;
}

.mobile-menu__inner {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
  padding-top: calc(var(--nav-top) + var(--nav-h) + 48px);
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: 100%;
}

.mobile-menu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-block: 10px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-menu__num {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transform: translateY(-0.9em);
}

.mobile-menu__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.mobile-menu__social {
  display: flex;
  gap: 22px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ===============================
   HERO
================================ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-top) + var(--nav-h) + 48px);
  padding-bottom: 40px;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 90px);
  flex: 1;
}

.hero__eyebrow {
  margin-bottom: clamp(22px, 3vw, 34px);
}

.hero__title {
  font-size: clamp(2.5rem, 4.9vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.hero__text {
  max-width: 34ch;
  font-size: clamp(1.0625rem, 1.35vw, 1.3125rem);
  line-height: 1.6;
  color: var(--text-body);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(32px, 4vw, 44px);
}

.hero__media {
  position: relative;
  display: flex;
  justify-content: center;
  align-self: end;
}

.hero__glow {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 95%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%; 
  pointer-events: none;
  z-index: -1;
}

.hero__parallax,
.hero__float {
  width: 100%;
}

.hero__portrait {
  width: 100%;
  max-width: 760px;
  height: auto;
  margin-inline: auto;
  filter: grayscale(100%) contrast(1.04);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

.hero__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__available {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.hero__scroll-line {
  position: relative;
  width: 48px;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}

/* ===============================
   ABOUT
================================ */
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 48px;
}

.about__aside {
  grid-column: 1 / span 4;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Logo construction grid (assets/icons/Logo Grid.svg) */
.about__grid-art {
  margin: 0;
  width: 100%;
  max-width: 460px;
}

.about__grid-art img {
  display: block;
  width: 100%;
  height: auto;
}

.about__body {
  grid-column: 6 / -1; /* column 5 left empty as a gap beside the logo grid */
}

.about__title {
  font-size: clamp(2.25rem, 5.2vw, 5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.about__text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 44px;
}

.about__text p:first-child {
  color: var(--text-body);
}

/* ===============================
   NUMBERS
================================ */
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.numbers__item {
  padding: clamp(28px, 3vw, 40px) clamp(16px, 2vw, 32px) 0;
  border-left: 1px solid var(--border);
}

.numbers__item:first-child {
  border-left: 0;
  padding-left: 0;
}

.numbers__value {
  display: flex;
  align-items: flex-start;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8.6vw, 9rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.numbers__plus {
  font-size: 0.45em;
  line-height: 1;
  margin-left: 0.08em;
  color: var(--accent);
  letter-spacing: 0;
}

.numbers__label {
  margin-top: 18px;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ===============================
   CLIENTS — logo marquees
   Rows wrap as a static grid until js/marquee.js
   adds .is-running (skipped for reduced motion).
================================ */
.clients {
  overflow: hidden;
}

.clients__marquee {
  --logo-gap: clamp(12px, 1.4vw, 20px);
  display: grid;
  gap: clamp(24px, 3vw, 48px); /* space between the two rows */
  /* Fade the logos out at both screen edges */
  --fade: linear-gradient(90deg,
    transparent 0%, transparent 6%,
    rgba(0, 0, 0, 0.35) 22%,
    #000 42%, #000 58%,
    rgba(0, 0, 0, 0.35) 78%,
    transparent 94%, transparent 100%);
  -webkit-mask-image: var(--fade);
          mask-image: var(--fade);
}

.clients__row {
  overflow: hidden;
}

.clients__track {
  display: flex;
  justify-content: center;
}

.clients__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--logo-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.clients__marquee.is-running .clients__track {
  justify-content: flex-start;
  width: max-content;
  will-change: transform;
}

.clients__marquee.is-running .clients__list {
  flex-wrap: nowrap;
  flex-shrink: 0;
  padding-right: var(--logo-gap); /* keeps the seam between copies even */
}

.clients__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: clamp(170px, 18vw, 260px);
  height: clamp(120px, 13.5vw, 180px);
  padding-inline: clamp(48px, 6vw, 100px);
}

/* Logos are white SVGs — dimmed at rest, full white on hover */
.clients__logo img {
  display: block;
  width: auto;
  height: calc(clamp(60px, 6.2vw, 90px) * var(--logo-scale, 1));
  max-width: 100%;
  opacity: 0.5;
  transition: opacity 0.4s var(--ease-smooth);
}

.clients__logo:hover img {
  opacity: 1;
}

/* ===============================
   SERVICES
================================ */
.services__list {
  border-top: 1px solid var(--border);
  counter-reset: service;
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 1.3fr) minmax(0, 1fr) 56px;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 3vw, 38px) 8px;
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease-out);
}

.service__num {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.service__title {
  font-size: clamp(1.75rem, 3.4vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  transition: transform 0.6s var(--ease-out);
}

.service__desc {
  max-width: 36ch;
  color: var(--text-muted);
  font-size: 0.9875rem;
  transition: color 0.4s ease;
}

.service__arrow {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.service__arrow .icon {
  width: 14px;
  height: 14px;
}

/* ===============================
   SELECTED WORK
================================ */
/* Stacking zig-zag cards:
   each card pins below the nav (sticky) and the next one slides over it.
   Cards alternate image-left / image-right. js/projects.js sets --cover
   (0 → 3) on covered cards to shrink + dim them slightly. */
.work__stack {
  --stack-top: calc(var(--nav-top) + var(--nav-h) + 24px);
  --stack-step: 16px; /* each card pins a little lower, so earlier edges peek out */
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 14vh, 160px);
}

.work__noscript {
  color: var(--text-muted);
}

.project {
  position: sticky;
  top: calc(var(--stack-top) + var(--i, 0) * var(--stack-step));
}

.project__card {
  --cover: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-areas: "media info";
  gap: 12px;
  /* Fits the LAST (lowest-pinned) card on screen, whatever the number of
     projects (--stack-count is set by js/projects.js) */
  height: clamp(420px, calc(100vh - var(--stack-top) - (var(--stack-count, 7) - 1) * var(--stack-step) - 32px), 680px);
  height: clamp(420px, calc(100svh - var(--stack-top) - (var(--stack-count, 7) - 1) * var(--stack-step) - 32px), 680px);
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.045), transparent 55%),
    var(--bg-soft);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transform: scale(calc(1 - var(--cover) * 0.04));
  transform-origin: 50% 0;
}

/* Zig-zag: every second card flips image and details */
.project:nth-of-type(even) .project__card {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  grid-template-areas: "info media";
}

/* Dims a card as others stack on top of it */
.project__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000000;
  opacity: calc(min(var(--cover), 1) * 0.5);
  pointer-events: none;
}

.project__media {
  grid-area: media;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #0f0f0f;
}

.project__parallax {
  position: absolute;
  inset: -6% 0;
}

.project__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}

/* Clean placeholder shown until the real image exists */
.project__placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 2.4vw, 32px);
  background:
    radial-gradient(circle at 100% 0%, rgba(63, 63, 63, 0.45) 0%, transparent 55%),
    var(--bg-soft);
}

.project__media.is-placeholder .project__placeholder {
  display: flex;
}

.project__media.is-placeholder .project__parallax {
  display: none;
}

.project__placeholder-num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.08);
}

.project__placeholder-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.project__placeholder-path {
  text-transform: none;
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  text-align: right;
}

.project__info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-width: 0;
  padding: clamp(20px, 2.6vw, 40px) clamp(16px, 2.2vw, 36px);
}

.project__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.project__num {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.project__industry {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: right;
}

.project__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project__title {
  font-size: clamp(2rem, 3.8vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.project__category {
  font-size: 1rem;
  color: var(--text-body);
}

.project__desc {
  max-width: 40ch;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Pill CTA — same language as the Let's Talk button */
.project__cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.project__cta .icon {
  width: 13px;
  height: 13px;
}

/* ===============================
   EXPERIENCE
================================ */
.exp__list {
  border-top: 1px solid var(--border);
}

.exp {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
  align-items: start;
  gap: 24px;
  padding-block: clamp(32px, 3.8vw, 52px);
  border-bottom: 1px solid var(--border);
}

.exp__years {
  padding-top: 0.6em;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.exp__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.exp__role {
  font-size: clamp(1.5rem, 2.8vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.exp__summary {
  max-width: 54ch;
  font-size: 0.9875rem;
  color: var(--text-muted);
}

.exp__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.exp__tags li {
  padding: 6px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-body);
  white-space: nowrap;
}

.exp__company {
  justify-self: end;
  padding-top: 0.5em;
  text-align: right;
}

.exp__name {
  font-weight: 500;
  color: var(--text);
}

.exp__meta {
  margin-top: 6px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===============================
   TESTIMONIALS
================================ */
/* Card marquees — rows wrap as a static grid until
   js/marquee.js adds .is-running (skipped for reduced motion). */
.testimonials {
  overflow: hidden;
}

.testimonials__marquee {
  --card-gap: clamp(16px, 2vw, 28px);
  display: grid;
  gap: var(--card-gap);
  /* Soft fade at both screen edges */
  --fade: linear-gradient(90deg,
    transparent 0%, transparent 4%,
    rgba(0, 0, 0, 0.4) 16%,
    #000 30%, #000 70%,
    rgba(0, 0, 0, 0.4) 84%,
    transparent 96%, transparent 100%);
  -webkit-mask-image: var(--fade);
          mask-image: var(--fade);
}

.testimonials__row {
  overflow: hidden;
}

.testimonials__track {
  display: flex;
  justify-content: center;
}

.testimonials__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--card-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.testimonials__list > li {
  display: flex;
}

.testimonials__marquee.is-running .testimonials__track {
  justify-content: flex-start;
  width: max-content;
  will-change: transform;
}

.testimonials__marquee.is-running .testimonials__list {
  flex-wrap: nowrap;
  flex-shrink: 0;
  padding-right: var(--card-gap); /* keeps the seam between copies even */
}

.quote {
  display: flex;
  flex-direction: column;
  width: clamp(290px, 34vw, 480px);
  padding: clamp(26px, 2.6vw, 40px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-soft);
  transition: border-color 0.4s var(--ease-smooth);
}

.quote:hover {
  border-color: var(--border-strong);
}

.quote__mark {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 5vw, 5rem);
  font-weight: 600;
  line-height: 0.8;
  color: var(--accent);
  height: 0.5em;
  margin-bottom: 18px;
}

.quote blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.5vw, 1.4rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
}

.quote figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: auto;
  padding-top: 28px;
  font-size: 0.9375rem;
}

.quote figcaption strong {
  font-weight: 500;
  color: var(--text);
}

.quote figcaption strong::before {
  content: "— ";
}

.quote figcaption span {
  color: var(--text-muted);
}

/* ===============================
   CONTACT
================================ */
.contact .eyebrow {
  margin-bottom: 28px;
}

.contact__title {
  font-size: clamp(3rem, 9vw, 9.5rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin-bottom: clamp(56px, 7vw, 110px);
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 64px;
}

.contact__info {
  grid-column: 1 / span 4;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.contact__lead {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.5;
  color: var(--text-body);
  max-width: 28ch;
}

.contact__label {
  margin-bottom: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Form */
.form {
  grid-column: 6 / -1;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 3.4vw, 44px);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 3.4vw, 44px) 32px;
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 0;
  min-width: 0;
}

.field__label {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.4vw, 1.3125rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 0;
  margin-bottom: 6px;
  transition: color 0.3s ease;
}

.field__label span[aria-hidden] {
  color: var(--accent);
}

.field__optional {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-faint);
}

.field__input {
  width: 100%;
  padding: 12px 0 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  outline: none;
  font-size: 1.125rem;
  color: var(--text);
  transition: border-color 0.3s ease;
}

.field__input--area {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.field__input:focus-visible {
  outline: none;
}

/* Animated underline */
.field__line {
  position: relative;
  display: block;
  height: 1px;
  margin-top: -1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out), background-color 0.3s ease;
}

.field:focus-within .field__line {
  transform: scaleX(1);
}

.field__error {
  min-height: 0;
  font-size: 0.8125rem;
  color: var(--accent);
}

.field__error:not(:empty) {
  margin-top: 8px;
}

.field.is-invalid .field__input {
  border-bottom-color: var(--accent);
}

.field.is-invalid .field__line {
  background: var(--accent);
}

/* Project-type choices */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
}

.choice span {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  font-size: 0.9375rem;
  color: var(--text-body);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.choice:hover span {
  border-color: var(--text);
  color: var(--text);
}

.choice input:checked + span {
  background: var(--text);
  border-color: var(--text);
  color: #000000;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.field--choices.is-invalid .choice span {
  border-color: rgba(255, 30, 0, 0.6);
}

.form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 8px;
}

.form__note {
  font-size: 0.875rem;
  color: var(--text-faint);
}

.form__status {
  font-size: 0.9375rem;
  color: var(--text-body);
}

.form__status:empty {
  display: none;
}

.form__status.is-error {
  color: var(--accent);
}

/* Reusable underline link */
.link-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}

/* ===============================
   FOOTER
================================ */
.footer {
  padding-top: clamp(90px, 10vw, 140px);
  padding-bottom: 36px;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 40px 24px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer__brand img {
  width: clamp(140px, 13vw, 180px);
  height: auto;
}

.footer__heading {
  margin-bottom: 18px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer__col ul {
  display: grid;
  gap: 10px;
}

.footer__col a {
  color: var(--text);
}

.footer__wordmark {
  margin-top: clamp(64px, 9vw, 130px);
  font-family: var(--font-display);
  font-size: 21vw; /* fallback — js/main.js fits it to the full width */
  font-weight: 600;
  line-height: 0.85;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.8;
  white-space: nowrap;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ===============================
   CUSTOM CURSOR (desktop only — enabled by js/cursor.js)
================================ */
.cursor {
  display: none;
}

.has-custom-cursor,
.has-custom-cursor * {
  cursor: none !important;
}

.has-custom-cursor input[type="text"],
.has-custom-cursor input[type="email"],
.has-custom-cursor textarea {
  cursor: text !important;
}

.has-custom-cursor .cursor {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  width: 0;
  height: 0;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.has-custom-cursor .cursor.is-visible {
  opacity: 1;
}

.cursor__circle {
  position: absolute;
  left: 0;
  top: 0;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(230, 230, 230);
  transform: translate(-50%, -50%);
}

.cursor__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000000;
  opacity: 0;
}

/* Project hover: solid "VIEW" disc, readable over any image */
.cursor.is-view {
  mix-blend-mode: normal;
}
