:root {
  --bg: #0c0d0d;
  --panel: #151616;
  --text: #f4f1ea;
  --muted: #a3a09a;
  --line: rgba(255,255,255,.12);
  --accent: #f4f1ea;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(ellipse at 18% 20%, rgba(120, 126, 138, .16) 0, transparent 34%),
    radial-gradient(ellipse at 82% 35%, rgba(63, 76, 99, .15) 0, transparent 31%),
    radial-gradient(ellipse at 52% 88%, rgba(112, 96, 78, .09) 0, transparent 35%);
  filter: blur(28px);
  animation: ambient-drift 20s ease-in-out infinite alternate;
}

body::after {
  z-index: -1;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
  animation: ambient-grid 28s linear infinite;
}

@keyframes ambient-drift {
  0% { transform: translate3d(-3%, -2%, 0) rotate(-2deg) scale(1); }
  50% { transform: translate3d(4%, 3%, 0) rotate(2deg) scale(1.08); }
  100% { transform: translate3d(-1%, 6%, 0) rotate(-1deg) scale(1.04); }
}

@keyframes ambient-grid {
  to { transform: translate3d(72px, 72px, 0); }
}

/* Scroll reveal: enabled by JS so content never stays hidden without it. */
.reveal-ready .reveal {
  opacity: 0;
  transform: translate3d(0, 42px, 0);
  transition:
    opacity .85s cubic-bezier(.22, 1, .36, 1),
    transform .85s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-ready .reveal.reveal-scale {
  transform: translate3d(0, 32px, 0) scale(.965);
}

.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 34px;
  background: linear-gradient(to bottom, rgba(12,13,13,.78), transparent);
  border-bottom: 1px solid transparent;
  transition: padding .35s ease, background .35s ease, border-color .35s ease;
}

.topbar.is-scrolled {
  padding-top: 17px;
  padding-bottom: 17px;
  background: rgba(12,13,13,.86);
  border-color: rgba(255,255,255,.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  font-size: 12px;
}

.brand-logo {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 11px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 12px;
  transition: color .25s ease;
}

.nav-work,
.nav-about { color: var(--muted); }
.nav-work:hover,
.nav-about:hover { color: var(--text); }

.nav-contact {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.55);
}

.nav-contact span { font-size: 13px; transition: transform .25s ease; }
.nav-contact:hover { color: var(--muted); }
.nav-contact:hover span { transform: translate(2px, -2px); }

main { width: 100%; }

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 28px;
  align-items: end;
  padding: 130px 34px 34px;
}

.hero-copy { padding: 0 0 42px; }
.eyebrow {
  margin: 0 0 20px;
  color: var(--muted);
  letter-spacing: .18em;
  font-size: 10px;
  font-weight: 700;
}

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 24px;
  font-size: clamp(52px, 7.2vw, 110px);
  line-height: .9;
  letter-spacing: -.055em;
  font-weight: 600;
}

.hero-text {
  max-width: 460px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.media-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 25%, rgba(255,255,255,.10), transparent 28%),
    linear-gradient(135deg, #232625 0%, #141515 48%, #0d0e0e 100%);
  isolation: isolate;
}

.media-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(0,0,0,.54), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 140px, rgba(255,255,255,.025) 140px 141px);
  pointer-events: none;
}

.media-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.1s cubic-bezier(.22, 1, .36, 1);
}

.media-card:hover video { transform: scale(1.025); }

.featured {
  min-height: calc(100vh - 164px);
  border-radius: 4px;
}

.media-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  padding: 22px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: default;
  pointer-events: none;
  text-align: left;
}

.play {
  display: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 50%;
  font-size: 12px;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}

.media-label {
  font-size: 10px;
  letter-spacing: .15em;
  font-weight: 700;
}

.media-card:hover .play {
  transform: scale(1.08);
  background: var(--text);
  color: #111;
}

.portfolio,
.about,
.contact {
  padding: 130px 34px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 42px;
}

.section-head h2,
.about h2,
.contact h2 {
  margin-bottom: 0;
  font-size: clamp(42px, 6vw, 84px);
  line-height: .95;
  letter-spacing: -.045em;
  font-weight: 500;
}

.work-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
}

.work-card { min-height: 430px; }
.work-card:nth-child(2),
.work-card:nth-child(3) { min-height: 340px; }

.about {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(50px, 8vw, 120px);
  align-items: center;
}

.about > .eyebrow { margin-bottom: 42px; }

.about-photo {
  margin: 0;
  width: clamp(280px, 25vw, 340px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: #181a19;
}

.about-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 47%;
  filter: saturate(1.14) contrast(1.04) brightness(1.03);
  transition: transform 1.1s cubic-bezier(.22, 1, .36, 1);
}

.about-photo:hover img { transform: scale(1.025); }
.about-content h2 { margin-bottom: 40px; }

.about-grid p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.about-copy { display: grid; gap: 18px; }

.contact {
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(420px, 1fr);
  gap: clamp(50px, 8vw, 130px);
  align-items: start;
  border-top: 1px solid var(--line);
}

.contact h2 { margin: 14px 0 24px; }
.contact-heading > p:last-child { max-width: 440px; color: var(--muted); font-size: 17px; line-height: 1.6; }

.quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 25px 18px; }
.form-field { display: flex; flex-direction: column; gap: 9px; }
.form-field-wide { grid-column: 1 / -1; }
.form-field label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.form-field input,
.form-field select {
  width: 100%; padding: 15px 0; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; outline: none; background: transparent; color: var(--text); font: inherit;
}
.form-field select { color-scheme: dark; }
.form-field select option {
  background: #151616;
  color: #f4f1ea;
}
.form-field select option:disabled { color: #a3a09a; }
.form-field input::placeholder { color: #707371; }
.form-field input:focus, .form-field select:focus { border-color: var(--text); }
.quote-submit {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding: 18px 20px; border: 1px solid var(--text);
  background: var(--text); color: #111; font: inherit; font-weight: 700; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.quote-submit:hover { background: transparent; color: var(--text); }
.form-note { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }

.whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(25px, 3.4vw, 46px);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--text);
  transition: opacity .2s ease;
}
.whatsapp:hover { opacity: .65; }
.contact-note { grid-column: 2; margin-top: -85px; color: var(--muted); font-size: 12px; }
.contact-note a { color: var(--text); border-bottom: 1px solid var(--line); }

footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 34px 32px;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--line);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 40px;
  background: rgba(0,0,0,.93);
}
.modal.open { display: grid; }
.modal-inner { width: min(1100px, 94vw); }
.modal video { width: 100%; max-height: 80vh; background: #000; }
.modal-close {
  position: absolute;
  top: 22px;
  right: 26px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
}
#missingVideo {
  display: none;
  color: var(--muted);
  padding: 26px 0;
  text-align: center;
}

@media (max-width: 900px) {
  .topbar { padding: 20px 18px; }
  .topbar.is-scrolled { padding: 15px 18px; }
  .brand-copy small { display: none; }
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 120px 18px 18px;
  }
  .hero-copy { padding-bottom: 10px; }
  .featured { min-height: 62vh; }
  .portfolio, .about, .contact { padding: 90px 18px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card, .work-card:nth-child(2), .work-card:nth-child(3) { min-height: 320px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photo { width: min(240px, 72vw); aspect-ratio: 1; }
  .contact { grid-template-columns: 1fr; gap: 48px; }
  .contact-note { grid-column: 1; margin-top: -24px; }
  footer { padding: 22px 18px 28px; }
}

@media (max-width: 520px) {
  .brand { font-size: 11px; }
  .nav-work { display: none; }
  .main-nav { gap: 16px; }
  .nav-contact { font-size: 11px; }
  h1 { font-size: 52px; }
  .featured { min-height: 52vh; }
  .section-head { margin-bottom: 26px; }
  .media-overlay { padding: 16px; }
  .work-card, .work-card:nth-child(2), .work-card:nth-child(3) { min-height: 260px; }
  .quote-form { grid-template-columns: 1fr; }
  .form-field, .form-field-wide { grid-column: 1; }
  .modal { padding: 16px; }
  footer { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before,
  body::after { animation: none; }
  .reveal-ready .reveal,
  .reveal-ready .reveal.reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .media-card video,
  .about-photo img,
  .topbar { transition: none; }
  .media-card:hover video { transform: none; }
  .about-photo:hover img { transform: none; }
}
