@font-face {
  font-family: "Nebula Sans";
  src: url("./fonts/NebulaSans-Book.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nebula Sans";
  src: url("./fonts/NebulaSans-BookItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Nebula Sans";
  src: url("./fonts/NebulaSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nebula Sans";
  src: url("./fonts/NebulaSans-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nebula Sans";
  src: url("./fonts/NebulaSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0d12;
  --bg-2: #12151c;
  --ink: #edeae2;
  --ink-dim: #8b8f9b;
  --accent: #e3b341;
  --accent-dim: #7a5c22;
  --hairline: rgba(237, 234, 226, 0.1);

  /* form controls stay neutral — the gold is for ambient signal only */
  --field-line: rgba(237, 234, 226, 0.35);
  --btn-bg: #f2f0ec;
  --btn-bg-hover: #ffffff;
  --btn-ink: #0b0d12;

  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Nebula Sans", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- ambient field ---------- */

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.65;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(circle at 20% 20%, rgba(227, 179, 65, 0.05), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(227, 179, 65, 0.04), transparent 50%);
}

/* ---------- topbar ---------- */

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 4vw, 40px) clamp(20px, 5vw, 56px) 0;
}

.mark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.mark.small {
  font-size: 1.05rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(227, 179, 65, 0.6);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(227, 179, 65, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(227, 179, 65, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(227, 179, 65, 0);
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 clamp(20px, 5vw, 56px);
  max-width: 900px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(20px, 3vw, 32px);
}

.sub {
  font-size: clamp(0.85rem, 1.15vw, 0.95rem);
  line-height: 1.65;
  color: rgba(237, 234, 226, 0.52);
  max-width: 50ch;
  margin: 0 0 clamp(28px, 3.5vw, 40px);
}

.connect-wrapper {
  width: 100%;
  max-width: 480px;
}

.access {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.access input {
  flex: 1 1 240px;
  min-width: 0;
  height: 48px;
  background: rgba(237, 234, 226, 0.02);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 0 16px;
  font-family: var(--mono);
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom on focus */
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}

.access input::placeholder {
  color: var(--ink-dim);
}

.access input:focus,
.access input:focus-visible {
  outline: none;
  border-color: var(--field-line);
  background: rgba(237, 234, 226, 0.05);
}

.access button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border: none;
  border-radius: 3px;
  padding: 0 22px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
}

.access button:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

.access button:active {
  transform: translateY(0);
}

.btn-arrow {
  transition: transform 0.15s ease;
}

.access button:hover .btn-arrow {
  transform: translateX(3px);
}

.access-note {
  margin: 14px 2px 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  min-height: 1.2em;
}

.access-note.confirmed {
  color: var(--ink);
}

/* ---------- message field ---------- */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.note-textarea {
  width: 100%;
  min-height: 76px;
  background: rgba(237, 234, 226, 0.02);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom */
  line-height: 1.5;
  color: var(--ink);
  resize: vertical;
  -webkit-appearance: none;
  appearance: none;
}

.note-textarea:focus,
.note-textarea:focus-visible {
  outline: none;
  border-color: var(--field-line);
  background: rgba(237, 234, 226, 0.05);
}

.note-textarea::placeholder {
  color: var(--ink-dim);
  font-size: 0.8rem;
}

.final-confirmation {
  padding: 16px 2px;
  animation: fadeIn 0.25s ease-out;
}

.final-confirmation p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.scroll-cue {
  position: absolute;
  bottom: clamp(28px, 5vh, 48px);
  left: clamp(20px, 5vw, 56px);
  width: 1px;
  height: 44px;
  background: var(--hairline);
  overflow: hidden;
}

.scroll-cue span {
  position: absolute;
  top: -44px;
  left: 0;
  width: 1px;
  height: 44px;
  background: var(--accent);
  animation: fall 2.4s ease-in-out infinite;
}

@keyframes fall {
  0% {
    top: -44px;
  }
  100% {
    top: 44px;
  }
}

/* ---------- manifesto ---------- */

.manifesto {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(80px, 14vw, 160px) clamp(20px, 5vw, 56px) clamp(100px, 14vw, 160px);
}

.line {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 4vw, 32px);
  padding: clamp(20px, 3vw, 28px) 0;
  border-top: 1px solid var(--hairline);
}

.line:last-child {
  border-bottom: 1px solid var(--hairline);
}

.tag {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent-dim);
  padding-top: 0.3em;
}

.line p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  color: var(--ink);
}

/* ---------- footer ---------- */

.foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 40px) clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--hairline);
}

.foot-meta {
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

.sep {
  color: var(--accent-dim);
}

/* ---------- links ---------- */

a.mark,
.foot-link,
.back-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

a.mark:hover,
.back-link:hover {
  color: var(--accent);
}

/* footer link always matches the footer text, in every link state */
.foot-link,
.foot-link:link,
.foot-link:visited,
.foot-link:hover,
.foot-link:active {
  color: inherit;
}

.foot-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link {
  text-transform: none;
  letter-spacing: 0.1em;
}

/* ---------- contact page ---------- */

.contact-main {
  min-height: auto;
  padding-top: clamp(60px, 12vh, 120px);
  padding-bottom: clamp(60px, 12vh, 120px);
}

.contact-main h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.contact-main .connect-wrapper {
  max-width: 560px;
}

.contact-form {
  flex-direction: column;
  gap: 12px;
}

.contact-form input[type="email"] {
  flex: none;
  width: 100%;
}

.contact-form .note-textarea {
  min-height: 128px;
}

.contact-form button {
  align-self: flex-start;
}

@media (max-width: 560px) {
  .contact-form button {
    align-self: stretch;
  }
}

/* ---------- motion & small screens ---------- */

@media (prefers-reduced-motion: reduce) {
  .dot,
  .scroll-cue span {
    animation: none;
  }
}

@media (max-width: 560px) {
  .hero {
    align-items: stretch;
  }
  .access,
  .connect-wrapper {
    width: 100%;
    max-width: 100%;
  }
  .access {
    flex-direction: column;
  }
  .access input {
    flex: none;
    width: 100%;
    height: 48px;
  }
  .access button {
    flex: none;
    width: 100%;
    height: 48px;
    justify-content: center;
  }
  .scroll-cue {
    display: none;
  }
}
