@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/projects/fonts/ibm-plex-sans-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/projects/fonts/ibm-plex-sans-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  --raised: color-mix(in srgb, var(--page) 95%, var(--foreground));
  --shadow: color-mix(in srgb, var(--foreground) 16%, transparent);
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--foreground);
  font: 400 16px/1.5 'IBM Plex Sans', system-ui, sans-serif;
}

.frame {
  width: min(1264px, calc(100% - var(--space-32) * 2));
  margin-inline: auto;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: var(--space-64);
  padding-block: var(--space-64);
}

.hero-copy { padding-block: var(--space-16); }
.brand-mark {
  width: max-content;
  padding: var(--space-8) var(--space-12);
  margin-bottom: var(--space-24);
  border-radius: 8px;
  background: var(--foreground);
  box-shadow: 0 8px 24px -8px var(--shadow);
}
.brand-mark img { width: 64px; height: auto; display: block; }
.hero h1 {
  margin: 0;
  font-size: clamp(54px, 6vw, 90px);
  font-weight: 600;
  line-height: .96;
  letter-spacing: -.055em;
}

.focus { margin: var(--space-24) 0 0; font-size: clamp(23px, 2.5vw, 32px); line-height: 1.2; }
.intro { margin: var(--space-16) 0 0; max-width: 36ch; color: var(--muted); font-size: 19px; }

a { color: inherit; display: inline-flex; align-items: center; gap: var(--space-8); min-height: 44px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.primary {
  margin-top: var(--space-24);
  padding: var(--space-12) var(--space-16);
  background: var(--foreground);
  color: var(--page);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.primary:hover { background: var(--muted); }

.scene {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.48;
  width: 100%;
  max-width: 680px;
  justify-self: end;
}

.scene::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 4% 0 10% 2%;
  background: radial-gradient(ellipse at 65% 48%, var(--raised), transparent 72%);
}

.system {
  position: absolute;
  top: 19%;
  left: 0;
  width: 66%;
}

.console-panel {
  position: relative;
  z-index: 1;
  min-height: clamp(100px, 16vw, 190px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-8);
  padding: clamp(16px, 2.6vw, 32px);
  border: 1px solid color-mix(in srgb, Canvas 24%, var(--foreground));
  border-radius: 12px;
  background: var(--foreground);
  color: Canvas;
  box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--foreground) 55%, transparent);
}
.console-kicker {
  opacity: .72;
  font-size: clamp(11px, 1.35vw, 14px);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.console-name {
  font-size: clamp(24px, 4.5vw, 48px);
  line-height: 1.05;
  letter-spacing: -.04em;
}
.console-note {
  opacity: .83;
  font-size: clamp(12px, 1.5vw, 16px);
}

.substrate {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  width: 80%;
  margin: -5px 0 0 var(--space-24);
  padding: var(--space-12) var(--space-16) var(--space-8);
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  background: linear-gradient(105deg, Canvas, var(--raised));
  box-shadow: 0 12px 24px -17px var(--shadow);
  font-size: clamp(13px, 2vw, 17px);
  font-weight: 600;
}
.substrate img { width: clamp(26px, 5vw, 36px); height: auto; }

.character {
  position: absolute;
  z-index: 2;
  margin: 0;
  width: 37%;
  text-align: center;
}
.character img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 18px var(--shadow));
}
.character figcaption { color: var(--muted); font-size: 14px; font-weight: 600; }
.character.kai { right: 0; top: 1%; }
.character.kai figcaption { position: absolute; top: 0; right: 12%; }
.character.clara { right: 4%; bottom: 0; }

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-24);
  padding-block: var(--space-16);
  border-top: 1px solid var(--line);
}
.footer nav { display: flex; flex-wrap: wrap; gap: var(--space-24); }
.footer a { white-space: nowrap; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; align-content: center; gap: var(--space-24); padding-block: var(--space-48); }
  .scene { justify-self: start; }
}

@media (max-width: 440px) {
  .frame { width: calc(100% - var(--space-24) * 2); }
  .hero { padding-block: var(--space-24); }
  .hero h1 { font-size: clamp(42px, 13vw, 54px); }
  .hero-copy { padding-block: 0; }

  /* Give the products and characters their own rows on small screens. */
  .scene {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-16);
    align-items: end;
  }
  .system {
    position: relative;
    grid-column: 1 / -1;
    top: auto;
    left: auto;
    width: 100%;
  }
  .substrate { margin-left: var(--space-16); }
  .character,
  .character.kai,
  .character.clara {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
  }
  .character img { width: min(100%, 144px); margin-inline: auto; }
  .character.kai figcaption { position: static; }
  .character figcaption { text-align: center; }

  /* Keep related links together instead of leaving uneven partial lines. */
  .footer {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    padding-block: var(--space-12) var(--space-16);
  }
  .footer nav { justify-content: center; flex-wrap: nowrap; }
}
