/* FRED homepage styles */
:root {
  --blue-900: #1d4ed8;
  --blue-800: #1e40af;
  --blue-700: #2563eb;
  --blue-100: #e0f2fe;
  --blue-50:  #eff6ff;
  --text-main: #0f172a;
  --text-muted: #6b7280;
  --bg-page: #f3f4f6;
  --card-bg: #ffffff;
  --border-subtle: #e5e7eb;
  --radius-card: 16px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, var(--blue-50), #f9fafb 60%);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* Layout helpers */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-900);
  line-height: 1.15;
}

.brand-line:last-child {
  opacity: 0.85;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.nav-links a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-cta {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--blue-700);
  color: var(--blue-800);
}

/* Underwriter banner */
.underwriter-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}

.underwriter-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.underwriter-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.underwriter-name {
  margin: 2px 0 4px;
  font-weight: 700;
  font-size: 18px;
}

.underwriter-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Hero */
.hero {
  padding: 64px 0 72px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-800);
  font-weight: 600;
  margin: 0 0 8px;
}

.hero-copy h1 {
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.1;
  margin: 0 0 16px;
}

.hero-subtitle {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 15px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-800));
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(37, 99, 235, 0.45);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--blue-800);
}

.btn-ghost:hover {
  background: #ffffff;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-bullets li::before {
  content: "•";
  margin-right: 6px;
  color: var(--blue-700);
}

/* Hero panel */
.hero-panel {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background: radial-gradient(circle at top left, #dbeafe 0, #ffffff 45%);
  border-radius: 24px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.35);
  max-width: 360px;
  width: 100%;
}

.hero-card h2 {
  font-size: 17px;
  margin: 0 0 4px;
}

.hero-card-subtitle {
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-bottom: 14px;
}

.metric:nth-child(3) {
  grid-column: 1 / -1;
}

.metric-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-900);
}

.metric-pill {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(22, 163, 74, 0.06);
}

.metric-pill.good {
  color: #15803d;
}

.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 14px;
}

.bar {
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue-700), var(--blue-900));
  opacity: 0.22;
  height: 22px;
}

.bar-2 {
  height: 30px;
  opacity: 0.32;
}

.bar-3 {
  height: 38px;
  opacity: 0.55;
}

.bar-4 {
  height: 28px;
  opacity: 0.4;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(191, 219, 254, 0.8);
  color: var(--blue-900);
}

/* Sections */
.section-heading {
  text-align: center;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-size: 22px;
  margin: 0 0 8px;
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Features */
.features {
  padding: 8px 0 56px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 20px 18px 18px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.feature-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  margin-bottom: 10px;
  position: relative;
  background: radial-gradient(circle at top left, #bfdbfe 0, #60a5fa 50%, #1d4ed8 100%);
}

.feature-icon-risk::before,
.feature-icon-safety::before,
.feature-icon-cost::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  border: 2px solid #ffffff;
}

.feature-icon-safety::before {
  border-radius: 6px;
}

.feature-icon-cost::before {
  border: none;
  border-bottom: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  transform: rotate(45deg) translate(2px, -2px);
}

/* About */
.about {
  padding: 48px 0 56px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr);
  gap: 32px;
  align-items: start;
}

.about-copy h2 {
  margin: 0 0 12px;
}

.about-copy p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.about-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-muted);
}

.about-note {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(191, 219, 254, 0.9);
}

.about-note h3 {
  margin: 0 0 10px;
}

.about-note ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-muted);
}

/* CTA */
.cta {
  padding: 40px 0 52px;
}

.cta-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 2fr);
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, #e0f2fe, #ffffff);
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.25);
}

.cta-copy h2 {
  margin: 0 0 10px;
}

.cta-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.cta-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.cta-form input {
  font: inherit;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  outline: none;
}

.cta-form input:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.28);
}

.cta-form .btn-primary {
  grid-column: 1 / -1;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
}

.footer-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    justify-content: flex-start;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-layout,
  .cta-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-layout {
    padding: 20px;
  }

  .nav-links {
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .nav {
    height: auto;
    padding: 10px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links {
    font-size: 13px;
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 40px;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .underwriter-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-layout {
    flex-direction: column;
    align-items: flex-start;
  }
}
