:root {
  --bg: #000000;
  --ink: #f4f4f4;
  --muted: rgba(244, 244, 244, 0.55);
  --line: rgba(244, 244, 244, 0.22);
  --line-hover: rgba(244, 244, 244, 0.6);
  /* soft white accent */
  --accent: 255, 255, 255;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* Star field sits behind everything, deliberately faint */
#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* editorial: a left-aligned reading column anchored to the top */
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2.4rem;
  width: min(680px, 90vw);
  margin: 0 auto;
  padding: 12vh 0 8vh;
  text-align: left;
}

/* logo + wordmark sit together as a masthead */
.masthead {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

/* Soft dreamy halo behind the logo */
.glow {
  position: absolute;
  top: 14%;
  left: 22%;
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 40%,
    transparent 70%
  );
  pointer-events: none;
  filter: blur(8px);
  animation: breathe 9s ease-in-out infinite;
}

.logo {
  width: clamp(56px, 9vw, 76px);
  height: auto;
  border-radius: 50%;
  /* logo art is on pure black, blend it seamlessly into the page */
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 26px rgba(255, 255, 255, 0.06));
  animation: float 8s ease-in-out infinite, fade-up 0.8s ease both;
}

.wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--ink);
  opacity: 0.9;
  animation: fade-up 0.9s ease 0.1s both;
}

.intro {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--muted);
  max-width: 46ch;
  animation: fade-up 0.95s ease 0.15s both;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  animation: fade-up 1s ease 0.2s both;
}

/* HUD-style command button */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.5rem;
  /* notched sci-fi panel corners */
  clip-path: polygon(
    10px 0, 100% 0, 100% calc(100% - 10px),
    calc(100% - 10px) 100%, 0 100%, 0 10px
  );
  border: 1px solid rgba(var(--accent), 0.25);
  color: var(--muted);
  text-decoration: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  background:
    linear-gradient(180deg, rgba(var(--accent), 0.04), rgba(var(--accent), 0));
  overflow: hidden;
  transition: color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, transform 0.2s ease;
}

/* faint scan-sweep that crosses on hover */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(var(--accent), 0.14) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.4s ease;
  pointer-events: none;
}

.btn:hover,
.btn:focus-visible {
  color: #eaf2ff;
  border-color: rgba(var(--accent), 0.65);
  box-shadow: 0 0 22px rgba(var(--accent), 0.12),
    inset 0 0 14px rgba(var(--accent), 0.05);
  transform: translateY(-1px);
  outline: none;
}

.btn:hover::after,
.btn:focus-visible::after {
  transform: translateX(120%);
}

.btn-index {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(var(--accent), 0.7);
  padding-right: 0.7rem;
  border-right: 1px solid rgba(var(--accent), 0.2);
}

.btn-label {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.18em;
}

/* ---- Products page ---- */
.stage--page {
  justify-content: flex-start;
  gap: 2.4rem;
}

.back {
  position: fixed;
  top: 1.6rem;
  left: 1.8rem;
  z-index: 2;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.4rem;
  line-height: 1;
  transition: color 0.25s ease, transform 0.2s ease;
}

.back:hover,
.back:focus-visible {
  color: var(--ink);
  transform: translateX(-3px);
  outline: none;
}

.page-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  opacity: 0.9;
  animation: fade-up 0.8s ease both;
}

.products {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
  animation: fade-up 0.9s ease 0.15s both;
}

.product-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.5rem;
  clip-path: polygon(
    14px 0, 100% 0, 100% calc(100% - 14px),
    calc(100% - 14px) 100%, 0 100%, 0 14px
  );
  border: 1px solid rgba(var(--accent), 0.22);
  text-decoration: none;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(var(--accent), 0.045), rgba(var(--accent), 0));
  overflow: hidden;
  transition: color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, transform 0.2s ease;
}

.product-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(var(--accent), 0.12) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.45s ease;
  pointer-events: none;
}

.product-link:hover,
.product-link:focus-visible {
  color: #eaf2ff;
  border-color: rgba(var(--accent), 0.6);
  box-shadow: 0 0 28px rgba(var(--accent), 0.12),
    inset 0 0 16px rgba(var(--accent), 0.05);
  transform: translateY(-2px);
  outline: none;
}

.product-link:hover::after,
.product-link:focus-visible::after {
  transform: translateX(120%);
}

/* square brand icon on the left */
.product-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
  background: rgba(var(--accent), 0.05);
  border: 1px solid rgba(var(--accent), 0.12);
}

.product-name {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  /* push the arrow to the far right */
  margin-right: auto;
}

.product-arrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1rem;
  color: rgba(var(--accent), 0.7);
  opacity: 0.7;
  transition: opacity 0.25s ease, transform 0.2s ease;
}

.product-link:hover .product-arrow,
.product-link:focus-visible .product-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

/* ---- Philosophy page ---- */
/* narrow the column to the reading width so the centered column
   is the centered text block (no leftover gap pooling on the right) */
.stage--read {
  width: min(560px, 90vw);
}

.stage--read .manifesto {
  max-width: none;
}

.manifesto {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  width: 100%;
  max-width: 58ch;
  animation: fade-up 0.9s ease 0.15s both;
}

.manifesto p {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.manifesto em {
  font-style: italic;
  color: var(--ink);
  opacity: 0.85;
}

/* opening line, set larger in the serif voice */
.manifesto .lede {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.3rem, 3.2vw, 1.7rem);
  line-height: 1.5;
  letter-spacing: 0.005em;
  color: var(--ink);
  opacity: 0.92;
}

/* signature pull-line — serif, set apart to echo the lede */
.manifesto .manifesto-line {
  margin: 0.4rem 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--ink);
  opacity: 0.92;
}

/* closing aside — quieter, with a hairline above it */
.manifesto .manifesto-coda {
  margin-top: 0.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.8;
  letter-spacing: 0.01em;
  color: rgba(244, 244, 244, 0.5);
}

.manifesto .manifesto-coda p {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

/* the spread of possible futures, set as a quiet ledger */
.futures {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.futures li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.86rem;
  line-height: 1.7;
  color: rgba(244, 244, 244, 0.52);
}

.futures li::before {
  content: "\2014"; /* em dash marker */
  position: absolute;
  left: 0;
  color: rgba(var(--accent), 0.5);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .logo,
  .glow,
  .wordmark,
  .intro,
  .actions {
    animation: none;
  }
}
