:root {
  --bg: #f7f4ef;
  --surface: #ece6dc;
  --card: #ffffff;
  --line: #ddd5c8;
  --text: #16130f;
  --muted: #6e675d;
  --accent: #e5432a;
  --accent-hover: #cc3720;
  --shadow: 0 1px 2px rgba(22, 19, 15, .05), 0 12px 32px -12px rgba(22, 19, 15, .18);
  --display: "Bebas Neue", "Impact", sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --pad: clamp(16px, 4vw, 56px);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad);
  background: rgba(247, 244, 239, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.logo { font-family: var(--display); font-size: 26px; letter-spacing: .04em; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; border-radius: 999px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  font-weight: 600; font-size: 15px;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--accent-hover); box-shadow: 0 10px 24px -10px rgba(229, 67, 42, .6); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--card); box-shadow: var(--shadow); }
.btn-small { padding: 9px 18px; font-size: 14px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(32px, 6vw, 96px) var(--pad) clamp(40px, 6vw, 80px);
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; color: var(--muted); background: var(--card);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .15); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: .95; margin: 0; }
h1 { font-size: clamp(56px, 8.5vw, 132px); margin: 22px 0 22px; }
.lede { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 52ch; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 69% 35%; transform-origin: 59% 40%; animation: kenburns 18s ease-in-out infinite alternate; }

/* Labels */
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* Sections */
.section { padding: clamp(64px, 9vw, 128px) var(--pad) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; margin-bottom: 36px; }
.section-head .eyebrow { flex-basis: 100%; }
h2 { font-size: clamp(48px, 7vw, 104px); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project {
  position: relative; display: block; text-align: left;
  aspect-ratio: 16 / 10; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); color: #fff; box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s;
}
.project:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(22,19,15,.06), 0 24px 48px -16px rgba(22,19,15,.35); }
.project:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.project::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .78)); }
.project:hover img, .project:focus-visible img { transform: scale(1.04); }
.project-meta { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.project h3 { font-size: clamp(36px, 4vw, 56px); }
.project .role { display: block; font-size: 14px; color: rgba(255,255,255,.82); margin-top: 6px; }
.project .years { font-size: 13px; color: rgba(255,255,255,.82); white-space: nowrap; }
.project .count { position: absolute; top: 18px; left: 18px; z-index: 1; font-size: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.tabs button { padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14px; transition: background .25s, color .25s; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }

/* Photo masonry */
.masonry { columns: 3 280px; column-gap: 14px; }
.masonry button { display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface); break-inside: avoid; }
.masonry img { width: 100%; height: auto; transition: opacity .3s, transform .6s cubic-bezier(.2, .7, .2, 1); }
.masonry button { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.masonry button:hover img { transform: scale(1.03); }
.more-wrap { display: flex; justify-content: center; margin-top: 24px; }

/* Design */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.design-grid button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--surface); }
.design-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.design-grid button:hover img { transform: scale(1.04); }

/* Events */
.events-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.events.flip .events-grid { grid-template-columns: 1.1fr 1fr; }
.events.flip .events-media { order: 2; }
.events-media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow); }
.events-media img { width: 100%; height: 100%; object-fit: cover; }
.events-copy h2 { margin: 12px 0 18px; }
.events-body { font-size: clamp(17px, 1.6vw, 20px); margin: 0 0 22px; max-width: 52ch; }
.event-types { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.event-types li { padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 500; font-size: 15px; transition: transform .2s, border-color .2s; }
.event-types li:hover { transform: translateY(-2px); border-color: var(--accent); }
.events-note { margin: 0 0 28px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 10px 10px 0; color: var(--muted); max-width: 52ch; }

/* Social */
.social-body { max-width: 60ch; font-size: clamp(17px, 1.6vw, 21px); color: var(--text); margin: -8px 0 36px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--card); padding: 28px 24px; display: flex; flex-direction: column; gap: 6px; }
.stat-value { font-family: var(--display); font-size: clamp(48px, 6vw, 80px); line-height: .9; color: var(--accent); }
.stat-label { color: var(--muted); font-size: 14px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); }
.about-text { font-size: clamp(18px, 1.8vw, 24px); line-height: 1.5; margin: 0; }
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; }
.services .n { color: var(--accent); font-size: 13px; padding-top: 4px; }
.services h3 { font-size: 30px; }
.services p { grid-column: 2; margin: 0; color: var(--muted); font-size: 15px; }

/* Contact */
.contact { margin: clamp(80px, 10vw, 140px) var(--pad) 0; padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 72px); border-radius: 22px; background: var(--text); color: var(--bg); text-align: center; }
.contact .eyebrow, .contact-row { color: rgba(247, 244, 239, .65); }
.contact-row a:hover { color: var(--bg) !important; }
.contact h2 { margin: 16px 0 28px; }
.contact-email { display: inline-block; font-family: var(--display); font-size: clamp(32px, 6vw, 88px); color: var(--accent); word-break: break-all; line-height: 1; border-bottom: 2px solid transparent; transition: border-color .2s; }
.contact-email:hover { border-bottom-color: var(--accent); }
.contact-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 24px; color: var(--muted); }
.contact-row a:hover { color: var(--text); }

.footer { display: flex; justify-content: space-between; padding: 40px var(--pad); color: var(--muted); font-size: 14px; }

/* Dialogs */
dialog { border: 0; padding: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(22, 19, 15, .7); backdrop-filter: blur(6px); }
.lightbox::backdrop { background: rgba(10, 9, 8, .94); }
.close { position: fixed; top: 16px; right: 20px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 26px; line-height: 1; box-shadow: var(--shadow); }

.project-dialog { width: min(1100px, 100vw - 32px); max-height: calc(100vh - 48px); margin: auto; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); overflow: auto; }
.pd-hero { aspect-ratio: 21 / 8; overflow: hidden; }
.pd-hero img { width: 100%; height: 100%; object-fit: cover; }
.pd-body { padding: clamp(20px, 4vw, 44px); }
.pd-body h2 { font-size: clamp(44px, 6vw, 80px); }
.pd-sub { color: var(--muted); margin: 10px 0 0; }
.pd-bullets { margin: 24px 0 0; padding-left: 18px; }
.pd-bullets li { margin-bottom: 6px; }
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 36px; }
.video h4 { margin: 10px 0 0; font-weight: 500; font-size: 15px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface); }
.ig-frame { aspect-ratio: auto; height: 640px; background: #fff; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--text); font-weight: 500; font-size: 14px; }
.video-placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: grayscale(.4); }
.video-placeholder span { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.ig-link img { opacity: 1; filter: none; }
.ig-link::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.ig-link span { z-index: 1; color: #fff; }
.play { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; font-size: 20px; padding-left: 4px; }
.yt-lite { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: #000; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.yt-lite .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }

.lightbox { width: 100vw; height: 100vh; margin: 0; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 80px); border-radius: 6px; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 28px; line-height: 1; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }

/* Hero entrance */
.hero-copy > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .2s; }
.hero-copy > :nth-child(4) { animation-delay: .32s; }
h1 .line { display: block; overflow: hidden; padding-bottom: .04em; }
h1 .line span { display: inline-block; animation: lineUp 1s cubic-bezier(.2, .7, .2, 1) both; }
h1 .line:nth-child(2) span { animation-delay: .12s; }
h1 .line:nth-child(3) span { animation-delay: .24s; }
h1 .accent { color: var(--accent); font-style: normal; }
.hero-media { animation: fadeScale 1.2s cubic-bezier(.2, .7, .2, 1) both .15s; }

/* Marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); padding: 18px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--display); font-size: clamp(28px, 3.4vw, 44px); letter-spacing: .02em; padding: 0 28px; white-space: nowrap; display: inline-flex; align-items: center; gap: 56px; }
.marquee-track span::after { content: "✦"; color: var(--accent); font-size: .6em; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fadeScale { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes marquee { to { transform: translateX(-50%); } }

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

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 4 / 3; order: -1; }
  .projects, .videos, .about-grid, .events-grid { grid-template-columns: 1fr; }
  .events-media { aspect-ratio: 4 / 3; }
  .events.flip .events-grid { grid-template-columns: 1fr; }
  .events.flip .events-media { order: 0; }
  .project:last-child:nth-child(odd) { aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .tabs { margin-left: 0; }
  .lightbox img { max-width: calc(100vw - 24px); }
  .lb-nav { top: auto; bottom: 20px; transform: none; }
  .project-meta { left: 16px; right: 16px; bottom: 16px; flex-direction: column; align-items: flex-start; gap: 4px; }
}
