:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
}

[data-theme="dark"] {
  --bg: #080808;
  --fg: #f5f5f5;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--fg);
  font-family: "Google Sans Flex", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 360ms cubic-bezier(0.22, 1, 0.36, 1);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

body.is-dragging {
  cursor: grabbing;
}

#lava-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* Difference blend keeps text razor-sharp B&W whether over background or liquid blobs */
.shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100dvh;
  padding: clamp(20px, 3.5vw, 40px);
  pointer-events: none;
  color: #ffffff;
  mix-blend-mode: difference;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.domain-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: -0.01em;
  opacity: 0.72;
  font-variation-settings: "wght" 460, "wdth" 100, "opsz" 14, "ROND" 40;
}

.domain-mark .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.icon-btn {
  pointer-events: auto;
  appearance: none;
  background: transparent;
  color: currentColor;
  border: 1px solid rgba(255, 255, 255, 0.35);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 180ms ease;
}

.icon-btn:hover {
  border-color: #ffffff;
  transform: scale(1.06);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* Centerpiece — static, crisp Google Sans Flex */
.centerpiece {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(18px, 3vh, 28px);
  padding: 0 12px;
}

.wordmark {
  font-size: clamp(3.4rem, 12vw, 9.5rem);
  line-height: 0.96;
  letter-spacing: -0.01em;
  font-variation-settings: "wght" 520, "wdth" 100, "opsz" 144, "ROND" 30;
}

.statement {
  max-width: 36ch;
  font-size: clamp(1rem, 1.55vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: -0.015em;
  opacity: 0.86;
  font-variation-settings: "wght" 400, "wdth" 100, "opsz" 20, "ROND" 20;
}

.nowrap {
  white-space: nowrap;
  font-variation-settings: "wght" 520, "wdth" 100, "opsz" 20, "ROND" 20;
}

.author-link {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
  font-variation-settings: "wght" 560, "wdth" 100, "opsz" 20, "ROND" 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  padding-bottom: 1px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 180ms ease;
}

.author-link .arrow {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.82em;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.author-link:hover {
  border-bottom-color: #ffffff;
}

.author-link:hover .arrow {
  transform: translate(2px, -2px);
}

.author-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 2px;
}

/* Bottom HUD */
.hud {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hint {
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0.48;
  font-variation-settings: "wght" 450, "wdth" 102, "opsz" 12, "ROND" 40;
  transition: opacity 600ms ease;
}

.hint.is-quiet {
  opacity: 0.24;
}

@media (prefers-reduced-motion: reduce) {
  .icon-btn,
  .author-link,
  .author-link .arrow {
    transition: none;
  }
}
