/* =========================================================
   ICS Care Tech Systems — stylesheet
   Plain CSS rebuild (originally React + Tailwind).
   Design tokens below mirror the previous Tailwind config,
   so colors/spacing/radius stay the same if you tweak them.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
  --background: 0 0% 100%;
  --foreground: 222 47% 11%;

  --primary: 45 97% 55%;
  --primary-foreground: 222 47% 11%;

  --secondary: 217 91% 60%;
  --secondary-foreground: 0 0% 100%;

  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;

  --border: 214 32% 91%;

  --footer-bg: 259 87% 56%;
  --footer-fg: 0 0% 100%;

  /* Brand accent colors used directly (not theme-switched) */
  --brand-gold: #FBBF24;
  --brand-violet: #6C30F0;
  --brand-violet-dark: #5a28c9;

  --radius: 0.5rem;
  --header-height: 68px;
  --max-width: 1280px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; border-color: hsl(var(--border)); }

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  overflow-x: clip;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
svg { stroke-width: 2; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; font-weight: 700; }

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

/* Sections that are targets of anchor links need this so the fixed
   header doesn't cover their heading when jumped to. */
#home, #about, #services, #hub, #contact,
section[id] {
  scroll-margin-top: var(--header-height);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.875rem 2rem;
  height: 3rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-lg { height: 3.5rem; font-size: 1rem; padding-inline: 2rem; }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }

.btn-outline {
  background: hsl(var(--background) / 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}
.btn-outline:hover { background: hsl(var(--muted)); }

.btn-violet {
  background: var(--brand-violet);
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(108, 48, 240, 0.2);
  ring: 2px solid transparent;
}
.btn-violet:hover { background: var(--brand-violet-dark); }
.btn-violet:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

.btn-violet .icon-arrow { transition: transform 0.2s ease; }
.btn-violet:hover .icon-arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid hsl(var(--border));
}
.header-bar { height: 4px; background: hsl(var(--primary)); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark {
  width: 2.5rem; height: 2.5rem;
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  flex-shrink: 0;
  padding: 0.4rem;
}
.brand-mark-icon { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 800; font-size: 1.125rem; color: var(--brand-gold); line-height: 1; margin-bottom: 0.25rem; }
.brand-tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-violet); line-height: 1; }

.nav-desktop { display: none; align-items: center; gap: 2rem; }
.nav-desktop a { font-size: 0.875rem; font-weight: 500; transition: color 0.2s ease; }
.nav-desktop a:hover { color: hsl(var(--primary)); }

.menu-toggle {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.2s ease;
}
.menu-toggle:hover { background: hsl(var(--muted)); }
.menu-toggle svg { width: 1.5rem; height: 1.5rem; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-mobile {
  display: none;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.nav-mobile.is-open { display: block; }
.nav-mobile-inner { padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.nav-mobile a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background 0.2s ease;
}
.nav-mobile a:hover { background: hsl(var(--muted)); }

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to right, hsl(var(--background) / 0.95), hsl(var(--background) / 0.8) 55%, hsl(var(--background) / 0.3));
}
.hero-content { position: relative; z-index: 10; padding-block: 5rem; }
.hero-inner { max-width: 48rem; }
.hero h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero p {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 42rem;
}
.hero-actions { display: flex; flex-direction: column; gap: 1rem; }

@media (min-width: 640px) {
  .hero-actions { flex-direction: row; }
}
@media (min-width: 768px) {
  .hero h1 { font-size: 3rem; }
  .hero p { font-size: 1.25rem; }
}
@media (min-width: 1024px) {
  .hero h1 { font-size: 3.75rem; }
  .hero-content { padding-block: 8rem; }
}

/* ---------- Generic section spacing ---------- */
.section { padding-block: 6rem; }
.section-muted { background: hsl(var(--muted) / 0.3); }
.section-head { text-align: center; max-width: 42rem; margin: 0 auto 4rem; }
.section-head h2 { font-size: 1.875rem; margin-bottom: 1rem; line-height: 1.25; }
.section-head p { font-size: 1.125rem; color: hsl(var(--muted-foreground)); }
@media (min-width: 768px) { .section-head h2 { font-size: 2.25rem; } }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.about-row + .about-row { margin-top: 6rem; }
.about-row.reverse .about-media { order: 2; }
.about-row.reverse .about-copy { order: 1; }
.about-copy h2 { font-size: 1.875rem; margin-bottom: 1.5rem; line-height: 1.3; }
.about-copy p { font-size: 1.125rem; line-height: 1.7; color: hsl(var(--muted-foreground)); margin-bottom: 1.5rem; }
.about-media { position: relative; }
.about-media::before {
  content: "";
  position: absolute; inset: -1rem;
  background: var(--tint, rgba(251, 191, 36, 0.1));
  border-radius: 2rem;
  transform: rotate(3deg);
  z-index: 0;
}
.about-row.reverse .about-media::before { transform: rotate(-3deg); background: rgba(108, 48, 240, 0.1); }
.about-media img {
  position: relative;
  z-index: 1;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  object-fit: cover;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid hsl(var(--border) / 0.5);
}

.check-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.check-list li { display: flex; align-items: center; gap: 1rem; font-weight: 500; }
.check-badge {
  width: 2rem; height: 2rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.check-badge.gold { background: rgba(251, 191, 36, 0.2); color: var(--brand-gold); }
.check-badge.violet { background: rgba(108, 48, 240, 0.1); color: var(--brand-violet); }
.check-badge svg { width: 1rem; height: 1rem; stroke-width: 3; }

@media (min-width: 1024px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .about-row + .about-row { margin-top: 0; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .services-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .service-card.is-last { grid-column: span 2; width: 50%; margin-inline: auto; }
}

.card {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  height: 100%;
  transition: all 0.3s ease;
}
.card:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); transform: translateY(-4px); }

.card-icon {
  width: 3.5rem; height: 3.5rem;
  border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.card-icon svg { width: 1.75rem; height: 1.75rem; }
.card-icon.gold-bg { background: rgba(251, 191, 36, 0.1); color: var(--brand-gold); }
.card-icon.violet-bg { background: rgba(108, 48, 240, 0.1); color: var(--brand-violet); }

.card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card p { color: hsl(var(--muted-foreground)); line-height: 1.7; }
@media (min-width: 768px) { .card h3 { font-size: 1.5rem; } }

/* ---------- Health Connect Hub ---------- */
.hub-section {
  background: rgba(240, 249, 255, 0.5);
  border-block: 1px solid rgba(224, 242, 254, 1);
}
.hub-section .section-head p { color: #075985; font-weight: 500; font-size: 1.25rem; }
.hub-section .section-head h2 { color: #0f172a; }

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 0.4rem 0.9rem 0.4rem 0.5rem;
  margin-bottom: 1.25rem;
}
.product-badge-icon { width: 1.25rem; height: 1.25rem; }
.product-badge span { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; color: #0d9488; }

.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.hub-copy-card {
  background: #fff;
  border: 1px solid #e0f2fe;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}
.hub-copy-card p { font-size: 1.125rem; line-height: 1.7; color: #475569; }

.hub-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-left: 0.5rem;
}
@media (min-width: 640px) { .hub-features { grid-template-columns: 1fr 1fr; } }

.hub-feature { display: flex; align-items: flex-start; gap: 1rem; }
.hub-feature-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.75rem;
  background: #e0f2fe;
  color: #0284c7;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hub-feature-icon svg { width: 1.25rem; height: 1.25rem; }
.hub-feature span { font-weight: 500; color: #334155; padding-top: 0.5rem; line-height: 1.4; }

.hub-media { position: relative; width: 100%; }
.hub-mock {
  position: relative;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.2);
  background: #f1f5f9;
  overflow: hidden;
}
.hub-mock-bar {
  height: 2.5rem;
  background: #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  padding-inline: 1rem;
  gap: 0.5rem;
}
.hub-mock-dots { display: flex; gap: 0.375rem; }
.hub-mock-dots span { width: 0.75rem; height: 0.75rem; border-radius: 999px; display: block; }
.hub-mock-dots span:nth-child(1) { background: #f87171; }
.hub-mock-dots span:nth-child(2) { background: #fbbf24; }
.hub-mock-dots span:nth-child(3) { background: #34d399; }
.hub-mock-url { margin-inline: auto; background: rgba(255,255,255,0.5); border-radius: 0.375rem; height: 1.25rem; width: 12rem; }
.hub-mock-body { background: #fff; padding: 0.5rem; }
.hub-mock-body img { border-radius: 0.25rem; border: 1px solid #f1f5f9; }

@media (min-width: 1024px) {
  .hub-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 72rem;
  margin-inline: auto;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.contact-info h3 { font-size: 1.5rem; margin-bottom: 2rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.5rem; }
.contact-item-icon {
  width: 3rem; height: 3rem;
  border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-item-icon svg { width: 1.5rem; height: 1.5rem; }
.contact-item-icon.gold-bg { background: rgba(251, 191, 36, 0.1); color: var(--brand-gold); }
.contact-item-icon.violet-bg { background: rgba(108, 48, 240, 0.1); color: var(--brand-violet); }
.contact-item-icon.blue-bg { background: hsl(var(--secondary) / 0.1); color: hsl(var(--secondary)); }
.contact-item-label { font-size: 0.75rem; font-weight: 500; color: hsl(var(--muted-foreground)); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.contact-item-value { font-size: 1.125rem; font-weight: 500; transition: color 0.2s ease; }
.contact-item:nth-child(1) .contact-item-value:hover { color: var(--brand-gold); }
.contact-item:nth-child(2) .contact-item-value:hover { color: var(--brand-violet); }
.contact-item:nth-child(3) .contact-item-value:hover { color: hsl(var(--secondary)); }

.contact-form-card { border-radius: calc(var(--radius) + 4px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); overflow: hidden; background: hsl(var(--background)); }
.contact-form-card-bar { height: 0.5rem; background: linear-gradient(to right, var(--brand-gold), var(--brand-violet)); }
.contact-form-card-body { padding: 2rem; }
.contact-form-card-body h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.contact-form-card-body > p { color: hsl(var(--muted-foreground)); margin-bottom: 1.5rem; }

.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.field-optional { font-weight: 400; color: hsl(var(--muted-foreground)); }
.field input, .field textarea {
  width: 100%;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  font: inherit;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
}
.field input { height: 2.75rem; }
.field textarea { min-height: 140px; resize: none; }
.field input::placeholder, .field textarea::placeholder { color: hsl(var(--muted-foreground) / 0.7); }
.field input:focus, .field textarea:focus { outline: 2px solid hsl(var(--primary)); outline-offset: 1px; }

/* Honeypot — trap field for bots, never shown to real visitors */
.hp-field { display: none; }

/* WhatsApp consent toggle */
label.toggle-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 0;
}
.toggle-switch {
  display: inline-flex;
}
.toggle-switch { position: relative; width: 2.75rem; height: 1.5rem; flex-shrink: 0; }
.toggle-input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: hsl(var(--muted-foreground) / 0.3);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.toggle-thumb {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}
.toggle-input:checked + .toggle-track { background: #25D366; }
.toggle-input:checked + .toggle-track .toggle-thumb { transform: translateX(1.25rem); }
.toggle-input:focus-visible + .toggle-track { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.toggle-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
  line-height: 1.4;
}
.whatsapp-icon { width: 1.25rem; height: 1.25rem; color: #25D366; flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: hsl(var(--footer-bg));
  color: hsl(var(--footer-fg));
  padding-block: 3rem;
}
.footer-top { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem; font-size: 0.875rem; }
.footer-links a { transition: opacity 0.2s ease; }
.footer-links a:hover { opacity: 0.7; }
.footer-dot { color: rgba(255,255,255,0.4); }
.footer-bottom { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.2); text-align: center; font-size: 0.875rem; color: rgba(255,255,255,0.8); }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tag { color: rgba(255,255,255,0.8); }

@media (min-width: 768px) {
  .footer-top { flex-direction: row; }
}

/* ---------- Legal pages (Privacy / Terms) ---------- */
.legal-main { padding-top: 6rem; padding-bottom: 4rem; }
.legal-head { margin-bottom: 3rem; border-bottom: 1px solid hsl(var(--border)); padding-bottom: 2rem; }
.back-link { display: inline-flex; align-items: center; font-size: 0.875rem; font-weight: 500; color: hsl(var(--muted-foreground)); margin-bottom: 1.5rem; transition: color 0.2s ease; }
.back-link:hover { color: hsl(var(--primary)); }
.back-link svg { width: 1rem; height: 1rem; margin-right: 0.5rem; }
.legal-head h1 { font-size: 2.25rem; letter-spacing: -0.02em; margin-bottom: 1rem; }
.legal-head p { font-size: 1.125rem; color: hsl(var(--muted-foreground)); font-weight: 500; }
@media (min-width: 768px) { .legal-head h1 { font-size: 3rem; } }

.legal-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .legal-grid { grid-template-columns: 3fr 9fr; } }

.toc { position: sticky; top: 7rem; background: hsl(var(--muted) / 0.3); border: 1px solid hsl(var(--border) / 0.5); border-radius: 1rem; padding: 1.5rem; max-height: calc(100vh - 10rem); overflow-y: auto; }
.toc h3 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: hsl(var(--muted-foreground)); margin-bottom: 1rem; }
.toc nav { display: flex; flex-direction: column; gap: 0.75rem; }
.toc a { font-size: 0.875rem; font-weight: 500; color: hsl(var(--foreground)); transition: color 0.2s ease; line-height: 1.4; }
.toc a:hover { color: var(--brand-gold); }

.legal-content { max-width: 56rem; }
.legal-content > p:first-child { color: hsl(var(--muted-foreground)); margin-bottom: 3rem; }
.legal-content section { margin-bottom: 3rem; scroll-margin-top: 7rem; }
.legal-content h2 { font-size: 1.5rem; color: var(--brand-gold); margin-bottom: 1rem; }
.legal-content p { color: hsl(var(--muted-foreground)); line-height: 1.7; }
.legal-content strong { color: hsl(var(--foreground)); }

.legal-footer-nav { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid hsl(var(--border)); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-left { transform: translateX(-24px); }
.reveal-left.is-visible { transform: translateX(0); }
.reveal-right { transform: translateX(24px); }
.reveal-right.is-visible { transform: translateX(0); }
.reveal-scale { transform: scale(0.95); }
.reveal-scale.is-visible { transform: scale(1); }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.toast {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
  min-width: 260px;
  max-width: 340px;
  animation: toast-in 0.25s ease;
}
.toast strong { display: block; margin-bottom: 0.25rem; }
.toast p { font-size: 0.875rem; opacity: 0.85; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
