/* ============================================================
   Azwan hub, dark theme.
   Type: Manrope. Radii: 12 / 16 / 20 / 32. Spacing rhythm: 4 / 8.
   ============================================================ */

:root {
  --stage: #060d1a;
  --shell: #0b1830;
  --surface: #11213b;
  --surface-2: #17294a;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f5f7fb;
  --muted: #a3b1c6;
  --accent: #f26a2e;
  --accent-soft: rgba(242, 106, 46, 0.16);
  --accent-line: rgba(242, 106, 46, 0.45);
  --on-accent: #0b1830; /* navy on orange: 5.8:1, white on orange fails */

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 32px;

  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; color-scheme: dark; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--stage);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Shell ---------- */

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

.shell {
  width: 100%;
  max-width: 440px;
  padding: max(16px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(242, 106, 46, 0.13), transparent 62%),
    var(--shell);
}

@media (min-width: 520px) {
  .stage { padding: 32px 16px; align-items: flex-start; }
  .shell {
    min-height: 0;
    padding-top: 20px;
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.topbar__brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.icon-btn,
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.icon-btn { border-radius: var(--r-md); }
.pill-btn { border-radius: 999px; padding: 0 16px; font-size: 13px; font-weight: 700; }

.icon-btn:hover,
.pill-btn:hover { border-color: var(--accent-line); }
.icon-btn:active,
.pill-btn:active { transform: scale(0.96); }

/* ---------- Icons ---------- */

.ico { width: 22px; height: 22px; flex-shrink: 0; }
.ico--sm { width: 18px; height: 18px; }

/* ---------- Hero ---------- */

.hero { text-align: center; padding: 20px 0 20px; }

.hero__photo {
  width: 104px;
  height: 104px;
  margin: 0 auto 16px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--shell), 0 0 0 5px var(--accent);
}

.hero__name {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero__role {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__tagline {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Call to action ---------- */

.cta {
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
}

.cta__title { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; }
.cta__text { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.cta__note { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--accent); }

.cta__row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  margin: 16px 0 8px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.btn { white-space: nowrap; }
.btn:active { transform: scale(0.98); }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: #ff7d44; }

.btn--secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover { border-color: var(--accent-line); }

.btn--ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn--ghost:hover { color: var(--text); border-color: var(--border-strong); }

.btn--block { width: 100%; }

/* ---------- Tabs ---------- */

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.tab {
  min-height: 44px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tab:hover { color: var(--text); }

.tab[aria-selected='true'] {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

/* ---------- Panels and cards ---------- */

.panel { animation: rise 0.2s ease-out; }
.panel:focus-visible { outline-offset: 6px; border-radius: var(--r-md); }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.stack { display: flex; flex-direction: column; gap: 8px; }

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.card:hover { border-color: var(--accent-line); background: #142643; }
.card:active { transform: scale(0.985); }

.card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card__title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.card__sub { font-size: 13px; color: var(--muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__sub--wrap { white-space: normal; }
.card__note { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--accent); line-height: 1.4; }
.card__cta { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--text); }
.card__go { color: var(--accent); flex-shrink: 0; align-self: center; }

.tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--accent);
}

.tile--logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.tile--logo img { width: 100%; height: 100%; object-fit: contain; }

.card--venture { align-items: flex-start; padding: 16px 14px; }
.card--venture .card__go { align-self: flex-start; margin-top: 2px; }

/* News */

.card--news { align-items: flex-start; padding: 14px; }
.news__thumb { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.news__date { font-size: 12px; font-weight: 700; color: var(--accent); }
.news__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }

.panel__foot { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.panel__foot a { color: var(--text); font-weight: 700; }

.foot { margin-top: 32px; text-align: center; font-size: 12px; color: var(--muted); }
.foot a { color: var(--text); font-weight: 700; text-decoration: none; }

/* ---------- QR sheet ---------- */

.sheet {
  width: min(360px, calc(100% - 32px));
  padding: 20px;
  margin: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.sheet::backdrop { background: rgba(3, 8, 18, 0.62); }

.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet__title { margin: 0; font-size: 18px; font-weight: 800; }

.sheet__qr {
  width: 240px;
  height: 240px;
  margin: 0 auto;
  border-radius: var(--r-md);
  background: #fff;
}

.sheet__url { margin: 12px 0 16px; text-align: center; font-size: 13px; color: var(--muted); word-break: break-all; }
.sheet__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reduced motion ---------- */

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