@layer site.reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
}

@layer site {
  :root {
    color-scheme: dark;
    --paper: #000;
    --ink: #f0f0f0;
    --ink-secondary: #929292;
    --ink-quiet: #7b7b7b;
    --focus: #d8d8d8;
  }

  html {
    min-width: 280px;
    min-height: 100%;
    background: var(--paper);
  }

  body {
    min-height: 100svh;
    display: grid;
    grid-template-rows: 1fr auto;
    overflow-x: hidden;
    color: var(--ink);
    background:
      radial-gradient(ellipse 70% 52% at 50% 48%, rgba(255,255,255,0.018), transparent 72%),
      var(--paper);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
  }

  main {
    min-height: 0;
    display: grid;
    place-items: center;
    padding: clamp(72px, 12vh, 144px) clamp(24px, 6vw, 96px) 48px;
  }

  .presence {
    width: min(760px, 100%);
    display: grid;
    justify-items: center;
    gap: clamp(34px, 6vh, 64px);
    text-align: center;
  }

  .wordmark {
    position: relative;
    z-index: 11;
    display: block;
    width: clamp(190px, 30vw, 390px);
    max-width: 74vw;
    height: auto;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.16));
    animation: wordmark-breathe 8s cubic-bezier(0.16, 1, 0.3, 1) infinite alternate;
    will-change: filter, opacity;
  }

  .copy { display: grid; justify-items: center; gap: 22px; }

  .copy p {
    max-width: 58ch;
    color: var(--ink-secondary);
    font-size: clamp(0.84rem, 1.25vw, 1rem);
    font-weight: 300;
    line-height: 1.75;
    letter-spacing: 0.055em;
    text-wrap: balance;
  }

  .contact {
    color: var(--ink-quiet);
    font-size: 0.72rem;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 0.35em;
    transition: color 300ms ease, text-decoration-color 300ms ease;
  }

  .contact:hover { color: var(--ink); text-decoration-color: currentColor; }
  .contact:focus-visible { color: var(--ink); outline: 1px solid var(--focus); outline-offset: 7px; border-radius: 2px; }

  footer {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    padding: 22px clamp(24px, 4vw, 64px) 26px;
    color: var(--ink-quiet);
    font-size: 0.72rem;
    line-height: 1.4;
    letter-spacing: 0.08em;
  }

  ::selection {
    color: #000;
    background: #dedede;
  }

  #psychos-canvas {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: none;
    pointer-events: none;
  }

  html.rpaint #psychos-canvas { display: block; }
  html.rpaint .rsf {
    background-color: transparent;
    background-image: none;
    border-color: transparent;
  }
  html.rpaint .rtx { -webkit-text-fill-color: transparent; }

  @keyframes wordmark-breathe {
    0% { opacity: 0.94; filter: brightness(0.96) drop-shadow(0 0 10px rgba(255,255,255,0.12)); }
    100% { opacity: 1; filter: brightness(1.06) drop-shadow(0 0 18px rgba(255,255,255,0.22)); }
  }

  @media (max-width: 560px) {
    main { padding-inline: 26px; }
    .presence { gap: 38px; }
    .copy p { max-width: 29ch; line-height: 1.8; }
    footer {
      min-height: 92px;
      align-items: flex-start;
      flex-direction: column;
      justify-content: flex-end;
      gap: 10px;
      padding-inline: 24px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .wordmark { animation: none; }
    .contact { transition: none; }
  }
}
