/* PurePath AI - Clean, family-safe design */
:root {
  --primary: #1e3a5f;
  --primary-light: #2c5282;
  --accent: #38a169;
  --accent-soft: #c6f6d5;
  --bg: #f7fafc;
  --card: #ffffff;
  --text: #1a202c;
  --text-muted: #4a5568;
  --border: #e2e8f0;
  --danger: #e53e3e;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary-light);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-light);
  text-decoration: none;
}

.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover {
  background: #2f855a;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

.hero .btn-outline {
  border-color: white;
  color: white;
}
.hero .btn-outline:hover {
  background: white;
  color: var(--primary);
}

/* Hero */
.hero {
  max-width: none;
  margin: 0;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  background: linear-gradient(rgba(30, 58, 95, 0.75), rgba(30, 58, 95, 0.82)),
              url('/images/bg-elderly-care.jpg') center/cover no-repeat;
  color: white;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero h1 span {
  color: #68d391;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  background: rgba(198, 246, 213, 0.95);
  color: #276749;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* Sections */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.feature-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.feature-card-content {
  padding: 1.25rem 1.5rem 1.5rem;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-soft);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.price-card.featured {
  border: 2px solid var(--accent);
  transform: scale(1.03);
}

.price-card.featured::before {
  content: "Most Popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.price-card h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.75rem 0;
}

.price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-card ul {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
}

.price-card li {
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-card li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

/* Chat page */
.chat-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px);
}

.chat-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.model-select {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.model-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.model-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.model-btn:hover:not(.active) {
  border-color: var(--primary-light);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.credits {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--accent-soft);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 85%;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.message.user {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.assistant {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow);
}

.message.system {
  align-self: center;
  background: var(--accent-soft);
  color: #276749;
  font-size: 0.85rem;
  max-width: 95%;
  text-align: center;
}

.input-area {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.input-area textarea {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  min-height: 52px;
  max-height: 150px;
  outline: none;
  transition: border-color 0.15s;
}

.input-area textarea:focus {
  border-color: var(--primary-light);
}

.input-area button {
  padding: 0 1.25rem;
  height: 52px;
}

/* Footer */
footer {
  background: var(--primary);
  color: #cbd5e0;
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

footer p {
  font-size: 0.9rem;
  margin: 0.3rem 0;
}

footer a {
  color: #a0aec0;
}

/* Utilities */
.verse {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
  max-width: 600px;
  margin: 2rem auto;
  padding: 1rem;
  border-left: 3px solid var(--accent);
  background: #f0fff4;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .nav-links {
    gap: 0.75rem;
  }
  .hero {
    padding: 2.5rem 1rem;
  }
  .price-card.featured {
    transform: none;
  }
  .chat-container {
    height: calc(100vh - 60px);
  }
}
