/* ============================================
   Roost Inspect - Legal Pages Stylesheet
   ============================================ */

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8f9fa;
  color: #334155;
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: #0f172a;
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; margin-top: 2rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; margin-top: 1.5rem; }

p { margin-bottom: 1rem; }

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

strong {
  color: #1e293b;
}

/* --- Navigation --- */
.nav-header {
  background-color: #0f172a;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-brand:hover {
  color: #ffffff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.nav-links a.active {
  color: #ffffff;
  background-color: #2563eb;
}

/* Hamburger Menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Main Content --- */
.page-wrapper {
  flex: 1;
  width: 100%;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* --- Card --- */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
}

.card h2:first-child {
  margin-top: 0;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #ffffff;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.hero h1 {
  color: #ffffff;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero p {
  color: #cbd5e1;
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Page Header --- */
.page-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #ffffff;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.page-header h1 {
  color: #ffffff;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header .subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
}

/* --- Link Cards Grid (Home page) --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.link-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: block;
  color: inherit;
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
}

.link-card .card-icon {
  width: 44px;
  height: 44px;
  background-color: #eff6ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.link-card .card-icon svg {
  width: 22px;
  height: 22px;
  stroke: #2563eb;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #0f172a;
}

.link-card p {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* --- Callout Box --- */
.callout {
  background-color: #eff6ff;
  border-left: 4px solid #2563eb;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  color: #1e40af;
}

.callout strong {
  color: #1e40af;
}

.callout-warning {
  background-color: #fef3c7;
  border-left-color: #d97706;
  color: #92400e;
}

.callout-warning strong {
  color: #92400e;
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background-color: #f1f5f9;
}

th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #0f172a;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background-color: #f8fafc;
}

/* --- FAQ / Accordion --- */
.faq-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  color: #0f172a;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.faq-question .q-marker {
  color: #2563eb;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-answer {
  padding-left: 1.75rem;
  color: #475569;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --- Steps List --- */
.steps-list {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}

.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
}

.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background-color: #2563eb;
  color: #ffffff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Section Number Headers --- */
.section-num {
  color: #2563eb;
  font-weight: 700;
  margin-right: 0.25rem;
}

/* --- Footer --- */
.site-footer {
  background-color: #0f172a;
  color: #94a3b8;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  margin-top: auto;
}

.site-footer a {
  color: #94a3b8;
  text-decoration: underline;
}

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

/* --- Effective Date Badge --- */
.effective-date {
  display: inline-block;
  background-color: #f1f5f9;
  color: #475569;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* --- Contact Box --- */
.contact-box {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  border: 1px solid #bfdbfe;
}

.contact-box h3 {
  color: #1e40af;
  margin-top: 0;
}

.contact-box .email-link {
  font-size: 1.15rem;
  font-weight: 600;
  color: #2563eb;
}

/* --- Responsive: Tablet --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: #0f172a;
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    gap: 0.125rem;
    border-top: 1px solid #1e293b;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 1rem;
    width: 100%;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .container {
    padding: 1.25rem 1rem 2rem;
  }

  .card {
    padding: 1.5rem 1.25rem;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}

/* --- Responsive: Mobile --- */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

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

  .card {
    padding: 1.25rem 1rem;
  }

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.5rem 0.65rem;
  }
}
