/* ----------------------------------------------------------------
   orionfold — stealth landing
   single-family grotesk on warm cream paper.
---------------------------------------------------------------- */

:root {
  --paper:       #F2ECDF;
  --paper-deep:  #E8E0CF;
  --ink:         #0E0E0C;
  --ink-soft:    #6B6259;
  --vermillion:  #D94B2B;
  --hairline:    rgba(14, 14, 12, 0.14);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-fold: cubic-bezier(0.16, 1, 0.3, 1);

  --pad-x: clamp(24px, 5vw, 96px);
  --pad-y: clamp(24px, 4vw, 56px);
}

/* ---- reset ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }

/* ---- page ------------------------------------------------------- */
html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--pad-y) var(--pad-x);
  gap: clamp(40px, 8vh, 120px);
  cursor: none;
  overflow-x: hidden;
  position: relative;
}
@media (hover: none) {
  body { cursor: auto; }
}

/* paper grain — barely visible, gives the cream a tactile depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(14,14,12,0.035) 1px, transparent 1px),
    radial-gradient(rgba(14,14,12,0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* ---- top bar ---------------------------------------------------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  opacity: 0;
  transform: translateY(-4px);
  animation: revealTop 700ms var(--ease-fold) 100ms forwards;
}
@keyframes revealTop {
  to { opacity: 1; transform: none; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.mark {
  width: 28px;
  height: 28px;
  display: block;
  color: var(--ink);
}
.mark-fold {
  transform-origin: 60% 30%;
  transform: scale(0) rotate(-30deg);
  opacity: 0;
  animation: foldIn 900ms var(--ease-fold) 900ms forwards;
}
@keyframes foldIn {
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.brand-text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vermillion);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

/* ---- page main column ------------------------------------------ */
.page {
  display: grid;
  gap: clamp(48px, 10vh, 120px);
  align-content: start;
  max-width: 1280px;
}

/* ---- manifesto -------------------------------------------------- */
.manifesto {
  display: grid;
  gap: clamp(20px, 3.5vh, 40px);
  padding-top: clamp(0px, 4vh, 40px);
}
.headline {
  font-weight: 700;
  font-size: clamp(36px, 6.4vw, 92px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.line > span {
  display: block;
  white-space: nowrap;
  transform: translateY(110%);
  animation: lineRise 900ms var(--ease-fold) forwards;
  will-change: transform;
}
.line:nth-child(1) > span { animation-delay: 280ms; }
.line:nth-child(2) > span { animation-delay: 440ms; }
.line:nth-child(3) > span { animation-delay: 600ms; }
@keyframes lineRise {
  to { transform: translateY(0); }
}

.signature {
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  opacity: 0;
  transform: translateY(8px);
  animation: revealUp 600ms var(--ease-fold) 1100ms forwards;
}
@keyframes revealUp {
  to { opacity: 1; transform: none; }
}

/* ---- signup ----------------------------------------------------- */
.signup {
  max-width: 560px;
  opacity: 0;
  transform: translateY(8px);
  animation: revealUp 700ms var(--ease-fold) 1300ms forwards;
}

.signup-form { display: grid; gap: 14px; }

.signup-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.signup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--hairline);
  transition: border-color 220ms ease;
  padding: 8px 0;
}
.signup-row:focus-within {
  border-bottom-color: var(--ink);
}
.signup-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 4px 0;
  color: var(--ink);
}
.signup-input::placeholder {
  color: var(--ink-soft);
  font-weight: 400;
  opacity: 0.7;
}
.signup-submit {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--ink);
  transition: color 220ms ease, background 220ms ease, transform 220ms var(--ease-fold);
}
.signup-submit:hover { color: var(--vermillion); transform: translate(2px, -2px); }
.signup-submit:focus-visible { outline: 2px solid var(--vermillion); outline-offset: 4px; }
.signup-status {
  min-height: 1.2em;
  font-size: 13px;
  color: var(--ink-soft);
  transition: color 220ms ease;
}
.signup-status[data-state="ok"]    { color: var(--ink); }
.signup-status[data-state="err"]   { color: var(--vermillion); }

/* ---- rule ------------------------------------------------------- */
.rule {
  border: 0;
  height: 1px;
  background: var(--hairline);
  margin: 0;
}

/* ---- notes ------------------------------------------------------ */
.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 64px);
}
.note {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}
.note-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.note-head {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.note-body {
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 400;
  color: var(--ink-soft);
  max-width: 24ch;
}

/* ---- footer ----------------------------------------------------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.foot .sep { opacity: 0.5; }

/* ---- cursor ----------------------------------------------------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  transition: width 220ms ease, height 220ms ease, border-color 220ms ease, background 220ms ease;
  opacity: 0;
  animation: revealOpacity 400ms ease 1400ms forwards;
}
@keyframes revealOpacity { to { opacity: 1; } }
.cursor.is-pointer {
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  background: rgba(217, 75, 43, 0.08);
  border-color: var(--vermillion);
}
@media (hover: none) {
  .cursor { display: none; }
}

/* ---- drifting accent -------------------------------------------- */
.drift {
  position: fixed;
  right: clamp(40px, 8vw, 120px);
  bottom: clamp(80px, 12vh, 200px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vermillion);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  animation: drift 28s ease-in-out infinite, driftIn 1.2s var(--ease-fold) 1.6s forwards;
}
@keyframes drift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-40px, -30px); }
  50%  { transform: translate(20px, -60px); }
  75%  { transform: translate(-20px, -10px); }
  100% { transform: translate(0, 0); }
}
@keyframes driftIn {
  to { opacity: 0.85; }
}

/* ---- focus ring ------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--vermillion);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- responsive ------------------------------------------------- */
@media (max-width: 1023px) {
  .headline { max-width: 16ch; }
}
@media (max-width: 720px) {
  body { gap: clamp(32px, 6vh, 80px); }
  .top { flex-wrap: wrap; }
  .meta { width: 100%; justify-content: flex-start; }
  .notes { grid-template-columns: 1fr; gap: 32px; }
  .note { padding-top: 0; border-top: 1px solid var(--hairline); padding-top: 20px; }
  .foot { font-size: 10px; gap: 8px; }

  /* Allow natural wrapping on narrow viewports.
     The mask-reveal animation still plays per .line block, but lines
     can now wrap internally so nothing overflows the viewport. */
  .headline { font-size: clamp(34px, 9vw, 56px); line-height: 1.05; }
  .line { overflow: clip; padding-bottom: 0.08em; }
  .line > span { white-space: normal; }
}
@media (max-width: 460px) {
  .headline {
    font-size: clamp(30px, 8vw, 44px);
    letter-spacing: -0.025em;
  }
}

/* ---- reduced motion -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .top, .signature, .signup, .cursor, .mark-fold,
  .line > span { opacity: 1 !important; transform: none !important; }
  .drift { opacity: 0.85 !important; }
  body { cursor: auto; }
  .cursor { display: none; }
}
