/* ===== Tokens ===== */
:root {
  --bg: #000000;
  --bg-2: #000000;
  --surface: #111a23;
  --surface-2: #16212c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e7f0f5;
  --text-dim: #9fb1bd;
  --text-faint: #6a7d8a;
  --accent: #60e6c4;
  --accent-2: #4cd6b0;
  --accent-glow: rgba(96, 230, 196, 0.35);
  --blue: #5aa9ff;
  --violet: #9b8cff;
  --radius: 16px;
  --radius-lg: 22px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-hand: "Caveat", cursive;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Background video ===== */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.28;
  filter: brightness(0.6) saturate(0.8) blur(2px);
  pointer-events: none;
}

/* (background is pure black) */

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

/* ===== Top nav ===== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 3px;
  font-size: 0.95rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.85rem;
}
.nav-about {
  color: var(--text-dim);
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}
.nav-about:hover { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 16px;
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

/* hide top nav while the about panel is open */
.about-panel.open ~ .site-nav {
  opacity: 0;
  pointer-events: none;
}
.site-nav { transition: opacity 0.25s ease; }

/* ===== Stage (centered content) ===== */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 60px 24px;
  position: relative;
  text-align: center;
}

/* ===== Logo ===== */
.logo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.logo-big {
  width: clamp(220px, 38vw, 360px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 24px var(--accent-glow));
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
  will-change: transform;
}
.logo-ink { stroke-linecap: round; stroke-linejoin: round; }
.logo-x, .logo-o {
  fill: none;
  stroke: var(--text);
  stroke-width: 3.4;
}
.logo-tick {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.8;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.logo-x,
.logo-o,
.logo-tick {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
.logo-x { animation: drawLogo 0.8s cubic-bezier(0.6, 0, 0.2, 1) 0.15s forwards; }
.logo-o { animation: drawLogo 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.5s forwards; }
.logo-tick { animation: drawLogo 0.8s cubic-bezier(0.6, 0, 0.2, 1) 1s forwards; }
@keyframes drawLogo {
  to { stroke-dashoffset: 0; }
}
.logo-word {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.6vw, 1.1rem);
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 10px;
  padding-left: 10px;
}
.pronunciation {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}
.pronunciation:hover,
.pronunciation:focus-visible {
  color: var(--accent);
  transform: translateY(-1px);
  outline: none;
}
.pronunciation-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.voice-wave i {
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
}
.pronunciation.speaking .voice-wave { opacity: 1; }
.pronunciation.speaking .voice-wave i { animation: voicePulse 0.65s ease-in-out infinite; }
.pronunciation.speaking .voice-wave i:nth-child(2) { animation-delay: 0.12s; }
.pronunciation.speaking .voice-wave i:nth-child(3) { animation-delay: 0.24s; }
@keyframes voicePulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(2.5); }
}

/* ===== Product links ===== */
.product-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.products-nav {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
  /* fade out the spotlight at the left/right edges */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent),
    linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent),
    linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  mask-composite: intersect;
}
.product-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-display);
  overflow: hidden;
  flex: 0 0 auto;
  justify-content: center;
  transition: background 0.22s ease;
  animation: cardIn 0.6s ease both;
  animation-delay: calc(var(--i) * 0.08s + 0.2s);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
/* spotlight glow that follows hover — applied to whole nav as one element */
.products-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(200px 100px at var(--nav-mx, 50%) var(--nav-my, 50%), var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 0;
}
.products-nav:hover::before { opacity: 1; }
.product-link { position: relative; z-index: 1; }

.pl-glyph {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--accent);
  transition: color 0.22s ease, transform 0.22s ease;
}
.product-link:hover .pl-glyph { transform: scale(1.08); }
.pl-glyph svg { width: 100%; height: 100%; overflow: visible; }

.pl-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.pl-name {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.1;
}
.pl-arrow {
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 1.15rem;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.22s ease;
}
.product-link:hover .pl-arrow {
  color: var(--accent);
  transform: translateX(4px);
}
.product-context {
  min-height: 1.3em;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  opacity: 0.75;
  transition: opacity 0.16s ease, transform 0.16s ease, color 0.16s ease;
}
.product-context.changing {
  opacity: 0;
  transform: translateY(3px);
}
.product-area:has(.product-link:hover) .product-context,
.product-area:has(.product-link:focus-visible) .product-context {
  color: var(--text-dim);
  opacity: 1;
}

/* ===== Signature (about us trigger) ===== */
.signature {
  position: relative;
  z-index: 1;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--text-faint);
  margin-top: -8px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.signature:hover { color: var(--accent); }
.signature::before,
.signature::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--line-strong);
  vertical-align: middle;
  margin: 0 12px;
}

/* ===== About panel (revealed as stage shoots up) ===== */
.about-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 60px 24px;
  visibility: hidden;
  transition: visibility 0s 0.7s;
}
.about-panel.open {
  visibility: visible;
  transition: none;
}
.about-inner {
  max-width: 640px;
  padding: 40px 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.about-panel.open .about-inner {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.5s, transform 0.5s ease 0.5s;
}
.about-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 16px;
}
.about-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.about-body {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 14px;
}
.about-body em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

/* mottos */
.about-mottos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 28px 0 32px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.motto {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--text);
}
.motto-dot {
  color: var(--accent);
  font-size: 1.1rem;
}

/* legal info */
.about-legal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  text-align: left;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
.legal-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.legal-label {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  white-space: nowrap;
}
.legal-value {
  color: var(--text-dim);
  text-align: right;
}
.legal-value a {
  color: var(--accent);
  transition: color 0.2s ease;
}
.legal-value a:hover { color: var(--accent-2); }

/* legal links */
.about-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}
.about-links a {
  color: var(--text-faint);
  transition: color 0.2s ease;
}
.about-links a:hover { color: var(--accent); }
.link-sep { color: var(--text-faint); }
.about-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 200;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.3s ease 0.2s;
}
.about-close.show {
  opacity: 1;
  pointer-events: auto;
}
.about-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* when about is open, each element shoots up individually with a stagger */
.stage {
  position: relative;
  z-index: 1;
}
.rise-item {
  transition: transform 0.7s cubic-bezier(0.2, 0, 0.05, 1), opacity 0.7s ease;
}
.rise-item:nth-child(1) { transition-delay: 0s; }
.rise-item:nth-child(2) { transition-delay: 0.1s; }
.rise-item:nth-child(3) { transition-delay: 0.2s; }
.stage.pushed .rise-item {
  transform: translateY(-110vh);
  opacity: 0;
}

/* ===== Command palette ===== */
.cmdk-tip {
  margin-top: 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
.cmdk-tip:hover { color: var(--accent); }
kbd {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
}
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18vh 20px 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.cmdk-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.cmdk {
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(13, 19, 26, 0.95);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.18s ease;
}
.cmdk-overlay.open .cmdk { transform: none; }
.cmdk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.cmdk-prompt {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
}
.cmdk-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}
.cmdk-input::placeholder { color: var(--text-faint); }
.cmdk-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.cmdk-item .cmdk-glyph {
  width: 22px;
  height: 22px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.cmdk-item .cmdk-glyph svg { width: 100%; height: 100%; }
.cmdk-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}
.cmdk-item.active .cmdk-glyph { color: var(--accent); }
.cmdk-item .cmdk-hint {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--text-faint);
}
.cmdk-empty {
  padding: 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.cmdk-foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-faint);
}

/* ===== Footer ===== */
.micro-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 10px 24px 12px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}

/* ===== Responsive ===== */
@media (max-width: 560px) {
  .stage { gap: 40px; padding: 48px 20px; }
  .products-nav { flex-wrap: wrap; max-width: 360px; }
  .product-link { flex: 1 1 45%; }
  .signature::before, .signature::after { width: 18px; margin: 0 8px; }
  .site-nav { padding: 14px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .logo-x, .logo-o, .logo-tick { stroke-dashoffset: 0; }
}
