/* Emberwake portal — desktop-first sizing matched to mock proportions */
:root {
  --bg0: #05070d;
  --text: #eef3fb;
  --muted: #a8b6c9;
  --muted-2: #8b9bb0;
  --gold: #d4b15a;
  --gold-2: #efd089;
  --ice: #9ec4ea;
  --card: rgba(9, 14, 24, 0.82);
  --input: rgba(5, 9, 16, 0.88);
  --line: rgba(170, 190, 220, 0.14);
  --gold-line: rgba(212, 177, 90, 0.28);
  --ok-bg: rgba(34, 84, 58, 0.38);
  --ok-bd: rgba(120, 200, 150, 0.35);
  --ok-tx: #d7f5e4;
  --bad-bg: rgba(92, 34, 42, 0.42);
  --bad-bd: rgba(230, 130, 130, 0.35);
  --bad-tx: #ffd6d6;
  --info-bg: rgba(24, 52, 88, 0.55);
  --info-bd: rgba(110, 160, 220, 0.4);
  --info-tx: #dcebff;
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --shell: 1080px;
  --card-w: 420px;
  --left-w: 520px;
  --gap: 48px;
  --field-h: 44px;
  --radius: 16px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg0);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ice); text-decoration: none; }
a:hover { color: #d7ecff; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--gold-2);
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(212,177,90,.3);
  border-radius: 6px;
  padding: 2px 7px;
}

/* Background */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #05070d;
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.18) 42%, rgba(0,0,0,.35) 100%),
    linear-gradient(180deg, rgba(5,7,13,.25) 0%, rgba(5,7,13,.08) 45%, rgba(5,7,13,.7) 100%),
    image-set(
      url("highlands.webp") type("image/webp"),
      url("highlands.jpg") type("image/jpeg")
    );
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 40%, transparent 0%, rgba(0,0,0,.45) 100%);
}
.haze, .fog { display: none !important; }

/* Page shell — fixed composition, not stretchy chaos */
.shell {
  position: relative;
  z-index: 1;
  width: min(var(--shell), calc(100% - 48px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}
.layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--card-w);
  gap: var(--gap);
  align-items: center;
}

/* ===== LEFT ===== */
.realm {
  width: 100%;
  max-width: var(--left-w);
  padding-right: 8px;
}
.crest {
  width: 56px;
  height: 56px;
  margin: 0 0 14px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.5));
}
.crest svg { width: 56px; height: 56px; display: block; }

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.realm h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.05;
  font-weight: 700;
  color: #f6f1e4;
  letter-spacing: 0;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
}
.lede {
  margin: 0 0 16px;
  max-width: 460px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  max-width: 480px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(160,180,210,.16);
  background: rgba(6,10,18,.55);
  color: #d4deee;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.chip svg {
  width: 14px;
  height: 14px;
  color: var(--gold-2);
  flex: 0 0 auto;
}

.section-title {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 460px;
}
.steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}
.steps .n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212,177,90,.5);
  background: rgba(212,177,90,.08);
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
}
.steps strong { color: #e8eef8; font-weight: 650; }

.download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(170,195,230,.26);
  background: linear-gradient(180deg, rgba(28,40,60,.95), rgba(10,16,26,.98));
  color: var(--text);
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
  max-width: 360px;
  width: 100%;
}
.download.secondary {
  border-color: rgba(212,177,90,.28);
  background: linear-gradient(180deg, rgba(36,32,22,.92), rgba(14,16,22,.96));
}
.download:hover {
  border-color: rgba(212,177,90,.45);
  color: #fff;
}
code.path {
  display: inline-block;
  margin: 4px 0;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.35;
}
.steps a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 2px; }
.steps a:hover { color: #fff2c8; }
.download:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.download .ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(223,192,122,.4);
  background: rgba(212,177,90,.12);
  color: var(--gold-2);
  flex: 0 0 auto;
}
.download .ico svg { width: 18px; height: 18px; display: block; }
.download .txt { min-width: 0; }
.download .txt strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}
.download .txt small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #9aabbf;
}
.trust {
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #8799af;
}
.trust svg { width: 13px; height: 13px; flex: 0 0 auto; }

/* ===== RIGHT CARD ===== */
.card {
  width: var(--card-w);
  max-width: 100%;
  background: var(--card);
  border: 1px solid rgba(212,177,90,.2);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.card-top {
  padding: 4px 6px 0;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent);
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0 10px;
}
.tab {
  display: block;
  text-align: center;
  padding: 14px 8px 12px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--gold-2);
  border-bottom-color: var(--gold);
}
.tab:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 2px;
  border-radius: 8px 8px 0 0;
}
.card-body {
  padding: 16px 20px 18px;
}

.note {
  margin: 0 0 14px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--info-bg);
  border: 1px solid var(--info-bd);
  color: var(--info-tx);
  font-size: 13px;
  line-height: 1.4;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.note .ni {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(170,205,245,.75);
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
}
.note strong { color: #f2f7ff; font-weight: 650; }

.banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.35;
}
.banner.bad { background: var(--bad-bg); border: 1px solid var(--bad-bd); color: var(--bad-tx); }
.banner.good { background: var(--ok-bg); border: 1px solid var(--ok-bd); color: var(--ok-tx); }
.banner.info { background: var(--info-bg); border: 1px solid var(--info-bd); color: var(--info-tx); }

.form {
  display: grid;
  gap: 12px;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field > .label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9aabbf;
  font-weight: 750;
  line-height: 1.2;
}
.field .hint {
  font-size: 12px;
  color: #8799af;
  line-height: 1.3;
}
.field .label .opt {
  margin-left: 5px;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: #7f91a8;
  font-weight: 600;
}

.control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.control .fi {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a9bb0;
  pointer-events: none;
  z-index: 1;
}
.control .fi svg { width: 16px; height: 16px; display: block; }

.field input,
.control input {
  width: 100%;
  height: var(--field-h);
  min-height: var(--field-h);
  max-width: 100%;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: var(--field-h);
}
.control.has-icon input {
  padding-left: 38px;
}
.control.has-pw input {
  padding-right: 56px;
}
.field input::placeholder { color: #6f7f95; }
.field input:hover { border-color: rgba(180,198,230,.28); }
.field input:focus {
  outline: none;
  border-color: rgba(212,177,90,.55);
  box-shadow: 0 0 0 3px rgba(212,177,90,.12);
}
.field input:disabled { opacity: .65; cursor: not-allowed; }

.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  min-width: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #93a4ba;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  z-index: 2;
}
.pw-toggle:hover { color: #fff; background: rgba(255,255,255,.05); }
.pw-toggle:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 1px; }

/* Stack password fields — mock-clean, no crushed side-by-side */
.row2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.captcha-box {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.captcha-eq {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--field-h);
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212,177,90,.3);
  background: linear-gradient(180deg, rgba(34,42,58,.95), rgba(14,20,32,.98));
  color: #f0e2b4;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.captcha-box input {
  height: var(--field-h);
  min-width: 0;
}

.cta {
  width: 100%;
  height: 48px;
  margin-top: 2px;
  border: 1px solid rgba(212,177,90,.55);
  border-radius: 12px;
  background: linear-gradient(180deg, #e7cb84 0%, #d0ae5d 48%, #a88436 100%);
  color: #1a1408;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 22px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.28);
}
.cta svg { width: 16px; height: 16px; flex: 0 0 auto; }
.cta:hover { filter: brightness(1.04); }
.cta:active { transform: translateY(1px); }
.cta:focus-visible { outline: 2px solid #fff2c8; outline-offset: 3px; }
.cta:disabled,
.cta.is-loading {
  opacity: .72;
  cursor: wait;
  filter: none;
}

.foot-links {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
}
.foot-links a { color: #9ec4ea; }
.foot-links a:hover { color: #d4e7ff; }
.secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #7a8ca3;
}
.secure svg { width: 12px; height: 12px; }

.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Mid desktop */
@media (max-width: 1100px) {
  :root {
    --shell: 980px;
    --card-w: 400px;
    --left-w: 480px;
    --gap: 36px;
  }
  .realm h1 { font-size: 40px; }
}
@media (max-width: 920px) {
  :root {
    --shell: 720px;
    --card-w: 100%;
    --gap: 28px;
  }
  .shell {
    align-items: flex-start;
    padding: 28px 0 36px;
    min-height: auto;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .realm {
    max-width: none;
    padding-right: 0;
  }
  .card { width: 100%; }
  .download { max-width: 100%; }
  .realm h1 { font-size: 36px; }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 24px); padding: 20px 0 28px; }
  .realm h1 { font-size: 32px; }
  .card-body { padding: 14px 14px 16px; }
  .captcha-box { grid-template-columns: 1fr; }
  .captcha-eq { width: 100%; }
  .tabs .tab { font-size: 11px; letter-spacing: 0.05em; padding: 12px 4px 11px; }
  .crest, .crest svg { width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
