/* Contsy — design tokens */
:root {
  --bg: #0a0a0c;
  --bg-alt: #111115;
  --surface: #16161b;
  --surface-2: #1d1d24;
  --line: #2a2a33;
  --text: #f4f2ee;
  --muted: #a3a1ab;
  --dim: #6f6d78;
  --accent: #ff5c35;
  --accent-soft: rgba(255, 92, 53, 0.14);
  --ok: #57d68d;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", var(--font);
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius: 18px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.03em; }
p { margin: 0; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--accent); }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: #000; padding: 8px 14px; border-radius: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: #0a0a0c;
  border: 1px solid var(--accent); border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--big { min-height: 60px; padding: 0 30px; font-size: clamp(17px, 2.4vw, 22px); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.04em; text-decoration: none; }
.logo__dot { color: var(--accent); }
.nav__links { display: flex; gap: 30px; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__right { display: flex; align-items: center; gap: 12px; }
  background: none; border: 0; cursor: pointer;
  padding: 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--dim);
}

/* Hero */
.hero { position: relative; padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 7vw, 80px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(255, 92, 53, 0.18), transparent 62%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(87, 214, 141, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(87, 214, 141, 0); } 100% { box-shadow: 0 0 0 0 rgba(87, 214, 141, 0); } }
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); font-weight: 800; letter-spacing: -0.045em; }
.hero h1 em { font-size: 1.06em; white-space: nowrap; }
.lead { margin-top: 24px; max-width: 540px; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Terminal */
.term {
  background: linear-gradient(180deg, var(--surface), #121216);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  overflow: hidden;
}
.term__bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.term__bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.term__bar p { margin-left: 8px; font: 12px var(--font-mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term__body { padding: 20px 20px 24px; font: 14px/1.55 var(--font-mono); min-height: 300px; }
.term__body li { padding: 5px 0; }
.term__in { color: var(--text); }
.term__in b { color: var(--accent); font-weight: 500; margin-right: 4px; }
.term__in b::before { content: "› "; color: var(--dim); }
.term__out { color: var(--ok); padding-left: 16px !important; margin-bottom: 8px; opacity: .9; }
.term__out--hl { color: var(--text); }
.js .term__body li { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.js .term__body li.is-on { opacity: 1; transform: none; }
.term__caret::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* Stats */
.stats {
  position: relative; margin: clamp(56px, 8vw, 96px) 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stats div { padding: 28px 24px 0 0; }
.stats dt { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 4.4vw, 54px); letter-spacing: -0.04em; line-height: 1; }
.stats dd { margin: 10px 0 0; color: var(--muted); font-size: 15px; max-width: 220px; }

/* Sections */
.section { padding: clamp(72px, 11vw, 140px) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.kicker { font: 500 13px var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 18px; }
.section h2 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 800; }
.section__sub { margin-top: 18px; color: var(--muted); font-size: 18px; }

/* Case study */
.case {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 4vw, 56px);
  padding: clamp(20px, 3vw, 36px);
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
}
.video {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #000;
}
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.video:hover img { transform: scale(1.03); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__pill {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(10, 10, 12, .78); backdrop-filter: blur(8px);
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.case__meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.case__num { font-family: var(--font-mono); color: var(--accent); }
.case h3 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; }
.case__lead { margin-top: 14px; font-size: 19px; color: var(--text); }
.case__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.case__cols h4 { font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.case__cols p { color: var(--muted); font-size: 15.5px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 28px; }
.facts li { background: var(--surface-2); border-radius: 12px; padding: 14px 12px; }
.facts b { display: block; font-family: var(--font-display); font-size: 22px; letter-spacing: -0.03em; }
.facts span { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tags li { font: 12.5px var(--font-mono); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.case__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.shots {
  grid-column: 1 / -1;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 31%); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.shot { scroll-snap-align: start; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.shot img { border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 16 / 10; object-fit: cover; transition: border-color .2s; }
.shot:hover img { border-color: var(--muted); }
.shot span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; }

.next {
  margin-top: 20px; padding: clamp(28px, 4vw, 44px);
  border: 1px dashed var(--line); border-radius: calc(var(--radius) + 6px);
  display: grid; gap: 12px; justify-items: start;
}
.next h3 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; }
.next p { color: var(--muted); }
.next .btn { margin-top: 10px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { padding: 28px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps__n { display: block; font: 500 14px var(--font-mono); color: var(--accent); margin-bottom: 40px; }
.steps h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 15.5px; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  padding: clamp(26px, 3.4vw, 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: rgba(255, 92, 53, .5); transform: translateY(-3px); }
.card__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent); font-size: 22px; margin-bottom: 26px;
}
.card h3 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about__card {
  padding: 36px; text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(255, 92, 53, .18), transparent 60%), var(--surface);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
}
.about__avatar {
  width: 132px; height: 132px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #ff9a3d); color: #0a0a0c;
  font: 800 46px var(--font-display); letter-spacing: -0.04em;
}
.about__name { font: 700 24px var(--font-display); letter-spacing: -0.03em; }
.about__role { color: var(--muted); margin-top: 4px; font-size: 15px; }
.about__chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.about__chips li { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.about__copy h2 { margin-bottom: 28px; }
.about__copy p:not(.kicker) { color: var(--muted); font-size: 18px; margin-top: 16px; max-width: 640px; }

/* Contact */
.contact { text-align: center; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 50%; bottom: -60%; transform: translateX(-50%);
  width: 900px; height: 700px; max-width: 140vw;
  background: radial-gradient(ellipse, rgba(255, 92, 53, .16), transparent 65%); pointer-events: none;
}
.contact__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.contact h2 { font-size: clamp(42px, 7vw, 88px); }
.contact .lead { margin-left: auto; margin-right: auto; }
.contact__cta { justify-content: center; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--dim); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Lightbox */
.lightbox { max-width: min(1400px, 94vw); padding: 0; border: 0; background: transparent; }
.lightbox::backdrop { background: rgba(5, 5, 7, .88); backdrop-filter: blur(4px); }
.lightbox img { border-radius: 12px; max-height: 88vh; width: auto; margin: 0 auto; }
.lightbox__close {
  position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); font-size: 24px; line-height: 1; cursor: pointer;
}

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 980px) {
  .hero__grid, .case, .about { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div { padding-bottom: 8px; }
  .shots { grid-auto-columns: minmax(240px, 46%); }
  .about__card { max-width: 420px; width: 100%; margin: 0 auto; }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .cards, .steps, .case__cols { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-auto-columns: 82%; }
  .term__body { font-size: 12.5px; min-height: 0; }
  .steps__n { margin-bottom: 20px; }
  .hero__cta .btn, .case__links .btn { flex: 1 1 auto; }
  .btn--big { font-size: 17px; padding: 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal, .js .term__body li { opacity: 1; transform: none; }
}
