:root {
    --ink: #0d1014;
    --ink-soft: #1a1f26;
    --paper: #f4f1ea;
    --paper-dim: rgba(244, 241, 234, 0.55);
    --paper-faint: rgba(244, 241, 234, 0.22);
  }

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

  html, body {
    height: 100%;
    background: var(--ink);
    color: var(--paper);
    font-family: 'Geist', sans-serif;
    overflow: hidden;
    cursor: default;
  }

  /* Subtle film-grain overlay — gives the ink surface texture */
  body::before {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    background:
      radial-gradient(ellipse at center, rgba(244,241,234,0.025) 0%, transparent 60%),
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.96  0 0 0 0 0.94  0 0 0 0 0.91  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    opacity: 0.5;
    mix-blend-mode: screen;
    z-index: 1;
  }

  /* Vignette */
  body::after {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
  }

  /* Stage */
  .stage {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }

  /* Brand wordmark */
  .brand {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: clamp(72px, 14vw, 220px);
    letter-spacing: -0.045em;
    line-height: 1;
    color: var(--paper);
    user-select: none;
    -webkit-user-select: none;
  }

  /* Word reveal — uses a clip mask that animates from 0% to 100% */
  .word {
    display: inline-block;
    clip-path: inset(0 100% 0 0);
    animation: word-reveal 1.2s 0.85s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  }
  .word .ch {
    display: inline-block;
    opacity: 0;
    animation: ch-in 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  }

  @keyframes word-reveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0% 0 0); }
  }
  @keyframes ch-in {
    from { opacity: 0; transform: translateY(0.04em); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* The round dot — lands first, then everything else reveals around it */
  .dot {
    display: inline-block;
    width: 0.135em;
    height: 0.135em;
    background: var(--paper);
    border-radius: 50%;
    margin-left: 0.04em;
    vertical-align: baseline;
    position: relative;
    opacity: 0;
    transform: scale(0);
    animation:
      dot-in 0.6s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
      dot-breath 3.6s 2s ease-in-out infinite;
    transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.3s ease;
    cursor: pointer;
    will-change: transform, opacity;
  }

  @keyframes dot-in {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
  }
  @keyframes dot-breath {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 241, 234, 0); }
    50% { box-shadow: 0 0 0 0.08em rgba(244, 241, 234, 0.12); }
  }

  /* Hovered dot gets bigger, slight glow */
  .brand:hover .dot,
  .dot:hover {
    transform: scale(1.5);
    box-shadow: 0 0 0 0.05em rgba(244, 241, 234, 0.25), 0 0 1.2em 0.1em rgba(244, 241, 234, 0.15);
  }

  /* The hidden reveal — slides up below the wordmark when dot is clicked */
  .reveal {
    position: absolute;
    left: 50%;
    top: calc(100% + 18px);
    transform: translateX(-50%) translateY(8px);
    font-family: 'Geist Mono', monospace;
    font-size: clamp(11px, 1.1vw, 14px);
    letter-spacing: 0.16em;
    text-transform: lowercase;
    color: var(--paper-dim);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
    white-space: nowrap;
  }
  .reveal.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }
  .reveal a {
    color: var(--paper);
    text-decoration: none;
    border-bottom: 1px solid var(--paper-faint);
    padding-bottom: 2px;
    transition: border-color 0.2s;
  }
  .reveal a:hover { border-bottom-color: var(--paper); }

  /* Bottom-left build stamp */
  .stamp {
    position: fixed;
    left: 32px; bottom: 32px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-faint);
    z-index: 3;
    opacity: 0;
    animation: fade-in 1s 2.2s ease-out forwards;
  }
  .stamp.left { left: 32px; right: auto; }

  /* Bottom-right system indicator: a little pulsing dot — system is alive */
  .system {
    position: fixed;
    right: 32px; bottom: 32px;
    display: flex; align-items: center; gap: 10px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-faint);
    z-index: 3;
    opacity: 0;
    animation: fade-in 1s 2.2s ease-out forwards;
  }
  .system .pulse {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--paper-dim);
    animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.85); }
    50% { opacity: 0.9; transform: scale(1.1); }
  }
  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* Click ripples — placed by JS */
  .ripple {
    position: fixed;
    border: 1px solid var(--paper-faint);
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
    animation: ripple-out 1.2s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  }
  @keyframes ripple-out {
    from { width: 0; height: 0; opacity: 0.8; }
    to { width: 320px; height: 320px; opacity: 0; }
  }

  /* Easter-egg buffer — typed characters appear as ghost glyphs near the dot */
  .ghost {
    position: fixed;
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    color: var(--paper-faint);
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    animation: ghost-in 0.4s ease-out forwards, ghost-out 0.8s 1.2s ease-in forwards;
  }
  @keyframes ghost-in {
    from { opacity: 0; transform: translateY(8px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes ghost-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-12px) scale(0.95); }
  }

  /* The "secret" line — full reveal triggered by typing "banda" */
  .secret {
    position: fixed;
    left: 50%; top: 50%;
    transform: translate(-50%, calc(50% + 80px));
    font-family: 'Geist Mono', monospace;
    font-size: clamp(11px, 1.1vw, 13px);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-dim);
    opacity: 0;
    text-align: center;
    line-height: 1.8;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 3;
  }
  .secret.show {
    opacity: 1;
  }
  .secret .accent { color: var(--paper); }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    .word, .word .ch, .dot { animation: none; opacity: 1; transform: none; clip-path: none; }
    .system .pulse { animation: none; opacity: 0.7; }
  }
