/* ================================================
   LusoInsights — Main Stylesheet
   Palette: Slate · Gold · White
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --slate:        #2C3E50;
  --slate-deep:   #1A2535;
  --slate-mid:    #34495E;
  --gold:         #C9A84C;
  --gold-light:   #E8C97A;
  --gold-dim:     #A8873A;
  --white:        #FFFFFF;
  --off-white:    #F8F6F1;
  --grey-light:   #E5E7EB;
  --grey-mid:     #9CA3AF;
  --grey-text:    #6B7280;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --radius:       4px;
  --radius-lg:    8px;
  --shadow:       0 2px 16px rgba(26, 37, 53, 0.12);
  --shadow-lg:    0 8px 40px rgba(26, 37, 53, 0.2);
  --transition:   0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--slate);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--grey-text); line-height: 1.75; }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ── Navbar ── */
.navbar {
  background: var(--slate-deep);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo span.luso { color: var(--gold); }
.logo span.insights { color: var(--white); }
.logo span.dot { color: var(--gold); font-size: 0.5rem; vertical-align: middle; margin: 0 1px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.active { color: var(--white); }

.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: var(--slate-deep);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-slate {
  background: var(--slate);
  color: var(--white);
}
.btn-slate:hover {
  background: var(--slate-mid);
}
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 7px 16px; font-size: 0.8rem; }

/* ── Hero ── */
.hero {
  background: var(--slate-deep);
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(44, 62, 80, 0.6) 0%, transparent 50%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}
.hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 500px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.stat-item { }
.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Country Strip ── */
.country-strip {
  background: var(--gold);
  padding: 12px 0;
  overflow: hidden;
}
.country-strip-inner {
  display: flex;
  gap: 48px;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}
.country-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Features ── */
.features { background: var(--off-white); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--slate-deep);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 1.2rem;
}
.feature-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.feature-card p { font-size: 0.9rem; }

/* ── Section Headers ── */
.section-header { text-align: center; max-width: 600px; margin: 0 auto 48px; }
.section-eyebrow {
  display: inline-block;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p { font-size: 1rem; }

/* ── Countries ── */
.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.country-card {
  background: var(--slate-deep);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition);
}
.country-card:hover { transform: translateY(-3px); }
.country-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.country-flag { font-size: 2rem; margin-bottom: 12px; }
.country-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 4px;
}
.country-desc { font-size: 0.82rem; color: rgba(255,255,255,0.5); }

/* ── Newsletter / CTA ── */
.cta-section { background: var(--slate); }
.cta-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.cta-inner h2 { color: var(--white); margin-bottom: 12px; }
.cta-inner p { color: rgba(255,255,255,0.6); margin-bottom: 32px; }
.subscribe-form { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.subscribe-form input {
  flex: 1;
  min-width: 240px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.subscribe-form input::placeholder { color: rgba(255,255,255,0.35); }
.subscribe-form input:focus { border-color: var(--gold); }
.form-msg {
  margin-top: 12px;
  font-size: 0.85rem;
  min-height: 20px;
}
.form-msg.success { color: var(--gold); }
.form-msg.error { color: #ef4444; }

/* ── Auth Forms ── */
.auth-page {
  min-height: 100vh;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-card h2 { text-align: center; margin-bottom: 8px; }
.auth-subtitle { text-align: center; font-size: 0.9rem; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--slate);
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus { border-color: var(--gold); }
.form-group input::placeholder { color: var(--grey-mid); }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.85rem; color: var(--grey-text); }
.auth-footer a { color: var(--gold); font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.auth-error {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #dc2626;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: none;
}

/* ── Members Area ── */
.members-header {
  background: var(--slate-deep);
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}
.members-header h1 { color: var(--white); font-size: 2rem; }
.members-header p { color: rgba(255,255,255,0.5); margin-top: 8px; font-size: 0.9rem; }
.members-body { padding: 48px 0; background: var(--off-white); min-height: 60vh; }

/* ── Briefs List ── */
.briefs-grid { display: grid; gap: 16px; }
.brief-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: all var(--transition);
  cursor: pointer;
}
.brief-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
.brief-meta { flex: 1; }
.brief-date {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.brief-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--slate);
  margin-bottom: 8px;
}
.brief-summary { font-size: 0.875rem; color: var(--grey-text); }
.brief-arrow { color: var(--gold); font-size: 1.2rem; flex-shrink: 0; }

/* ── Brief Detail ── */
.brief-content {
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-light);
  padding: 48px;
}
.brief-content h2 {
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--grey-light);
}
.brief-content h2:first-child { margin-top: 0; }
.brief-content p { font-size: 0.95rem; margin-bottom: 12px; color: var(--slate); }
.brief-content ul { padding-left: 20px; margin-bottom: 12px; }
.brief-content li { font-size: 0.95rem; color: var(--slate); margin-bottom: 6px; }

/* ── Dashboard ── */
.dashboard-embed {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 700px;
}
.dashboard-embed iframe { width: 100%; height: 100%; border: none; }

/* ── Footer ── */
.footer {
  background: var(--slate-deep);
  border-top: 1px solid rgba(201, 168, 76, 0.15);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand p { color: rgba(255,255,255,0.45); font-size: 0.875rem; margin-top: 12px; max-width: 280px; }
.footer-col h4 {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.5); font-size: 0.875rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 0.8rem; }

/* ── Loading / Auth Guard ── */
.auth-guard-loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--grey-light);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ── */
.text-gold { color: var(--gold); }
.text-white { color: var(--white); }
.text-muted { color: var(--grey-text); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.divider { height: 1px; background: var(--grey-light); margin: 32px 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .brief-card { flex-direction: column; align-items: flex-start; }
  .auth-card { padding: 32px 24px; }
  .brief-content { padding: 28px; }
  .hero { min-height: auto; padding: 80px 0; }
}
