/* ==========================================================================
   North Cut Studios Design System
   ========================================================================== */

:root {
  --bg: #000000;
  --fg: #f5f5f3;
  --muted: #8a8a8a;
  --muted-dim: #4d4d4d;
  --accent: #2ba89c;
  --accent-bright: #4fd8c8;
  --line: #262626;

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1400px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --header-h: 84px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.section {
  padding-top: clamp(4rem, 10vw, 8rem);
  padding-bottom: clamp(4rem, 10vw, 8rem);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Buttons / links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1rem 1.75rem;
  border: 1px solid var(--fg);
  border-radius: 999px;
  transition:
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

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

.btn-arrow {
  transition: transform 0.35s var(--ease);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.link-underline {
  position: relative;
  padding-bottom: 0.15em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition:
    background-size 0.4s var(--ease),
    color 0.4s var(--ease);
}

.link-underline:hover {
  background-size: 100% 1px;
  color: var(--accent-bright);
}

/* --------------------------------------------------------------------------
   Header + marquee
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
  transition: background 0.4s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header > * {
  pointer-events: auto;
}

.marquee {
  overflow: hidden;
  width: min(46vw, 520px);
  mask-image: linear-gradient(to right, black 0%, black 85%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 16s linear infinite;
}

.marquee-seq {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  padding-right: 1.5rem;
}

.marquee-seq .brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
}

.marquee-seq .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 1.4rem;
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   Logo marquee (homepage, brands we've worked with)
   -------------------------------------------------------------------------- */

.logo-marquee-section {
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.logo-marquee-eyebrow {
  display: block;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.logo-marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.logo-marquee-track {
  display: flex;
  width: max-content;
  animation: logo-marquee-scroll 48s linear infinite;
}

.logo-marquee-seq {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  padding-right: clamp(2.5rem, 6vw, 4.5rem);
}

.logo-marquee-seq img {
  height: clamp(22px, 3vw, 32px);
  width: auto;
  object-fit: contain;
  opacity: 0.5;
}

@keyframes logo-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-marquee-track {
    animation: none;
  }
}

.main-nav ul {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.main-nav a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s var(--ease);
  position: relative;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--fg);
}

.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--fg);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 8vw, 6rem) 0 2.5rem;
}

.footer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.footer-cta h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  max-width: 14ch;
}

.footer-cta a {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.footer-col {
  min-width: 160px;
}

.footer-col .eyebrow {
  display: block;
  margin-bottom: 0.9rem;
}

.footer-col a,
.footer-col p {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s var(--ease);
}

.footer-col a:hover {
  color: var(--fg);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  font-size: 0.78rem;
  color: var(--muted-dim);
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */

.hero {
  min-height: 80vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2rem;
  padding-top: var(--header-h);
}

.hero-copy .eyebrow {
  margin-bottom: 1.5rem;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  margin-bottom: 1.75rem;
}

.hero-copy h1 em {
  color: var(--accent);
  font-style: normal;
}

.word-cycle {
  display: inline-block;
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.word-cycle.is-swapping {
  opacity: 0;
  transform: translateY(0.3em);
}

.hero-copy p {
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  margin-bottom: 2.5rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-animated-mark {
  position: relative;
  width: min(100%, 760px);
}

.ncs-mark {
  width: 100%;
  margin: 0 auto;
}

.ncs-mark-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.ncs-mark-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-wordmark-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  max-width: none;
  /* width is set in px by hero-mark-animation.js, to exactly match the
     circle's diameter (2 * R) at the current size; this is a no-JS/
     pre-hydration fallback only. */
  width: 92%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Services strip
   -------------------------------------------------------------------------- */

.services-list {
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 80px 1.4fr 1.6fr;
  gap: 2rem;
  align-items: start;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease);
}

.service-row:hover {
  background: rgba(43, 168, 156, 0.04);
}

.service-index {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  padding-top: 0.4rem;
}

.service-row h3 {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.service-row p {
  color: var(--muted);
  max-width: 46ch;
}

/* --------------------------------------------------------------------------
   Work grid
   -------------------------------------------------------------------------- */

.page-head {
  padding-top: clamp(7rem, 16vw, 11rem);
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}

.page-head + .section {
  padding-top: 0;
}

.page-head + .section .work-grid {
  padding-top: clamp(1rem, 2vw, 1.5rem);
}

.page-head h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  max-width: 18ch;
}

.page-head p {
  color: var(--muted);
  max-width: 52ch;
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Work tiles (photo thumbnail, click-to-play Vimeo embed)
   -------------------------------------------------------------------------- */

.work-tile--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.88);
  transition:
    transform 0.6s var(--ease),
    filter 0.5s var(--ease);
}

.work-card:hover .work-tile--photo img {
  transform: scale(1.05);
  filter: saturate(1) brightness(1);
}

.work-tile--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

.work-tile--photo .tile-status {
  z-index: 1;
}

.tile-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(245, 245, 243, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  font-size: 0.9rem;
  transition:
    transform 0.35s var(--ease),
    background 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.work-card:hover .tile-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--accent);
  border-color: var(--accent);
}

.work-tile[data-vimeo-id] {
  cursor: pointer;
}

.work-tile.is-playing::after {
  content: none;
}

.work-tile.is-playing img,
.work-tile.is-playing .tile-play,
.work-tile.is-playing .tile-status {
  display: none;
}

.work-tile iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.work-grid--gallery {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1100px) {
  .work-grid--gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.work-card {
  display: block;
}

.work-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid var(--line);
}

.work-tile .tile-status {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1.1rem;
  gap: 1rem;
}

.work-meta .work-index {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.85rem;
}

.work-meta h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Chromatic feature (About page hero)
   -------------------------------------------------------------------------- */

.chroma-feature {
  padding-top: clamp(7rem, 16vw, 11rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.chroma-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #050505;
}

.chroma-header {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--line);
}

.chroma-header .eyebrow {
  display: block;
  margin-bottom: 1rem;
}

.chroma-header h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 20ch;
}

.chroma-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
}

.chroma-col {
  margin: 0;
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.chroma-col:first-child {
  border-right: 1px solid var(--line);
}

.chroma-col:last-child {
  border-left: 1px solid var(--line);
}

.chroma-item {
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 12rem;
}

.chroma-item + .chroma-item {
  border-top: 1px solid var(--line);
}

.chroma-item dt {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.chroma-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent);
}

.chroma-item dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 34ch;
}

.chroma-image {
  position: relative;
  overflow: hidden;
  min-height: 22rem;
  background: #0a0a0a;
  perspective: 900px;
}

.chroma-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chroma-image canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  will-change: transform;
}

.chroma-image canvas.is-ready {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-intro {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.about-intro p {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.3rem);
  font-weight: 500;
  line-height: 1.3;
  max-width: 34ch;
}

.about-intro p em {
  color: var(--accent);
  font-style: normal;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.about-grid h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.5rem;
}

.about-grid .founder-role {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
  margin-top: 0.5rem;
  display: block;
}

.about-copy p {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
  max-width: 58ch;
}

.values-list {
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-hero {
  padding-top: clamp(7rem, 18vw, 12rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.contact-hero .eyebrow {
  margin-bottom: 1.5rem;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 5.5rem);
  font-weight: 600;
  display: inline-block;
  word-break: break-word;
  transition: color 0.35s var(--ease);
}

.contact-email:hover {
  color: var(--accent);
}

.contact-hero p {
  color: var(--muted);
  max-width: 48ch;
  margin-top: 2rem;
  font-size: 1.05rem;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}

.contact-details .eyebrow {
  display: block;
  margin-bottom: 1rem;
}

.contact-details a,
.contact-details p {
  color: var(--fg);
  font-size: 1.05rem;
}

.contact-details .muted {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
    padding-bottom: 4rem;
    min-height: auto;
    gap: 3rem;
  }

  .hero-visual {
    order: -1;
  }

  .hero-animated-mark {
    width: min(80%, 420px);
  }

  .service-row {
    grid-template-columns: 50px 1fr;
  }

  .service-row p {
    grid-column: 2;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .chroma-grid {
    grid-template-columns: 1fr;
  }

  .chroma-image {
    order: -1;
    min-height: 18rem;
  }

  .chroma-col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .chroma-col:last-child {
    border-left: none;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }

  .marquee {
    width: 48vw;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 68px;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem var(--gutter);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.35s var(--ease),
      transform 0.35s var(--ease);
  }

  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1.75rem;
  }

  .main-nav a {
    font-size: 1.4rem;
  }

  .nav-toggle {
    display: flex;
  }

  .marquee {
    width: 42vw;
  }

  .marquee-seq .brand {
    font-size: 0.85rem;
  }

  .footer-grid {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
