/* The site's colors and fonts. Change them here and they update everywhere. */
:root {
  --navy: #0b1b33;
  --navy-light: #13294b;
  --navy-line: #2a4068;
  --grey: #c5ced9;
  --white: #ffffff;
  --heading: "Space Grotesk", Arial, sans-serif;
  --body: "Inter", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--heading);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 { font-size: clamp(32px, 5vw, 48px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }

p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--white);
  color: var(--navy);
}
.skip:focus { left: 16px; top: 12px; }

.lead { color: var(--grey); font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  border-bottom: 1px solid var(--navy-line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; flex: none; align-items: center; gap: 10px; text-decoration: none; }
.logo img { display: block; width: 56px; height: 56px; }
.logo .logo-name { width: auto; height: 23px; }
.site-header nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.site-header nav a { color: var(--grey); font-size: 15px; text-decoration: none; }
.site-header nav a:hover { color: var(--white); }

/* Hero */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(82vh, 760px);
  overflow: hidden;
  background: var(--navy);
  isolation: isolate;
}
/* The filter deepens the photo's blacks, "screen" turns them into the page's navy,
   and the mask fades the photo's edges away */
.hero-photo {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24%;
  right: 0;
  z-index: -1;
  background: url("images/photo-hero.jpg") left center / cover no-repeat;
  filter: contrast(1.15) brightness(1.08) saturate(0.85);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 58% 72% at 52% 48%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 72% at 52% 48%, #000 60%, transparent 100%);
}
.hero-links {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
}
.hero-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  transition: color 0.15s;
}
.hero-links a:first-child { margin-left: -8px; }
.hero-links a:hover { color: var(--grey); }
.hero-links svg { width: 20px; height: 20px; }

.hero-links .email-menu {
  position: absolute;
  top: 42px;
  left: calc(var(--gutter) - 8px);
  z-index: 5;
  min-width: 190px;
  padding: 6px;
  background: var(--navy-light);
  border: 1px solid var(--navy-line);
  border-radius: 4px;
}
.hero-links .email-menu a {
  justify-content: flex-start;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 15px;
  text-decoration: none;
}
.hero-links .email-menu a:hover { background: var(--navy); color: var(--white); }
.hero-text { padding-top: 96px; padding-bottom: clamp(40px, 7vw, 72px); }
.hero-logo { display: block; width: min(100%, 500px); height: auto; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.button {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid var(--grey);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.button:hover { background: var(--navy-light); }
.button.primary { background: var(--white); border-color: var(--white); color: var(--navy); }
.button.primary:hover { background: var(--grey); border-color: var(--grey); }

/* Sections */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section.alt { background: var(--navy-light); }

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

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  padding: 8px 14px;
  background: none;
  border: 1px solid var(--navy-line);
  border-radius: 4px;
  color: var(--grey);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.filters button:hover { border-color: var(--grey); }
.filters button[aria-pressed="true"] { background: var(--white); border-color: var(--white); color: var(--navy); }

/* Video carousel: 3 videos at a time on desktop, 2 on tablets, 1 and a peek on phones */
.carousel {
  --visible: 3;
  --gap: 24px;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

.carousel-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.carousel-nav button {
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--grey);
  border-radius: 4px;
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
}
.carousel-nav button:hover { background: var(--navy-light); }

.card {
  flex: 0 0 calc((100% - (var(--visible) - 1) * var(--gap)) / var(--visible));
  scroll-snap-align: start;
}
.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--navy-light);
}
.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.card-start:hover img { transform: scale(1.03); }
.card-start {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.card-media iframe { display: block; width: 100%; height: 100%; border: 0; }

.card-info { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-expand {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: none;
  border: 1px solid var(--navy-line);
  border-radius: 4px;
  color: var(--grey);
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}
.card-expand:hover { border-color: var(--grey); color: var(--white); }
.card-expand svg { width: 14px; height: 14px; }

.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0.92;
}
.play::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 17px;
  border-style: solid;
  border-width: 11px 0 11px 17px;
  border-color: transparent transparent transparent var(--navy);
}

.card-title { display: block; font-family: var(--heading); font-weight: 500; font-size: 19px; line-height: 1.25; }
.card-detail { display: block; margin-top: 2px; color: var(--grey); font-size: 15px; line-height: 1.4; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(32px, 6vw, 80px); }
.about .lead { margin-top: 16px; }
.skills { display: grid; gap: 28px; margin: 0; padding: 0; list-style: none; }
.skills li { padding-top: 20px; border-top: 1px solid var(--navy-line); }
.skills p { margin-top: 8px; color: var(--grey); }

/* Contact */
.contact { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.contact-logo {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  width: min(40%, 440px);
  transform: translateY(-50%);
}
.contact .lead { max-width: 32em; }
.socials { display: flex; gap: 24px; font-size: 16px; }
.socials a { color: var(--grey); }
.socials a:hover { color: var(--white); }

/* Footer */
.site-footer { padding: 24px 0; border-top: 1px solid var(--navy-line); color: var(--grey); font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Video player */
dialog {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: visible;
  background: #000;
  border: 0;
  color: var(--white);
}
dialog::backdrop { background: rgba(5, 12, 24, 0.92); }
.frame { aspect-ratio: 16 / 9; max-height: calc(100vh - 88px); margin: 0 auto; }
.frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 1000px) {
  .carousel { --visible: 2; }
}

@media (max-width: 760px) {
  .logo { gap: 8px; }
  .logo img { width: 44px; height: 44px; }
  .logo .logo-name { height: 17px; }
  .contact-logo { position: static; width: 100%; max-width: 320px; margin-top: 12px; transform: none; }
  .carousel { --visible: 1.15; --gap: 16px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: max(78vh, 640px); }
  .hero-logo { width: min(92%, 320px); }
  .hero-photo {
    left: 0;
    background-position: 42% calc(100% - 96px);
    background-size: auto 490px;
    -webkit-mask-image: radial-gradient(ellipse min(75vw, 300px) 300px at 50% calc(100% - 320px), #000 60%, transparent 100%);
    mask-image: radial-gradient(ellipse min(75vw, 300px) 300px at 50% calc(100% - 320px), #000 60%, transparent 100%);
  }
}

@media (max-width: 360px) {
  .logo { gap: 4px; }
  .logo img { width: 34px; height: 34px; }
  .logo .logo-name { height: 15px; }
  .site-header nav { gap: 10px; }
  .site-header nav a { font-size: 14px; }
}

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