/* Ready72 unified design system - site and app share visual identity */

:root {
  /* Navy + Gold palette (matches app) */
  --navy-900: #111827;
  --navy-800: #1f2937;
  --navy-700: #374151;
  --gold: #f59e0b;
  --gold-600: #d97706;
  --gold-ink: #a35909;
  --gold-50: #fffbeb;
  --gold-200: #fde68a;

  /* Neutrals */
  --ink: #1f2937;
  --ink-mid: #374151;
  --ink-soft: #5b6472;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --surface: #ffffff;
  --surface-sunk: #f7f8fa;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;

  /* Radius and shadow */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.1), 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-lg: 0 10px 24px rgba(17, 24, 39, 0.1);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--surface-sunk);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ========== TYPOGRAPHY ========== */

h1, h2, h3, h4 {
  color: var(--navy-800);
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
h4 { font-size: 0.9375rem; }

p {
  margin: 0 0 var(--sp-3);
}

a {
  color: #1d4ed8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ========== HEADER ========== */

.header {
  background: var(--navy-900);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 60px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.nav-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--navy-900);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: -0.5px;
}

.nav-menu {
  list-style: none;
  display: none;
  gap: var(--sp-5);
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-menu a, .nav-menu button {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: var(--sp-2) 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-menu a:hover, .nav-menu button:hover {
  color: #ffffff;
}

.nav-menu .cta {
  margin-left: auto;
}

.nav-menu .cta a, .nav-menu .cta button {
  background: var(--gold);
  color: var(--navy-900);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
}

.nav-menu .cta a:hover, .nav-menu .cta button:hover {
  background: var(--gold-600);
  text-decoration: none;
}

@media (min-width: 700px) {
  .nav-menu {
    display: flex;
  }
}

/* ========== HERO / HOME ========== */

.hero {
  background: var(--navy-900);
  background-image: radial-gradient(1100px 420px at 85% -10%, rgba(245, 158, 11, 0.16), transparent 62%);
  border-bottom: 3px solid var(--gold);
  padding: var(--sp-10) var(--sp-4);
  color: #ffffff;
}

.hero-content {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.hero-content h1 {
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: var(--sp-4);
}

.hero-content .lead {
  color: #d7dce4;
  font-size: 1.0625rem;
  line-height: 1.6;
  margin-bottom: var(--sp-6);
  max-width: 54ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-content .btn {
  font-size: 1.0625rem;
  padding: var(--sp-4) var(--sp-6);
  min-height: 52px;
  display: inline-block;
}

/* ========== SECTION CARDS (HOME PAGE) ========== */

.sections {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-4);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-8);
}

.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: var(--sp-5);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

.section-card:hover {
  box-shadow: var(--shadow-lg);
}

.section-card h2 {
  margin-bottom: var(--sp-3);
}

.section-card h2 a {
  color: var(--navy-800);
  text-decoration: none;
}

.section-card h2 a:hover {
  color: var(--gold-ink);
}

.section-card p {
  color: var(--ink-soft);
  margin: 0;
}

/* ========== BUTTONS ========== */

button, .btn {
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: var(--sp-3) var(--sp-5);
  transition: all 0.2s;
}

button:hover:not(:disabled), .btn:hover {
  background: var(--surface-sunk);
}

.btn-primary, button[class*="primary"] {
  background: var(--gold);
  color: var(--navy-900);
  border: none;
  font-weight: 700;
}

.btn-primary:hover, button[class*="primary"]:hover {
  background: var(--gold-600);
}

/* ========== ARTICLE / CONTENT ========== */

.article {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-4);
}

.article-header {
  margin-bottom: var(--sp-8);
}

.article-header h1 {
  margin-bottom: var(--sp-4);
}

.article-header .summary {
  font-size: 1.125rem;
  color: var(--ink-mid);
  margin: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin: var(--sp-5) 0 0;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.draft-badge {
  display: inline-block;
  background: var(--gold-50);
  color: var(--gold-ink);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--sp-3);
}

.risk-badge {
  display: inline-block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

.risk-badge.tier-a {
  background: #ecfdf5;
  color: #047857;
}

.risk-badge.tier-b {
  background: var(--gold-50);
  color: var(--gold-ink);
}

.risk-badge.tier-c {
  background: #fef2f2;
  color: #b91c1c;
}

/* ========== FOOTER ========== */

.footer {
  background: var(--navy-900);
  color: #cbd5e1;
  padding: var(--sp-8) var(--sp-4);
  margin-top: var(--sp-10);
  border-top: 1px solid var(--navy-800);
}

.footer-content {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.footer-content p {
  margin: var(--sp-3) 0;
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-5);
  margin: var(--sp-6) 0;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-meta {
  color: #6b7280;
  font-size: 0.8125rem;
  margin: 0 !important;
}

/* ========== ACCESSIBILITY ========== */

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

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--gold-600);
  outline-offset: 2px;
  border-radius: 6px;
}

.header :where(a, button):focus-visible {
  outline-color: var(--gold-200);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }

  .hero {
    padding: var(--sp-6) var(--sp-4);
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .nav-menu {
    width: 100%;
    flex-direction: column;
  }

  .nav-menu .cta {
    margin-left: 0;
    width: 100%;
  }

  .nav-menu .cta a, .nav-menu .cta button {
    width: 100%;
    text-align: center;
  }

  .sections {
    grid-template-columns: 1fr;
  }
}

/* ========== UTILITY ========== */

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

.main-content {
  flex: 1;
}
