:root {
  --bg: #0b0b0c;
  --bg-alt: #101012;
  --surface: #16161a;
  --line: #26262c;
  --text: #f4f1e8;
  --muted: #9b9a92;
  --accent: #f5d815;
  --radius: 18px;
  --font-display: "Syne", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}
::selection { background: var(--accent); color: #111; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.01em; }
.accent { color: var(--accent); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- NAV ---------- */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 5vw;
  background: rgba(11, 11, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
#nav.scrolled { border-bottom-color: var(--line); }
.nav-logo { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .04em; }
.nav-links { display: flex; gap: 32px; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--accent); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  font-weight: 600; font-size: 15px; border: 1px solid var(--line);
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-small { padding: 9px 20px; font-size: 13px; }
.btn-small:hover { border-color: var(--accent); color: var(--accent); }
.btn-accent { background: var(--accent); color: #111; border-color: var(--accent); }
.btn-accent:hover { background: #ffe94d; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- PRELOADER ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.preloader-text {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 7vw, 90px); letter-spacing: .04em;
  overflow: hidden;
}
.preloader-text { animation: preIn .8s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes preIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: none; }
}

/* ---------- CUSTOM CURSOR ---------- */
.cursor {
  position: fixed; top: 0; left: 0; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent);
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .25s, height .25s, opacity .25s;
  opacity: 0;
}
.cursor.on { opacity: 1; }
.cursor.grow { width: 56px; height: 56px; }
@media (hover: none) { .cursor { display: none; } }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px 5vw 0;
}
.hero-bg-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(120px, 24vw, 360px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 216, 21, 0.07);
  pointer-events: none; user-select: none; white-space: nowrap;
}
.hero-inner {
  position: relative; display: grid;
  grid-template-columns: 1.25fr 1fr; gap: 4vw; align-items: center;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; margin-bottom: 26px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .5); }
  50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}
.hero-kicker {
  font-size: 14px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(34px, 6.2vw, 96px); font-weight: 800; }
.hero-sub { margin-top: 26px; font-size: 18px; color: var(--muted); max-width: 480px; }
.hero-sub strong { color: var(--text); }
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-photo { position: relative; justify-self: end; }
.hero-calligraphy {
  position: absolute; top: -8%; left: -22%; width: 65%;
  opacity: .9; z-index: 0;
  filter: drop-shadow(0 0 50px rgba(245, 216, 21, .25));
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.hero-img {
  position: relative; z-index: 1;
  width: min(380px, 34vw);
  border-radius: var(--radius);
  filter: grayscale(18%) contrast(1.04);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .55);
}

.hero-stats {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1280px; margin: 70px auto 0; width: 100%;
  border-top: 1px solid var(--line);
  padding: 34px 0 44px; gap: 20px;
}
.stat-num, .stat-plus {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 4vw, 56px); color: var(--text);
}
.stat-plus { color: var(--accent); }
.stat-label { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-alt); padding: 20px 0;
}
.marquee-track {
  display: flex; gap: 44px; width: max-content;
  animation: scroll 36s linear infinite;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: .08em; color: var(--muted); white-space: nowrap;
}
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- SECTIONS ---------- */
.section { padding: 110px 5vw; max-width: 1280px; margin: 0 auto; }
.section-alt { max-width: none; background: var(--bg-alt); }
.section-alt .timeline { max-width: 880px; margin: 0 auto; }
.section-head { margin-bottom: 56px; }
.section-kicker {
  font-size: 13px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.section-head h2, .about-text h2 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; }
.section-sub { margin-top: 18px; color: var(--muted); max-width: 560px; font-size: 17px; }

/* ---------- SERVICES ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.service {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 34px;
  transition: transform .3s, border-color .3s, background .3s;
  overflow: hidden;
}
.service:hover { transform: translateY(-5px); border-color: rgba(245, 216, 21, .45); }
.service-num {
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  color: var(--accent); letter-spacing: .1em;
}
.service h3 { font-size: 24px; margin: 14px 0 12px; }
.service p { color: var(--muted); font-size: 15px; max-width: 420px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.service-tags span {
  font-size: 12px; padding: 6px 13px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted);
}
.service::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 216, 21, .08), transparent 70%);
  opacity: 0; transition: opacity .4s;
}
.service:hover::after { opacity: 1; }

/* ---------- PROCESS ---------- */
.section-wide { max-width: none; }
.process-inner { max-width: 1280px; margin: 0 auto; }
.process { border-top: 1px solid var(--line); }
.process-row {
  display: grid; grid-template-columns: 110px 1.1fr 1.6fr;
  gap: 30px; align-items: baseline;
  padding: 34px 12px; border-bottom: 1px solid var(--line);
  transition: background .25s, padding-left .25s;
}
.process-row:hover { background: rgba(245, 216, 21, .04); padding-left: 26px; }
.process-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: 17px; color: var(--accent); letter-spacing: .1em;
}
.process-row h3 { font-size: clamp(20px, 2.4vw, 30px); }
.process-row p { color: var(--muted); font-size: 15px; max-width: 520px; }

/* ---------- REFERENCES ---------- */
.refs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.ref-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 30px;
  transition: transform .3s, border-color .3s;
}
.ref-card:hover { transform: translateY(-4px); border-color: rgba(245, 216, 21, .45); }
.ref-brand {
  font-size: 12px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.ref-card h3 { font-size: 23px; margin-bottom: 8px; }
.ref-mail { color: var(--muted); font-size: 14px; transition: color .2s; }
.ref-mail:hover { color: var(--accent); }

/* ---------- WORK TABS ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 42px; }
.tab {
  padding: 11px 22px; border-radius: 999px; cursor: pointer;
  background: none; border: 1px solid var(--line); color: var(--muted);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  transition: all .2s;
}
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #111; }
.tab .count { opacity: .55; font-weight: 500; margin-left: 5px; }

.panel { display: none; }
.panel.active { display: block; animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.panel-desc { color: var(--muted); margin-bottom: 30px; max-width: 640px; }
.panel-desc strong { color: var(--text); }

.embed-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.embed-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  min-height: 480px; position: relative;
  transition: transform .25s, border-color .25s;
}
.embed-card:hover { transform: translateY(-4px); border-color: rgba(245, 216, 21, .4); }
.embed-card iframe { width: 100%; height: 480px; border: 0; background: #fff; }
.embed-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px;
}

.channel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.channel-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: all .25s; display: block;
}
.channel-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.channel-card h4 { font-family: var(--font-display); font-size: 19px; margin-bottom: 6px; }
.channel-card p { color: var(--muted); font-size: 14px; }
.channel-card .arrow { color: var(--accent); font-size: 14px; font-weight: 600; display: inline-block; margin-top: 14px; }

.archive { margin-top: 34px; border: 1px solid var(--line); border-radius: var(--radius); }
.archive summary {
  cursor: pointer; padding: 18px 24px; font-weight: 600; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); transition: color .2s;
}
.archive summary:hover { color: var(--accent); }
.archive summary::after { content: "+"; font-size: 22px; color: var(--accent); }
.archive[open] summary::after { content: "–"; }
.archive-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 24px; }
.archive-list a {
  font-size: 13px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); transition: all .2s;
}
.archive-list a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- TIMELINE ---------- */
.timeline { position: relative; }
.tl-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 34px;
  padding: 34px 0; border-bottom: 1px solid var(--line);
}
.tl-item:last-child { border-bottom: none; }
.tl-when { font-size: 14px; font-weight: 600; color: var(--muted); padding-top: 5px; }
.tl-body h3 { font-size: 22px; margin-bottom: 10px; }
.tl-body p { color: var(--muted); max-width: 620px; }
.tl-body strong { color: var(--text); }

/* ---------- ABOUT ---------- */
.about-head { max-width: 720px; }
.about-head p:not(.section-kicker) { color: var(--muted); margin-top: 20px; }
.about-head strong { color: var(--text); }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.skills span {
  font-size: 13px; padding: 8px 16px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted);
}
.logo-wall-label {
  margin-top: 64px; margin-bottom: 18px;
  font-size: 13px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.logo-wall { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.logo-card {
  flex: 0 1 calc((100% - 4 * 14px) / 5);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 4 / 3;
  transition: border-color .3s;
}
.logo-card:hover { border-color: rgba(245, 216, 21, .45); }
.logo-card img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; transition: transform .5s ease;
}
.logo-card:hover img { transform: scale(1.05); }

/* ---------- CONTACT ---------- */
.section-contact { text-align: center; padding-top: 140px; padding-bottom: 140px; }
.contact-big { font-size: clamp(44px, 7vw, 96px); font-weight: 800; }
.contact-email {
  display: inline-block; margin-top: 38px;
  font-size: clamp(18px, 2.6vw, 28px); font-weight: 600;
  border-bottom: 2px solid var(--accent); padding-bottom: 6px;
  transition: color .2s;
}
.contact-email:hover { color: var(--accent); }
.contact-links { margin-top: 34px; display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 15px; font-weight: 500; }
.contact-links a:hover { color: var(--accent); }

/* ---------- CTA MARQUEE ---------- */
.cta-marquee {
  display: block; overflow: hidden; cursor: pointer;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 34px 0; background: var(--bg-alt);
}
.cta-track {
  display: flex; gap: 54px; width: max-content; white-space: nowrap;
  animation: scroll 14s linear infinite;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(38px, 6vw, 84px); letter-spacing: .02em;
  color: transparent; -webkit-text-stroke: 1.5px var(--text);
  transition: color .3s;
}
.cta-marquee:hover .cta-track { color: var(--accent); -webkit-text-stroke: 1.5px var(--accent); }
.cta-track .accent { -webkit-text-stroke: 0; color: var(--accent); }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--line); overflow: hidden; }
.footer-top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 26px 5vw; color: var(--muted); font-size: 13px;
}
.footer-coords { letter-spacing: .06em; }
footer a:hover { color: var(--accent); }
.footer-wordmark {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(90px, 22vw, 340px); line-height: .78;
  text-align: center; user-select: none;
  margin-bottom: -0.12em;
  color: var(--text); opacity: .95;
}

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* line-split headline reveal */
.split-lines .line-wrap { display: block; overflow: hidden; }
.split-lines .line {
  display: block; transform: translateY(110%);
  transition: transform .9s cubic-bezier(.22, 1, .36, 1);
}
.split-lines.visible .line { transform: none; }
.split-lines.visible .line:nth-child(2), .split-lines .line-wrap:nth-child(2) .line { transition-delay: .12s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .embed-grid, .channel-grid { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: 1fr; }
  .refs { grid-template-columns: 1fr; }
  .logo-card { flex-basis: calc((100% - 2 * 14px) / 3); }
  .process-row { grid-template-columns: 60px 1fr; }
  .process-row p { grid-column: 2; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { justify-self: start; margin-top: 30px; }
  .hero-img { width: min(320px, 70vw); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .embed-grid, .channel-grid { grid-template-columns: 1fr; }
  .logo-card { flex-basis: calc((100% - 14px) / 2); }
  .section { padding: 80px 6vw; }
}
