:root {
  --paper: #f2efe9;
  --paper-2: #e9e5dd;
  --ink: #141414;
  --ink-2: #3a3a38;
  --muted: #7b7973;
  --line: rgba(20, 20, 20, 0.14);
  --accent: #ff4d1a;
  --dark: #121212;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --maxw: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

.label {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); display: flex; gap: 10px; align-items: center;
}
.label__num { color: var(--accent); }
.label--light { color: rgba(255,255,255,.55); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .35s, border-color .35s, transform .45s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(242, 239, 233, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav.on-dark:not(.is-scrolled) { color: #fff; }
.nav__inner { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; position: relative; }
.brand img { height: 62px; width: auto; transition: opacity .3s; }
.brand__light { position: absolute; left: 0; top: 0; opacity: 0; }
.nav.on-dark:not(.is-scrolled) .brand__dark { opacity: 0; }
.nav.on-dark:not(.is-scrolled) .brand__light { opacity: 1; }
.nav__links { display: flex; gap: 36px; }
.nav__links a { font-size: .93rem; font-weight: 500; position: relative; overflow: hidden; display: inline-block; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.lang { background: none; border: 0; cursor: pointer; font: 500 .8rem var(--mono); color: inherit; padding: 6px 2px; display: flex; gap: 4px; }
.lang__off, .lang__sep { color: var(--muted); transition: color .2s; }
.lang:hover .lang__off { color: var(--ink); }
.menu { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; position: relative; cursor: pointer; }
.menu span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease), top .35s var(--ease); }
.menu span:first-child { top: 17px; }
.menu span:last-child { top: 23px; }
.menu[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.menu[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 90px; position: relative; }
.hero__grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.hero__label { margin-bottom: 32px; }
.hero__title {
  font-family: var(--display); font-weight: 700; letter-spacing: -.045em;
  font-size: clamp(3rem, 7.4vw, 7rem); line-height: .92;
}
.hero__title .line { display: block; overflow: hidden; padding: .14em 0 .06em; margin-top: -.14em; }
.hero__title .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.is-loaded .hero__title .line > span { transform: none; }
.is-loaded .hero__title .line:nth-child(2) > span { transition-delay: .1s; }
.is-loaded .hero__title .line:nth-child(3) > span { transition-delay: .2s; }
.rotator { position: relative; color: var(--accent); }
.rotator__word { display: inline-block; }
.rotator__word.is-out { animation: rotOut .5s var(--ease) forwards; }
.rotator__word.is-in { animation: rotIn .7s var(--ease) both; }
@keyframes rotOut { to { transform: translateY(-100%); opacity: 0; } }
@keyframes rotIn { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }

.hero__foot { margin-top: 48px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease) .5s, transform 1s var(--ease) .5s; }
.is-loaded .hero__foot { opacity: 1; transform: none; }
.hero__lead { max-width: 440px; color: var(--ink-2); font-size: 1.08rem; }

.btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 16px 26px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: .98rem;
  position: relative; overflow: hidden; isolation: isolate;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--accent); z-index: -1; transform: translateY(101%); transition: transform .5s var(--ease); border-radius: inherit; }
.btn:hover::before { transform: none; }
.btn svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.hero__art { width: 100%; max-width: 500px; justify-self: end; position: relative; display: flex; flex-direction: column; align-items: center; }
.hero__art canvas { width: 71%; aspect-ratio: 1; }
.hero__wordmark { width: 95%; margin-top: -2%; opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease) 1.5s, transform 1s var(--ease) 1.5s; }
.is-loaded .hero__wordmark { opacity: 1; transform: none; }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 22px; height: 36px; border: 1.5px solid var(--ink); border-radius: 12px; transform: translateX(-50%); opacity: .5; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; border-radius: 2px; background: var(--ink); transform: translateX(-50%); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Marquee ---------- */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: var(--paper); }
.marquee__track { display: flex; width: max-content; gap: 40px; align-items: center; animation: marquee 34s linear infinite;
  font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3.2vw, 2.6rem); letter-spacing: -.03em; white-space: nowrap; }
.marquee__track i { font-style: normal; color: var(--accent); font-size: .6em; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 160px 0; }
.section--tight { padding-top: 40px; }
.section__head { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: end; margin-bottom: 64px; }
.h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 4.4rem); letter-spacing: -.04em; line-height: 1; }

.studio { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }
.studio .label { padding-top: 14px; }
.statement {
  font-family: var(--display); font-weight: 500; letter-spacing: -.025em;
  font-size: clamp(1.6rem, 3.2vw, 2.9rem); line-height: 1.15;
}
.statement .w { color: rgba(20,20,20,.16); transition: color .25s linear; }
.statement .w.on { color: var(--ink); }

/* Services */
.services { border-top: 1px solid var(--ink); }
.service {
  display: grid; grid-template-columns: 80px 1.1fr 1.4fr 280px; gap: 32px; align-items: baseline;
  padding: 44px 0; border-bottom: 1px solid var(--line); position: relative;
}
.service::before {
  content: ""; position: absolute; left: -40px; right: -40px; top: 0; bottom: 0; background: var(--paper-2);
  z-index: -1; transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease);
}
.service:hover::before { transform: scaleY(1); }
.service__num { font-family: var(--mono); font-size: .85rem; color: var(--accent); }
.service__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 2.8vw, 2.5rem); letter-spacing: -.035em; line-height: 1.05; transition: transform .55s var(--ease); }
.service:hover .service__title { transform: translateX(10px); }
.service__body { color: var(--ink-2); max-width: 460px; }
.service__tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.service__tags li { font-family: var(--mono); font-size: .74rem; letter-spacing: .02em; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; color: var(--ink-2); white-space: nowrap; }

/* Contact */
.contact { background: var(--dark); color: #fff; padding: 150px 0 110px; border-radius: 32px 32px 0 0; }
.contact__title { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 6.6vw, 6rem); letter-spacing: -.045em; line-height: .98; margin: 36px 0 56px; }
.contact__mail { display: inline-flex; align-items: center; gap: 18px; font-family: var(--display); font-weight: 500; font-size: clamp(1.4rem, 3.4vw, 2.8rem); letter-spacing: -.03em; position: relative; padding-bottom: 8px; }
.contact__mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.25); }
.contact__mail::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); z-index: 1; }
.contact__mail:hover::before { transform: scaleX(1); }
.contact__mail svg { width: .9em; height: .9em; transition: transform .5s var(--ease); color: var(--accent); }
.contact__mail:hover svg { transform: translate(4px, -4px) rotate(45deg); }
.contact__row { margin-top: 90px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: rgba(255,255,255,.6); font-size: .95rem; }
.socials { display: flex; gap: 24px; }
.socials a { color: #fff; font-weight: 500; position: relative; }
.socials a::after { content: " ↗"; color: var(--accent); }
.socials a:hover { color: var(--accent); }

.footer { background: var(--dark); color: rgba(255,255,255,.5); font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 26px; flex-wrap: wrap; }
.to-top:hover { color: #fff; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero__foot, .hero__title .line > span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee__track { animation: none; }
  .scroll-cue span { animation: none; }
  .statement .w { color: var(--ink); }
}

/* Responsive */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { position: absolute; right: -60px; top: 90px; width: 300px; opacity: .35; z-index: -1; }
  .service { grid-template-columns: 56px 1fr; gap: 12px 20px; }
  .service__body, .service__tags { grid-column: 2; }
  .service__tags { justify-content: flex-start; }
  .studio, .section__head { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .menu { display: block; }
  .nav.on-dark:not(.is-scrolled) .menu span { background: #fff; }
  .brand img { height: 50px; }
  .nav__inner { height: 72px; }
  .nav__links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; padding: 8px 16px 20px;
    background: var(--paper); border-bottom: 1px solid var(--line); color: var(--ink);
    clip-path: inset(0 0 100% 0); transition: clip-path .5s var(--ease);
  }
  .nav__links.is-open { clip-path: inset(0 0 0 0); }
  .nav__links a { padding: 16px 0; font-family: var(--display); font-size: 1.6rem; font-weight: 600; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .hero { padding: 110px 0 90px; }
  .hero__art { position: static; order: -1; width: 190px; opacity: 1; z-index: auto; justify-self: start; margin: 0 0 4px -8px; }
  .hero__grid { gap: 20px; }
  .hero__foot { margin-top: 36px; }
  .section { padding: 100px 0; }
  .section--tight { padding-top: 20px; }
  .service { padding: 32px 0; }
  .service::before { left: -16px; right: -16px; }
  .contact { padding: 100px 0 80px; border-radius: 22px 22px 0 0; }
  .contact__title { margin: 28px 0 40px; }
  .contact__mail { font-size: 1.35rem; gap: 10px; }
  .contact__row { margin-top: 60px; }
  .footer__inner { flex-direction: column; gap: 8px; }
}
