:root {
  --base: #16181b;
  /* frosted charcoal behind the open menu */
  --glass: rgba(22, 24, 27, .94);
  --glass-blur: blur(8px);
  --mist: #eaeaea;
  --muted: #8e9196;
  --white: #fff;

  --font-title: "Geist", system-ui, sans-serif;
  --font-body: "Geist", system-ui, sans-serif;

  --gutter: 2.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

/* Home is one fixed screen: nothing scrolls. Inner pages (.is-scroll) scroll. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.is-scroll, html.is-scroll body { height: auto; overflow: visible; }

body {
  margin: 0;
  background: var(--base);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wordmark {
  font-family: var(--font-title);
  font-weight: 500;
  letter-spacing: -.01em;
}

/* ---------- Header: menu left, logo centred (a16z-style) ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
}

/* On scrolling pages the header turns to frosted glass once the page moves,
   so content passes softly under it; at the top it stays clear over the video. */
html.is-scroll .site-header {
  transition: background-color .3s ease, -webkit-backdrop-filter .3s ease, backdrop-filter .3s ease;
}
html.is-scrolled .site-header {
  background-color: rgba(22, 24, 27, .55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 72px;
  padding: 0 var(--gutter);
}

.site-header__logo {
  grid-area: 1 / 2;
  font-size: 20px;
  line-height: 1;
  transition: opacity .3s ease;
}

.menu-toggle {
  grid-area: 1 / 1;
  justify-self: start;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: -.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
}

/* Two lines that cross into an X when open. */
.menu-toggle__lines,
.menu-toggle__lines::before {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform .3s ease;
}

.menu-toggle__lines {
  position: relative;
  transform: translateY(-3.5px);
}

.menu-toggle__lines::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
}

.menu-open .menu-toggle__lines { transform: translateY(0) rotate(45deg); }
.menu-open .menu-toggle__lines::before { transform: translateY(-7px) rotate(-90deg); }

/* ---------- Announcement bar: thin glass strip over the hero video (sidebar glass, a bit lighter) ----------
   Only shown around an announcement, such as a new press release. The header moves down under it
   when the bar is in the page and back up when the bar is removed. */

.announce {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20; /* under the menu panel (25); the header (30) sits below the bar, so they never overlap */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .75rem;
  height: 2.25rem;
  padding: 0 var(--gutter);
  background: rgba(22, 24, 27, .75);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  font-size: .8125rem;
  color: var(--white);
  white-space: nowrap;
}

.announce__link {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .4);
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
  transition: text-decoration-color .2s;
}

.announce__link:hover { text-decoration-color: var(--white); }

body:has(.announce) .site-header { top: 2.25rem; }

/* ---------- Menu: side panel from the left (a16z-style); full width on phones ---------- */

.site-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 25;
  display: flex;
  align-items: flex-start;
  width: min(26rem, 85vw);
  padding: 8rem var(--gutter) var(--gutter);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .45s;
}

.menu-open .site-menu {
  transform: none;
  visibility: visible;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

/* The page behind stays put while the panel is open. */
html:has(body.menu-open) { overflow: hidden; }

.site-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-menu li + li { margin-top: 1.25rem; }

.site-menu a {
  font: 400 1.5rem/1.3 var(--font-title);
  letter-spacing: -.01em;
  color: var(--mist);
  transition: color .2s;
}

.site-menu a:hover,
.site-menu a[aria-current="page"] { color: var(--white); }

/* The panel covers the header's left end, so drop the frosted bar while open. */
html.is-scrolled .menu-open .site-header {
  background-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Where the panel would reach the centred logo, hide the logo while it is open. */
@media (max-width: 1000px) {
  .menu-open .site-header__logo { opacity: 0; pointer-events: none; }
}

/* ---------- Hero: full-screen video ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--base);
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 50%;
  padding: 0 var(--gutter) 2.5rem;
}

.hero__heading {
  margin: 0;
  font: 400 2.25rem/1.15 var(--font-title);
  letter-spacing: -.02em;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) 2rem;
  font-size: .8125rem;
  color: var(--mist);
}

/* ---------- Inner page hero: full-width video, title bottom-left inside it ---------- */

.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 70vh;
  height: 70svh;
  min-height: 26rem;
  overflow: hidden;
}

.page-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Background videos: the still frame sits on top and fades out once the video
   is actually playing (main.js adds .is-playing). Where a browser holds back
   autoplay (iPhone Low Power Mode), its play button stays hidden under the still.
   Taps pass through both. */
.hero__video,
.page-hero__video { pointer-events: none; }

.video-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity .6s ease;
}

.is-playing + .video-still { opacity: 0; }

@media (scripting: none) {
  .video-still { display: none; }
}

/* Scrim: a light shade at the top for the logo, a deeper one at the bottom
   for the title, and the middle of the picture left untouched. */
.page-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22, 24, 27, .35) 0%, rgba(22, 24, 27, 0) 22%),
    linear-gradient(0deg, rgba(22, 24, 27, .6) 0%, rgba(22, 24, 27, 0) 55%);
}

/* Same width as the reading column below, so the left edges line up. */
.page-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(40rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
}

/* Article without an image: same hero block, filled with the card colour. */
.page-hero--plain { background: #22252a; }

/* News uses the full page width, so its hero text sits on the page gutter. */
.page-hero__inner--wide { max-width: none; }

/* ---------- About: one centred reading column ---------- */

.about {
  max-width: calc(40rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: 4.5rem var(--gutter) 0;
}

.about__label {
  margin: 0;
  font: 400 .8125rem/1.5 var(--font-body);
  color: var(--mist);
}

.about__lede {
  max-width: 34rem;
  margin: .75rem 0 0;
  font: 400 2.25rem/1.2 var(--font-title);
  letter-spacing: -.02em;
}

.about__text p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--mist);
}

.about__text p + p { margin-top: 1.25rem; }

/* ---------- Contact form: Intersect-style filled boxes, label inside ---------- */

.contact-form {
  display: grid;
  gap: .75rem;
  margin-top: 3rem;
  color-scheme: dark;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

/* Filled box with its label inside, above the field. */
.box {
  display: block;
  padding: .7rem 1rem .8rem;
  background: #22252a;
  cursor: text;
  transition: box-shadow .2s;
}

.box:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.box.is-invalid { box-shadow: inset 0 0 0 1px #d97b6c; }

.box__label {
  display: block;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--muted);
}

.box input,
.box textarea {
  display: block;
  width: 100%;
  margin-top: .3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  font: 400 1.0625rem/1.5 var(--font-body);
}

.box input:focus,
.box textarea:focus { outline: none; }

.box input::placeholder,
.box textarea::placeholder { color: #6b6e73; }

.box textarea { resize: vertical; min-height: 5.5rem; }

/* Cloudflare's check: a tick box from page load; clicking it swaps in
   Cloudflare's widget (same height, so the form doesn't jump). */
.contact-form__check {
  min-height: 65px;
  margin-top: .25rem;
}

.verify {
  display: flex;
  align-items: center;
  gap: .875rem;
  width: 100%;
  height: 65px;
  padding: 0 1rem;
  border: 0;
  background: #22252a;
  color: var(--white);
  font: 400 1rem/1 var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: box-shadow .2s;
}

.verify[hidden] { display: none; }
.contact-form__check > div { line-height: 0; } /* Cloudflare's wrapper: no gap under it */
.verify:focus-visible { outline: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }

.verify__box {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 2px;
  transition: border-color .2s;
}

.verify:hover .verify__box { border-color: var(--white); }

.contact-form__footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
}

.contact-form__submit:disabled { opacity: .6; cursor: default; }

.contact-form__submit {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--mist);
  color: var(--base);
  font: 500 1rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color .2s;
}

.contact-form__submit:hover,
.contact-form__submit:focus-visible {
  outline: none;
  background: var(--white);
}

.contact-form__status {
  margin: 0;
  font-size: .8125rem;
  color: var(--mist);
}

/* ---------- News: filter pills and a two-column card grid (Intersect-style) ---------- */

.news {
  padding: 2.5rem var(--gutter) 0;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin: 0 0 1.5rem;
}

.news-filters button {
  padding: .55rem .9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mist);
  font: 400 .9375rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.news-filters button:hover { color: var(--white); }

.news-filters button[aria-pressed="true"] {
  background: var(--mist);
  color: var(--base);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}

.news-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 22rem;
  background: #22252a;
  transition: background-color .2s;
}

/* Cards without an image: the text takes the whole card. */
.news-card:not(:has(.news-card__image)) { grid-template-columns: 1fr; }

.news-card:hover { background: #282b31; }
.news-card[hidden] { display: none; }

.news-card__text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 1.5rem 1.25rem 0;
}

.news-card__meta {
  display: flex;
  gap: .6rem;
  margin: 0 0 0 1rem;
  font-size: .75rem;
  color: var(--muted);
}

/* Title bottom-left with a bar on the card's edge. */
.news-card__title {
  margin: 0;
  padding-left: 1rem;
  border-left: 4px solid var(--mist);
  font: 400 1.25rem/1.3 var(--font-title);
  letter-spacing: -.01em;
  color: var(--white);
}

.news-card__image { position: relative; overflow: hidden; }

.news-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-empty {
  margin: 1rem 0 0;
  font-size: 1.125rem;
  color: var(--muted);
}

.site-footer--wide { padding-top: 6rem; }

/* ---------- Article ---------- */

.about__text a,
.article-back a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .3);
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
  transition: text-decoration-color .2s;
}

.about__text a:hover,
.article-back a:hover { text-decoration-color: var(--white); }

.article-back {
  margin: 3rem 0 0;
  font-size: 1rem;
}

/* ---------- 404: one screen, text centred ---------- */

.notfound {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  height: 100dvh;
  padding: 0 var(--gutter);
  text-align: center;
}

.notfound .article-back { margin-top: 2rem; }

/* Footer on the same left edge as the reading column. */
.site-footer--page {
  max-width: calc(40rem + 2 * var(--gutter));
  margin: 0 auto;
  padding-top: 6rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 650px) {
  :root { --gutter: 1rem; }
  .site-header__inner { height: 64px; }
  .site-header__logo { font-size: 18px; }
  .site-menu { width: 100%; padding-top: 6rem; }
  .site-menu a { font-size: 1.75rem; }
  .site-footer { padding-bottom: 1.5rem; }
  .hero__copy { max-width: none; padding-bottom: 2rem; }
  .hero__heading { font-size: 1.75rem; }

  .page-hero__inner { padding-bottom: 2rem; }
  .contact-form { margin-top: 2rem; }
  .news { padding-top: 2rem; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card { grid-template-columns: 1fr; min-height: 0; }
  .news-card__image { order: -1; aspect-ratio: 16 / 9; }
  .news-card__text { gap: 2.5rem; padding-top: 1rem; }
  .site-footer--wide { padding-top: 4rem; }
  .contact-form__row { grid-template-columns: 1fr; }
  .about { padding-top: 3rem; }
  .about__lede { font-size: 1.75rem; }
  .site-footer--page { padding-top: 5rem; }
}
