/* Doctors Aid public hub — brand aligned with clinical portals */
:root {
  /* Palette taken from the logo: blue (left of the cross) → green (right) */
  --primary: #1565c0;          /* logo blue */
  --primary-dark: #0d47a1;
  --primary-light: #42a5f5;
  --green: #2e7d32;            /* logo green */
  --green-dark: #1b5e20;
  --secondary: #2e7d32;        /* green partner */
  --accent: #2e7d32;
  /* Signature gradient mirrors the split cross in the logo */
  --brand-gradient: linear-gradient(135deg, #1565c0 0%, #2e7d32 100%);
  --bg: #f3f7fb;
  --surface: #ffffff;
  --text: #16202b;
  --text-muted: #586876;
  --border: #e1e9f0;
  --shadow: 0 12px 40px rgba(21, 101, 192, 0.08);
  --shadow-hover: 0 20px 48px rgba(21, 101, 192, 0.16);
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 15% -20%, rgba(21, 101, 192, 0.12), transparent),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(46, 125, 50, 0.12), transparent),
    var(--bg);
}

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  padding: 1.25rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}

.brand-text strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.beta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(46, 125, 50, 0.12);
  color: #1b5e20;
  border: 1px solid rgba(46, 125, 50, 0.28);
}

.hero {
  text-align: center;
  padding: 1rem 0 2.5rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero h1 em {
  font-style: normal;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary); /* fallback for browsers without background-clip:text */
}

.hero p {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.portal-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(21, 101, 192, 0.35);
  outline: none;
}

.portal-card:focus-visible {
  box-shadow: var(--shadow-hover), 0 0 0 3px rgba(21, 101, 192, 0.25);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.card-icon--clinical {
  background: rgba(46, 125, 50, 0.12);
  color: #1b5e20;            /* doctor portal green */
}

.card-icon--patient {
  background: rgba(21, 101, 192, 0.12);
  color: #0d47a1;            /* patient portal blue */
}

.card-icon--admin {
  background: rgba(55, 71, 79, 0.12);
  color: #37474f;            /* admin portal slate */
}

.card-icon--developer {
  background: rgba(0, 137, 123, 0.12);
  color: #00695c;            /* teal (no orange) */
}

.portal-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.portal-card p {
  margin: 0 0 1.25rem;
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.portal-card:hover .card-cta {
  text-decoration: underline;
}

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--primary-dark);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer-credit {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

.founder-role {
  font-size: 0.85em;
  font-weight: 500;
  color: var(--text-muted);
}

.site-footer-version {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.section-heading {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}

.feature-spotlight {
  margin-bottom: 2.5rem;
}

.feature-spotlight-inner {
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 45%, #2e7d32 100%);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  color: #fff;
  box-shadow: var(--shadow);
}

.feature-spotlight h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.feature-spotlight p {
  margin: 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.95;
}

.trust-strip {
  margin-bottom: 2.5rem;
}

.trust-strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.trust-item strong {
  font-size: 0.95rem;
  color: var(--text);
}

.trust-item > span:last-child {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.trust-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.faq {
  margin-bottom: 2.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 42rem;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 0;
  color: var(--text);
  list-style-position: outside;
}

.faq-item summary::-webkit-details-marker {
  color: var(--primary);
}

.faq-item p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.faq-item a {
  color: var(--primary-dark);
}

.site-footer-legal {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.footer-sep {
  color: var(--border);
}

.legal-page {
  padding: 2rem 0 3rem;
  max-width: 40rem;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.legal-page .legal-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.legal-page h2 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.legal-page p,
.legal-page li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.legal-page ul {
  padding-left: 1.25rem;
}

.legal-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
}

.legal-back:hover {
  text-decoration: underline;
}

.load-error {
  grid-column: 1 / -1;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .portal-card {
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}
