:root {
  color-scheme: light;
  --ink: #231f20;
  --ink-soft: #403a3b;
  --paper: #f5f3ee;
  --surface: #ffffff;
  --line: #ddd9d1;
  --muted: #74706d;
  --yellow: #ffc000;
  --yellow-pale: #fff3c7;
  --yellow-contrast: #231f20;
  --green: #2f846c;
  --green-pale: #e3f3ed;
  --shadow: 0 32px 90px rgba(35, 31, 32, 0.16);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.gateway-shell {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(430px, 1.08fr) minmax(540px, 0.92fr);
  margin: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  color: #fff;
  border-radius: 0;
  background:
    radial-gradient(circle at 62% 15%, rgba(255, 192, 0, 0.16), transparent 25%),
    linear-gradient(145deg, #171415 0%, #2d2829 67%, #191617 100%);
  box-shadow: none;
}

@media (min-width: 821px) {
  body { overflow: hidden; }
  .gateway-shell {
    width: 100%;
    height: 111.111111vh;
    height: 111.111111dvh;
    min-height: 111.111111dvh;
    zoom: .9;
  }
}

.gateway-shell::before,
.gateway-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.gateway-shell::before {
  z-index: 0;
  width: min(74vw, 1180px);
  aspect-ratio: 1;
  left: 24%;
  top: 14%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 84px rgba(255, 255, 255, 0.024), 0 0 0 168px rgba(255, 192, 0, 0.03);
}

.gateway-shell::after {
  z-index: 0;
  width: 70px;
  height: 290px;
  left: 48%;
  bottom: -100px;
  transform: skewX(-24deg);
  background: var(--yellow);
  opacity: .92;
}

.brand-stage {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 68px);
  color: #fff;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-stage::before,
.brand-stage::after {
  display: none;
}

.brand-stage::before {
  width: clamp(360px, 45vw, 720px);
  aspect-ratio: 1;
  right: -24%;
  top: 24%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.026), 0 0 0 140px rgba(255, 192, 0, 0.035);
}

.brand-stage::after {
  width: 76px;
  height: 280px;
  right: clamp(30px, 7vw, 120px);
  bottom: -86px;
  transform: skewX(-24deg);
  background: var(--yellow);
  opacity: 0.92;
}

.brand-head,
.brand-copy,
.production-rail,
.brand-foot { position: relative; z-index: 1; }

.brand-head,
.brand-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  width: 174px;
  border-radius: 8px;
  overflow: hidden;
}

.brand-mark img { display: block; width: 100%; height: auto; }

.workspace-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pulse {
  position: relative;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #53c29b;
  box-shadow: 0 0 0 5px rgba(83, 194, 155, 0.12);
}

.status-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(83, 194, 155, 0.45);
  border-radius: inherit;
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse { 0% { transform: scale(.65); opacity: .8; } 75%, 100% { transform: scale(1.5); opacity: 0; } }

.brand-copy { max-width: 730px; padding: 64px 0 40px; }
.eyebrow { margin: 0 0 18px; color: var(--yellow); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.18em; }
.brand-copy h1 { margin: 0; max-width: 12ch; font-size: clamp(3rem, 5.5vw, 6.75rem); line-height: 0.94; letter-spacing: -0.065em; }
.brand-copy h1 span { color: var(--yellow); }
.brand-summary { max-width: 570px; margin: 28px 0 0; color: rgba(255, 255, 255, 0.68); font-size: clamp(1rem, 1.35vw, 1.25rem); line-height: 1.65; }

.production-rail { max-width: 720px; margin-bottom: clamp(52px, 8vh, 96px); }
.rail-line { position: absolute; top: 15px; left: 18px; right: 18px; height: 2px; background: rgba(255, 255, 255, 0.16); }
.rail-line span { display: block; width: 72%; height: 100%; background: linear-gradient(90deg, var(--yellow), #fff0b5); }
.production-rail ol { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.production-rail li { display: grid; gap: 12px; color: rgba(255, 255, 255, 0.58); font-size: 0.8rem; }
.production-rail li span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); background: #2b2728; color: #fff; font-size: 0.68rem; font-weight: 800; }
.production-rail li:nth-child(-n+3) span { border-color: var(--yellow); color: var(--yellow-contrast); background: var(--yellow); }
.production-rail li strong { color: rgba(255, 255, 255, 0.8); font-size: 0.82rem; }

.brand-foot { padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.44); font-size: 0.75rem; }

.access-stage {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(22px, 2.5vw, 42px);
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .1);
  border-radius: 0;
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
}

.mobile-brand { display: none; }

.access-card { width: min(100%, 500px); margin:auto 0; text-align:center; }
.access-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: #ffd45a; font-size: 0.7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.access-card[data-mode]:not([data-mode="welcome"]) .access-kicker { margin-bottom: -14px; }
.access-card[data-mode]:not([data-mode="welcome"])::after { content: ""; display: block; height: 32px; }
.access-kicker > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--yellow); color: var(--yellow-contrast); font-size: 1rem; }
.access-panel { animation: panel-in .28s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.access-heading p { margin: 0 0 5px; color: rgba(255,255,255,.52); font-size: .78rem; font-weight: 700; }
.access-heading h2 { margin: 0; color: #fff; font-size: clamp(2rem, 2.6vw, 2.5rem); line-height: 1.03; letter-spacing: -0.045em; }
.access-heading h2:focus { outline: 0; }
.access-heading > span { display: block; max-width: 460px; margin:9px auto 0; color: rgba(255,255,255,.52); font-size: .86rem; line-height: 1.45; }

.entry-panel .access-heading h2 { font-size: clamp(2.6rem, 4vw, 3.65rem); }
.entry-panel .access-heading > span { max-width: 390px; }
.entry-actions { width:min(58%,340px); min-width:300px; display: grid; gap: 11px; margin:30px auto 0; }
.secondary-access { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 17px; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(255,255,255,.055); color: #fff; cursor: pointer; font-size: .82rem; font-weight: 850; box-shadow: 0 8px 20px rgba(0,0,0,.1); transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.secondary-access:hover { transform: translateY(-2px); border-color: rgba(255,192,0,.58); background: rgba(255,192,0,.08); }
.entry-panel .access-footnote { margin-top: 26px; }

.invitation-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  margin: 17px 0 15px;
  padding: 11px 12px;
  border: 1px solid #ead490;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff9e8, var(--yellow-pale));
}
.invitation-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--yellow); font-weight: 900; }
.invitation-note strong { display: block; font-size: 0.78rem; }
.invitation-note p { margin: 2px 0 0; color: #705d25; font-size: 0.7rem; line-height: 1.3; }
.invitation-note button { min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; font-size: 0.72rem; font-weight: 800; box-shadow: 0 2px 10px rgba(35,31,32,.08); }

.access-form { width:min(58%,340px); min-width:300px; display: grid; gap: 12px; margin:16px auto 0; text-align:left; }
.access-form label { display: grid; gap: 6px; color: rgba(255,255,255,.78); font-size: 0.76rem; font-weight: 800; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.text-action, .back-action { border: 0; padding: 0; background: transparent; color: #ffd45a; cursor: pointer; font-size: 0.72rem; font-weight: 800; }
.back-action { min-height: 44px; display:block; margin:0 auto 12px; }
.field-control { min-height: 48px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid rgba(255,255,255,.15); border-radius: 13px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.42); box-shadow: 0 8px 22px rgba(0,0,0,.14); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.field-control:focus-within { border-color: rgba(255,192,0,.72); background: rgba(255,255,255,.09); box-shadow: 0 0 0 4px rgba(255,192,0,.12); }
.field-control input { min-width: 0; width: 100%; height: 44px; border: 0; outline: 0; background: transparent; color: #fff; font-size: .88rem; }
.field-control input::placeholder { color: rgba(255,255,255,.34); }
.reveal-password { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: #ffd45a; cursor: pointer; font-size: 0.75rem; font-weight: 800; }
.remember-choice { display: flex !important; grid-template-columns: none; align-items: center; gap: 9px !important; color: rgba(255,255,255,.52) !important; font-size: 0.72rem !important; font-weight: 600 !important; }
.remember-choice input { width: 19px; height: 19px; margin: 0; accent-color: var(--yellow); }
.primary-access { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 17px; border: 0; border-radius: 13px; background: var(--yellow); color: var(--yellow-contrast); cursor: pointer; font-size: .86rem; font-weight: 900; box-shadow: 0 13px 26px rgba(201, 151, 0, .18); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-access:hover { transform: translateY(-2px); background: #ffca23; box-shadow: 0 20px 36px rgba(201,151,0,.25); }
.primary-access:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(47,132,108,.5); outline-offset: 3px; }

.access-footnote { display: flex; justify-content:center; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.11); color: rgba(255,255,255,.48); font-size: .7rem; line-height: 1.4; text-align:center; }
.access-footnote > span { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; color: #58bd99; font-size: 1.1rem; line-height: 1; }
.access-footnote p { margin: 0; }
.access-footnote strong { color: rgba(255,255,255,.84); }

.prototype-message { grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin-top: 24px; padding: 16px; border: 1px solid #b9dccf; border-radius: 16px; background: var(--green-pale); color: #225f4d; }
.prototype-message[hidden] { display: none; }
.prototype-message > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-weight: 900; }
.prototype-message strong { font-size: .88rem; }
.prototype-message p { margin: 3px 0 0; font-size: .78rem; line-height: 1.45; }
.prototype-message a { grid-column: 2; color: #184d3e; font-size: .78rem; font-weight: 900; }
.prototype-message.is-error { border-color: rgba(181,77,62,.42); background: #fff0ec; color: #8e3428; }
.prototype-message.is-error > span { background: #b54d3e; }
.prototype-message.is-info { border-color: rgba(255,192,0,.52); background: rgba(255,243,199,.96); color: #6d5100; }
.prototype-message.is-info > span { background: var(--yellow); color: var(--ink); }
.primary-access:disabled, .secondary-access:disabled { cursor: wait; opacity: .7; transform: none; }

.access-footer { width: min(100%, 500px); flex:0 0 auto; display: flex; justify-content: space-between; gap: 20px; margin-top:0; color: rgba(255,255,255,.36); font-size: .7rem; }
.access-footer a { color: rgba(255,255,255,.64); text-decoration: none; font-weight: 700; }

@media (min-width: 821px) and (min-height: 760px) {
  .access-stage { justify-content: center; }
  .access-card { position: absolute; top: 50%; left: 50%; margin: 0; transform: translate(-50%, -50%); }
  .access-footer { position: absolute; right: clamp(22px, 2.5vw, 42px); bottom: clamp(22px, 2.5vw, 42px); left: clamp(22px, 2.5vw, 42px); width: auto; }
}

@media (max-width: 1040px) {
  .gateway-shell { grid-template-columns: minmax(340px, .8fr) minmax(480px, 1.2fr); }
  .brand-copy h1 { font-size: clamp(3rem, 6.4vw, 5rem); }
  .production-rail ol { gap: 8px; }
}

@media (min-width: 821px) and (max-height: 900px) {
  .brand-stage {
    padding-block: clamp(26px, 3.8vh, 42px);
  }

  .brand-mark { width: 150px; }
  .workspace-status { font-size: .7rem; }
  .brand-copy { padding: clamp(18px, 3.2vh, 30px) 0 clamp(14px, 2.4vh, 24px); }
  .eyebrow { margin-bottom: 12px; font-size: .7rem; }
  .brand-copy h1 { font-size: clamp(3rem, 8.2vh, 5.5rem); }
  .brand-summary { margin-top: 16px; font-size: .95rem; line-height: 1.48; }
  .production-rail { margin-bottom: clamp(16px, 2.8vh, 26px); }
  .production-rail li { gap: 8px; }
  .brand-foot { padding-top: 13px; font-size: .68rem; }
}

@media (max-width: 820px) {
  .gateway-shell { display: block; width: 100%; height: auto; min-height: 100vh; min-height: 100dvh; margin: 0; padding: 0; border-radius: 0; }
  .brand-stage { display: none; height: auto; }
  .access-stage { height: auto; min-height: 100vh; min-height: 100dvh; border: 0; border-radius: 0; padding: 24px; justify-content: space-between; }
  .mobile-brand { width: min(100%, 540px); display: flex; align-items: center; justify-content: space-between; margin-bottom: 48px; }
  .mobile-brand img { width: 145px; }
  .access-card { margin: auto 0; }
  .access-footer { margin-top:0; padding-bottom:8px; }
}

@media (max-width: 520px) {
  .access-stage { padding: 20px; }
  .entry-actions,.access-form { width:100%; min-width:0; }
  .access-heading h2 { font-size: 2.35rem; }
  .entry-panel .access-heading h2 { font-size: 2.65rem; }
  .invitation-note { grid-template-columns: auto 1fr; }
  .invitation-note button { grid-column: 1 / -1; width: 100%; }
  .access-footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
