@font-face {
  font-family: "Canela Trial";
  src: url("../fonts/Canela-Light-Trial.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Canela Text Trial";
  src: url("../fonts/CanelaText-Light-Trial.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "Canela Text Trial", "Canela Trial", Georgia, serif;
  --font-heading: "Canela Trial", "Canela Text Trial", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-subheading: var(--font-body);
  --font-ui: var(--font-body);
  /* Editable from admin -> Fonts. Defaults = the original design sizes. */
  --size-h1: 70px;
  --size-h2: 55px;
  --size-h3: 20px;
  --size-body: 16px;
  --size-menu: 16px;
  --size-button: 10px;
  --size-footer: 12px;
  --logo-height: 53px;
  --logo-header-height: 24px;
  /* Theme — editable from admin -> Theme. Defaults = the original dark design. */
  --bg: #000000;
  --fg: #ffffff;
  --bg-rgb: 0, 0, 0;
  --fg-rgb: 255, 255, 255;
  --fg-muted: rgba(var(--fg-rgb), 0.7);
  --border: rgba(var(--fg-rgb), 0.35);
  --surface: rgba(var(--fg-rgb), 0.1);
  --radius: 15px;
  --logo-filter: brightness(0) invert(1);
}

* { box-sizing: border-box; }

html, body { padding: 0; margin: 0; background: var(--bg); color: var(--fg); }

body { font-family: var(--font-body); font-weight: 300; -webkit-font-smoothing: antialiased; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1440px; margin: 0 auto; position: relative; }
.container { padding-left: 188px; padding-right: 188px; }

@media (max-width: 900px) {
  .container { padding-left: 24px; padding-right: 24px; }
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 24px;
  border: 1px solid var(--fg);
  border-radius: 25px;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--size-button);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
.pill-btn:hover { background: var(--fg); color: var(--bg); }

.section-heading { font-family: var(--font-subheading); font-weight: 600; font-size: var(--size-h3); margin: 0 0 20px; }

/* Nav */
.site-nav { position: absolute; top: 32px; right: 40px; z-index: 20; }
.nav-toggle { background: none; border: none; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.nav-toggle span { width: 42px; height: 1.5px; background: var(--fg); display: block; }
.nav-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  background: var(--bg); border: 1px solid rgba(var(--fg-rgb), 0.15);
  border-radius: 12px; padding: 24px 28px; min-width: 220px;
  display: none; flex-direction: column; gap: 32px;
}
.nav-menu.open { display: flex; }
.nav-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.nav-menu a { font-family: var(--font-ui); font-size: var(--size-menu); font-weight: 300; }

/* Hero */
.hero-title { padding: 56px 0 40px; text-align: center; }
.hero-title h1 { font-family: var(--font-display); font-weight: 300; font-size: var(--size-h1); letter-spacing: 0.1em; margin: 0; text-transform: uppercase; }
.hero-image { position: relative; width: 100%; aspect-ratio: 1440 / 700; overflow: hidden; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.project-hero-image { position: relative; width: 100%; aspect-ratio: 1440 / 800; overflow: hidden; }
.project-hero-image img { width: 100%; height: 100%; object-fit: cover; }

/* Project card rows (homepage) */
.project-card-row { display: flex; align-items: center; gap: 60px; margin-bottom: 140px; }
.project-card-row.reverse { flex-direction: row-reverse; }
.project-card-row .card-image { flex: 0 0 630px; position: relative; aspect-ratio: 630 / 450; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.project-card-row .card-image img { width: 100%; height: 100%; object-fit: cover; }
.project-card-row .card-text { flex: 1 1 auto; max-width: 466px; }
.project-card-row h2 { font-family: var(--font-heading); font-weight: 300; font-size: var(--size-h2); letter-spacing: 0.1em; margin: 0 0 20px; line-height: 1.1; }
.project-card-row p { font-family: var(--font-body); font-weight: 300; font-size: var(--size-body); line-height: 1.5625; color: var(--fg-muted); margin: 0 0 28px; }

@media (max-width: 900px) {
  .project-card-row { flex-direction: column !important; gap: 28px; margin-bottom: 80px; }
  .project-card-row .card-image { flex-basis: auto !important; width: 100%; }
}

/* Project detail page */
.detail-body { padding-top: 90px; display: flex; flex-direction: column; gap: 80px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.credits-cols { display: flex; gap: 40px; }
.credits-cols div { display: flex; flex-direction: column; gap: 6px; }
.credits-cols p { margin: 0; font-size: var(--size-body); font-weight: 300; line-height: 1.875; }
.concept-text, .more-info-text { font-size: var(--size-body); font-weight: 300; line-height: 1.5625; margin: 0 0 32px; }
.more-info-text { white-space: pre-line; }

.gallery-section { display: flex; flex-direction: column; gap: 80px; }

.grid-kidsfilm { position: relative; width: 100%; aspect-ratio: 1194 / 722; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.grid-kidsfilm .media-el { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }

.grid-social { display: grid; gap: 24px; }
.grid-social .cell { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.grid-social .cell .media-el { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }

.grid-masonry { column-gap: 24px; }
.grid-masonry .cell { width: 100%; margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; background: var(--surface); break-inside: avoid; }
.grid-masonry .cell img.media-el { width: 100%; height: auto; display: block; }
.grid-masonry .cell video.media-el,
.grid-masonry .cell iframe.media-el { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; }
@media (max-width: 900px) { .grid-masonry { column-count: 1 !important; } }

.more-work { padding-top: 100px; padding-bottom: 60px; text-align: center; }
.more-work-grid { display: grid; gap: 24px; margin-top: 20px; }
.more-work-grid .item .thumb { position: relative; aspect-ratio: 254 / 183; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.more-work-grid .item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.more-work-grid .item p { margin-top: 12px; font-size: var(--size-body); font-weight: 300; }
@media (max-width: 900px) { .more-work-grid { grid-template-columns: repeat(2, 1fr) !important; } }

.site-footer { text-align: center; padding: 40px 0 60px; }
.site-footer p { font-family: var(--font-ui); font-size: var(--size-footer); color: var(--fg-muted); }

/* Category / Selected work listing pages: same 40px title-to-content gap as project pages */
.listing-section { padding-top: 0; }

/* Hover-to-play video (banner, cards, heroes, thumbnails) */
.hero-image video,
.project-hero-image video,
.project-card-row .card-image video,
.more-work-grid .item .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-image video { opacity: 0.85; }

/* YouTube/Vimeo players are 16:9: scale them to cover boxes of any shape and
   let the hover/click pass through to the box (and any link around it). */
.hero-image, .project-hero-image, .project-card-row .card-image,
.grid-kidsfilm, .grid-social .cell, .more-work-grid .item .thumb { container-type: size; }
.hero-image > iframe[data-hover-embed],
.project-hero-image > iframe[data-hover-embed],
.project-card-row .card-image > iframe[data-hover-embed],
.grid-kidsfilm > iframe[data-hover-embed],
.grid-social .cell > iframe[data-hover-embed],
.more-work-grid .item .thumb > iframe[data-hover-embed] {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: max(100%, calc(100cqh * 16 / 9)); height: max(100%, calc(100cqw * 9 / 16));
}
iframe[data-hover-embed] { border: 0; pointer-events: none; }
.embed-poster { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: opacity 0.3s ease; }
.embed-poster.hide { opacity: 0; }
.grid-masonry .cell { position: relative; }

/* Homepage: "More projects" small windows under the top-ranked rows */
.more-projects { padding-top: 0; }
.more-projects .section-heading { text-align: center; margin-bottom: 28px; }
.more-projects .more-work-grid { grid-template-columns: repeat(4, 1fr); }
.more-projects .more-work-grid .item p { text-align: center; }
@media (max-width: 900px) { .more-projects .more-work-grid { grid-template-columns: repeat(2, 1fr); } }

/* Project hero: click-to-play video with a play button */
.project-hero-image video[data-click-video] { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-hero-image .click-poster { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.project-hero-image .hero-player { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 88px; height: 88px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding: 0 0 0 4px;
  background: rgba(0, 0, 0, 0.45); color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px); transition: background 0.2s ease, transform 0.2s ease;
}
.play-btn:hover { background: rgba(255, 255, 255, 0.9); color: #000; transform: translate(-50%, -50%) scale(1.06); }

/* Gallery videos: click to zoom into a player covering about half the page */
.lightbox-zone { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(var(--bg-rgb), 0.92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-player { width: min(62vw, 1100px); max-height: 70vh; aspect-ratio: 16 / 9; background: #000; border: 0; border-radius: var(--radius); }
.lightbox video.lightbox-player { aspect-ratio: auto; height: auto; max-width: 62vw; width: auto; min-width: min(62vw, 1100px); object-fit: contain; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px; background: none; border: none; color: var(--fg);
  font-size: 44px; line-height: 1; padding: 0;
}
@media (max-width: 900px) {
  .lightbox-player, .lightbox video.lightbox-player { width: 94vw; min-width: 0; max-width: 94vw; }
  .play-btn { width: 68px; height: 68px; }
}

/* Project page: site logo on top, project title below the hero */
.hero-title .site-logo {
  display: inline-block; font-family: var(--font-display); font-weight: 300; font-size: var(--size-h1);
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.2;
}
.project-title { text-align: center; padding: 56px 24px 0; }
.project-title h1 { font-family: var(--font-display); font-weight: 300; font-size: var(--size-h1); letter-spacing: 0.1em; margin: 0; text-transform: uppercase; }
.project-title + .detail-body { padding-top: 56px; }
@media (max-width: 900px) {
  .hero-title .site-logo, .project-title h1 { font-size: calc(var(--size-h1) * 0.57); letter-spacing: 0.1em; }
}

/* Zoomed photo in the gallery lightbox */
.lightbox-image { max-width: min(80vw, 1300px); max-height: 85vh; object-fit: contain; border-radius: var(--radius); }
@media (max-width: 900px) { .lightbox-image { max-width: 94vw; } }

/* Homepage banner video: autoplay loop, no controls — 16:9 player scaled to cover the banner */
.hero-image > iframe.banner-embed {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: max(100%, calc(100cqh * 16 / 9)); height: max(100%, calc(100cqw * 9 / 16));
  border: 0; pointer-events: none;
}

/* Banner sound toggle, bottom right: small, borderless, soft glass */
.sound-btn {
  position: absolute; right: 20px; bottom: 20px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%; padding: 0; border: none; outline: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.35); color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0.8; transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.sound-btn svg { width: 16px; height: 16px; }
.sound-btn:hover, .sound-btn:focus-visible { opacity: 1; background: rgba(0, 0, 0, 0.6); transform: scale(1.08); }
.sound-btn .ico-sound { display: none; }
.sound-btn[data-muted="false"] .ico-sound { display: block; }
.sound-btn[data-muted="false"] .ico-muted { display: none; }

/* Logo image (homepage title + project-page logo link) */
.logo-img { display: block; margin: 0 auto; height: var(--logo-height); width: auto; max-width: 100%; object-fit: contain; }
.logo-white { filter: var(--logo-filter); }
.hero-title .site-logo:has(.logo-img) { display: block; }
@media (max-width: 900px) { .logo-img { height: calc(var(--logo-height) * 0.57); } }

/* Small logo, top-left, level with the hamburger icon (every page except the homepage) */
.site-header-logo {
  position: absolute; top: 32px; left: 48px; z-index: 20;
  height: 32.5px; display: flex; align-items: center; max-width: calc(100% - 160px);
}
.header-logo-img { display: block; height: var(--logo-header-height); width: auto; max-width: 100%; object-fit: contain; }
.header-logo-text {
  font-family: var(--font-display); font-weight: 300; text-transform: uppercase; white-space: nowrap;
  font-size: calc(var(--logo-header-height) * 0.8); letter-spacing: 0.1em;
}
.header-space { height: calc(max(32.5px, var(--logo-header-height)) + 72px); }
/* leave room under the header row for the page title on category / About / Contact pages */
.wrap:has(> .site-header-logo) .hero-title { padding-top: 96px; }
@media (max-width: 900px) {
  .site-header-logo { left: 28px; max-width: calc(100% - 130px); }
  .site-nav { right: 20px; }
  .header-logo-img { height: calc(var(--logo-header-height) * 0.7); }
}
