/* ARB Hub — Shared Theme System */
/* Light/Dark mode via [data-theme] on <html> */

:root {
  /* OITE brand colors */
  --brand-primary: #B22234;
  --brand-primary-light: #D43D4F;
  --brand-primary-dark: #8A1A28;
  --brand-accent: #1a1a2e;
  --brand-gold: #c9a84c;

  /* Shared */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'SF Pro Display', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* ─── LIGHT THEME (default) ─── */
[data-theme="light"], :root {
  --bg-primary: #FAFAFA;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F5F5F5;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFAFA;
  --bg-input: #F5F5F5;
  --bg-input-focus: #FFFFFF;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.12);
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #A1A1A6;
  --text-inverse: #FFFFFF;
  --surface-overlay: rgba(255,255,255,0.85);
  --header-bg: rgba(255,255,255,0.72);
  --badge-bg: rgba(178,34,52,0.08);
  --badge-text: var(--brand-primary);
  color-scheme: light;
}

/* ─── DARK THEME ─── */
[data-theme="dark"] {
  --bg-primary: #0A0A0F;
  --bg-secondary: #141418;
  --bg-tertiary: #1C1C22;
  --bg-card: #1C1C22;
  --bg-card-hover: #242430;
  --bg-input: #1C1C22;
  --bg-input-focus: #242430;
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.1);
  --text-primary: #F5F5F7;
  --text-secondary: #A1A1A6;
  --text-tertiary: #6E6E73;
  --text-inverse: #1D1D1F;
  --surface-overlay: rgba(10,10,15,0.85);
  --header-bg: rgba(10,10,15,0.72);
  --badge-bg: rgba(178,34,52,0.15);
  --badge-text: #E8545F;
  color-scheme: dark;
}

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  transition: background var(--transition), color var(--transition);
  line-height: 1.5;
}

/* ─── TYPOGRAPHY ─── */
.t-display { font-family: var(--font-display); font-size: clamp(28px, 5vw, 42px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.t-heading { font-size: clamp(20px, 3vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.t-subhead { font-size: 15px; font-weight: 500; color: var(--text-secondary); line-height: 1.5; }
.t-body { font-size: 15px; font-weight: 400; line-height: 1.6; }
.t-caption { font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.t-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-tertiary); }

/* ─── LAYOUT ─── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ─── HEADER ─── */
.hub-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  transition: background var(--transition);
}
.hub-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.hub-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); }
.hub-logo img { height: 28px; }
.hub-logo-text { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.hub-logo-divider { width: 1px; height: 18px; background: var(--border-strong); }
.hub-logo-sub { font-size: 13px; color: var(--text-tertiary); font-weight: 400; }

.hub-nav { display: flex; align-items: center; gap: 8px; }

/* ─── THEME TOGGLE ─── */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-secondary); cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: all var(--transition); font-size: 16px; line-height: 1;
}
.theme-toggle:hover { background: var(--bg-tertiary); border-color: var(--border-strong); }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; transition: all var(--transition);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card-interactive { cursor: pointer; text-decoration: none; color: inherit; display: block; }
.card-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md); border: none;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(178,34,52,0.25); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }

/* ─── INPUTS ─── */
.input {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-input);
  font-family: var(--font); font-size: 15px; color: var(--text-primary);
  outline: none; transition: all var(--transition);
}
.input::placeholder { color: var(--text-tertiary); }
.input:focus { border-color: var(--brand-primary); background: var(--bg-input-focus); box-shadow: 0 0 0 3px rgba(178,34,52,0.1); }

.input-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.input-required { color: var(--brand-primary); margin-left: 2px; }

/* ─── BADGE ─── */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; background: var(--badge-bg); color: var(--badge-text); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.anim-fade-up { animation: fadeUp 0.5s ease both; }
.anim-d1 { animation-delay: 0.05s; } .anim-d2 { animation-delay: 0.1s; }
.anim-d3 { animation-delay: 0.15s; } .anim-d4 { animation-delay: 0.2s; }
.anim-d5 { animation-delay: 0.25s; } .anim-d6 { animation-delay: 0.3s; }

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .hub-logo-sub { display: none; }
  .hub-logo-divider { display: none; }
}

/* ─── MISC ─── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
