/* CareSoft — shared stylesheet */

:root {
  --accent: #1d46ba;
  --accent-hover: #16378f;
  --accent-soft: #eef2fc;
  --text: #111827;
  --text-muted: #4b5563;
  --text-faint: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --border: #e5e7eb;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 16px rgba(17, 24, 39, 0.06);
  --max-width: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 750;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 650;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow {
  max-width: 720px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

.site-header nav {
  margin-left: auto;
}

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

.nav-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.nav-list a[aria-current="page"] {
  color: var(--accent);
}

/* ---------- Sections ---------- */

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-intro {
  max-width: 640px;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero {
  padding: 6.5rem 0 5.5rem;
}

.hero h1 {
  max-width: 820px;
}

.hero .lead {
  max-width: 640px;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.text-link {
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.button-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
}

.header-cta {
  flex-shrink: 0;
  white-space: nowrap;
}

.button:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ---------- Feature list ---------- */

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

.feature-list li {
  padding-top: 1.25rem;
  border-top: 2px solid var(--accent-soft);
}

/* Four items: two by two instead of three plus one */
.feature-list-2x2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-list p {
  color: var(--text-muted);
  margin: 0;
}

/* Keep anchored sections clear of the sticky header */
section[id] {
  scroll-margin-top: 64px;
}

/* ---------- About / profile ---------- */

.profile {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  max-width: 820px;
  padding: 2.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.profile-photo {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent) 0%, #0ea5a4 100%);
}

.profile-body h3 {
  margin-bottom: 0.15rem;
}

.profile-body p {
  color: var(--text-muted);
}

.profile-body p:last-child {
  margin-bottom: 0;
}

.profile-role {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent) !important;
}

/* ---------- Contact form ---------- */

.contact-form {
  display: grid;
  gap: 1.25rem;
  max-width: 640px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.95rem;
  font-weight: 600;
}

.optional {
  font-weight: 400;
  color: var(--text-faint);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error-text);
}

.field-error {
  margin: 0;
  font-size: 0.875rem;
  color: var(--error-text);
}

.field-error:empty {
  display: none;
}

.form-notice {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-faint);
}

/* Honeypot: hidden from people, visible to naive bots */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.form-status:empty {
  display: none;
}

.form-status.is-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.form-status.is-error {
  background: var(--error-bg);
  color: var(--error-text);
}

/* ---------- Prose (legal pages, 404) ---------- */

.prose {
  padding: 4rem 0 5rem;
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
}

.prose h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose ul {
  padding-left: 1.5rem;
  margin: 0 0 1rem;
}

.meta {
  font-size: 0.9rem;
  color: var(--text-faint);
  margin-bottom: 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.9rem;
  color: var(--text-faint);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-faint);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 0 1rem;
    min-height: 56px;
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
  }

  /* Logo and Launch app on the first row, nav links below */
  .site-header nav {
    order: 3;
    width: 100%;
    margin-left: -0.5rem;
  }

  .header-cta {
    margin-left: auto;
  }

  .nav-list {
    flex-wrap: wrap;
  }

  /* The logo already links home; dropping Home keeps the menu on one row */
  .nav-home {
    display: none;
  }

  .nav-list a {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .profile {
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }

  .hero .lead {
    font-size: 1.075rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .form-row,
  .feature-list-2x2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 1.1rem;
  }

  .nav-list a {
    padding: 0.4rem;
    font-size: 0.8125rem;
  }
}
