/* ============================================
   LRIA Education — Shared Template Styles
   Leonard Rickey Investment Advisors, PLLC
   ============================================ */

/* --- DESIGN TOKENS --- */
:root {
  --navy: #1a2744;
  --navy-light: #243454;
  --slate: #3d4f6f;
  --gold: #c8a45e;
  --gold-light: #e8d4a0;
  --gold-dim: rgba(200,164,94,0.15);
  --cream: #faf7f0;
  --white: #ffffff;
  --green: #3a8f6a;
  --green-light: #e8f5ee;
  --red: #c45454;
  --red-light: #fceaea;
  --blue-accent: #4a7fb5;
  --gray: #8895a7;
  --gray-light: #e8ecf0;
  --shadow-sm: 0 1px 3px rgba(26,39,68,0.06);
  --shadow-md: 0 4px 20px rgba(26,39,68,0.08);
  --shadow-lg: 0 8px 40px rgba(26,39,68,0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--navy);
  line-height: 1.6;
  min-height: 100vh;
}

/* --- SITE HEADER --- */
.site-header {
  background: var(--navy);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.site-header .logo-mark {
  width: 32px;
  height: 32px;
  background: var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--navy);
  font-weight: 700;
}

.site-header .logo-text {
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.site-header .logo-text span {
  color: var(--gold-light);
  font-weight: 400;
  font-size: 12px;
  display: block;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: -2px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-header nav a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--gold-light);
}

.site-header .logout-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.site-header .logout-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

/* --- SITE FOOTER (DISCLOSURES) --- */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-light);
  padding: 48px 40px 32px;
}

.site-footer .footer-inner {
  max-width: 760px;
  margin: 0 auto;
}

.site-footer .disclosure-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 16px;
}

.site-footer .disclosure-text {
  font-size: 11.5px;
  color: var(--slate);
  line-height: 1.8;
}

.site-footer .disclosure-text p {
  margin-bottom: 10px;
}

.site-footer .disclosure-text a {
  color: var(--blue-accent);
  text-decoration: none;
}

.site-footer .disclosure-text a:hover {
  text-decoration: underline;
}

.site-footer .footer-brand {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-light);
  text-align: center;
}

.site-footer .footer-brand .firm-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.site-footer .footer-brand .firm-sub {
  font-size: 12px;
  color: var(--gray);
  margin-top: 3px;
}

/* --- AUTH GATE --- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--slate) 100%);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.auth-screen::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,164,94,0.08) 0%, transparent 70%);
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  text-align: center;
}

.auth-card .auth-logo {
  width: 48px;
  height: 48px;
  background: var(--navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--gold);
}

.auth-card h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  margin-bottom: 6px;
  color: var(--navy);
}

.auth-card .auth-subtitle {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 32px;
}

.auth-card input[type="password"] {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--navy);
  transition: border-color 0.2s;
  outline: none;
  text-align: center;
  letter-spacing: 2px;
}

.auth-card input[type="password"]:focus {
  border-color: var(--gold);
}

.auth-card .auth-btn {
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.5px;
}

.auth-card .auth-btn:hover {
  background: var(--navy-light);
}

.auth-card .auth-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

.auth-card .auth-error.visible {
  display: block;
}

/* --- LIBRARY / INDEX PAGE --- */
.library-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--slate) 100%);
  color: var(--white);
  padding: 80px 40px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.library-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,164,94,0.08) 0%, transparent 70%);
}

.library-hero .hero-label {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 16px;
  position: relative;
}

.library-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 16px;
  position: relative;
  line-height: 1.2;
}

.library-hero .hero-sub {
  font-size: 16px;
  color: var(--gold-light);
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
}

/* --- CONTENT GRID --- */
.library-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

.category-label {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-dim);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.content-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(26,39,68,0.06);
  transition: box-shadow 0.25s, transform 0.25s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.content-card .card-preview {
  height: 160px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--slate) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.content-card .card-preview .preview-icon {
  font-size: 48px;
  opacity: 0.8;
}

.content-card .card-preview .card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--green);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

.content-card .card-preview .card-badge.draft {
  background: var(--gray);
}

.content-card .card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content-card .card-body h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.content-card .card-body .card-desc {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.6;
  flex: 1;
}

.content-card .card-meta {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray);
}

.content-card .card-meta .meta-date {
  font-weight: 500;
}

.content-card .card-meta .meta-type {
  background: var(--cream);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--slate);
}

/* --- COMING SOON CARD --- */
.content-card.coming-soon {
  opacity: 0.5;
  pointer-events: none;
}

.content-card.coming-soon .card-preview {
  background: var(--gray-light);
}

/* --- CONTENT PAGE WRAPPER --- */
.content-page {
  /* Wraps individual content pages to sit between header and footer */
}

.content-page .back-nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 40px 0;
}

.content-page .back-nav a {
  font-size: 13px;
  color: var(--gray);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.content-page .back-nav a:hover {
  color: var(--gold);
}

/* --- MEETING TRACKING FORM --- */
.tracking-form-wrapper {
  background: var(--cream);
  border-top: 1px solid var(--gray-light);
  padding: 36px 40px;
}

.tracking-form-inner {
  max-width: 760px;
  margin: 0 auto;
}

.tracking-form-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 6px;
}

.tracking-form-desc {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 16px;
}

.tracking-form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.tracking-form-group {
  flex: 1;
  min-width: 160px;
}

.tracking-form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.tracking-form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--navy);
  outline: none;
  transition: border-color 0.2s;
  background: var(--white);
}

.tracking-form-group input:focus {
  border-color: var(--gold);
}

.tracking-form-btn-group {
  flex: 0 0 auto;
  min-width: auto;
}

.tracking-form-btn {
  padding: 10px 24px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.tracking-form-btn:hover {
  background: var(--navy-light);
}

.tracking-form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tracking-form-page-info {
  font-size: 11px;
  color: var(--gray);
  margin-top: 10px;
}

.tracking-form-status {
  font-size: 12px;
  margin-top: 8px;
  min-height: 18px;
}

.tracking-form-success {
  color: var(--green);
  font-weight: 500;
}

.tracking-form-error {
  color: var(--red);
  font-weight: 500;
}

/* --- RESPONSIVE --- */
@media (max-width: 640px) {
  .site-header { padding: 0 20px; }
  .site-header nav { gap: 16px; }
  .library-hero { padding: 48px 20px 40px; }
  .library-body { padding: 32px 20px 60px; }
  .content-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
  .site-footer { padding: 32px 20px 24px; }
  .tracking-form-wrapper { padding: 28px 20px; }
  .tracking-form-row { flex-direction: column; }
  .tracking-form-btn { width: 100%; }
}
