/* ═══════════════════════════════════════════════════════════
   Scripta Health — shared styles
   Palette: navy #0f1b2d, teal #2a9d8f, cream #f8f9fa
   ═══════════════════════════════════════════════════════════ */

:root {
  --navy: #0f1b2d;
  --navy-light: #162a45;
  --teal: #2a9d8f;
  --teal-light: #3ab8a8;
  --cream: #f8f9fa;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f0f2f5;
  --gray-200: #e2e5ea;
  --gray-300: #d1d5db;
  --gray-600: #6b7280;
  --gray-800: #2d3748;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --green: #16a34a;
  --green-soft: #f0fdf4;
}

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

body {
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--gray-800);
  line-height: 1.6;
  background: var(--white);
}

/* ─── NAV ────────────────────────────────────────────── */
.nav {
  background: var(--navy);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--teal); }
.nav-links { display: flex; align-items: center; gap: 0; margin-left: auto; }
.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  margin-left: 28px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--teal-light); font-weight: 700; }
.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 8px 22px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--teal-light); }

/* Hamburger — hidden on desktop, shown on mobile */
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 6px; margin-left: auto;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--white); margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 80px 40px 70px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(42,157,143,0.2);
  border: 1px solid var(--teal);
  color: var(--teal-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

/* AWS-branded badge for the home hero — subtle "Backed by" + AWS Startups
   logo rendered as inline SVG with currentColor, so the logo shows on the
   dark hero without needing a light container. */
.aws-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 18px;
  border-radius: 22px;
  margin-bottom: 24px;
  text-decoration: none;
  color: rgba(255,255,255,0.92);
  transition: all 0.25s ease;
}
.aws-hero-badge:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.35);
  color: #ffffff;
  transform: translateY(-1px);
}
.aws-hero-badge .badge-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.aws-hero-badge svg,
.aws-hero-badge img {
  display: block;
  height: 22px;
  width: auto;
}
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  max-width: 750px;
  margin: 0 auto 18px;
  letter-spacing: -1px;
}
.hero h1 em { font-style: normal; color: var(--teal-light); }
.hero p.sub {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  max-width: 620px;
  margin: 0 auto 30px;
  line-height: 1.55;
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-light); }
.btn-outline { background: transparent; color: var(--teal-light); border: 2px solid var(--teal); }
.btn-outline:hover { background: rgba(42,157,143,0.15); }
.btn-sm { padding: 10px 24px; font-size: 14px; }

/* ─── SECTIONS ───────────────────────────────────────── */
.section { padding: 70px 40px; }
.section-inner { max-width: 960px; margin: 0 auto; }
.section h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section h2 em { font-style: normal; color: var(--teal); }
.section p.lead {
  font-size: 17px;
  color: var(--gray-600);
  margin-bottom: 30px;
  max-width: 700px;
}

.bg-gray { background: var(--gray-100); }
.bg-white { background: var(--white); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-red-soft { background: var(--red-soft); border-top: 3px solid var(--red); }
.bg-green-soft { background: var(--green-soft); border-top: 3px solid var(--green); }

/* ─── CARDS ──────────────────────────────────────────── */
.card-grid { display: grid; gap: 20px; margin-top: 24px; }
.card-grid-2 { grid-template-columns: 1fr 1fr; }
.card-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.card-grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.card .icon { font-size: 32px; margin-bottom: 12px; }
.card h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--gray-600); line-height: 1.55; }

/* ─── PRODUCT CARDS (home page) ──────────────────────── */
.product-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  border: 2px solid var(--gray-200);
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card .btn {
  margin-top: auto;
  align-self: flex-start;
}
.product-card:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 30px rgba(42,157,143,0.12);
}
.product-card .badge-new {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--teal);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 12px;
}
.product-card h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.product-card .tagline {
  font-size: 15px;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 16px;
}
.product-card p { font-size: 15px; color: var(--gray-600); margin-bottom: 16px; line-height: 1.6; }
.product-card ul { margin: 0 0 20px 20px; }
.product-card li { font-size: 14px; color: var(--gray-600); margin-bottom: 4px; }

/* ─── DATA FLOW DIAGRAM (styled, not ASCII) ──────────── */
.diagram-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 24px 0;
  overflow-x: auto;
}
.diagram-box {
  flex: 1;
  min-width: 200px;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid;
}
.diagram-box h4 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}
.diagram-box .tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.diagram-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.diagram-box li {
  font-size: 13px;
  padding: 3px 0;
  padding-left: 18px;
  position: relative;
}
.diagram-box li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  font-weight: 700;
}
.box-pharmacy { background: #eef2ff; border-color: #818cf8; }
.box-pharmacy h4 { color: #4338ca; }
.box-pharmacy .tag { color: #6366f1; }
.box-pharmacy li::before { color: #6366f1; }

.box-server { background: #ecfdf5; border-color: var(--teal); }
.box-server h4 { color: #065f46; }
.box-server .tag { color: var(--teal); }
.box-server li::before { color: var(--teal); }

.box-bedrock { background: #fef3c7; border-color: #f59e0b; }
.box-bedrock h4 { color: #92400e; }
.box-bedrock .tag { color: #d97706; }
.box-bedrock li::before { color: #d97706; }

/* AWS boundary wrapper — nests server + bedrock inside one border */
.box-aws-boundary {
  flex: 2;
  min-width: 0;
  background: #fffbeb;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 16px;
}
.box-aws-boundary .aws-boundary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.box-aws-boundary .aws-boundary-header h4 {
  font-size: 14px;
  font-weight: 800;
  color: #92400e;
  margin: 0;
}
.box-aws-boundary .aws-boundary-header .tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #d97706;
}
.aws-boundary-inner {
  display: flex;
  gap: 0;
  align-items: stretch;
}
.aws-boundary-inner .diagram-box {
  flex: 1;
  min-width: 0;
  padding: 14px;
  font-size: 12px;
}
.aws-boundary-inner .diagram-arrow {
  min-width: 60px;
  padding: 0 4px;
}
.aws-boundary-inner .diagram-arrow .arrow-line {
  font-size: 22px;
}
.aws-boundary-inner .diagram-arrow .arrow-label {
  font-size: 9px;
}

.diagram-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  min-width: 80px;
}
.diagram-arrow .arrow-line {
  font-size: 28px;
  color: var(--gray-300);
  font-weight: 300;
  line-height: 1;
}
.diagram-arrow .arrow-label {
  font-size: 10px;
  color: var(--gray-600);
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ─── LAYER ROWS ─────────────────────────────────────── */
.layer-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gray-200);
}
.layer-row:last-child { border-bottom: none; }
.layer-num {
  width: 52px; height: 52px;
  background: var(--navy);
  color: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}
.layer-content h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.layer-content .tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.tag-instant { background: #dbeafe; color: #1d4ed8; }
.tag-ai { background: #ede9fe; color: #6d28d9; }
.tag-human { background: #fef3c7; color: #92400e; }
.layer-content p { font-size: 14px; color: var(--gray-600); }

/* ─── SAFETY GRID ────────────────────────────────────── */
.safety-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.safety-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px; background: var(--white);
  border-radius: 8px; border: 1px solid #bbf7d0;
}
.safety-item .check { color: var(--green); font-size: 20px; flex-shrink: 0; }
.safety-item p { font-size: 14px; }
.safety-item strong { color: var(--navy); }

/* ─── TABLE ──────────────────────────────────────────── */
.styled-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--white); border-radius: 12px; overflow: hidden; }
.styled-table th { background: var(--navy); color: var(--white); padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 700; }
.styled-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-200); font-size: 14px; }
.styled-table tr:last-child td { border-bottom: none; }
.styled-table .yes { color: var(--green); font-weight: 700; }
.styled-table .no { color: #9ca3af; }

/* ─── BADGES ROW ─────────────────────────────────────── */
.badge-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 20px 0; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gray-100); border: 1px solid var(--gray-200);
  border-radius: 8px; padding: 10px 16px;
  font-size: 13px; font-weight: 600; color: var(--navy);
}

/* ─── STATS BAR ──────────────────────────────────────── */
.stats-bar {
  background: var(--navy-light);
  padding: 30px 40px;
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat .num { font-size: 28px; font-weight: 800; color: var(--teal-light); }
.stat .label { font-size: 12px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

/* ─── CALLOUT ────────────────────────────────────────── */
.callout {
  background: var(--gray-100); border-left: 4px solid var(--teal);
  padding: 16px 20px; margin: 20px 0; border-radius: 0 8px 8px 0;
}

/* ─── CTA SECTION ────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  text-align: center;
  padding: 70px 40px;
}
.cta-section h2 { color: var(--white); font-size: 32px; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.7); font-size: 16px; margin-bottom: 28px; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ─── FOOTER ─────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 28px 40px;
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
.footer a:hover { color: rgba(255,255,255,0.9); }
.footer .aws-line { margin-top: 8px; font-size: 11px; }
.footer .footer-aws-logo {
  height: 16px;
  width: auto;
  vertical-align: middle;
  margin-right: 8px;
  display: inline-block;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 { font-size: 30px; }
  .card-grid-2, .card-grid-3, .card-grid-4, .safety-grid { grid-template-columns: 1fr; }
  .product-card .badge-new { display: none; }
  .diagram-flow { flex-direction: column; align-items: center; }
  .diagram-arrow { padding: 10px 0; min-width: auto; }
  .diagram-arrow .arrow-line { transform: rotate(90deg); display: inline-block; }
  .aws-boundary-inner { flex-direction: column; }
  .aws-boundary-inner .diagram-arrow { padding: 8px 0; }
  .box-aws-boundary { width: 100%; }
  .stats-bar { gap: 16px 30px; display: grid; grid-template-columns: 1fr 1fr; padding: 20px; }
  .section, .hero, .cta-section { padding-left: 20px; padding-right: 20px; }

  /* Center all card content on mobile */
  .card { text-align: center; }
  .card .icon { display: block; }
  .card ul { display: inline-block; text-align: left; }
  .card h3 { text-align: center; }

  /* Tighter list margins on mobile */
  .card ul, .diagram-box ul { margin-left: 12px !important; }

  /* Lead paragraphs and section text */
  .lead { font-size: 15px; }
  .section-inner { text-align: center; }
  .section-inner p { max-width: 100%; }
  .section-inner h2 { font-size: 24px; }

  /* Layer rows (Sentinel three-layer section) */
  .layer-row { text-align: center; }
  .layer-content { text-align: center; }
  .layer-content p { text-align: left; }

  /* CTA sections */
  .cta-section h2 { font-size: 26px; }
  .cta-section p { font-size: 14px; }
  .nav {
    flex-wrap: wrap;
    padding: 14px 16px;
  }
  .nav-logo { font-size: 20px; }
  .nav-hamburger { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 12px;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    margin-left: 0; font-size: 15px;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-cta {
    padding: 10px 22px; font-size: 15px;
    margin-top: 8px; text-align: center;
  }

  /* Center the product cards on mobile */
  .product-card { text-align: center; }
  .product-card .tagline { text-align: center; }
  .product-card p { text-align: center; }
  .product-card .btn { align-self: center; }
  .product-card ul {
    display: inline-block;
    text-align: left;
    margin: 0 auto 20px;
  }
}
