/* Interstice — North Star palette, Geist + Geist Mono */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('./assets/fonts/geist-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('./assets/fonts/geist-mono-latin.woff2') format('woff2');
}

:root {
  /* Brand palette ("North Star") */
  --night: #0b1733;
  --midnight: #14274e;
  --panel: #14264d;
  --slate: #5a6a8a;
  --gold: #e2b24c;
  --deep-gold: #a9781a;
  --paper: #f4f2ee;
  --card: #faf8f4;
  --line: #dcd8cf;
  --tint-1: #dce1ea;
  --tint-2: #aeb9d4;
  --muted-on-dark: #c5ccdd;

  /* Roles */
  --color-bg: var(--paper);
  --color-text: var(--night);
  --color-text-muted: var(--slate);
  --color-focus: var(--deep-gold);

  /* Type */
  --font-body: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.18vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --text-xl: clamp(1.75rem, 1.35rem + 1.8vw, 2.625rem);
  --text-hero: clamp(2.375rem, 1.5rem + 3.9vw, 4.25rem);

  /* Space (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --max: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Layout primitives ---------- */

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

.skip {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--gold);
  color: var(--night);
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
}

.skip:focus {
  top: var(--space-4);
}

.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

h2 {
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--midnight);
}

h3 {
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--midnight);
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--midnight);
}

.muted {
  color: var(--color-text-muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.btn-gold {
  background: var(--gold);
  color: var(--night);
}

.btn-gold:hover {
  background: #edc467;
}

.btn-gold:active {
  background: #d3a23d;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--night) l c h / 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid oklch(from var(--paper) l c h / 0.1);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: var(--space-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand img {
  height: 22px;
  width: auto;
}

.site-header .btn {
  min-height: 44px;
  padding: var(--space-2) var(--space-5);
}

/* ---------- Hero ---------- */

.hero {
  background: var(--night);
  color: var(--paper);
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: min(74dvh, 46rem);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: center;
}

.hero .label {
  color: var(--tint-2);
}

.hero .label b {
  font-weight: 400;
  color: var(--gold);
}

.hero h1 {
  margin-top: var(--space-6);
  font-size: var(--text-hero);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--paper);
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero .lede {
  margin-top: var(--space-6);
  color: var(--muted-on-dark);
  max-width: 34rem;
}

.hero-figure {
  width: 100%;
  max-width: 560px;
  justify-self: end;
}

.hero-figure svg {
  width: 100%;
  overflow: visible;
}

.tile {
  fill: oklch(from var(--paper) l c h / 0.045);
  stroke: oklch(from var(--paper) l c h / 0.16);
  stroke-width: 1;
}

.channel {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.25;
  stroke-linecap: round;
  opacity: 0.75;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.js .channel {
  stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease) 0.35s forwards;
}

.js .hero-star {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: star-in 0.9s var(--ease) 0.1s forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes star-in {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(-20deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-figure {
    justify-self: start;
    max-width: 460px;
  }
}

/* ---------- About: product, company, contact ---------- */

.about {
  background: var(--night);
  color: var(--muted-on-dark);
  border-top: 1px solid oklch(from var(--paper) l c h / 0.1);
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 0.8fr);
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: start;
}

.about-col {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  scroll-margin-top: var(--space-24);
}

.about .label {
  color: var(--tint-2);
  line-height: 1.6;
}

.about p {
  max-width: 30rem;
}

.about .status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--gold);
  text-wrap: balance;
}

.founders {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.founders li {
  display: grid;
  gap: 0;
}

.founders .name {
  color: var(--paper);
  font-weight: 500;
}

.founders .role {
  font-size: var(--text-sm);
}

.contact-mail {
  font-size: var(--text-lg);
  color: var(--paper);
  text-decoration-color: var(--gold);
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
  word-break: break-word;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  justify-self: start;
}

.contact-mail:hover {
  color: var(--gold);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */

.site-footer {
  background: var(--night);
  border-top: 1px solid oklch(from var(--paper) l c h / 0.1);
  color: var(--muted-on-dark);
  padding-block: var(--space-12);
  font-size: var(--text-sm);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.site-footer img {
  height: 20px;
  width: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  align-items: center;
}

.footer-links a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-links a:hover {
  color: var(--paper);
}

/* Legal pages */

.legal {
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
}

.legal .wrap {
  max-width: 46rem;
}

.legal h1 {
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--midnight);
  margin-top: var(--space-3);
}

.legal h2 {
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: var(--space-10);
}

.legal p,
.legal ul {
  margin-top: var(--space-4);
  color: var(--night);
}

.legal ul {
  padding-left: var(--space-5);
  display: grid;
  gap: var(--space-2);
}

.legal a {
  color: var(--midnight);
  text-decoration-color: var(--deep-gold);
  text-underline-offset: 0.2em;
}
