:root {
  font-size: 62.5%;
  color-scheme: dark;
  --bg: #03050c;
  --fg: #f2f5ff;
  --muted: rgb(242 245 255 / 0.6);
  --line: rgb(242 245 255 / 0.15);
  --accent: #3ad8ff;
  --gutter: 2.4rem;
}
html {
  background: var(--bg);
  overscroll-behavior-block: none;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font: 400 1.6rem/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Cross-page fade between the splash and the about page (progressive enhancement). */
@view-transition {
  navigation: auto;
}

/* Pill link, bottom centre on both pages. */
.pill {
  display: inline-flex;
  padding: 0.4rem;
  border-radius: 99rem;
  background: rgb(3 5 12 / 0.6);
  -webkit-backdrop-filter: blur(1rem);
  backdrop-filter: blur(1rem);
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 1.3rem;
  line-height: 1.4;
  text-decoration: none;
}
.pill span {
  padding: 0.6rem 1.4rem;
  border-radius: 99rem;
  background: rgb(242 245 255 / 0.15);
  transition: background-color 0.2s ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .pill:hover span {
    background: rgb(242 245 255 / 0.24);
  }
}

/* Footer row: company details, pill, copyright. */
.bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.6rem;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}
.bottom p {
  margin: 0;
  color: var(--muted);
}
.bottom .copyright {
  text-align: right;
}
.bottom a {
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .bottom a:hover {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 0.3rem;
  }
}
@media (max-width: 640px) {
  .bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 0.8rem;
    text-align: center;
  }
  .bottom .pill {
    order: -1;
    margin-bottom: 1.2rem;
  }
  .bottom .copyright {
    text-align: center;
  }
}

/* Splash (index.html) */
.splash {
  position: relative;
  display: flex;
  min-height: 100svh;
  padding: var(--gutter);
  box-sizing: border-box;
}
.background {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.vortex {
  display: block;
  width: 100%;
  height: 100%;
}
.no-webgl .vortex {
  display: none;
}
.no-webgl .background {
  background: radial-gradient(60rem 30rem at 69% 50%, #0c2c8f 0%, #061033 45%, var(--bg) 80%);
}
.content {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  width: 100%;
}
.wordmark {
  grid-row: 2;
  position: relative;
  width: 100%;
  max-width: 94rem;
  margin: 0 auto;
  animation: wordmark-in 1.2s 0.1s ease-out both;
}
.wordmark svg {
  display: block;
  width: 100%;
  height: auto;
}
.wordmark h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: transparent;
  user-select: none;
}
@keyframes wordmark-in {
  from {
    opacity: 0;
    filter: blur(0.6rem);
  }
}
.still .wordmark {
  animation: none;
}
.splash .bottom {
  grid-row: 3;
  align-self: end;
}

/* Shell shared by about.html and privacy-policy.html */
/* Corner glow in the vortex palette; sized to the viewport so it holds up on large screens. */
.page {
  background:
    radial-gradient(max(40rem, 38vw) max(28rem, 42vh) at 100% 0%, rgb(58 216 255 / 0.3), rgb(58 216 255 / 0.08) 45%, transparent 75%),
    radial-gradient(max(70rem, 85vw) max(50rem, 100vh) at 100% 0%, rgb(20 82 255 / 0.55), rgb(20 70 230 / 0.2) 38%, rgb(12 40 140 / 0.06) 62%, transparent 82%),
    var(--bg);
}
.page-header,
.page-main,
.page .bottom {
  width: 100%;
  max-width: 96rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
  box-sizing: border-box;
}
.page-header {
  padding-top: var(--gutter);
}
.page-header img {
  display: block;
  width: 12rem;
  height: auto;
}
.page-main {
  flex: 1;
  padding-top: 10rem;
  padding-bottom: 8rem;
}
.page .bottom {
  padding-bottom: var(--gutter);
}

/* About (about.html): sized to fit one screen. Type scales with both width and height, so short
   laptop screens shrink it slightly instead of scrolling. */
.page--about .page-header,
.page--about .page-main,
.page--about .bottom {
  max-width: 136rem;
}
.about {
  --text: clamp(1.4rem, min(1.25vw, 2.1vh), 1.7rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.4rem, 6.5vh, 8rem);
  padding-top: clamp(1.6rem, 4.5vh, 6rem);
  padding-bottom: clamp(1.6rem, 4.5vh, 6rem);
}
.lead {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.6rem, min(4.2vw, 6.2vh), 5.6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.intro {
  margin: clamp(1.2rem, 2.2vh, 2.4rem) 0 0;
  max-width: 58ch;
  font-size: clamp(1.5rem, min(1.5vw, 2.4vh), 2rem);
  line-height: 1.5;
  color: var(--muted);
}
.about-grid {
  display: grid;
  gap: clamp(2rem, 3vw, 5.6rem);
}
@media (min-width: 640px) and (max-width: 979px) {
  .about {
    --text: clamp(1.5rem, min(2.1vw, 2vh), 1.8rem);
  }
  .lead {
    font-size: clamp(3.2rem, min(6.4vw, 5.6vh), 5.2rem);
  }
  .intro {
    font-size: clamp(1.6rem, min(2.4vw, 2.2vh), 2rem);
  }
  .about-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 'vision contact' 'team team';
  }
  #vision {
    grid-area: vision;
  }
  #team {
    grid-area: team;
  }
  #contact {
    grid-area: contact;
  }
  .team {
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(2rem, 3vw, 5.6rem);
  }
}
@media (min-width: 980px) {
  .about-grid {
    grid-template-columns: 1.1fr 1.35fr 0.9fr;
  }
}
.about-grid section {
  padding-top: clamp(1.2rem, 2vh, 2rem);
  border-top: 1px solid var(--line);
  font-size: var(--text);
  line-height: 1.55;
}
.about-grid h2 {
  margin: 0 0 clamp(0.8rem, 1.8vh, 1.8rem);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-grid p {
  margin: 0 0 0.8em;
}
.about-grid p:last-child {
  margin-bottom: 0;
}
.about .statement {
  margin-bottom: 0.4em;
  font-size: calc(var(--text) * 1.45);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.team {
  display: grid;
  gap: clamp(1.2rem, 2.4vh, 2.4rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.team .member {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1rem;
  margin-bottom: 0.2em;
}
.team .member {
  align-items: center;
}
.team .member a {
  text-decoration: none;
}
.socials {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.2rem;
}
.team .member .social {
  display: inline-flex;
  padding: 0.4rem; /* larger tap target than the icon itself */
  color: var(--muted);
  transition: color 0.2s ease-out;
}
.social svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
}
@media (hover: hover) and (pointer: fine) {
  .team .member .social:hover {
    color: var(--fg);
  }
}
.team .role,
.team .bio,
.about .note {
  color: var(--muted);
}
.about .note {
  margin-top: 1em;
}
.about-grid a {
  text-decoration-color: var(--line);
  text-underline-offset: 0.3rem;
}
@media (hover: hover) and (pointer: fine) {
  .about-grid a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent);
  }
}
/* Section switch, phones only; styled like the pill link. */
.tabs {
  display: none;
}
@media (max-width: 639px) {
  .js .tabs {
    display: inline-flex;
    justify-self: start;
    gap: 0.2rem;
    padding: 0.4rem;
    border-radius: 99rem;
    background: rgb(3 5 12 / 0.6);
    border: 1px solid var(--line);
  }
  .tabs button {
    font: inherit;
    font-size: 1.3rem;
    line-height: 1.4;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 99rem;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
  }
  .tabs button[aria-selected='true'] {
    color: var(--fg);
    background: rgb(242 245 255 / 0.15);
  }
  .js .about-grid section:not(.is-active) {
    display: none;
  }
  /* The tab already names the section. */
  .js .about-grid section {
    padding-top: 0;
    border-top: 0;
  }
  .js .about-grid h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
/* Short phones (iPhone SE and similar): tighter rhythm so every tab still fits. */
@media (max-width: 639px) and (max-height: 700px) {
  .about {
    gap: 2rem;
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
  }
  .intro {
    font-size: 1.45rem;
  }
}
@media (max-width: 639px) {
  .page--about .bottom {
    row-gap: 0.4rem;
  }
  .page--about .bottom .pill {
    margin-bottom: 0.8rem;
  }
}

/* Privacy policy (privacy-policy.html): long-form reading layout. */
.legal h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(3.2rem, 4vw, 4.4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.legal .effective {
  margin: 0 0 4rem;
  font-size: 1.4rem;
  color: var(--muted);
}
.page .legal p,
.page .legal li {
  max-width: 68ch;
  font-size: 1.6rem;
  line-height: 1.65;
  color: rgb(242 245 255 / 0.85);
}
.page .legal p {
  margin: 0 0 1.6rem;
}
.legal section {
  display: block;
  padding: 4rem 0 2.4rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--gutter);
}
.legal h2 {
  margin: 0 0 1.6rem;
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--fg);
  line-height: 1.3;
}
.legal h3 {
  margin: 2.8rem 0 0.8rem;
  font-size: 1.7rem;
  font-weight: 600;
}
.legal ul,
.legal ol {
  margin: 0 0 1.6rem;
  padding-left: 2.2rem;
}
.legal li {
  margin-bottom: 0.6rem;
}
.legal li::marker {
  color: var(--muted);
}
.legal strong {
  font-weight: 600;
  color: var(--fg);
}
.legal a {
  text-decoration-color: var(--line);
  text-underline-offset: 0.3rem;
}
.legal a:hover {
  text-decoration-color: var(--accent);
}
.legal nav {
  margin: 4rem 0 0;
  padding: 3.2rem 0 0;
  border-top: 1px solid var(--line);
}
.legal .toc li {
  margin-bottom: 0.4rem;
}
@media (min-width: 720px) {
  .legal .toc {
    columns: 2;
    column-gap: 4rem;
  }
  .legal .toc li {
    break-inside: avoid;
  }
}

/* Placeholder copy still to be written. Remove the class once the text is final. */
.todo {
  color: var(--muted);
  text-decoration: underline dashed rgb(58 216 255 / 0.5);
  text-underline-offset: 0.4rem;
  text-decoration-thickness: 1px;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
  .wordmark {
    animation: none;
  }
}
