:root {
  color-scheme: light;
}

html {
  background: var(--bg-soft);
}

body.access-page {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(26, 86, 255, 0.1), transparent 28rem),
    radial-gradient(circle at 92% 84%, rgba(91, 75, 224, 0.08), transparent 30rem),
    var(--bg-soft);
  color: var(--body);
  font-feature-settings: "kern" 1, "liga" 1;
}

body.access-page::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(12, 20, 36, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 20, 36, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 150ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.access-header,
.access-shell,
.access-footer {
  position: relative;
  z-index: 1;
}

.access-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--container), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.15rem 0;
}

.access-header .brand {
  text-decoration: none;
}

.access-header-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.access-header-note > span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(15, 157, 99, 0.13);
}

.access-shell {
  display: grid;
  width: min(var(--container), calc(100% - 2.5rem));
  flex: 1;
  place-items: center;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.25rem) 0 clamp(2rem, 5vw, 4rem);
}

.access-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  grid-template-areas: "context form";
  width: 100%;
  min-height: 37.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 4px);
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: access-reveal 420ms var(--ease) both;
}

.access-panel {
  grid-area: form;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 4.5rem);
  background: #fff;
}

.access-panel-inner {
  width: min(100%, 26rem);
}

.access-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  margin-bottom: 1.35rem;
  border: 1px solid #dce5ff;
  border-radius: 13px;
  background: var(--brand-tint);
  color: var(--brand);
}

.access-mark svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.access-panel h1 {
  max-width: 13ch;
  margin-top: 0.8rem;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.access-intro {
  max-width: 42ch;
  margin-top: 1rem;
  color: var(--body);
  font-size: 0.98rem;
  line-height: 1.55;
}

.access-form {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.access-form label {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 650;
}

.access-form input {
  width: 100%;
  min-width: 0;
  min-height: 3.25rem;
  border: 1px solid #d4dae5;
  border-radius: var(--radius-sm);
  outline: none;
  padding: 0.85rem 0.95rem;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-size: 1rem;
  line-height: 1.2;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease), background 150ms var(--ease);
}

.access-form input::placeholder {
  color: #7b8598;
  opacity: 1;
}

.access-form input:hover {
  border-color: #b7c1d1;
}

.access-form input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(26, 86, 255, 0.12);
}

.access-submit {
  width: 100%;
  min-height: 3.25rem;
  margin-top: 0.15rem;
  padding: 0.9rem 1.1rem;
  touch-action: manipulation;
}

.access-submit span {
  font-size: 1.05rem;
  transition: transform 150ms var(--ease);
}

.access-submit:hover span {
  transform: translateX(2px);
}

.status-text {
  min-height: 1.35rem;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.status-text.error {
  border: 1px solid #f4c7ca;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: #b4232b;
  background: #fff1f1;
}

.access-boundary {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.15rem;
}

.boundary-check {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  flex: none;
  place-items: center;
  margin-top: 0.08rem;
  border-radius: 50%;
  color: var(--emerald);
  background: var(--emerald-tint);
  font-size: 0.72rem;
  font-weight: 800;
}

.access-boundary p {
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.5;
}

.access-boundary strong {
  color: var(--text);
}

.back-link {
  display: inline-block;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-color: #c4cad5;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms var(--ease), text-decoration-color 150ms var(--ease);
}

.back-link:hover {
  color: var(--brand);
  text-decoration-color: currentColor;
}

.access-context {
  position: relative;
  isolation: isolate;
  grid-area: context;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  overflow: hidden;
  padding: clamp(2.4rem, 5vw, 4.5rem);
  color: #cdd6e6;
  background:
    radial-gradient(circle at 12% 8%, rgba(42, 99, 255, 0.33), transparent 25rem),
    radial-gradient(circle at 88% 92%, rgba(91, 75, 224, 0.24), transparent 24rem),
    var(--ink);
}

.access-context::before,
.access-context::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
}

.access-context::before {
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 20% 20%, #000, transparent 74%);
}

.access-context::after {
  right: -8rem;
  bottom: -9rem;
  width: 23rem;
  height: 23rem;
  border: 1px solid rgba(143, 176, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 3.8rem rgba(143, 176, 255, 0.035), 0 0 0 7.6rem rgba(143, 176, 255, 0.025);
}

.context-copy,
.posture-card {
  position: relative;
  z-index: 1;
}

.access-context .eyebrow-dot {
  background: #54d494;
  box-shadow: 0 0 0 4px rgba(84, 212, 148, 0.15);
}

.access-context h2 {
  max-width: 12ch;
  margin-top: 1.1rem;
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.context-lede {
  max-width: 48ch;
  margin-top: 1.25rem;
  color: #b7c2d5;
  font-size: 1rem;
  line-height: 1.55;
}

.trust-list {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: start;
  gap: 0.8rem;
}

.trust-list li > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(143, 176, 255, 0.24);
  border-radius: 8px;
  color: #9bb8ff;
  background: #101b34;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums lining-nums;
}

.trust-list p {
  color: #aeb9cc;
  font-size: 0.88rem;
  line-height: 1.5;
}

.trust-list strong {
  color: #f3f6fc;
  font-weight: 700;
}

.posture-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(143, 176, 255, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: #111d36;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

.posture-card > div {
  display: grid;
  gap: 0.18rem;
}

.posture-label {
  color: #91a0ba;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.posture-card strong {
  color: #fff;
  font-size: 0.9rem;
}

.posture-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(84, 212, 148, 0.24);
  border-radius: 999px;
  padding: 0.38rem 0.65rem;
  color: #75e1ab;
  background: rgba(15, 157, 99, 0.11);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.posture-pill > span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(84, 212, 148, 0.12);
}

.access-footer {
  width: min(52rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0 0 1.6rem;
  text-align: center;
}

.access-footer p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.access-page a:focus-visible,
.access-page button:focus-visible,
.access-page input:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.access-context :focus-visible {
  outline-color: #8fb0ff;
}

@keyframes access-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .access-frame {
    grid-template-columns: 1fr;
    grid-template-areas:
      "form"
      "context";
    max-width: 42rem;
  }

  .access-panel,
  .access-context {
    padding: clamp(2rem, 8vw, 4rem);
  }

  .access-context h2 {
    max-width: 16ch;
  }
}

@media (max-width: 560px) {
  .access-header,
  .access-shell,
  .access-footer {
    width: min(100% - 1.5rem, var(--container));
  }

  .access-header {
    padding: 0.9rem 0;
  }

  .access-header-note {
    display: none;
  }

  .access-shell {
    place-items: start center;
    padding: 0.35rem 0 1.5rem;
  }

  .access-frame {
    min-height: 0;
    border-radius: 18px;
  }

  .access-panel,
  .access-context {
    padding: 1.7rem 1.25rem;
  }

  .access-panel h1 {
    max-width: 15ch;
  }

  .access-context {
    gap: 2rem;
  }

  .access-context h2 {
    font-size: clamp(2rem, 10vw, 2.65rem);
  }

  .posture-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .access-footer {
    padding-bottom: 1.25rem;
  }
}

@media (prefers-contrast: more) {
  .access-frame,
  .access-form input,
  .access-boundary,
  .posture-card {
    border-color: currentColor;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .access-mark,
  .boundary-check,
  .posture-pill,
  .trust-list li > span {
    border: 1px solid currentColor;
  }
}
