@font-face {
  font-family: "Open Sans";
  src: url("assets/open-sans.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("assets/open-sans-semibold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("assets/open-sans-bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #11151d;
  --panel: #1b2330;
  --night: #10141c;
  --text: #f4f5fa;
  --accent: #aecbff;
  --muted: #c4ccda;
  --border: #303849;
  --body: "Open Sans", system-ui, sans-serif;
  --max-width: 80rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--canvas); color: var(--text); font: 1rem/1.65 var(--body); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
p, h1, h2, h3, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.wrap { width: min(calc(100% - 6.25rem), var(--max-width)); margin-inline: auto; }
.section-pad { padding-block: clamp(4rem, 7vw, 6.4rem); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.1rem;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 1.45rem; height: 1px; background: currentColor; }
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 25;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  background: var(--panel);
}

.site-header { position: sticky; top: 0; z-index: 20; background: var(--night); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.125rem; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; white-space: nowrap; }
.brand-mark { width: 2.25rem; height: 2.25rem; flex: none; filter: grayscale(1) invert(1); }
.brand-name { font-size: .875rem; font-weight: 700; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .35rem clamp(1.2rem, 3vw, 3rem); align-items: center; }
.site-header nav a, .catalog-toggle, .menu-toggle { font-size: .9rem; font-weight: 600; }
.site-header nav a, .catalog-toggle { padding-block: .65rem; }
.site-header nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .32em; }
.catalog-menu { position: relative; }
.catalog-toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 0;
  background: transparent;
  padding-inline: 0;
}
.catalog-toggle::after {
  content: "";
  width: .34rem;
  height: .34rem;
  margin-top: -.18rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform .16s ease;
}
.catalog-toggle:hover, .catalog-toggle[aria-expanded="true"] { color: var(--accent); }
.catalog-toggle[aria-expanded="true"]::after { transform: translateY(.18rem) rotate(225deg); }
.catalog-panel { position: absolute; right: 0; top: 100%; min-width: 15rem; background: var(--panel); border: 1px solid var(--border); }
.catalog-panel a { display: block; padding-inline: .9rem; }
.catalog-panel a:hover { background: #252936; }
.site-header:not(.menu-ready) .catalog-toggle { display: none; }
.site-header:not(.menu-ready) .catalog-panel { position: static; min-width: 0; border: 0; }
.menu-toggle { display: none; background: transparent; border: 1px solid var(--border); padding: .48rem .8rem; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(28rem, 36.1vw, 38rem);
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 3.25rem 5rem;
  pointer-events: none;
}
.hero-intro { max-width: 38rem; pointer-events: auto; }
.hero h1 {
  font-size: clamp(2.8rem, 4.55vw, 4.65rem);
  line-height: 1.06;
  letter-spacing: -.035em;
}
.hero h1 em { display: block; color: var(--accent); font-style: normal; font-size: 1.11em; }
.hero-description { max-width: 21rem; margin-top: 1.65rem; color: #e1e7f2; font-size: 1.0625rem; }
.hero-action { margin-top: 1.75rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: .2rem;
  padding: .64rem 1rem;
  border: 1px solid transparent;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.button-primary { background: #e0eaff; color: #141e32; }
.button-primary:hover { background: var(--accent); }
.button-outline { border-color: #646c88; background: transparent; color: var(--text); }
.button-outline:hover { border-color: var(--accent); background: #29314a; }
.hero-figure { position: absolute; inset: 0; pointer-events: none; }
.hero-image { position: absolute; inset: 0; display: block; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 43%; }
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #10141c99, transparent 33%),
    linear-gradient(to right, #10141cfb, #10141cf3 16%, #10141cda 35%, #10141c77 53%, #10141c12 74%, #10141c03);
}
.hero-caption { position: absolute; inset-inline: 0; bottom: 1.2rem; display: flex; justify-content: flex-end; }
.hero-credit {
  display: grid;
  gap: .15rem;
  min-width: 13.5rem;
  padding-top: .4rem;
  border-top: 1px solid #b4c9e8;
  color: #d9e3f5;
  text-align: right;
  font-size: .875rem;
  pointer-events: auto;
}
.hero-credit strong { font-weight: 600; color: var(--text); }
.hero-credit:hover strong { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }

.section-pad h2 {
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  letter-spacing: -.034em;
  line-height: 1.06;
}
.projects { padding-top: clamp(2rem, 3vw, 3.15rem); }
.projects-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; }
.projects-heading h2 { font-size: clamp(1.65rem, 2.15vw, 2rem); letter-spacing: -.022em; }
.portfolio-link { color: var(--accent); font-size: .9rem; font-weight: 600; }
.portfolio-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: .25em; }
.project-filters { display: flex; flex-wrap: wrap; gap: 0 clamp(.5rem, 2vw, 1.5rem); margin-top: 1.2rem; border-bottom: 1px solid var(--border); }
.project-filters button {
  min-height: 2.75rem;
  padding: .45rem .25rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}
.project-filters button:hover { color: var(--text); }
.project-filters button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.project-filters button:focus-visible { outline-offset: -2px; }
.project-filter-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.project-grid, .video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.35rem, 3.1vw, 2.5rem); margin-top: 2rem; }
.project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem clamp(.9rem, 1.2vw, 1.4rem); margin-top: 1.45rem; }
.project { min-width: 0; }
.project-link {
  display: block;
  height: 100%;
  border-bottom: 1px solid var(--border);
  transition: border-color .2s ease;
}
.project-link:hover { border-color: #828db5; }
.project-image { aspect-ratio: 16 / 9; overflow: hidden; background: var(--night); }
.project-image img { height: 100%; object-fit: cover; transition: transform .3s ease; }
.project-link:hover img { transform: scale(1.025); }
.project-info { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 1rem 0 1.1rem; }
.project-type { margin-bottom: .25rem; color: var(--muted); font-size: .875rem; }
.project h3 { font-size: clamp(1.05rem, 1.55vw, 1.34rem); line-height: 1.25; letter-spacing: -.018em; }
.project-open { padding-inline: .2rem; color: var(--accent); font-size: 1.45rem; line-height: 1; }
.project-link:hover h3 { color: var(--accent); }

.videos { border-top: 1px solid var(--border); }
.videos-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem 2rem; }
.videos-heading p { margin-top: .8rem; color: var(--muted); }
.video { min-width: 0; padding-bottom: 1.05rem; border-bottom: 1px solid var(--border); }
.video-player { display: block; width: 100%; height: auto; min-height: 200px; aspect-ratio: 16 / 9; border: 0; background: var(--night); }
.video h3 { margin-top: 1rem; font-size: clamp(1.25rem, 2.15vw, 1.9rem); line-height: 1.15; letter-spacing: -.045em; }
.video p { margin-top: .28rem; color: var(--muted); font-size: .875rem; }
.video-link { display: inline-block; margin-top: .4rem; padding-block: .35rem; color: var(--accent); font-size: .875rem; font-weight: 600; text-decoration: underline; text-underline-offset: .25em; }
.video-link:hover { color: var(--text); }

.about { border-top: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.about-copy p { max-width: 36rem; margin-top: 1.1rem; color: var(--muted); }
.about-copy .about-intro { margin-top: 1.3rem; color: var(--text); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); }
.about-copy .button { margin-top: 1.55rem; }
.about-figure img { aspect-ratio: 16 / 9; object-fit: cover; background: var(--night); }
.about-figure figcaption { padding-block: .7rem; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .875rem; }

.contact { border-block: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: clamp(2rem, 5vw, 5.5rem); }
.contact h2 + p { color: var(--muted); max-width: 32rem; margin-top: 1.15rem; }
.contact-channels { margin-top: 1.6rem; border-top: 1px solid #565e75; }
.contact-channels a {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #565e75;
}
.contact-channels span { font-size: 1.1rem; font-weight: 600; }
.contact-channels a:hover span, .top-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.contact-channels small, .footer-inner p, .top-link { font-size: .875rem; color: var(--muted); }
.contact-form {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--border);
  background: var(--night);
}
.contact-form h3 { font-size: 1.35rem; line-height: 1.25; }
.contact-form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.contact-form label { display: block; font-size: .9rem; font-weight: 600; }
.contact-form label span { color: var(--muted); font-weight: 400; }
.contact-form input:not([type="hidden"]), .contact-form textarea {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .62rem .75rem;
  border: 1px solid #565e75;
  border-radius: .2rem;
  background: var(--canvas);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
}
.contact-form :is(input, textarea)::placeholder { color: var(--muted); }
.contact-form textarea { resize: vertical; }
.contact-form-actions { display: grid; justify-items: start; gap: .55rem; }
.contact-form-actions p { color: var(--muted); font-size: .875rem; }
.site-footer { background: var(--night); }
.footer-inner { min-height: 6.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 1.5rem; padding-block: 1.4rem; }

.project-dialog {
  width: min(calc(100% - 2rem), 55rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 1px solid #666e88;
  background: var(--panel);
  color: var(--text);
}
.project-dialog::backdrop { background: #0b0d15e8; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .56rem 1.3rem; }
.dialog-header p { margin: 0; }
.close-dialog {
  width: 2.65rem;
  height: 2.65rem;
  display: grid;
  place-items: center;
  padding: 0 0 .14em;
  border: 1px solid #666e88;
  border-radius: .25rem;
  background: transparent;
  font-size: 1.65rem;
  line-height: 1;
}
.close-dialog:hover { background: #29314a; border-color: var(--accent); }
.dialog-image { width: 100%; height: min(47vh, 29rem); object-fit: contain; background: var(--night); }
.dialog-content { padding: 1.4rem 1.6rem 1.6rem; }
.dialog-content h2 { font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.055em; }
.dialog-description { color: var(--muted); margin-top: .55rem; }
.dialog-controls { display: flex; gap: .65rem; margin-top: 1.15rem; }

@media (max-width: 1020px) {
  .wrap { width: calc(100% - 4.5rem); }
}

@media (max-width: 820px) {
  .wrap { width: calc(100% - 3rem); }
  .site-header nav { column-gap: .95rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .hero-inner { padding-block: clamp(13.25rem, 40vw, 21rem) 6.25rem; }
  .hero-image { inset: 0 0 auto; height: clamp(17.75rem, 62vw, 30rem); }
  .hero-image img { object-position: right 43%; }
  .hero-image::after { background: linear-gradient(to top, var(--canvas), #11151dd9 22%, #11151d21 59%, transparent 78%); }
  .hero-caption { bottom: 1.15rem; justify-content: flex-start; }
  .hero-credit { text-align: left; min-width: 0; }
  .hero h1 { font-size: clamp(2.85rem, 7.4vw, 4rem); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 630px) {
  .wrap { width: calc(100% - 2.25rem); }
  .hero h1 { font-size: clamp(2.25rem, 9vw, 3.55rem); }
  .project-grid, .video-grid, .contact-form-fields { grid-template-columns: 1fr; }
  .header-inner { min-height: 4.35rem; flex-wrap: wrap; gap: .6rem; padding-block: .5rem; }
  html { scroll-padding-top: 5.35rem; }
  .site-header nav { width: 100%; }
  .site-header .menu-toggle { display: block; }
  .site-header:not(.menu-ready) .menu-toggle { display: none; }
  .site-header.menu-ready nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    padding: .5rem 1.125rem .8rem;
    background: var(--night);
    border-bottom: 1px solid var(--border);
  }
  .site-header.menu-ready .menu-toggle[aria-expanded="true"] + nav { display: block; }
  .site-header.menu-ready nav > a, .catalog-toggle, .catalog-panel a { display: block; width: 100%; padding: .7rem 0; text-align: left; }
  .site-header.menu-ready nav > a, .catalog-menu { border-bottom: 1px solid var(--border); }
  .catalog-toggle::after { display: inline-block; margin: 0 0 .16rem .5rem; }
  .catalog-panel { position: static; min-width: 0; margin: 0 0 .45rem .65rem; border: 0; border-left: 1px solid #828aab; background: transparent; }
  .site-header .catalog-panel a { padding-inline: .85rem; }
  .footer-inner p { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
