/* AIlien Intelligence — styles.css
   Dark / cosmic. The "there is – such that" clock is a fixed full-viewport
   backdrop; content floats over it (hero) or rides a dark sheet (below). */

:root {
  --bg: #141414;           /* rgb(20,20,20) — the needle ground */
  --bg-deep: #0c0c0e;
  --sheet: rgba(12, 12, 14, 0.92);
  --ink: #eef1f5;
  --ink-soft: #d6dde6;
  --muted: #9fb0c4;
  --faint: #74808f;
  --hairline: rgba(190, 205, 230, 0.16);
  --accent: #8ec9ff;       /* icy blue — the needle glow */
  --accent-soft: #b6dcff;
  --accent-weak: rgba(142, 201, 255, 0.14);

  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-body: Georgia, "Times New Roman", Times, serif;
  --font-mono: Georgia, "Times New Roman", Times, serif;

  --wrap: 760px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(4.5rem, 12vh, 9rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* The p5 clock canvas — fixed, centered, behind all content. ------- */
canvas {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* All page content rides above the canvas. */
.page { position: relative; z-index: 1; }

/* Layout ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section + .section { border-top: 1px solid var(--hairline); }

/* Typography helpers ------------------------------------------------ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.section__label { margin-bottom: 1.75rem; color: var(--faint); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

/* Skip link --------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: #1b2330;
  padding: 0.6rem 1rem;
  border-radius: 0 0 6px 0;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Scroll progress --------------------------------------------------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: transparent;
  z-index: 120;
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transform-origin: left center;
  transition: width 0.08s linear;
}

/* Header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.78) 0%, rgba(10, 10, 12, 0) 100%);
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(10, 10, 12, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { color: var(--ink); flex: none; transition: transform 0.5s var(--ease); }
.brand:hover .brand__mark { transform: rotate(8deg); }
.brand__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}
.brand__ai { font-weight: 700; color: var(--accent-soft); }
.brand--footer .brand__text { font-size: 0.92rem; }

.header__nav { display: flex; align-items: center; }
.header__contact {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 0.45rem 0.2rem;
  position: relative;
}
.header__contact::after {
  content: "";
  position: absolute;
  left: 0.2rem; right: 0.2rem; bottom: 0.2rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.header__contact:hover::after,
.header__contact:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* Hero — floats over the clock, text anchored low with a bottom scrim - */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(4rem, 11vh, 8rem);
  padding-top: 6rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(10, 10, 12, 0.96) 0%,
    rgba(10, 10, 12, 0.84) 28%,
    rgba(10, 10, 12, 0.50) 54%,
    rgba(10, 10, 12, 0.14) 76%,
    rgba(10, 10, 12, 0) 100%
  );
}
.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero .eyebrow { margin-bottom: 1.5rem; }
.ai-mark { color: var(--accent); }
.hero__title {
  font-size: clamp(2.6rem, 1.6rem + 5.2vw, 5rem);
  line-height: 1.02;
  font-weight: 600;
  max-width: 16ch;
  text-shadow: 0 2px 30px rgba(6, 6, 8, 0.55);
}
.hero__sub {
  margin: 1.75rem 0 0;
  font-size: clamp(1.1rem, 1.02rem + 0.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 46ch;
  font-weight: 400;
  text-shadow: 0 1px 16px rgba(6, 6, 8, 0.5);
}
.hero__cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.hero__cue svg { transition: transform 0.4s var(--ease); }
.hero__cue:hover { color: var(--accent); }
.hero__cue:hover svg { transform: translateY(4px); }

/* Dark sheet — carries all content below the hero, keeps it readable - */
.sheet {
  position: relative;
  background: var(--sheet);
  -webkit-backdrop-filter: blur(9px) saturate(115%);
  backdrop-filter: blur(9px) saturate(115%);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -30px 60px rgba(6, 6, 8, 0.35);
}

/* Premise ----------------------------------------------------------- */
.prose { max-width: 54ch; }
.prose p {
  margin: 0 0 1.4rem;
  font-size: clamp(1.12rem, 1.04rem + 0.4vw, 1.32rem);
  line-height: 1.62;
  color: var(--ink-soft);
}
.prose p:last-child { margin-bottom: 0; }
.prose__punch {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem) !important;
  line-height: 1.1 !important;
  margin-top: 0.5rem !important;
}

/* Approach ---------------------------------------------------------- */
.principles { list-style: none; margin: 0; padding: 0; }
.principle {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 1.25rem;
  padding-block: 1.9rem;
  border-top: 1px solid var(--hairline);
}
.principle:first-child { border-top: 0; padding-top: 0; }
.principle__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  padding-top: 0.35rem;
  letter-spacing: 0.05em;
}
.principle__title {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  margin-bottom: 0.5rem;
}
.principle__body p { margin: 0; color: var(--muted); max-width: 50ch; }
.principle__body em { font-style: italic; color: var(--ink-soft); }
.principles__note {
  margin: 2.25rem 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--faint);
  max-width: 52ch;
}
.principles__note em { font-style: italic; }

/* Catalog — ascending faculties of an unbounded mind --------------- */
.catalog__intro {
  margin: 0 0 2.75rem;
  color: var(--muted);
  max-width: 52ch;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.18rem);
}
.catalog__list { list-style: none; margin: 0; padding: 0; }
.catalog__item {
  display: grid;
  grid-template-columns: 2.8rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
  padding-block: 1.15rem;
  border-top: 1px solid var(--hairline);
}
.catalog__item:first-child { border-top: 0; padding-top: 0; }
.catalog__idx {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.catalog__body {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 0.3rem 1.75rem;
  align-items: baseline;
}
.catalog__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.catalog__def { color: var(--muted); }
@media (max-width: 640px) {
  .catalog__body { grid-template-columns: 1fr; }
}

/* Tracked operation/domain lines (the factoring) ------------------- */
.span {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.span:first-of-type { margin-top: 2rem; }
.span b {
  display: inline-block;
  min-width: 7rem;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 0.6rem;
}
@media (max-width: 640px) {
  .span b { display: block; min-width: 0; margin: 0 0 0.25rem; }
}

/* A section-level aside (e.g. the register/honesty note) ----------- */
.section-note {
  margin: 2.25rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.6;
}

/* Contact ----------------------------------------------------------- */
.contact__title {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}
.contact__sub {
  color: var(--muted);
  max-width: 44ch;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  margin: 0 0 2.5rem;
}

.form { max-width: 560px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 480px) { .form__row { grid-template-columns: 1fr; } }

.field { display: block; margin-bottom: 1.25rem; }
.field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.5rem;
}
.field__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
  border: 0;
  border-bottom: 1px solid var(--hairline);
  padding: 0.55rem 0.1rem;
  border-radius: 0;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field__input::placeholder { color: var(--faint); }
.field__textarea { resize: vertical; min-height: 6.5rem; line-height: 1.55; }
.field__input:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}
.field__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* honeypot — hidden from humans */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__foot {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1b2330;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.15s var(--ease), opacity 0.25s var(--ease);
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: progress; }
.btn:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

.form__status {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  min-height: 1.2em;
}
.form__status.is-success { color: #84d6a8; }
.form__status.is-error { color: #ec9d93; }

/* Footer ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 3rem;
}
.footer__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}
.footer__tag {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.footer__copy {
  margin: 0 0 0 auto;
  font-size: 0.85rem;
  color: var(--faint);
}
@media (max-width: 540px) {
  .footer__copy { margin-left: 0; width: 100%; }
}

/* Links (in prose / general) --------------------------------------- */
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Reveal animation -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-progress__bar { transition: none; }
  .brand__mark, .hero__cue svg, .btn,
  .header__contact, .header__contact::after,
  .site-header, .field__input { transition: none; }
}

/* Thank-you page (no-JS form fallback target) ----------------------- */
.thanks-page { min-height: 100vh; display: grid; place-items: center; }
.thanks {
  max-width: 34rem;
  padding: var(--gutter);
  text-align: center;
}
.thanks__mark { color: var(--ink); margin-bottom: 1.5rem; }
.thanks h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  margin-bottom: 0.85rem;
}
.thanks p { color: var(--muted); margin: 0 0 2rem; font-size: 1.1rem; }

/* One-sentence page — the whole site compressed to its shortest form */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.solo {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.1rem, 3.5vh, 2.2rem);
  text-align: center;
  padding: 2rem 1rem;
}
/* soft radial scrim: dims the bright ring center so the text reads */
.solo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at center,
    rgba(8, 8, 10, 0.62) 0%,
    rgba(8, 8, 10, 0.30) 38%,
    rgba(8, 8, 10, 0) 68%);
}
.solo__line {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 0.64rem + 0.5vw, 0.98rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  text-shadow: 0 1px 12px rgba(6, 6, 8, 0.95);
  text-indent: 0.34em;
}
.solo__line--low { color: var(--ink-soft); }
.solo__art {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--accent);
  white-space: pre;
  line-height: 1.04;
  font-size: clamp(5.5px, 2.45vw, 22px);
  text-shadow: 0 0 18px rgba(142, 201, 255, 0.55), 0 0 3px rgba(142, 201, 255, 0.9);
  overflow: hidden;
  max-width: 100%;
}
.solo__invite {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 0.64rem + 0.5vw, 0.92rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--faint);
  text-shadow: 0 1px 12px rgba(6, 6, 8, 0.95);
  text-indent: 0.34em;
}
