/* ============================================================================
   ARK — signal page styles (static export)
   Layering: .space-bg (z0) · canvas (z1) · .vignette (z2) · .ark-overlay (z3)
   ========================================================================== */

:root {
  --bg-0: #03040a;
  --bg-1: #06070e;

  --text: #f4f6fb;
  --text-dim: #aeb6c6;
  --text-muted: #7e879c;
  --text-faint: #646d83;

  --accent: #8fb0ff;

  --line: rgba(255, 255, 255, 0.07);
  --line-soft: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);

  --font-sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Menlo", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: 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;
}

/* ── Space gradient (behind the transparent canvas) ───────────────────────── */
.space-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(
      120% 115% at 16% 100%,
      rgba(26, 46, 104, 0.5) 0%,
      rgba(11, 22, 54, 0.28) 28%,
      rgba(4, 7, 18, 0.92) 60%,
      var(--bg-0) 100%
    ),
    radial-gradient(80% 70% at 88% 4%, rgba(18, 26, 58, 0.32) 0%, rgba(3, 5, 12, 0) 55%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 72%);
}

.ark-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Vignette ─────────────────────────────────────────────────────────────── */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    132% 100% at 50% 42%,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.38) 84%,
    rgba(0, 0, 0, 0.66) 100%
  );
}

/* ── Overlay layout ───────────────────────────────────────────────────────── */
.ark-overlay {
  position: relative;
  z-index: 3;
  height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr minmax(380px, 432px);
  gap: clamp(28px, 4vw, 72px);
  align-items: stretch;
  padding: clamp(30px, 4.5vh, 56px) clamp(28px, 5vw, 76px);
  pointer-events: none;
}

.ark-overlay > * {
  pointer-events: auto;
}

.ark-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(4px, 1vh, 12px) 0;
}

/* ── Hero (top-left) ──────────────────────────────────────────────────────── */
.hero-wordmark {
  margin: 0;
  font-size: clamp(62px, 11vw, 150px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: #f7f9ff;
  text-shadow: 0 2px 40px rgba(120, 160, 255, 0.12);
}

.hero-tagline {
  margin: clamp(16px, 2.4vw, 26px) 0 0;
  font-size: clamp(17px, 1.7vw, 22px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-shadow: 0 1px 18px rgba(2, 4, 12, 0.6);
}

.hero-sub {
  margin: 12px 0 0;
  font-size: clamp(12.5px, 1vw, 14px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-shadow: 0 1px 14px rgba(2, 4, 12, 0.6);
}

/* ── Copy block (bottom-left) ─────────────────────────────────────────────── */
.hero-foot {
  max-width: 42ch;
}

.hero-foot-lead {
  margin: 0;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-dim);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero-foot-note {
  margin: 14px 0 0;
  font-size: clamp(12px, 0.95vw, 13.5px);
  line-height: 1.6;
  font-style: italic;
  font-weight: 300;
  color: var(--text-faint);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 20px rgba(0, 0, 0, 0.8);
}

/* ── Console (right card) ─────────────────────────────────────────────────── */
.console-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.console {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  padding: clamp(20px, 1.8vw, 26px) clamp(20px, 1.8vw, 28px) clamp(18px, 1.6vw, 22px);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(13, 15, 22, 0.72) 0%,
    rgba(8, 9, 15, 0.66) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 40px 90px -40px rgba(0, 0, 0, 0.9);
}

.console::-webkit-scrollbar {
  width: 6px;
}
.console::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
}

.console-title {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.svc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.svc-row:last-child {
  border-bottom: none;
}

.svc-row:hover {
  color: var(--text);
}

.svc-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.svc-row:hover .svc-icon {
  color: var(--accent);
}

.svc-label {
  font-size: clamp(12px, 1vw, 13.5px);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Access / form ────────────────────────────────────────────────────────── */
.access {
  margin-top: clamp(14px, 1.6vw, 20px);
  padding-top: clamp(14px, 1.5vw, 18px);
  border-top: 1px solid var(--line);
}

.access-label {
  margin: 0 0 11px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hp-field {
  display: none;
}

.access-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.access-form input,
.access-form select,
.access-form textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.access-form textarea {
  resize: vertical;
  min-height: 52px;
  line-height: 1.5;
}

.access-form input::placeholder,
.access-form textarea::placeholder {
  color: var(--text-faint);
}

/* Select needs an explicit color + custom caret (native caret is invisible on dark). */
.access-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--text-faint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%237e879c' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}

.access-select:valid {
  color: var(--text);
}

.access-form option {
  color: #f4f6fb;
  background: #0a0c12;
}

.access-form input:focus,
.access-form select:focus,
.access-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.5);
}

.access-form input:focus-visible,
.access-form select:focus-visible,
.access-form textarea:focus-visible {
  outline: 2px solid rgba(150, 180, 255, 0.7);
  outline-offset: 2px;
}

.access-form input:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 120, 120, 0.45);
}

.access-submit {
  width: 100%;
  margin-top: 2px;
  padding: 13px 16px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #07080d;
  background: linear-gradient(180deg, #ffffff 0%, #e7e9f0 100%);
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 30px -12px rgba(255, 255, 255, 0.25);
}

.access-submit span {
  margin-left: 6px;
}

.access-submit:hover {
  filter: brightness(1.04);
  box-shadow: 0 12px 34px -12px rgba(255, 255, 255, 0.4);
}

.access-submit:active {
  transform: translateY(1px);
}

.access-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.access-submit:focus-visible {
  outline: 2px solid rgba(150, 180, 255, 0.8);
  outline-offset: 3px;
}

.access-help {
  margin: 0;
  min-height: 0;
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: transparent;
}

.access-help--error {
  color: #ff9a9a;
}

.access-help--ok {
  color: #66d6a6;
}

.access-foot {
  margin: clamp(14px, 1.6vw, 20px) 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  font-style: italic;
  color: var(--text-faint);
}

/* ── Thank-you page ───────────────────────────────────────────────────────── */
.thanks-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.thanks {
  max-width: 560px;
  padding: 0 8px;
}

.thanks-eyebrow {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.thanks-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f7f9ff;
  text-shadow: 0 2px 40px rgba(120, 160, 255, 0.14);
}

.thanks-sub {
  margin: 18px auto 0;
  max-width: 40ch;
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-dim);
  text-shadow: 0 1px 18px rgba(2, 4, 12, 0.7);
}

.thanks-btn {
  display: inline-block;
  margin-top: 30px;
  padding: 13px 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.18s ease;
}

.thanks-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.thanks-btn:active {
  transform: translateY(1px);
}

.thanks-btn:focus-visible {
  outline: 2px solid rgba(150, 180, 255, 0.8);
  outline-offset: 3px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 940px) {
  body {
    overflow: auto;
  }
  .ark-overlay {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 44px 28px 40px;
    align-items: start;
    min-height: 100dvh;
  }
  .ark-left {
    gap: 30px;
    justify-content: flex-start;
  }
  .hero-foot {
    max-width: none;
  }
  .console-slot {
    justify-content: stretch;
    height: auto;
  }
  .console {
    max-height: none;
    overflow: visible;
    max-width: 520px;
  }
  .space-bg {
    background:
      radial-gradient(120% 78% at 28% 100%,
        rgba(26, 46, 104, 0.45) 0%,
        rgba(11, 22, 54, 0.26) 32%,
        rgba(4, 7, 18, 0.92) 64%,
        var(--bg-0) 100%),
      linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 72%);
  }
}

@media (max-width: 520px) {
  .ark-overlay {
    padding: 34px 20px 30px;
  }
  .console {
    max-width: none;
    padding: 22px 18px 20px;
  }
  .svc-label {
    letter-spacing: 0.1em;
  }
}

/* Short viewports: let the page scroll rather than trap content. */
@media (max-height: 760px) and (min-width: 941px) {
  body {
    overflow: auto;
  }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
