:root {
  --ink: #082425;
  --ink-soft: #31514d;
  --forest: #285f4c;
  --moss: #5f7d64;
  --paper: #f4f7f3;
  --white: #fff;
  --gold: #c8a36a;
  --line: rgba(200, 163, 106, .42);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--paper); }
a { color: inherit; }
button, input { font: inherit; }
.portal-shell { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
.portal-header { position: absolute; z-index: 5; inset: 0 0 auto; min-height: 104px; padding: 16px clamp(24px, 5vw, 70px); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--white); }
.portal-brand { display: flex; align-items: center; gap: 18px; color: var(--white); text-decoration: none; }
.portal-brand img { width: 88px; height: 78px; object-fit: contain; }
.portal-brand span { font-family: var(--serif); font-size: 20px; }
.portal-header nav { display: flex; align-items: center; gap: 16px; }
.portal-header nav > span { color: rgba(255,255,255,.7); font-size: 13px; }
.portal-button { min-height: 46px; padding: 13px 19px; display: inline-flex; align-items: center; justify-content: center; color: var(--white); background: var(--forest); border: 1px solid var(--forest); border-radius: 5px; font-weight: 750; text-decoration: none; cursor: pointer; }
.portal-button--outline { color: var(--white); background: transparent; border-color: rgba(255,255,255,.55); }
.portal-button--quiet { min-height: 40px; padding: 9px 14px; color: var(--white); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }
.portal-hero { position: relative; min-height: 680px; display: grid; align-items: end; color: var(--white); background: linear-gradient(118deg, rgba(5,32,32,.98), rgba(12,54,50,.91) 58%, rgba(54,78,64,.82)), url("../img/aleana-neural.jpg") center / cover; overflow: hidden; }
.portal-hero::after { position: absolute; inset: 0; content: ""; background: radial-gradient(circle at 77% 34%, rgba(200,163,106,.22), transparent 24%); pointer-events: none; }
.portal-orbit { position: absolute; z-index: 1; top: 18%; right: 7%; width: min(42vw, 520px); aspect-ratio: 1; border: 1px solid rgba(200,163,106,.3); border-radius: 50%; }
.portal-orbit::before, .portal-orbit::after { position: absolute; content: ""; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.portal-orbit::before { inset: 16%; }
.portal-orbit::after { inset: 34%; background: rgba(200,163,106,.08); }
.portal-hero-content { position: relative; z-index: 2; padding-bottom: 92px; }
.portal-kicker { margin: 0 0 16px; color: var(--gold); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.portal-hero h1 { max-width: 820px; margin: 0 0 22px; font-family: var(--serif); font-size: clamp(42px, 6.5vw, 82px); font-weight: 400; line-height: 1.02; }
.portal-hero-content > p:not(.portal-kicker) { max-width: 680px; margin: 0 0 30px; color: rgba(255,255,255,.76); font-size: 18px; line-height: 1.7; }
.portal-actions { display: flex; gap: 12px; }
.portal-coming-soon { display: inline-flex; padding: 10px 13px; color: var(--gold); border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.portal-public { padding: clamp(76px, 9vw, 126px) 0; }
.portal-public-grid { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(0, 1fr); gap: clamp(38px, 8vw, 110px); }
.portal-public h2, .portal-section-heading h2, .portal-locked h2 { margin: 0; font-family: var(--serif); font-size: clamp(34px, 4.6vw, 58px); font-weight: 400; line-height: 1.08; }
.portal-public-copy { padding-top: 25px; border-top: 1px solid var(--line); }
.portal-public-copy p { margin: 0 0 20px; color: var(--ink-soft); line-height: 1.76; }
.portal-members { padding: clamp(76px, 9vw, 124px) 0; color: var(--white); background: var(--ink); }
.portal-section-heading { max-width: 760px; }
.portal-section-heading > p:last-child { color: rgba(255,255,255,.7); line-height: 1.7; }
.portal-library { margin-top: 54px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.portal-library article { min-height: 300px; padding: 30px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.portal-library article:last-child { border-right: 0; }
.portal-library span { color: var(--gold); font-family: var(--serif); font-size: 24px; }
.portal-library h3 { margin: 50px 0 14px; font-family: var(--serif); font-size: 27px; font-weight: 400; }
.portal-library p { color: rgba(255,255,255,.66); line-height: 1.62; }
.portal-library a { margin-top: auto; color: var(--gold); font-weight: 750; }
.portal-locked { padding: clamp(66px, 8vw, 104px) 0; color: var(--white); background: var(--ink); }
.portal-locked-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 50px; align-items: end; }
.portal-locked-inner > div { max-width: 760px; }
.portal-locked p:last-child { color: rgba(255,255,255,.7); line-height: 1.7; }
.portal-footer { padding: 32px 0; color: rgba(255,255,255,.7); background: #051c1d; }
.portal-footer .portal-shell { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.portal-footer img { width: 70px; height: 62px; object-fit: contain; }
.portal-footer p { margin: 0; }
.portal-footer nav { display: flex; gap: 18px; font-size: 13px; }

.portal-account-page { color: var(--ink); background: var(--ink); }
.portal-account-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr); }
.portal-account-brand { min-height: 100vh; padding: clamp(36px, 6vw, 86px); display: flex; flex-direction: column; justify-content: space-between; color: var(--white); background: linear-gradient(rgba(5,36,37,.72), rgba(5,36,37,.94)), url("../img/aleana-neural.jpg") center / cover; }
.portal-account-brand img { width: 102px; height: 90px; object-fit: contain; }
.portal-account-brand > div { max-width: 650px; }
.portal-account-brand h1 { margin: 0 0 20px; font-family: var(--serif); font-size: clamp(44px, 6vw, 76px); font-weight: 400; line-height: 1.02; }
.portal-account-brand > div > p:last-child { max-width: 540px; color: rgba(255,255,255,.7); font-size: 17px; line-height: 1.65; }
.portal-account-panel { padding: clamp(34px, 7vw, 86px); display: grid; place-items: center; background: var(--paper); }
.portal-account-form { width: min(100%, 480px); }
.portal-back { display: inline-block; margin-bottom: 56px; color: var(--ink-soft); font-size: 13px; text-decoration: none; }
.portal-account-form h2 { margin: 0 0 28px; font-family: var(--serif); font-size: 48px; font-weight: 400; }
.portal-account-form form { display: grid; gap: 18px; }
.portal-account-form label { display: grid; gap: 8px; font-size: 13px; font-weight: 750; }
.portal-account-form input { width: 100%; min-height: 48px; padding: 12px 13px; color: var(--ink); background: var(--white); border: 1px solid #ccd8d1; border-radius: 4px; outline: none; }
.portal-account-form input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(40,95,76,.12); }
.portal-account-form label small { color: var(--ink-soft); font-size: 11px; font-weight: 400; line-height: 1.45; }
.portal-account-links { margin-top: 24px; padding-top: 20px; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); }
.portal-account-links a { color: var(--forest); font-size: 13px; font-weight: 750; }
.portal-message { margin: 0 0 22px; padding: 14px; border-left: 3px solid var(--forest); background: #e6efe8; font-size: 13px; line-height: 1.55; }
.portal-message--error { color: #71343c; background: #f2e5e6; border-color: #8d4a54; }

@media (max-width: 900px) {
  .portal-public-grid, .portal-locked-inner, .portal-account-shell { grid-template-columns: 1fr; }
  .portal-library { grid-template-columns: 1fr; }
  .portal-library article { min-height: 230px; border-right: 0; border-bottom: 1px solid var(--line); }
  .portal-library article:last-child { border-bottom: 0; }
  .portal-account-brand { min-height: 360px; }
}

@media (max-width: 620px) {
  .portal-shell { width: min(100% - 28px, 1160px); }
  .portal-header { min-height: 82px; padding: 10px 14px; }
  .portal-brand img { width: 68px; height: 62px; }
  .portal-brand span, .portal-header nav > span { display: none; }
  .portal-hero { min-height: 720px; }
  .portal-hero-content { padding-bottom: 64px; }
  .portal-hero-content > p:not(.portal-kicker) { font-size: 16px; }
  .portal-actions { align-items: stretch; flex-direction: column; }
  .portal-footer .portal-shell { grid-template-columns: 1fr; }
  .portal-account-brand { min-height: 290px; padding: 28px 22px; }
  .portal-account-brand img { width: 80px; height: 70px; }
  .portal-account-brand h1 { font-size: 40px; }
  .portal-account-panel { padding: 38px 22px 52px; }
  .portal-back { margin-bottom: 38px; }
  .portal-account-form h2 { font-size: 40px; }
}

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