/* ohnoai.net — firm sky
   tokens: ink / cream / red / ghost teal */

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/syne/syne-variable-latin.woff2") format("woff2-variations"), url("../fonts/syne/syne-variable-latin.woff2") format("woff2");
}

:root {
  --ink: #070708;
  --void: #050506;
  --cream: #ece8e1;
  --red: #e10600;
  --ghost: #5aa8b0;
  --violet: #a070d0;
  --warm: #e8b050;
  --muted: #6a6660;
  --status: #989994;
  /* Site-wide type: Syne the shit out of it */
  --font: "Syne", system-ui, sans-serif;
  --manifesto-font: "Syne", system-ui, sans-serif;
  --serif: "Syne", system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--cream);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* —— sky stage —— */
.sky {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 46% 42%, #140a12 0%, #0a080c 42%, var(--void) 100%);
}

.sky::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 48% 42% at 28% 30%, rgba(225, 6, 0, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 72% 58%, rgba(90, 168, 176, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 36% 34% at 58% 78%, rgba(106, 42, 154, 0.14) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* DOM hit targets over canvas */
.stars {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.star {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--cream);
  padding: 0;
  text-align: center;
  font: inherit;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.star:focus-visible .star-core {
  box-shadow: 0 0 0 2px var(--void), 0 0 0 4px var(--cream);
}

.star-core {
  width: var(--size, 18px);
  height: var(--size, 18px);
  border-radius: 50%;
  margin: 0 auto;
  background: radial-gradient(circle at 40% 35%, #fff 0%, var(--glow, #ffe8b0) 28%, transparent 70%);
  box-shadow:
    0 0 calc(var(--size, 18px) * 1.2) color-mix(in srgb, var(--glow, #ffe8b0) 55%, transparent),
    0 0 calc(var(--size, 18px) * 2.4) color-mix(in srgb, var(--glow, #ffe8b0) 25%, transparent);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.star.is-core .star-core {
  width: var(--size, 48px);
  height: var(--size, 48px);
  background: radial-gradient(circle at 40% 35%, #fff 0%, #ffc070 22%, var(--red) 55%, transparent 72%);
  box-shadow:
    0 0 40px rgba(225, 6, 0, 0.55),
    0 0 90px rgba(225, 6, 0, 0.28),
    0 0 0 1px rgba(225, 6, 0, 0.35);
}

.star:hover .star-core,
.star:focus-visible .star-core,
.star.is-active .star-core {
  transform: scale(1.18);
}

.star-role {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--cream);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
}

.star-truth {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--muted);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease;
  white-space: nowrap;
}

.star:hover .star-truth,
.star:focus-visible .star-truth,
.star.is-active .star-truth {
  opacity: 1;
  max-height: 2rem;
}

/* chrome */
.chrome {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  pointer-events: none;
}

.chrome a,
.chrome button {
  pointer-events: auto;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--cream);
  line-height: 0;
}

/* S3 lockup: real XT + T6 cream wordmark (brand package) */
.brand-lockup {
  height: 2.35rem;
  width: auto;
  display: block;
}

.brand-lockup--sm {
  height: 2.1rem;
}

.brand-xt {
  height: 2.1rem;
  width: 2.1rem;
  display: block;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--cream);
}

/* desktop only — soft pulse toward the manifesto door */
@media (min-width: 821px) {
  .nav-link--pulse {
    animation: manifesto-pulse 3.2s ease-in-out infinite;
  }
  @media (prefers-reduced-motion: reduce) {
    .nav-link--pulse { animation: none; }
  }
}

@keyframes manifesto-pulse {
  0%, 100% {
    color: var(--muted);
    text-shadow: none;
    opacity: 0.85;
  }
  50% {
    color: color-mix(in srgb, var(--cream) 88%, var(--red));
    text-shadow: 0 0 18px rgba(225, 6, 0, 0.35);
    opacity: 1;
  }
}

/* —— cursed signature star —— */
.cursed-star {
  position: absolute;
  z-index: 3;
  /* tucked where the eye doesn't want to go */
  left: 11%;
  top: 78%;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: crosshair;
  background: radial-gradient(circle at 40% 35%, #fff 0%, #ece8e1 40%, transparent 70%);
  box-shadow: 0 0 6px rgba(236, 232, 225, 0.45);
  pointer-events: auto;
  animation: cursed-blink 2.7s steps(1, end) infinite;
}

.cursed-star:focus-visible {
  outline: 1px solid var(--red);
  outline-offset: 4px;
}

@keyframes cursed-blink {
  0%, 12% { opacity: 0.15; transform: scale(0.7); }
  14%, 22% { opacity: 1; transform: scale(1.15); }
  24%, 55% { opacity: 0.35; transform: scale(0.85); }
  57%, 62% { opacity: 0.95; transform: scale(1.05); }
  64%, 100% { opacity: 0.2; transform: scale(0.75); }
}

@media (prefers-reduced-motion: reduce) {
  .cursed-star {
    animation: none;
    opacity: 0.55;
  }
}

/* when the signature is invoked */
body.is-cursed .sky {
  animation: cursed-sky 0.45s steps(2, end) 3;
}

body.is-cursed .star-role {
  color: var(--red) !important;
}

body.is-cursed .star-core {
  filter: hue-rotate(200deg) saturate(1.6);
}

@keyframes cursed-sky {
  0% { filter: none; }
  50% { filter: hue-rotate(180deg) contrast(1.2); }
  100% { filter: none; }
}

.cursed-toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.65rem 1rem;
  border: 1px solid rgba(225, 6, 0, 0.45);
  background: rgba(7, 7, 8, 0.92);
  color: var(--cream);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cursed-toast.is-on {
  opacity: 1;
}

@media (max-width: 820px) {
  .cursed-star {
    left: 8%;
    top: 62%;
  }
  .cursed-toast {
    bottom: 28%;
  }
}

/* mobile dock — wrap, no horizontal slider */
.rail {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem 0.5rem;
  padding: 0.85rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(5, 5, 6, 0.94) 55%, transparent);
  overflow: visible;
}

.rail-btn {
  flex: 0 1 auto;
  border: 1px solid rgba(236, 232, 225, 0.12);
  background: rgba(7, 7, 8, 0.65);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.rail-btn:hover,
.rail-btn:focus-visible,
.rail-btn.is-active {
  border-color: color-mix(in srgb, var(--accent, var(--cream)) 55%, transparent);
  color: var(--cream);
}

@media (max-width: 820px) {
  .rail { display: flex; }
  /* manifesto lives in the dock — hide top chrome link */
  .chrome .nav-link { display: none; }
  .chrome { justify-content: flex-start; }
  .brand-lockup {
    height: 2.55rem;
  }
  .star-role { font-size: 0.72rem; }
  .star-truth { white-space: normal; max-width: 9rem; margin-left: auto; margin-right: auto; }
  /* give the sky a little air above the dock */
  .sky { padding-bottom: 5.5rem; }
}

@media (min-width: 821px) {
  .brand-lockup {
    height: 2.5rem;
  }
  .brand-lockup--sm {
    height: 2.25rem;
  }
}

/* firm panel (core expand) */
.panel {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 58%;
  transform: translate(-50%, 0);
  width: min(22rem, calc(100vw - 2rem));
  padding: 1.1rem 1.2rem 1.15rem;
  border-radius: 0.75rem;
  background: rgba(7, 7, 8, 0.88);
  border: 1px solid rgba(236, 232, 225, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0.25rem);
}

.panel-mark-wrap {
  margin: 0 0 0.75rem;
  min-height: 2.25rem;
}

.panel-mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  object-fit: cover;
  border-radius: 0.35rem;
}

/* human mark is a portrait, not a square glyph — let it breathe */
.panel-mark--human {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 0.45rem;
}

/* wordmark/lockup marks aren't square glyphs — show them whole at their own ratio */
.panel-mark--wide {
  width: auto;
  max-width: 7.5rem;
  height: 1.7rem;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
}

.panel-dot {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  margin-top: 0.35rem;
  background: radial-gradient(circle at 40% 35%, #fff 0%, var(--dot, #ece8e1) 35%, transparent 72%);
  box-shadow: 0 0 16px color-mix(in srgb, var(--dot, #ece8e1) 45%, transparent);
}

.panel-body {
  margin: 0 0 0.85rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  color: color-mix(in srgb, var(--cream) 78%, transparent);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.panel a {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ghost);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ghost) 40%, transparent);
  padding-bottom: 0.1rem;
}

.panel a:hover { color: var(--cream); border-color: var(--cream); }

.panel-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

/* —— manifesto page —— */
.manifesto-page {
  min-height: 100vh;
  background: var(--void);
  color: var(--cream);
}

.manifesto-page header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(236, 232, 225, 0.06);
}

.manifesto-main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.5rem 1.4rem 4rem;
}

.manifesto-main h1 {
  font-family: var(--manifesto-font, var(--font));
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  margin: 0 0 2rem;
  color: var(--muted);
}

.manifesto-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.manifesto-list li {
  font-family: var(--manifesto-font, var(--font));
  font-size: 1.08rem;
  line-height: 1.55;
  font-weight: 400;
  color: color-mix(in srgb, var(--cream) 92%, transparent);
  padding: 0;
  border: 0;
}

.exhibit {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(236, 232, 225, 0.08);
  display: flex;
  justify-content: center;
}

.claude-status {
  display: inline-flex;
  align-items: center;
  gap: 25px;
  user-select: none;
  padding: 0.35rem 0;
}

.claude-status .think {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  background: transparent;
}

.claude-status .line {
  margin: 0;
  /* only non-Syne type on the site */
  font-family: "Anthropic Serif", "AnthropicSerif", ui-serif, Georgia, serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.25;
  color: var(--status);
}

@media (prefers-reduced-motion: reduce) {
  .star-core,
  .star-truth,
  .panel {
    transition: none !important;
  }
}
