/* Paletler: HealthBuddy lib/theme/app_theme.dart, PawBuddy pet_health/lib/utils/theme.dart */
:root {
  --bg: #09091b;
  --surface: #111128;
  --card: #18183a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --muted-deep: #475569;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-light: #818cf8;
  --green: #10b981;
  --header-bg: rgba(9, 9, 27, 0.88);
  --hero-glow: rgba(99, 102, 241, 0.16);
  --card-hover-glow: rgba(99, 102, 241, 0.12);
  --radius: 16px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

/* HealthBuddy AI — hastane mavisi açık tema */
body.theme-hb {
  --bg: #c5dff0;
  --surface: #dceef8;
  --card: #e8f4fc;
  --border: #94c5e0;
  --text: #0a3348;
  --muted: #1e5f7a;
  --muted-deep: #2d6a85;
  --accent: #0284c7;
  --accent-2: #0369a1;
  --accent-light: #0ea5e9;
  --header-bg: rgba(220, 238, 248, 0.94);
  --hero-glow: rgba(2, 132, 199, 0.22);
  --card-hover-glow: rgba(2, 132, 199, 0.18);
}

/* PawBuddy AI — logo arka planı #102A43 (AppIcon) */
body.theme-pb {
  --bg: #102a43;
  --surface: #152f4a;
  --card: #1c3754;
  --text: #ffffff;
  --muted: #94b8d4;
  --muted-deep: #6b8fa8;
  --accent: #1de9b6;
  --accent-2: #14c9a0;
  --accent-light: #5ef0d4;
  --header-bg: rgba(16, 42, 67, 0.92);
  --hero-glow: rgba(29, 233, 182, 0.12);
  --card-hover-glow: rgba(29, 233, 182, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

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

body.theme-hb {
  background: linear-gradient(165deg, #b8d9ee 0%, #c5dff0 35%, #d4e8f5 70%, #a8d4ec 100%);
  background-attachment: fixed;
  color: var(--text);
}

/* Açık zemin — tüm metin koyu (gradient şeffaflığı beyaz göstermesin) */
body.theme-hb .logo,
body.theme-hb main,
body.theme-hb h2,
body.theme-hb h3,
body.theme-hb .section-heading,
body.theme-hb .feature-block h3,
body.theme-hb .cta-band h2 {
  color: var(--text);
}

body.theme-hb .page-hero h1 {
  color: var(--text);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: var(--text);
}

body.theme-hb .page-hero .lead,
body.theme-hb p,
body.theme-hb .feature-block p,
body.theme-hb .cta-band p {
  color: var(--muted);
}

body.theme-hb .page-hero .back {
  color: var(--muted-deep);
}

body.theme-hb .page-hero .back:hover {
  color: var(--text);
}

body.theme-hb .nav a {
  color: var(--muted);
}

body.theme-hb .nav a:hover,
body.theme-hb .nav a.active {
  color: var(--accent);
}

body.theme-hb .site-footer,
body.theme-hb .footer-inner,
body.theme-hb .footer-links a {
  color: var(--muted);
}

body.theme-hb .footer-links a:hover {
  color: var(--text);
}

body.theme-hb .btn-outline {
  color: var(--text);
  border-color: #5a9fc4;
}

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

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #fff;
}

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

.nav a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}

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

body.theme-hb .nav a.active {
  color: var(--accent);
}

body.theme-pb .nav a.active {
  color: var(--accent-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, var(--text) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* Product cards */
.products {
  padding: 2rem 0 5rem;
}

.section-title {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.product-card,
.product-card-link {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: inherit;
}

.product-card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.product-card.hb {
  background: #dceef8;
  border-color: #7eb8da;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.1);
}

.product-card.hb:hover {
  border-color: #0284c7;
  box-shadow: 0 16px 36px var(--card-hover-glow);
}

.product-card.hb h2 {
  color: #0a3348;
}

.product-card.hb .tagline {
  color: #1e5f7a;
}

.product-card.hb .card-cta {
  color: #0284c7;
}

.product-card.hb:hover .card-cta,
.product-card.hb.product-card-link:hover .card-cta {
  color: #0369a1;
}

.product-card.pb {
  background: #152f4a;
  border-color: rgba(29, 233, 182, 0.18);
}

.product-card.pb:hover {
  border-color: rgba(29, 233, 182, 0.35);
  box-shadow: 0 20px 40px var(--card-hover-glow);
}

.product-card.pb .card-cta {
  color: var(--accent);
}

.app-logo {
  border-radius: 1.75rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.app-logo[width="88"],
.app-logo[width="72"] {
  border-radius: 1.25rem;
}

.app-logo[width="96"],
.app-logo.app-logo-hero {
  border-radius: 1.5rem;
}

.app-logo-hero {
  margin-bottom: 0.25rem;
}

.page-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.card-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: auto;
}

.product-card-link:hover .card-cta {
  color: var(--text);
}

.product-card-link.hb:hover .card-cta {
  color: #0369a1;
}

.product-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product-card .tagline {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

body.theme-pb .btn-primary {
  color: #102a43;
  font-weight: 700;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.product-card .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

/* Product detail pages */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-hero.hb {
  background:
    linear-gradient(180deg, #a8d4ec 0%, #c5dff0 45%, transparent 88%),
    radial-gradient(ellipse 90% 55% at 50% -5%, var(--hero-glow), transparent 68%);
  border-bottom-color: #7eb8da;
}

.page-hero.pb {
  background:
    linear-gradient(180deg, #102a43 0%, rgba(16, 42, 67, 0.4) 55%, transparent 85%),
    radial-gradient(ellipse 70% 45% at 50% 0%, var(--hero-glow), transparent 65%);
}

body.theme-pb .page-hero h1 {
  background: linear-gradient(135deg, #ffffff 0%, #5ef0d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.theme-hb .feature-block {
  border-color: #7eb8da;
  box-shadow: 0 2px 14px rgba(2, 132, 199, 0.08);
}

body.theme-hb .feature-block:hover {
  border-color: #0284c7;
  box-shadow: 0 8px 26px rgba(2, 132, 199, 0.14);
}

body.theme-pb .feature-block {
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-pb .feature-block:hover {
  border-color: rgba(29, 233, 182, 0.28);
}

body.theme-hb .cta-band {
  border-color: #7eb8da;
  background: linear-gradient(145deg, #e8f4fc 0%, #b8dff0 100%);
  box-shadow: 0 6px 28px rgba(2, 132, 199, 0.12);
}

body.theme-pb .cta-band {
  border-color: rgba(29, 233, 182, 0.2);
  background: linear-gradient(145deg, #1c3754 0%, #102a43 100%);
}

.page-hero .back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.page-hero .back:hover {
  color: var(--text);
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.page-hero .lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 640px;
}

.content {
  padding: 3rem 0 4rem;
}

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

.feature-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.feature-block h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-block .emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.feature-block p {
  font-size: 0.9rem;
  color: var(--muted);
}

h2.section-heading {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.cta-band {
  text-align: center;
  padding: 2.5rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cta-band .app-logo {
  margin: 0 auto 1rem;
}

.cta-band h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.cta-band p {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.cta-band .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* About */
.about {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.about h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about p {
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

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

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}
