/* ═══════════════════════════════════════════════
   iSWAT.org — Brand Stylesheet
   Theme: Coral #DA3F35 + Dark #1A1424
   ═══════════════════════════════════════════════ */

:root {
  --coral: #DA3F35;
  --coral-hover: #c0352e;
  --coral-light: #ff6b5a;
  --coral-muted: #2d1412;
  --dark: #1A1424;
  --darker: #0b0b0e;
  --surface: #121216;
  --surface-light: #1a1a22;
  --border: #1e1e24;
  --text: #e0e0e0;
  --text-muted: #777;
  --text-dim: #555;
  --text-bright: #fff;
  --radius: 14px;
  --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--darker);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--coral); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--coral-light); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── Navigation ─────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11, 11, 14, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.nav-container {
  display: flex; align-items: center; gap: 24px;
  height: 60px; max-width: 1100px; margin: 0 auto;
}
.nav-logo { font-size: 20px; font-weight: 800; color: var(--text-bright); letter-spacing: -0.3px; }
.nav-logo span { color: var(--coral); }
.nav-links { display: flex; gap: 20px; flex: 1; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text-muted);
  transition: color 0.2s; white-space: nowrap; }
.nav-links a:hover { color: var(--text-bright); }
.nav-hub-link { color: var(--coral) !important; font-weight: 600 !important; }
.nav-auth { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.nav-user { font-size: 12px; color: var(--text-muted); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text);
  border-radius: 2px; transition: 0.3s; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }
.nav-overlay { display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,0.5); }
.nav-overlay.open { display: block; }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.1s, border-color 0.2s;
  white-space: nowrap; font-family: inherit; text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-hover); color: #fff; }
.btn-secondary { background: var(--surface-light); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #252530; color: var(--text-bright); border-color: #333; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--coral); color: var(--coral); }
.btn-small { padding: 8px 16px; font-size: 12px; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn.disabled, .btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── Hero ───────────────────────────────────── */
.hero {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; position: relative; overflow: hidden;
  padding: 100px 0 60px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 20%, #2d1412 0%, var(--darker) 60%);
  z-index: 0;
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: var(--coral-muted); color: var(--coral-light);
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  margin-bottom: 24px; border: 1px solid rgba(218, 63, 53, 0.2);
}
.hero h1 {
  font-size: clamp(32px, 6vw, 64px); font-weight: 800;
  line-height: 1.15; margin-bottom: 20px; color: var(--text-bright);
}
.hero-subtitle-top { display: block; font-size: clamp(18px, 3vw, 32px); font-weight: 400; color: var(--text-muted); }
.hero-em { display: block; font-size: clamp(14px, 2vw, 20px); font-weight: 300; color: var(--text-dim); margin: 8px 0; }
.hero-highlight { display: block; color: var(--coral); font-weight: 900; margin: 4px 0; }
.hero-subtitle-bottom { display: block; font-size: clamp(16px, 2.5vw, 28px); font-weight: 700; margin-top: 4px; }
.hero-desc {
  font-size: clamp(14px, 1.3vw, 16px); color: var(--text-muted);
  max-width: 600px; margin: 0 auto 32px; line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.hero-frameworks { display: flex; align-items: center; justify-content: center; gap: 16px; }
.fw-badge {
  padding: 8px 20px; background: var(--surface-light); border-radius: 8px;
  font-size: 18px; font-weight: 800; color: var(--text-bright);
  border: 1px solid var(--border);
}
.fw-sep { color: var(--coral); font-size: 14px; font-weight: 700; }

/* ── Sections ───────────────────────────────── */
.section { padding: 80px 0; }
.section-title {
  font-size: clamp(24px, 3vw, 36px); font-weight: 800;
  color: var(--text-bright); text-align: center; margin-bottom: 12px;
}
.section-subtitle {
  font-size: 15px; color: var(--text-muted); text-align: center;
  max-width: 500px; margin: 0 auto 48px;
}

/* ── Frameworks Grid ────────────────────────── */
.frameworks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.framework-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px; text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.framework-card:hover { border-color: var(--coral); transform: translateY(-2px); }
.fw-icon { font-size: 40px; margin-bottom: 16px; }
.framework-card h3 { font-size: 18px; font-weight: 700; color: var(--text-bright); margin-bottom: 10px; }
.framework-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── Book Preview ───────────────────────────── */
.book-preview { background: var(--surface); }
.book-preview-grid { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
.book-placeholder {
  display: flex; align-items: stretch; perspective: 600px;
}
.book-spine {
  width: 16px; background: #a52a2a; border-radius: 4px 0 0 4px;
  position: relative; transform: skewY(4deg); transform-origin: top;
}
.book-face {
  flex: 1; background: linear-gradient(135deg, var(--coral) 0%, #b83028 100%);
  border-radius: 0 8px 8px 0; padding: 40px 24px; min-height: 320px;
  display: flex; flex-direction: column; justify-content: center;
  align-items: center; text-align: center; box-shadow: 8px 8px 30px rgba(0,0,0,0.4);
}
.book-face-title { font-size: 28px; font-weight: 300; color: rgba(255,255,255,0.9); line-height: 1.2; }
.book-face-title strong { font-size: 36px; font-weight: 900; color: #fff; display: block; }
.book-face-author { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 16px; letter-spacing: 1px; text-transform: uppercase; }
.book-cover-img {
  width: 100%; max-width: 260px; height: auto;
  border-radius: 8px; box-shadow: 8px 8px 30px rgba(0,0,0,0.4);
  display: block;
}
.mini-cover-img {
  width: 120px; height: auto; border-radius: 6px;
  box-shadow: 4px 4px 20px rgba(0,0,0,0.4); display: block;
}
.book-info h2 { font-size: 28px; font-weight: 800; color: var(--text-bright); margin-bottom: 8px; }
.book-subtitle { font-size: 16px; color: var(--coral); font-weight: 500; margin-bottom: 16px; }
.book-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; }
.book-stats { display: flex; gap: 24px; margin-bottom: 24px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 24px; font-weight: 800; color: var(--text-bright); }
.stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Course Teaser ──────────────────────────── */
.teaser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.teaser-grid h2 { font-size: 22px; font-weight: 700; color: var(--text-bright); margin-bottom: 12px; }
.teaser-grid p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.teaser-list { list-style: none; margin-bottom: 20px; }
.teaser-list li { font-size: 13px; color: var(--text); padding: 6px 0; }

/* ── Page Hero ──────────────────────────────── */
.page-hero {
  padding: 120px 0 60px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #2d1412 0%, var(--darker) 70%);
}
.page-hero-sm { padding: 100px 0 40px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; color: var(--text-bright); margin-bottom: 8px; }
.page-subtitle { font-size: 15px; color: var(--text-muted); max-width: 500px; margin: 0 auto; }

/* ── Content Page Layout ────────────────────── */
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 48px; }
.content-main h2 { font-size: 24px; font-weight: 700; color: var(--text-bright); margin: 32px 0 12px; }
.content-main h2:first-child { margin-top: 0; }
.content-main h3 { font-size: 18px; font-weight: 600; color: var(--text-bright); margin: 24px 0 10px; }
.content-main p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.content-main ul { list-style: none; margin-bottom: 16px; }
.content-main ul li { font-size: 13px; color: var(--text); padding: 5px 0 5px 20px; position: relative; }
.content-main ul li::before { content: "→"; position: absolute; left: 0; color: var(--coral); }

/* ── Sidebar ────────────────────────────────── */
.sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
}
.sidebar-card h4 { font-size: 15px; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.sidebar-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 16px; }
.sidebar-note { font-size: 12px; color: var(--text-dim); margin: 12px 0 8px; text-align: center; }
.sidebar-form input {
  width: 100%; background: var(--darker); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; color: var(--text);
  font-size: 13px; font-family: inherit; margin-bottom: 8px; outline: none;
}
.sidebar-form input:focus { border-color: var(--coral); }
.mini-cover {
  margin-bottom: 16px; display: flex; justify-content: center;
}
.mini-cover-inner {
  width: 120px; height: 160px; background: linear-gradient(135deg, var(--coral) 0%, #b83028 100%);
  border-radius: 6px; display: flex; flex-direction: column; justify-content: center;
  align-items: center; text-align: center; padding: 16px;
  box-shadow: 4px 4px 20px rgba(0,0,0,0.4);
}
.mini-cover-inner span { font-size: 16px; font-weight: 300; color: rgba(255,255,255,0.9); line-height: 1.2; }
.mini-cover-inner strong { font-size: 20px; font-weight: 900; color: #fff; display: block; }
.detail-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.detail-row span:first-child { color: var(--text-muted); }
.detail-row span:last-child { color: var(--text); font-weight: 500; }
.feature-block { margin-bottom: 20px; }
.feature-block h4 { font-size: 15px; font-weight: 600; color: var(--text-bright); margin-bottom: 4px; }
.feature-block p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── Auth Pages ─────────────────────────────── */
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 800px; margin: 0 auto; }
.auth-layout-center { grid-template-columns: 400px; justify-content: center; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}
.auth-card h2 { font-size: 20px; font-weight: 700; color: var(--text-bright); margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.form-group input {
  width: 100%; background: var(--darker); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text);
  font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--coral); }
.form-error { color: var(--coral); font-size: 12px; margin-top: 12px; text-align: center; }
.form-error a { color: var(--text-bright); text-decoration: underline; }
.auth-alt { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 20px; }
.auth-alt a { color: var(--coral); }
.auth-benefits h3 { font-size: 16px; font-weight: 700; color: var(--text-bright); margin-bottom: 16px; }
.auth-benefits ul { list-style: none; }
.auth-benefits ul li { font-size: 14px; color: var(--text); padding: 8px 0; }

/* ── Resources Grid ─────────────────────────── */
.resources-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.resource-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.resource-card:hover { border-color: var(--coral); transform: translateY(-2px); }
.resource-icon { font-size: 32px; margin-bottom: 12px; }
.resource-card h3 { font-size: 15px; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.resource-card p { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.resources-cta { text-align: center; padding: 32px; border-top: 1px solid var(--border); }
.resources-cta p { font-size: 16px; color: var(--text); margin-bottom: 16px; }

/* ── Hub Dashboard ──────────────────────────── */
.hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 40px; }
.hub-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px; text-decoration: none !important;
  display: block; transition: border-color 0.2s, transform 0.2s;
}
.hub-card:hover { border-color: var(--coral); transform: translateY(-2px); }
.hub-card-icon { font-size: 32px; margin-bottom: 12px; }
.hub-card h3 { font-size: 17px; font-weight: 700; color: var(--text-bright); margin-bottom: 8px; }
.hub-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.hub-card-link { font-size: 12px; font-weight: 600; color: var(--coral); }
.hub-card-soon { opacity: 0.6; cursor: default; }
.hub-card-soon:hover { border-color: var(--border); transform: none; }
.badge-coming { display: inline-block; padding: 4px 10px; background: var(--coral-muted);
  color: var(--coral-light); border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-green { display: inline-block; padding: 2px 8px; background: rgba(34,197,94,0.15);
  color: #22c55e; border-radius: 8px; font-size: 11px; font-weight: 600; }
.hub-quicklinks { padding: 24px; border-top: 1px solid var(--border); }
.hub-quicklinks h3 { font-size: 15px; font-weight: 600; color: var(--text-bright); margin-bottom: 12px; }
.quicklinks-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.quicklink { font-size: 13px; color: var(--text-muted); }
.quicklink:hover { color: var(--coral); }

/* ── Hub Categories (Tools & Training) ──────── */
.hub-categories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.hub-category {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.hub-category h2 { font-size: 17px; font-weight: 700; color: var(--text-bright); margin-bottom: 14px; }
.tool-list { list-style: none; }
.tool-list li {
  font-size: 13px; color: var(--text); padding: 6px 0 6px 18px;
  position: relative; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.tool-list li::before { content: "•"; position: absolute; left: 0; color: var(--coral); }
.tool-list li:last-child { border-bottom: none; }
.hub-note { text-align: center; margin-top: 32px; }
.hub-note p { font-size: 13px; color: var(--text-dim); }

/* ── Footer ─────────────────────────────────── */
.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-brand h3 { font-size: 18px; font-weight: 800; color: var(--text-bright); margin-bottom: 8px; }
.footer-brand h3 span { color: var(--coral); }
.footer-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.footer-links h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-dim); margin-bottom: 12px; }
.footer-links a, .footer-links span { display: block; font-size: 13px; color: var(--text-muted);
  padding: 3px 0; }
.footer-links a:hover { color: var(--coral); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px;
  text-align: center; font-size: 12px; color: var(--text-dim); }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 60px; left: 0; right: 0;
    background: var(--darker); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 16px 20px; z-index: 100; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-auth { display: none; }
  .frameworks-grid { grid-template-columns: 1fr; }
  .book-preview-grid { grid-template-columns: 1fr; }
  .book-placeholder { justify-content: center; }
  .teaser-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .resources-grid { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-categories { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .book-stats { justify-content: center; }
}
