/* ============================== TOKENS ============================== */
:root {
  --accent: #297D8E;
  --ink: #242933;
  --ink-soft: rgba(36, 41, 51, 0.5);
  --paper: #F0EFE9;
  --paper-alt: #E3E2DA;
  --radius: 16px;
  --radius-sm: 8px;
  --font-display: 'Figtree', system-ui, -apple-system, sans-serif;

  /* Type scale — fluid clamp() */
  --t-eyebrow: 14px;
  --t-body: clamp(15px, 1.05vw, 16px);
  --t-h1: clamp(40px, 6.5vw, 72px);
  --t-h2: clamp(34px, 4.5vw, 48px);
  --t-h3: clamp(26px, 2.6vw, 36px);

  /* Spacing rhythm */
  --section-y: clamp(72px, 9vw, 160px);
}

/* ============================== RESET ============================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }
body {
  font-family: var(--font-display);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ============================== PAGE LOAD ============================== */
body.is-loading {
  opacity: 0;
}
body.is-loaded {
  opacity: 1;
  transition: opacity 1.2s cubic-bezier(.2,.7,.2,1);
}
body.is-loaded .reveal-on-load {
  animation: rise-in 1.4s cubic-bezier(.2,.7,.2,1) both;
}
body.is-loaded .reveal-on-load-1 { animation-delay: .15s; }
body.is-loaded .reveal-on-load-2 { animation-delay: .30s; }
body.is-loaded .reveal-on-load-3 { animation-delay: .45s; }
body.is-loaded .reveal-on-load-4 { animation-delay: .60s; }
@keyframes rise-in {
  0% { opacity: 0; transform: translateY(28px); filter: blur(4px); }
  60% { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, button { font-family: inherit; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ============================== LAYOUT ============================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

/* ============================== TYPE ============================== */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-eyebrow);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.eyebrow--accent { color: var(--accent); }

.body {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--t-body);
  line-height: 1.5;
  letter-spacing: 0.006em;
  color: var(--ink);
}

/* ============================== BUTTONS ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  transition: transform .35s cubic-bezier(.2,.7,.2,1),
              background-color .35s ease,
              color .35s ease,
              box-shadow .35s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--accent);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(36, 41, 51, 0.6);
}
.btn--primary:active { transform: translateY(0); }
.btn--large { padding: 18px 26px; font-size: 16px; }

/* ============================== NAV ============================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid rgba(36, 41, 51, 0.1);
  transition: box-shadow .3s ease, border-color .3s ease;
}
.nav--scrolled {
  border-bottom-color: rgba(36, 41, 51, 0.14);
  box-shadow: 0 4px 20px -12px rgba(36, 41, 51, 0.25);
}
.nav__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--ink);
  transition: opacity .25s ease;
}
.nav__logo:hover { opacity: 0.7; }
.nav__logo-img {
  height: 22px;
  width: auto;
  display: block;
  filter: brightness(0);
  transition: filter .3s ease;
}
.nav__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  flex-shrink: 0;
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  line-height: 1;
  transition: background .25s ease, color .25s ease;
}
.nav__link:hover {
  background: rgba(36, 41, 51, 0.06);
  color: var(--accent);
}
.nav__cta {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: background .3s ease, transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
}
.nav__cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -14px rgba(36,41,51,0.5);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
}
.nav__burger span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .25s ease;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid rgba(36, 41, 51, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 32px;
  transform: translateY(-110%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  z-index: 99;
  visibility: hidden;
}
.nav__drawer.open { transform: translateY(0); visibility: visible; }
.nav__drawer-link {
  padding: 16px 8px;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  border-bottom: 1px solid rgba(36, 41, 51, 0.08);
}
.nav__drawer-cta { margin-top: 16px; align-self: flex-start; }

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
}

/* ============================== HERO ============================== */
.hero {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  background: var(--paper);
}
.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.hero__top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-h1);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.hero__image {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--paper-alt);
  position: relative;
}
.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.hero__image:hover img { transform: scale(1.03); }

/* Variant: portrait photo on matching background */
.hero__image--portrait {
  background: #d9d9d9;
}
.hero__image--portrait::before { content: none; }
.hero__image--portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.hero__image--portrait:hover img {
  transform: scale(1.03);
}

.hero__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 64px;
  align-items: start;
}
.hero__bottom-eyebrow { padding-top: 6px; }
.hero__bottom-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 624px;
}
.hero__bottom-content .btn { align-self: flex-start; }

@media (max-width: 760px) {
  .hero__bottom { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================== WORKS ============================== */
.works {
  padding: clamp(48px, 6vw, 96px) 0;
  background: var(--paper);
}
.works__inner {
  background: var(--paper-alt);
  border-radius: var(--radius);
  padding: clamp(48px, 6vw, 96px) clamp(20px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 64px;
  align-items: center;
}
.works__list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.project {
  display: flex;
  flex-direction: column;
}
.project__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.project__title { color: var(--ink); }
.project__tag { color: var(--ink-soft); }
.project__link {
  display: contents;
}
.project__image {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  cursor: none;
}
.project__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.2,.7,.2,1);
}
.project:hover .project__image img { transform: scale(1.04); }

/* ============================== FLOATING CURSOR CHIP ============================== */
.cursor-chip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 8px 24px -10px rgba(0,0,0,0.25), 0 2px 6px -2px rgba(0,0,0,0.15);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
  white-space: nowrap;
  will-change: transform, opacity, left, top;
}
.cursor-chip.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.cursor-chip__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
@media (hover: none), (max-width: 760px) {
  .cursor-chip { display: none; }
  .project__image { cursor: pointer; }
}

/* ============================== STORY ============================== */
.story {
  padding: var(--section-y) 0;
  background: var(--paper);
}
.story__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
  max-width: 768px;
  margin: 0 auto;
}
.story__heading {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--t-h2);
  line-height: 1;
  color: var(--ink);
  text-transform: uppercase;
}
.story__image {
  margin: 64px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
  max-width: 463px;
  aspect-ratio: 463 / 518;
  background: var(--paper-alt);
}
.story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.story__image:hover img { transform: scale(1.04); }

.services {
  margin-top: clamp(64px, 8vw, 109px);
  display: flex;
  flex-direction: column;
}
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding: 64px 0;
  border-top: 1px solid rgba(36, 41, 51, 0.1);
}
.service:last-child { border-bottom: 1px solid rgba(36, 41, 51, 0.1); }
.service__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.service__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--t-h3);
  line-height: 1;
  color: var(--ink);
  text-transform: uppercase;
}
.service__body { max-width: 624px; }

@media (max-width: 760px) {
  .service { grid-template-columns: 1fr; gap: 16px; padding: 40px 0; }
}

/* ============================== TESTIMONIAL ============================== */
.testimonial {
  padding-top: clamp(32px, 4vw, 32px);
  padding-bottom: clamp(48px, 6vw, 96px);
  background: var(--paper);
}
.testimonial .container {
  background: var(--paper-alt);
  border-radius: var(--radius);
  padding: clamp(32px, 4vw, 32px) clamp(20px, 4vw, 40px) clamp(48px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.testimonial__image {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.testimonial__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transform: scale(1.25);
  transform-origin: 50% 35%;
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.testimonial__image:hover img { transform: scale(1.35); }
.testimonial__wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 64px;
  align-items: start;
}
.testimonial__eyebrow { padding-top: 6px; }
.testimonial__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 624px;
}
@media (max-width: 760px) {
  .testimonial__wrap { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================== CTA ============================== */
.cta {
  padding: var(--section-y) 0;
  background: var(--paper);
}
.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  max-width: 768px;
}
.cta__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-h2);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.cta__form {
  width: 100%;
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.field input, .field textarea {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: 14px 16px;
  background: var(--paper-alt);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink);
  resize: vertical;
  transition: border-color .25s ease, background .25s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
}
.field input.invalid, .field textarea.invalid {
  border-color: #c14545;
}
.cta__submit {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 16px;
}
.cta__submit svg { transition: transform .35s ease; }
.cta__submit:hover svg { transform: translateX(4px); }
.cta__feedback {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  min-height: 18px;
  color: var(--accent);
}
@media (max-width: 600px) {
  .cta__form { grid-template-columns: 1fr; }
}

/* ============================== FOOTER ============================== */
.footer {
  background: var(--paper);
  padding: 60px 0 40px;
  overflow: hidden;
}
.footer__brand {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 20px 0;
}
.footer__logo-img {
  width: 100%;
  max-width: 1100px;
  height: auto;
  display: block;
  filter: brightness(0);
  opacity: 0.92;
}
.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 18vw, 256px);
  letter-spacing: -0.04em;
  line-height: 0.85;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
}
.footer__brand-vector {
  width: 100%;
  max-width: 1280px;
  height: auto;
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(36, 41, 51, 0.08);
}
.footer__social {
  display: flex;
  gap: 20px;
  align-items: center;
}
.footer__social a {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  position: relative;
  transition: color .25s ease;
}
.footer__social a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.footer__social a:hover { color: var(--accent); }
.footer__social a:hover::after { transform: scaleX(1); }
@media (max-width: 480px) {
  .footer__bottom { justify-content: center; text-align: center; }
}

/* ============================== REVEAL ANIMATIONS ============================== */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition:
    opacity 1.8s cubic-bezier(.2,.7,.2,1),
    transform 1.8s cubic-bezier(.2,.7,.2,1),
    filter 1.6s cubic-bezier(.2,.7,.2,1);
  filter: blur(6px);
  will-change: opacity, transform, filter;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
/* Stagger for siblings inside the same parent */
.reveal.visible.stagger-1 { transition-delay: .08s; }
.reveal.visible.stagger-2 { transition-delay: .16s; }
.reveal.visible.stagger-3 { transition-delay: .24s; }
.reveal.visible.stagger-4 { transition-delay: .32s; }
.reveal.visible.stagger-5 { transition-delay: .40s; }
.reveal.visible.stagger-6 { transition-delay: .48s; }

/* Parallax-friendly base for hero/cover images */
.parallax {
  will-change: transform;
  transition: transform .1s linear;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; filter: none; }
  html { scroll-behavior: auto; }
  .parallax { transform: none !important; }
}

/* ============================== WORD REVEAL ============================== */
.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition:
    opacity 1.4s cubic-bezier(.2,.7,.2,1),
    transform 1.4s cubic-bezier(.2,.7,.2,1),
    filter 1.2s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--word-i, 0) * 90ms);
  will-change: opacity, transform, filter;
}
.word-reveal-go .word-reveal {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
  .word-reveal { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ============================== TWEAKS PANEL ============================== */
.tw {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  background: rgba(36, 41, 51, 0.95);
  color: var(--paper);
  border-radius: 14px;
  padding: 16px;
  width: 280px;
  box-shadow: 0 24px 50px -20px rgba(0,0,0,0.4);
  font-family: var(--font-display);
  display: none;
}
.tw.open { display: block; }
.tw__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.tw__title { font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.tw__close {
  width: 28px; height: 28px;
  border-radius: 8px;
  color: var(--paper);
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tw__close:hover { background: rgba(255,255,255,0.1); }
.tw__group { margin-bottom: 16px; }
.tw__label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }
.tw__swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.tw__swatch {
  width: 32px; height: 32px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.tw__swatch:hover { transform: scale(1.1); }
.tw__swatch.active { border-color: var(--paper); }
