/* Niche Hounds. One theme: the logo's navy sky and cream ink. */

:root {
  --navy: #121826;
  --navy-2: #1a2235;
  --cream: #f5f3ee;
  --muted: rgba(245, 243, 238, 0.74);
  --faint: rgba(245, 243, 238, 0.14);
  --panel: rgba(18, 24, 38, 0.78);
  --gutter: clamp(1rem, 6vw, 5rem);
  --measure: 72rem;
}

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

html {
  background: var(--navy);
}

/* In-page links (the nav, the logo, the hero button) glide instead of jump.
   site.js adds .smooth-scroll only after the page has loaded: set from the
   start, smooth scrolling stops an address like /#team landing on Team. */
@media (prefers-reduced-motion: no-preference) {
  html.smooth-scroll {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--cream);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 10;
  background: var(--cream);
  color: var(--navy);
  padding: 0.4rem 0.7rem;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

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

/* ---------- The space background ---------- */

.scene,
.scene > * {
  position: absolute;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.scene-stars,
.scene-moon {
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-stars {
  fill: var(--cream);
}

.scene-earth,
.scene-hound {
  display: block;
}

/* The hound is full cream at the top of the page and dims to grey as you
   scroll, so it doesn't glow through the cards that pass over it. scene.js
   sets --hound-brightness from 1 down to 0.7. */
.scene-hound {
  filter: brightness(var(--hound-brightness, 1));
}

/* The Earth can be turned by hand (spin.js). Over the Earth the cursor is a
   hand; while it's being turned, nothing on the page gets selected. */
html.earth-grab body {
  cursor: grab;
}

html.earth-spinning,
html.earth-spinning body {
  cursor: grabbing;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Until the script has placed things, keep the art out of the way. */
.scene:not(.is-live) {
  visibility: hidden;
}

/* Everything else sits above the scene. */
.site-header,
main {
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(18, 24, 38, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--faint);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 650;
}

.brand img {
  width: 36px;
  height: 36px;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}

.nav a {
  text-decoration: none;
  padding: 0.35rem 0;
  opacity: 0.88;
}

.nav a:hover,
.nav a[aria-current] {
  opacity: 1;
}

.nav a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  padding: 10px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-toggle .cross,
.nav-open .nav-toggle .bars {
  display: none;
}

.nav-open .nav-toggle .cross {
  display: inline;
}

main {
  flex: 1;
}

/* ---------- Home hero ---------- */

.hero {
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  max-height: 1100px;
}

/* The top gap is kept modest so the headline, subhead and buttons all sit
   above the hound's head; scene.js shrinks the hound only if they still don't. */
.hero-copy {
  max-width: 72rem;
  padding: clamp(6rem, 16vh, 11rem) var(--gutter) 0;
}

/* The headline must end before the Earth. scene.js puts the Earth's left edge
   at about 61% of the window width, and the text starts after a gutter of up
   to 6vw, so 52vw leaves a clear gap at every desktop width. The size is set
   so the current headline fits that width in two lines: a third line pushes
   the subhead down into the hound's head. */
.hero-copy h1 {
  max-width: min(13.2em, 52vw);
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 4.8vw, 4.5rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-sub {
  max-width: 44ch;
  margin: 0;
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  line-height: 1.35;
  color: var(--muted);
  text-wrap: balance;
}

/* Two buttons under the subhead; they wrap onto two rows if they must. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: clamp(1.5rem, 4vh, 2.25rem) 0 0;
}

.hero-actions .button {
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
}

/* ---------- Home sections ---------- */

/* Clear the pinned header (about 75px tall) when a link scrolls here. */
.section {
  scroll-margin-top: 4.75rem;
}

.section-head {
  max-width: var(--measure);
  padding: clamp(1rem, 4vh, 2.5rem) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
}

.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 750;
  letter-spacing: -0.025em;
}

/* Below the fold, sections rise in as they arrive (see site.js). */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Inner pages ---------- */

.page-head {
  max-width: var(--measure);
  padding: clamp(8rem, 24vh, 12rem) var(--gutter) clamp(2rem, 6vh, 3.5rem);
}

.page-head h1 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.kicker {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  max-width: 34ch;
  margin: 1.1rem 0 0;
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}

.page-body {
  max-width: var(--measure);
  padding: 0 var(--gutter) clamp(4rem, 14vh, 9rem);
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.page-body--wide {
  max-width: 92rem;
}

.panel {
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--faint);
  border-radius: 14px;
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

/* Panel headings. By element on a venture page; by class in the home
   sections, where they sit a level lower under each section's h2. */
:where(.panel) h2,
.panel-title {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  margin-bottom: 0.85rem;
}

:where(.panel) h3,
.panel-subtitle {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.panel p:last-child {
  margin-bottom: 0;
}

.panel .muted,
.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.grid--people {
  list-style: none;
  padding: 0;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
}

.num {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.split {
  display: grid;
  gap: clamp(1rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  align-items: start;
}

/* Outline buttons get a navy fill, so on the smallest phones the hound
   standing behind the hero buttons doesn't show through them. */
.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid var(--cream);
  background: var(--navy);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.button:hover {
  background: var(--cream);
  color: var(--navy);
}

/* The main action: filled cream. On hover it lightens rather than inverting. */
.button--primary {
  background: var(--cream);
  color: var(--navy);
}

.button--primary:hover {
  background: #ffffff;
  border-color: #ffffff;
}

.button[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.button--small {
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
}

/* Team */

.person {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.person__head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.person__head h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  margin: 0 0 0.2rem;
}

.person__head .role {
  margin: 0;
}

.person__bio p {
  max-width: 62ch;
}

/* Email / LinkedIn. margin-top: auto holds the row at the foot of the card,
   so the buttons line up across cards of different bio lengths. */
.person__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: auto 0 0;
}

.avatar {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy-2);
  border: 1px solid var(--faint);
  display: grid;
  place-items: center;
}

/* A headshot fills the circle; a non-square photo is cropped, not squashed. */
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar svg {
  width: 48px;
  height: 48px;
  fill: rgba(245, 243, 238, 0.35);
}

.role {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

/* Ventures */

.venture-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 100%;
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card__title {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  margin: 0.4rem 0 0.85rem;
}

.card__link {
  text-decoration: none;
}

.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card__desc {
  color: var(--muted);
  flex: 1;
}

.card .button {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin-top: auto;
}

/* Status pills. The base is Retired (and any unknown status): grey. Each
   standard status tints the text, border and a faint fill in its colour, and
   a dot repeats it. The word always carries the meaning, not the colour. */
.pill {
  --pill: rgba(245, 243, 238, 0.74);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--faint);
  color: var(--muted);
}

.pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--pill);
}

.pill--live,
.pill--beta,
.pill--stealth {
  color: var(--pill);
  border-color: color-mix(in srgb, var(--pill) 45%, transparent);
  background: color-mix(in srgb, var(--pill) 12%, transparent);
}

.pill--live {
  --pill: #4ade80;
}

.pill--beta {
  --pill: #facc15;
}

.pill--stealth {
  --pill: #60a5fa;
}

.venture-status {
  margin: 1rem 0 0;
}

.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--navy-2);
  border: 1px solid var(--faint);
  overflow: hidden;
}

.logo-box--large {
  width: 112px;
  height: 112px;
}

.logo-box--empty {
  border-style: dashed;
}

.logo-box img {
  max-width: 78%;
  max-height: 78%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* logo_fill: a square app-icon logo fills the box, clipped to its corners. */
.logo-box--fill img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

/* No logo yet: the venture's initials stand in. */
.logo-box--initials {
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.logo-box--large.logo-box--initials {
  font-size: 2.3rem;
}

.venture {
  display: grid;
  gap: 1rem;
}

.venture .button {
  justify-self: start;
}

.venture .page-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.venture-body {
  color: var(--muted);
}

@media (max-width: 719px) {
  .site-header {
    padding: 0.9rem 1rem;
    flex-wrap: nowrap;
  }

  /* Phone: a menu button instead of the row of links. */
  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
  }

  .nav-open {
    background: rgba(18, 24, 38, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--faint);
    flex-wrap: wrap;
  }

  .nav-open .nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 0.5rem 0 0.25rem;
  }

  .nav-open .nav a {
    padding: 0.8rem 0;
    font-size: 1.15rem;
    border-top: 1px solid var(--faint);
  }

  .hero {
    min-height: 640px;
  }

  /* Just clear of the pinned header (about 64px tall here), so the copy
     sits high and leaves the hound room on the ground below the buttons. */
  .hero-copy {
    padding-top: 5.25rem;
  }

  /* Both buttons on one row at phone width. */
  .hero-actions {
    gap: 0.6rem;
  }

  .hero-actions .button {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
  }

  /* The Earth sits behind the words on a phone, so the headline can use the
     full width instead of stopping short of it. */
  .hero-copy h1 {
    max-width: 13.2em;
  }

  .page-head {
    padding-top: 9rem;
  }

  /* Earth sits behind the words on a phone. */
  .hero-copy h1,
  .hero-sub,
  .page-head h1,
  .page-head .lede,
  .page-head .kicker,
  .section-head h2,
  .section-head .lede {
    text-shadow: 0 1px 2px rgba(18, 24, 38, 0.9), 0 0 22px rgba(18, 24, 38, 0.85);
  }
}
