/* ============ TOKENS ============ */
:root {
  --ink: #0d0f12;
  --ink-2: #16191e;
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --accent: #ff6a1a;
  --accent-2: #ffb347;
  --muted-dark: #6b6a66;
  --muted-light: #9a988f;
  --line-dark: rgba(13, 15, 18, .12);
  --line-light: rgba(244, 241, 234, .14);

  --font-display: "Inter Tight", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --section-y: clamp(80px, 12vw, 160px);
  --max: 1240px;
  --nav-h: 72px;
}

/* ============ BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(16px, 1.1vw, 18px)/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); }
::selection { background: var(--accent); color: var(--ink); }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 12px/1 var(--font-display);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 24px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.h2 {
  font-size: clamp(32px, 5vw, 64px); font-weight: 700;
  line-height: 1.04; letter-spacing: -.03em;
}
.h3 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.muted { color: var(--muted-dark); margin: 0; }

.section { padding-block: var(--section-y); border-top: 1px solid var(--line-dark); }
.section__head { margin-bottom: clamp(40px, 6vw, 72px); }

/* ============ BUTTONS ============ */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 28px; border-radius: 999px;
  font: 600 15px/1 var(--font-display); letter-spacing: .02em;
  text-decoration: none; border: 1px solid currentColor; cursor: pointer;
  background: transparent;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  transform: translateY(101%); border-radius: inherit;
  transition: transform .5s var(--ease);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .5s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover svg, .btn:focus-visible svg { transform: translateX(4px); }
.btn:hover, .btn:focus-visible { color: var(--ink); border-color: var(--accent); }
.btn--light { color: var(--paper); }
.btn--dark { color: var(--ink); }

/* ============ NAV ============ */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  color: var(--paper);
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__logo img { height: 24px; width: auto; transition: filter .5s var(--ease); }
.nav__links { display: none; gap: 40px; }
.nav__links a {
  position: relative; text-decoration: none;
  font: 500 14px/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase;
  padding-block: 6px;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav.is-scrolled {
  background: rgba(244, 241, 234, .82);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  color: var(--ink); border-color: var(--line-dark);
}
.nav.is-scrolled .nav__logo img { filter: invert(1) hue-rotate(180deg); }
.nav.is-hidden { transform: translateY(-100%); }

.nav__toggle {
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer; color: inherit;
  display: grid; place-content: center; gap: 7px; position: relative; z-index: 60;
}
.nav__toggle span { display: block; width: 26px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
body.menu-open .nav { color: var(--paper); background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; }
body.menu-open .nav__logo img { filter: none; }
body.menu-open .nav__toggle span:first-child { transform: translateY(4.25px) rotate(45deg); }
body.menu-open .nav__toggle span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45; background: var(--ink); color: var(--paper);
  display: flex; align-items: center; padding: var(--gutter);
  clip-path: circle(0% at calc(100% - 38px) 36px);
  transition: clip-path .8s var(--ease); visibility: hidden;
}
.mobile-menu nav { display: grid; gap: 8px; width: 100%; }
.mobile-menu a {
  display: flex; align-items: baseline; gap: 16px; text-decoration: none;
  font: 700 clamp(44px, 13vw, 72px)/1.1 var(--font-display); letter-spacing: -.03em;
  border-bottom: 1px solid var(--line-light); padding-block: 12px;
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), color .3s;
}
.mobile-menu a span { font-size: 13px; letter-spacing: .1em; color: var(--accent); font-weight: 500; }
.mobile-menu a:hover { color: var(--accent); }
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 38px) 36px); visibility: visible; }
body.menu-open .mobile-menu a { opacity: 1; transform: none; }
body.menu-open .mobile-menu a:nth-child(1) { transition-delay: .25s; }
body.menu-open .mobile-menu a:nth-child(2) { transition-delay: .32s; }
body.menu-open .mobile-menu a:nth-child(3) { transition-delay: .39s; }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  background: var(--ink); color: var(--paper); overflow: hidden;
  padding-block: calc(var(--nav-h) + 40px) 120px;
}
.hero__bg { position: absolute; inset: 0; }
.hero__bg > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__image {
  background:
    url("assets/hero.jpg") center / cover no-repeat,
    radial-gradient(120% 80% at 80% 100%, #3a1d0c 0%, transparent 60%),
    linear-gradient(160deg, #0d0f12 0%, #181b21 55%, #22170f 100%);
  transform: scale(1.08);
  animation: heroZoom 18s var(--ease) forwards;
  will-change: transform;
}
.hero__video { object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero__video.is-ready { opacity: 1; }
.hero__grid {
  background-image:
    linear-gradient(var(--line-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 75%);
  opacity: .5;
}
.hero__glow {
  inset: auto -20% -40% auto !important; width: 80vmax !important; height: 80vmax !important;
  background: radial-gradient(circle, rgba(255, 106, 26, .28), transparent 60%);
  animation: glow 9s ease-in-out infinite alternate;
}
.hero__shade { background: linear-gradient(180deg, rgba(13,15,18,.55) 0%, rgba(13,15,18,.25) 40%, rgba(13,15,18,.85) 100%); }

.hero__content { position: relative; z-index: 1; }
.hero__title {
  font-size: clamp(32px, 10.8vw, 128px); font-weight: 800;
  line-height: .95; letter-spacing: -.045em; text-transform: uppercase;
  margin-bottom: 32px;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line > span { display: inline-block; transform: translateY(110%); animation: lineUp 1.1s var(--ease) forwards; }
.hero__title .line:nth-child(2) > span { animation-delay: .12s; }
.hero__title .line:nth-child(3) > span { animation-delay: .24s; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__eyebrow, .hero__sub, .hero__cta { opacity: 0; animation: fadeUp 1s var(--ease) forwards; }
.hero__eyebrow { animation-delay: .1s; }
.hero__sub { max-width: 34ch; font-size: clamp(17px, 1.6vw, 21px); color: rgba(244,241,234,.78); margin-bottom: 40px; animation-delay: .55s; }
.hero__cta { animation-delay: .7s; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(244,241,234,.5); border-radius: 20px; z-index: 1;
  opacity: 0; animation: fadeUp 1s var(--ease) 1.1s forwards;
}
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; background: var(--paper); border-radius: 2px; animation: scrollDot 2s var(--ease) infinite; }

/* ============ ABOUT ============ */
.about { border-top: 0; }
.about__grid { display: grid; gap: 8px; align-items: start; }
.about__grid .eyebrow { margin-top: 18px; }
.about__text { margin-top: 40px; max-width: 60ch; color: var(--muted-dark); font-size: clamp(17px, 1.3vw, 19px); }

/* ============ PROJECT ============ */
.project {
  display: grid; background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 0 var(--line-dark), 0 30px 60px -30px rgba(13,15,18,.25);
}
.project__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-2); }
.project__art, .project__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.project:hover .project__art, .project:hover .project__img { transform: scale(1.05); }
.badge {
  position: absolute; left: 20px; top: 20px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(13,15,18,.6); color: var(--paper);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 600 12px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase;
}
.badge i, .dot {
  position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
}
.badge i::after, .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  animation: pulse 2s ease-out infinite;
}
.project__body { display: grid; gap: 32px; align-content: center; padding: clamp(28px, 4vw, 56px); }
.project__body .btn { justify-self: start; }

.specs { margin: 0; border-top: 1px solid var(--line-dark); }
.specs > div {
  display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center;
  padding-block: 14px; border-bottom: 1px solid var(--line-dark);
}
.specs dt { font: 500 12px/1.2 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dark); }
.specs dd { margin: 0; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.specs a { text-decoration: none; border-bottom: 1px solid var(--accent); transition: color .3s; }
.specs a:hover { color: var(--accent); }

/* ============ SERVICES ============ */
.services__grid { display: grid; border-top: 1px solid var(--line-dark); }
.service {
  position: relative; padding: 40px 0; border-bottom: 1px solid var(--line-dark);
  display: grid; gap: 12px;
}
.service::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease);
}
.service:hover::after { transform: scaleX(1); }
.service svg {
  width: 44px; height: 44px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round;
  margin-bottom: 12px; transition: stroke .4s, transform .6s var(--ease);
}
.service:hover svg { stroke: var(--accent); transform: translateY(-4px); }
.service__num { position: absolute; right: 0; top: 40px; font: 500 13px/1 var(--font-display); color: var(--muted-light); letter-spacing: .1em; }
.service .muted { max-width: 40ch; }

/* ============ VALUES ============ */
.values {
  background: var(--ink); color: var(--paper);
  padding-block: clamp(100px, 16vw, 200px); text-align: center; overflow: hidden; position: relative;
}
.values::before {
  content: ""; position: absolute; left: 50%; top: 100%; width: 120vmax; height: 120vmax;
  transform: translate(-50%, -30%);
  background: radial-gradient(circle, rgba(255,106,26,.18), transparent 55%);
  pointer-events: none;
}
.values__title {
  position: relative;
  font-size: clamp(36px, 7vw, 104px); font-weight: 800; line-height: 1; letter-spacing: -.04em; text-transform: uppercase;
  margin-bottom: 40px;
}
.values__words {
  position: relative; margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px;
  font: 500 clamp(18px, 2vw, 26px)/1.3 var(--font-display); color: var(--muted-light);
}
.values__words span { transition: color .4s; }
.values__words span:hover { color: var(--accent); }

/* ============ CONTACT ============ */
.contact { border-top: 0; }
.contact__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.contact__info { margin: 32px 0 44px; font-size: clamp(17px, 1.4vw, 20px); color: var(--muted-dark); }
.contact__info p { margin-bottom: 6px; }
.contact__email {
  font: 600 clamp(22px, 3vw, 36px)/1.2 var(--font-display); letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0% 2px no-repeat;
  transition: background-size .6s var(--ease);
  overflow-wrap: anywhere;
}
.contact__email:hover { background-size: 100% 2px; }

/* ============ FOOTER ============ */
.footer { background: var(--ink); color: rgba(244,241,234,.6); padding-block: 64px 40px; font-size: 14px; line-height: 1.7; }
.footer__grid { display: grid; gap: 32px; }
.footer__logo { height: 22px; width: auto; margin-bottom: 16px; }
.footer__legal { margin: 0; }
.footer address { font-style: normal; }
.footer__label { display: block; font: 600 11px/1 var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.footer__copy { margin: 0; padding-top: 24px; border-top: 1px solid var(--line-light); grid-column: 1 / -1; font-size: 13px; }

/* ============ MODAL ============ */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--gutter); visibility: hidden; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(13,15,18,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .5s var(--ease); }
.modal__panel {
  position: relative; width: min(640px, 100%); max-height: 90vh; overflow: auto;
  background: var(--paper); border-radius: 20px; padding: clamp(28px, 5vw, 56px);
  opacity: 0; transform: translateY(24px) scale(.97);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.modal__panel .h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 20px; }
.modal__panel p { color: var(--muted-dark); }
.modal__panel a { color: var(--ink); text-decoration-color: var(--accent); }
.specs--compact { margin-top: 28px; }
.modal__close {
  position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-dark); background: transparent; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink);
  transition: transform .4s var(--ease), background .3s;
}
.modal__close:hover { transform: rotate(90deg); background: var(--paper-2); }
.modal.is-open { visibility: visible; }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__panel { opacity: 1; transform: none; }

/* ============ REVEAL ============ */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ============ KEYFRAMES ============ */
@keyframes lineUp { to { transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes heroZoom { to { transform: scale(1); } }
@keyframes glow { from { transform: translate(0, 0) scale(1); opacity: .8; } to { transform: translate(-6%, -4%) scale(1.1); opacity: 1; } }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }

/* ============ BREAKPOINTS ============ */
@media (min-width: 640px) {
  .services__grid { grid-template-columns: 1fr 1fr; }
  .service { padding: 48px 40px 48px 0; }
  .service:nth-child(even) { padding: 48px 0 48px 40px; border-left: 1px solid var(--line-dark); }
  .service:nth-child(even) .service__num { right: 0; }
  .service__num { right: 40px; top: 48px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__toggle, .mobile-menu { display: none; }
  .about__grid { grid-template-columns: 1fr 2.2fr; gap: 48px; }
  .project { grid-template-columns: 1.35fr 1fr; }
  .project__media { aspect-ratio: auto; min-height: 520px; }
}
@media (max-width: 420px) {
  .specs > div { grid-template-columns: 1fr; gap: 2px; }
  .btn { padding: 16px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}
