/* member.namhglobal.com — "client area has moved" pages, CRM style.
   Mirrors the live my.namhglobal.com sign-in shell (LoginScreen + client-portal
   theme): bronze hero panel left, warm canvas + glass card right, champagne
   primary button. Colour values measured from the live CRM on 2026-11-28.
   Dark is the default (as in the CRM); html[data-theme="light"] switches. */

:root {
  color-scheme: dark;
  --canvas: #171719;
  --canvas-glow: rgba(212, 175, 55, 0.11);
  --fg: #FBF1E5;
  --fg-2: #D6C9BC;
  --fg-3: #B8AB9E;
  --accent-text: #E3C766;
  --focus: #E3C766;
  --panel-fallback: #242127;
  --panel-paint: linear-gradient(135deg, rgba(52, 41, 39, 0.9), rgba(34, 32, 35, 0.82) 45%, rgba(27, 25, 29, 0.9));
  --panel-border: #3F383C;
  --panel-shadow: 0 14px 44px -31px rgba(42, 30, 19, 0.45);
  --control-bg: #222023;
  --control-border: #8D7E71;
  --hairline: #3F3A3E;
  --secondary-bg: #222125;
  --secondary-border: #817263;
  --secondary-hover: #322F34;
  --notice-bg: #2A272C;

  /* Bronze hero is a dark island in both themes */
  --bronze: radial-gradient(at 18% 9%, rgba(212, 175, 55, 0.23), transparent 60%), linear-gradient(145deg, #322720, #19171A 80%);
  --on-bronze: #F3F4F6;
  --on-bronze-dim: rgba(243, 244, 246, 0.62);
  --bronze-gold: #E3C766;
  --bronze-glass: linear-gradient(135deg, rgba(59, 51, 39, 0.88), rgba(32, 32, 34, 0.78) 45%, rgba(26, 26, 26, 0.88));
  --bronze-glass-border: rgba(255, 255, 255, 0.18);
  --bronze-hairline: rgba(255, 255, 255, 0.12);

  --champagne: linear-gradient(90deg, #E5D19A 0%, #D4AF37 60%, #C5A133 100%);
  --champagne-hover: linear-gradient(90deg, #D4AF37 0%, #C9A330 100%);
  --champagne-pressed: #BD9828;
  --on-accent: #171A20;

  --font: 'Anek Latin', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --radius-control: 8px;
  --radius-dialog: 20px;
  --radius-panel: 24px;
  --fast: 120ms;
  --medium: 180ms;
  --slow: 240ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #F0ECE6;
  --fg: #2A2523;
  --fg-2: #4F4640;
  --fg-3: #6F5F52;
  --accent-text: #75590B;
  --focus: #75590B;
  --panel-fallback: #FFFBF6;
  --panel-paint: linear-gradient(135deg, rgba(255, 252, 247, 0.93), rgba(247, 240, 230, 0.87) 55%, rgba(255, 252, 247, 0.93));
  --panel-border: #DED4C7;
  --control-bg: #FBF8F3;
  --control-border: #85715E;
  --hairline: #E0D4C6;
  --secondary-bg: #FFFBF6;
  --secondary-border: #8B7259;
  --secondary-hover: #F7F0E7;
  --notice-bg: #F4ECE1;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  background-color: var(--canvas);
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  color: var(--fg);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--champagne); color: var(--on-accent);
  padding: 8px 14px; border-radius: var(--radius-control); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .shell { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }
}

/* ---------- bronze hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px 16px;
  background: var(--bronze);
  color: var(--on-bronze);
}
.hero__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hero__brand a { display: block; }
.hero__brand img { display: block; width: 37px; height: 40px; }
.hero__kicker { font-size: 12px; line-height: 16px; }
.hero__title { margin: 0 0 12px; font-size: 28px; line-height: 36px; font-weight: 600; }
.hero__blurb { margin: 0; font-size: 14px; line-height: 20px; max-width: 46ch; }

.stats {
  display: none;
  margin: 32px 0 0; padding: 8px 20px;
  border: 1px solid var(--bronze-glass-border);
  border-radius: var(--radius-panel);
  background: #262126;
  box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .stats { position: relative; isolation: isolate; background: transparent; }
  .stats::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background-image: var(--bronze-glass);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  }
}
.stats__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--bronze-hairline);
}
.stats__row:last-child { border-bottom: 0; }
.stats dt { font-size: 14px; white-space: nowrap; }
.stats dd { margin: 0 0 0 auto; min-width: 0; font-size: 14px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.stats .is-gold { color: var(--bronze-gold); }
.stats .is-old { color: var(--on-bronze-dim); font-weight: 500; position: relative; }
.stats .is-old::after {
  content: ""; position: absolute; left: 0; right: 0; top: 52%; height: 1.5px;
  background: currentColor; transform-origin: left center;
  animation: strike var(--slow) var(--ease) 300ms both;
}

@media (min-width: 768px) {
  .hero { justify-content: space-between; gap: 32px; padding: 48px; min-height: 100vh; min-height: 100dvh; }
  .hero__brand { gap: 12px; }
  .hero__brand img { width: 52px; height: 56px; }
  .hero__title { margin-bottom: 16px; font-size: 36px; line-height: 44px; letter-spacing: -0.02em; }
  .hero__blurb { font-size: 16px; line-height: 24px; }
  .hero__body { max-width: 520px; }
  .stats { display: block; }
  .hero__spacer { display: block; }
}
.hero__spacer { display: none; }
@media (min-width: 768px) and (max-width: 1023px) {
  .hero { padding: 32px; }
  .stats { padding: 8px 16px; }
}

/* ---------- right side ---------- */
.side {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px 16px 32px;
  background-color: var(--canvas);
  background-image: radial-gradient(at 88% 5%, var(--canvas-glow), transparent 56%);
}
@media (min-width: 640px) { .side { padding: 24px; } }
@media (min-width: 768px) { .side { padding: 48px; } }

.toolbar { width: 100%; max-width: 480px; display: flex; justify-content: flex-end; }
.theme-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border: 0; border-radius: var(--radius-control); background: transparent; color: var(--fg-2); cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.theme-btn:hover { background: var(--secondary-hover); color: var(--fg); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .moon { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .moon { display: block; }

/* glass card */
.card {
  width: 100%; max-width: 480px; padding: 24px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-dialog);
  background: var(--panel-fallback);
  box-shadow: var(--panel-shadow);
  animation: rise var(--slow) var(--ease) both;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { position: relative; isolation: isolate; background: transparent; }
  .card::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background-image: var(--panel-paint);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  }
}
@media (min-width: 640px) { .card { padding: 32px; } }

.card h1 { margin: 0; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.15; font-weight: 600; letter-spacing: -0.028em; }
.card .sub { margin: 8px 0 24px; color: var(--fg-2); }

.field { margin-bottom: 16px; }
.field__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.label { font-weight: 500; color: var(--fg-2); }
.link {
  display: inline-flex; align-items: center; min-height: 44px;
  background: none; border: 0; padding: 0; font: inherit; font-weight: 600;
  color: var(--accent-text); cursor: pointer; text-decoration: none;
}
.link:hover { text-decoration: underline; }
@media (min-width: 640px) { .link { min-height: 0; } }
.addr {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 14px;
  border: 1px solid var(--control-border); border-radius: var(--radius-control);
  background: var(--control-bg);
  font-size: 16px; line-height: 24px;
}
.addr svg { width: 16px; height: 16px; flex: none; color: var(--accent-text); }
.addr__scheme { color: var(--fg-3); }
.addr__host { font-weight: 600; overflow-wrap: anywhere; }
.copied { color: var(--accent-text); font-weight: 600; }

.btn {
  display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; margin-top: 8px;
  border-radius: var(--radius-control); border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn--primary { background-image: var(--champagne); color: var(--on-accent); }
.btn--primary:hover { background-image: var(--champagne-hover); }
.btn--primary:active { background-image: none; background-color: var(--champagne-pressed); }
.btn--secondary { background: var(--secondary-bg); color: var(--fg); border-color: var(--secondary-border); }
.btn--secondary:hover { background: var(--secondary-hover); }
@media (min-width: 640px) {
  .btn { min-height: 44px; font-size: 14px; }
  .addr { min-height: 44px; }
}

.center { margin: 16px 0 0; text-align: center; color: var(--fg-2); }
.center a { font-weight: 600; color: var(--accent-text); text-decoration: none; }
.center a:hover { text-decoration: underline; }

.rule { height: 1px; border: 0; margin: 24px 0; background: var(--hairline); }

.card h2 { margin: 0 0 12px; font-size: 16px; line-height: 24px; font-weight: 600; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--fg-2); }
.steps li::before {
  content: counter(step);
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--accent-text); border: 1px solid var(--hairline);
}
.steps strong, .notice strong { color: var(--fg); font-weight: 600; }

.notice {
  margin-top: 20px; padding: 12px 16px;
  display: grid; grid-template-columns: 18px 1fr; gap: 12px;
  border-radius: var(--radius-control); background: var(--notice-bg); color: var(--fg-2);
}
.notice svg { width: 18px; height: 18px; margin-top: 1px; color: var(--accent-text); }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }

.legal { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 16px; color: var(--fg-2); }
.legal p { margin: 0; }
.legal a { text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.nowrap { white-space: nowrap; }

/* ---------- motion (functional, CRM durations) ---------- */
@keyframes strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .stats .is-old::after { animation: none; }
  .card { animation-name: fade; }
}
