:root {
  --black: #080808;
  --black-soft: #101010;
  --white: #f7f7f5;
  --muted: #aaa9a5;
  --line: rgba(255, 255, 255, .18);
  --orange: #ff7900;
  --side: clamp(1rem, 3.1vw, 3.75rem);
  --header-height: 4.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display:none !important; }

html {
  min-width: 0;
  background: var(--black);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--black);
  color: var(--white);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  content: "";
  opacity: .055;
  pointer-events: none;
}

body.menu-open,
body.dialog-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { color: inherit; font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  transform: translateY(-150%);
  background: var(--orange);
  color: var(--black);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgba(8, 8, 8, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  width: 100%;
  min-height: var(--header-height);
  padding: .55rem var(--side);
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand { flex: 0 0 auto; width: clamp(8.2rem, 11vw, 10.8rem); }
.brand img { width: 100%; height: auto; }

.desktop-nav {
  display: flex;
  align-items: stretch;
  gap: clamp(1.4rem, 2.8vw, 3.1rem);
  font-size: .95rem;
}

.desktop-nav > a,
.portfolio-toggle {
  position: relative;
  display: inline-flex;
  min-height: 3rem;
  padding: 0;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.desktop-nav > a::after,
.portfolio-toggle::after {
  position: absolute;
  right: 0;
  bottom: .18rem;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--orange);
  content: "";
  transition: transform .22s ease;
}

.desktop-nav > a:hover::after,
.desktop-nav > a.is-active::after,
.portfolio-toggle:hover::after,
.portfolio-toggle.is-active::after,
.portfolio-toggle[aria-expanded="true"]::after { transform: scaleX(1); }

.portfolio-menu { position: relative; }
.portfolio-toggle { gap: .45rem; }
.portfolio-toggle span { transition: transform .2s ease; }
.portfolio-toggle[aria-expanded="true"] span { transform: rotate(180deg); }

.portfolio-dropdown {
  position: absolute;
  top: calc(100% + .55rem);
  right: 0;
  width: 15.5rem;
  padding: .7rem;
  background: #0b0b0b;
  border: 1px solid var(--line);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .48);
}

.portfolio-dropdown a {
  display: flex;
  min-height: 2.75rem;
  padding: .55rem .7rem;
  align-items: center;
  color: #d5d5d2;
  font-size: .9rem;
  transition: color .18s ease, background .18s ease;
}
.portfolio-dropdown a:hover,
.portfolio-dropdown a:focus-visible { background: rgba(255,255,255,.055); color: var(--orange); }
.portfolio-dropdown a.is-current { color: var(--orange); }
.desktop-nav .nav-cta { color: var(--orange); }

.mobile-menu-toggle {
  display: none;
  min-height: 2.75rem;
  padding: 0;
  align-items: center;
  gap: .8rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-icon { display: grid; width: 1.75rem; gap: .31rem; }
.menu-icon i { display: block; width: 100%; height: 1px; background: var(--white); transition: transform .22s ease, opacity .22s ease; }
.mobile-menu-toggle[aria-expanded="true"] .menu-icon i:first-child { transform: translateY(.375rem) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] .menu-icon i:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] .menu-icon i:last-child { transform: translateY(-.375rem) rotate(-45deg); }

.mobile-menu {
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,.08);
}
.mobile-menu-inner { padding: 1.65rem var(--side) 2.2rem; }
.mobile-home-link { display: flex; min-height: 2.75rem; margin-bottom: 1rem; align-items: center; font-size: 1.25rem; }
.desktop-nav > a[aria-current="page"]::after { transform: scaleX(1); }
.desktop-nav > a[aria-current="page"], .mobile-home-link[aria-current="page"] { color: var(--orange); }
.mobile-menu-inner > p { margin: 0 0 .7rem; font-size: 1.55rem; }
.mobile-categories { display: grid; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.mobile-categories a { display: flex; min-height: 2.8rem; align-items: center; gap: .85rem; color: #cececa; }
.mobile-menu a.is-current { color: var(--orange); }
.mobile-categories span { width: 1.6rem; color: var(--orange); font-size: .73rem; letter-spacing: .08em; }
.mobile-primary-links { display: grid; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.mobile-primary-links a { display: flex; min-height: 3.2rem; align-items: center; font-size: 1.25rem; }
.mobile-primary-links .mobile-cta { color: var(--orange); }
.mobile-email { display: inline-flex; padding-top: 1.5rem; color: #b8b8b4; }

/* Homepage */
.home-mosaic {
  display: grid;
  min-height: calc(100vh - var(--header-height) - 3.2rem);
  padding: 1.45rem var(--side) 2.2rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  align-content: center;
}

.category-tile,
.showreel-tile { min-width: 0; }
.category-tile[data-index="0"] { grid-column: span 3; }
.showreel-tile { grid-column: span 6; }
.category-tile[data-index="1"] { grid-column: span 3; }
.category-tile[data-index="2"],
.category-tile[data-index="3"],
.category-tile[data-index="4"],
.category-tile[data-index="5"] { grid-column: span 3; }

.tile-title {
  display: flex;
  min-height: 2.15rem;
  margin: 0 0 .28rem;
  padding: 0 .35rem .35rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.3);
  font-size: clamp(1rem, 1.32vw, 1.32rem);
  font-weight: 400;
  letter-spacing: -.02em;
}
.tile-title span { color: var(--orange); font-size: .9rem; opacity: 0; transform: translateX(-.3rem); transition: opacity .2s ease, transform .2s ease; }
.category-tile:focus-within .tile-title span,
.category-tile:hover .tile-title span { opacity: 1; transform: translateX(0); }

.tile-collage {
  display: grid;
  aspect-ratio: .95 / 1;
  overflow: hidden;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 2fr 1fr;
  gap: .42rem;
}
.tile-video:first-child { grid-column: 1 / -1; }
.tile-video {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #131313;
  cursor: pointer;
}

.tile-video img,
.showreel-poster,
.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.65,.25,1), filter .35s ease;
}

.tile-video::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0,0,0,.28));
  content: "";
  opacity: 0;
  transition: opacity .25s ease;
}
.tile-video:hover img,
.tile-video:focus-visible img,
.video-card:hover img,
.video-card:focus-visible img { transform: scale(1.025); filter: brightness(.82); }
.tile-video:hover::after,
.tile-video:focus-visible::after { opacity: 1; }

.mini-play,
.card-play,
.showreel-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--white);
  border-radius: 50%;
  background: rgba(8,8,8,.18);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}
.mini-play { width: 2.7rem; aspect-ratio: 1; }
.mini-play::after,
.card-play::after,
.showreel-play::after {
  width: 0;
  height: 0;
  margin-left: .18rem;
  border-top: .35rem solid transparent;
  border-bottom: .35rem solid transparent;
  border-left: .55rem solid var(--white);
  content: "";
}
.tile-video:hover .mini-play,
.tile-video:focus-visible .mini-play { opacity: 1; }

.showreel-tile {
  position: relative;
  min-height: 0;
  align-self: start;
  aspect-ratio: 1.77 / 1;
  overflow: hidden;
  background: #101010;
}
.showreel-tile::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.32)); content: ""; pointer-events: none; }
.showreel-label { position: absolute; z-index: 3; right: 0; bottom: 2.7rem; left: 0; margin: 0; font-size: .91rem; letter-spacing: .42em; text-align: center; text-transform: uppercase; }
.showreel-play { width: clamp(3.4rem, 4.8vw, 4.8rem); aspect-ratio: 1; border: 2px solid var(--orange); background: rgba(8,8,8,.36); opacity: 1; cursor: pointer; }
.showreel-play:hover { transform: translate(-50%,-50%) scale(1.08); background: var(--orange); }
.showreel-play::after { border-top-width: .5rem; border-bottom-width: .5rem; border-left-width: .78rem; }
.showreel-tile iframe,
.showreel-tile video { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* Portfolio */
.portfolio-page { min-height: calc(100vh - var(--header-height)); padding: 2.25rem var(--side) 1.75rem; }
.portfolio-heading { position: relative; margin-bottom: 1.7rem; text-align: center; }
.back-link { position: absolute; top: .55rem; left: 0; color: #cacac6; font-size: .94rem; }
.back-link:hover { color: var(--orange); }
.portfolio-heading h1 { margin: 0; font-size: clamp(2rem, 3.1vw, 3rem); font-weight: 400; letter-spacing: -.035em; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.7rem 1.05rem; }
.portfolio-item { min-width: 0; }
.video-card { position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 16 / 9; overflow: hidden; border: 0; background: #111; cursor: pointer; }
.video-card::after { position: absolute; inset: 0; background: rgba(0,0,0,.06); content: ""; transition: background .25s ease; }
.video-card:hover::after,
.video-card:focus-visible::after { background: rgba(0,0,0,.18); }
.card-play { width: 3.5rem; aspect-ratio: 1; opacity: 1; }
.portfolio-item:first-child .card-play { border-color: var(--orange); }
.video-card:hover .card-play { transform: translate(-50%,-50%) scale(1.07); border-color: var(--orange); }
.portfolio-item h2 { margin: .65rem 0 0; font-size: 1rem; font-weight: 400; letter-spacing: -.01em; }
.load-more { display: block; min-width: 10.5rem; min-height: 2.85rem; margin: 2.7rem auto .7rem; padding: .7rem 1.25rem; border: 1px solid var(--orange); background: transparent; cursor: pointer; }
.load-more:hover { background: var(--orange); color: var(--black); }
.category-switcher { display: flex; margin-top: 3rem; padding-top: 1rem; justify-content: space-between; border-top: 1px solid var(--line); color: #bcbcb8; font-size: .9rem; }
.category-switcher a:hover { color: var(--orange); }

/* About and contact */
.content-page { width: min(100%, 92rem); min-height: calc(100vh - var(--header-height) - 4rem); margin-inline: auto; padding: clamp(2.5rem, 5vw, 5rem) var(--side) 4rem; }
.page-kicker { margin: 0 0 .6rem; color: var(--orange); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.content-page h1 { margin: 0 0 clamp(2rem, 4vw, 3.5rem); font-size: clamp(2.5rem, 4.8vw, 4.6rem); font-weight: 400; letter-spacing: -.05em; line-height: 1; }
.about-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about-photo { margin: 0; aspect-ratio: 16/9; overflow: hidden; background: #111; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-copy > p { max-width: 35rem; margin: 0 0 1.8rem; color: #d1d1cd; font-size: clamp(1.15rem, 1.8vw, 1.55rem); line-height: 1.48; }
.team-list { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.team-member { display: flex; padding: 1.05rem 0; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.team-member span:last-child { color: var(--muted); }
.team-member strong { font-weight: 400; }
.team-member small { display: block; margin-top: .3rem; color: var(--muted); }
.about-photo { background: #000; aspect-ratio: 1468 / 629; }
.about-copy > p { font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
.contact-details h2 { font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin: 0 0 .5rem; }
.contact-intro { max-width: 30ch; color: #ccc; margin: 0 0 2rem; }
.contact-addresses { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2rem; margin-top: 2.5rem; font-size: .9375rem; }
.contact-addresses h3 { font-size: .9375rem; font-weight: 400; color: #fff; }
.contact-addresses address { font-style: normal; color: #bbb; }
.contact-addresses p { color: #bbb; }
.form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-privacy { color: #aaa; font-size: .8125rem; margin: 0; }
.submit-button:disabled { cursor: not-allowed; opacity: .6; }
.form-status[data-state="error"] { color: #ffc18a; }
.admin-page > p { max-width: 48rem; font-size: 1.2rem; color: #ccc; }
.admin-page .submit-button { display: inline-flex; margin-top: 1rem; }
.dialog-video > video { display: block; width: 100%; height: 100%; background: #000; }
.portfolio-item[hidden] { display: none !important; }
@media (max-width: 1100px) { .contact-addresses { grid-template-columns: 1fr; gap: 1rem; } }
.contact-layout { display: grid; grid-template-columns: minmax(15rem, .8fr) minmax(22rem, 1.2fr); gap: clamp(3rem, 9vw, 9rem); }
.contact-details { display: grid; align-content: start; gap: .6rem; }
.contact-details a { width: fit-content; font-size: clamp(1.25rem, 2vw, 1.8rem); }
.contact-details a:hover { color: var(--orange); }
.contact-place { margin-top: 1.3rem; color: var(--muted); }
.contact-form { display: grid; gap: 1.35rem; }
.field { display: grid; gap: .45rem; }
.field label { color: #bbb; font-size: .86rem; }
.field input,
.field textarea { width: 100%; padding: .85rem 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.36); border-radius: 0; outline: 0; background: transparent; resize: vertical; }
.field input:focus,
.field textarea:focus { border-bottom-color: var(--orange); }
.submit-button { width: fit-content; min-height: 3rem; padding: .75rem 1.25rem; border: 1px solid var(--orange); background: var(--orange); color: var(--black); cursor: pointer; }
.submit-button:hover { background: transparent; color: var(--orange); }
.form-status { min-height: 1.5rem; margin: 0; color: #c6c6c2; font-size: .9rem; }
.form-retry { justify-self:start; padding:.5rem 0; min-height:2.75rem; border:0; border-bottom:1px solid var(--orange); color:var(--orange); background:transparent; cursor:pointer; }
.form-privacy a { text-decoration:underline; text-underline-offset:.2em; }
.privacy-copy { max-width:52rem; }
.privacy-copy h2 { margin-top:2.5rem; font-weight:400; }
.privacy-copy p { color:#ccc; line-height:1.7; }

/* Video dialog */
.video-dialog { width: min(92vw, 77rem); max-width: none; margin: auto; padding: 3.25rem 0 0; overflow: visible; border: 0; background: transparent; color: var(--white); }
.video-dialog::backdrop { background: rgba(0,0,0,.91); backdrop-filter: blur(8px); }
.dialog-close { position: absolute; top: .2rem; right: 0; display: inline-flex; padding: .35rem 0; gap: .55rem; border: 0; background: transparent; cursor: pointer; }
.dialog-close span { color: var(--orange); font-size: 1.45rem; line-height: .8; }
.dialog-video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.dialog-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.dialog-title { margin: .7rem 0 0; color: #d0d0cc; font-size: .95rem; }

.site-footer { display: flex; min-height: 4rem; margin: 0 var(--side); padding: 1rem 0; align-items: center; justify-content: space-between; gap: 1.5rem; border-top: 1px solid var(--line); color: #bdbdb9; font-size: .8rem; }
.footer-contact { display: flex; align-items: center; gap: 1rem; }
.footer-contact i { width: 1px; height: .85rem; background: var(--line); }
.site-footer a:hover { color: var(--orange); }

@media (max-width: 1050px) {
  .home-mosaic { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .category-tile[data-index="0"], .category-tile[data-index="1"] { grid-column: span 3; }
  .showreel-tile { grid-column: 1 / -1; grid-row: 1; }
  .category-tile[data-index="0"] { grid-row: 2; }
  .category-tile[data-index="1"] { grid-row: 2; }
  .category-tile[data-index="2"], .category-tile[data-index="3"], .category-tile[data-index="4"], .category-tile[data-index="5"] { grid-column: span 3; }
}

@media (max-width: 800px) {
  :root { --side: clamp(1rem, 5vw, 1.5rem); --header-height: 4.6rem; }
  .desktop-nav { display: none; }
  .mobile-menu-toggle { display: inline-flex; }
  .brand { width: 9.2rem; }
  .home-mosaic { display: flex; min-height: 0; padding-top: 0; flex-direction: column; gap: 2rem; }
  .showreel-tile { order: -1; margin-inline: calc(var(--side) * -1); aspect-ratio: 16/9; }
  .showreel-label { bottom: 1.45rem; font-size: .76rem; }
  .showreel-play { width: 3.6rem; }
  .tile-title { position: relative; justify-content: center; margin-bottom: .65rem; border-bottom: 0; font-size: 1.45rem; }
  .tile-title span { position: absolute; right: 0; opacity: 1; }
  .tile-collage { display: grid; aspect-ratio: auto; grid-template-columns: 1fr; grid-template-rows: none; gap: .72rem; }
  .tile-video, .tile-video:first-child { grid-column: auto; aspect-ratio: 16 / 9; }
  .tile-video .mini-play { width: 3.5rem; opacity: 1; }
  .category-tile .tile-video:nth-child(n+2) { display: none; }
  .portfolio-page { padding-top: 1.75rem; }
  .portfolio-heading { padding-top: 2.7rem; margin-bottom: 1.4rem; }
  .back-link { top: 0; }
  .portfolio-grid { grid-template-columns: 1fr; gap: 1.45rem; }
  .portfolio-item h2 { margin-top: .55rem; }
  .about-layout, .contact-layout { grid-template-columns: 1fr; }
  .about-copy { order: -1; }
  .contact-layout { gap: 3rem; }
}

@media (max-width: 560px) {
  .header-inner { padding-block: .45rem; }
  .menu-label { font-size: .95rem; }
  .home-mosaic { padding-bottom: 1rem; }
  .portfolio-page { padding-inline: 1rem; }
  .portfolio-heading h1 { font-size: 2rem; }
  .card-play { width: 3.25rem; }
  .category-switcher { gap: 1rem; font-size: .8rem; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .footer-contact { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .footer-contact i { display: none; }
  .video-dialog { width: 100vw; padding: 3rem 1rem 0; }
  .dialog-close { right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
