/* ToCARE Website — Shared Styles */

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

:root {
  --teal: #3ECDA6;
  --teal-bright: #52dbb8;
  --teal-glow: rgba(62, 205, 166, 0.15);
  --slate-950: #0a0f1a;
  --slate-900: #0f1729;
  --slate-800: #172038;
  --slate-700: #1e2a4a;
  --slate-400: #7a8bb5;
  --slate-300: #a0aece;
  --slate-100: #dce3f0;
  --white: #f0f4fa;
  --max-w: 1100px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--slate-100);
  background: var(--slate-950);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Grain overlay ── */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Navigation ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: rgba(10, 15, 26, 0.7);
  border-bottom: 1px solid rgba(62, 205, 166, 0.08);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--teal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--slate-400);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s;
}

.nav-links a:hover { color: var(--white); }

.nav-cta {
  background: var(--teal);
  color: var(--slate-950) !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.03em;
  transition: background 0.25s, transform 0.2s !important;
}

.nav-cta:hover {
  background: var(--teal-bright) !important;
  color: var(--slate-950) !important;
  transform: translateY(-1px);
}

/* ── Page Content (privacy, terms, contact) ── */

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 100px 32px 80px;
}

.page h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--slate-400);
  font-size: 0.95rem;
  margin-bottom: 40px;
}

.page h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  margin-top: 40px;
  margin-bottom: 12px;
}

.page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-top: 28px;
  margin-bottom: 8px;
}

.page p {
  margin-bottom: 16px;
  color: var(--slate-300);
}

.page ul,
.page ol {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--slate-300);
}

.page li {
  margin-bottom: 6px;
}

.page a {
  color: var(--teal);
  text-decoration: underline;
}

.page strong {
  font-weight: 600;
  color: var(--slate-100);
}

/* ── Legal page table ── */

.page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}

.page th,
.page td {
  border: 1px solid var(--slate-700);
  padding: 10px 12px;
  text-align: left;
  color: var(--slate-300);
}

.page th {
  background: var(--slate-900);
  font-weight: 600;
  color: var(--slate-100);
}

/* ── Hero (Landing Page) ── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 32px 80px;
  overflow: hidden;
}

/* Gradient mesh background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(62, 205, 166, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(45, 120, 212, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 90%, rgba(62, 205, 166, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

/* Grid lines */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(62, 205, 166, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 205, 166, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(62, 205, 166, 0.08);
  border: 1px solid rgba(62, 205, 166, 0.15);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--teal);
  margin-bottom: 32px;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease both;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-name {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 12px;
  animation: fadeInUp 0.8s 0.1s ease both;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hero-name-logo {
  width: 1.6em;
  height: 1.6em;
  border-radius: 8px;
}

.hero-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 14px;
  animation: fadeInUp 0.8s 0.15s ease both;
}

.hero-title em {
  font-style: italic;
  color: var(--teal);
}

.hero-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--slate-400);
  letter-spacing: 0.01em;
  margin-bottom: 28px;
  animation: fadeInUp 0.8s 0.2s ease both;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--slate-300);
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.7;
  animation: fadeInUp 0.8s 0.3s ease both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s 0.4s ease both;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--teal);
  color: var(--slate-950);
}

.btn-primary:hover {
  background: var(--teal-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(62, 205, 166, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--slate-300);
  border: 1px solid var(--slate-700);
}

.btn-ghost:hover {
  border-color: var(--slate-400);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── Vitals line ── */

.vitals-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  overflow: hidden;
  opacity: 0.07;
}

.vitals-line svg {
  width: 200%;
  height: 100%;
  animation: vitals-scroll 8s linear infinite;
}

@keyframes vitals-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Divider ── */

.section-divider {
  max-width: var(--max-w);
  margin: 0 auto;
  border: none;
  border-top: 1px solid rgba(62, 205, 166, 0.08);
}

/* ── Stats Strip ── */

.stats {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stat {
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.6s ease both;
}

.stat + .stat::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: rgba(62, 205, 166, 0.14);
}

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }

.stat-value {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--teal);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--slate-400);
  letter-spacing: 0.02em;
}

/* ── Features ── */

.features-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 32px;
}

.features-header {
  text-align: center;
  margin-bottom: 64px;
}

.features-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

.features-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  position: relative;
  background: rgba(23, 32, 56, 0.32);
  border: 1px solid rgba(122, 139, 181, 0.1);
  border-radius: 14px;
  padding: 34px 30px;
  transition: border-color 0.35s, transform 0.35s, background 0.35s, box-shadow 0.35s;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(62, 205, 166, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.feature-card:hover {
  border-color: rgba(62, 205, 166, 0.22);
  background: rgba(23, 32, 56, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--teal-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--teal);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--slate-400);
  line-height: 1.65;
  margin: 0;
}

/* ── Highlight Section ── */

.highlight {
  position: relative;
  margin: 0 32px;
  max-width: calc(var(--max-w) - 64px);
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, rgba(62, 205, 166, 0.06) 0%, rgba(45, 120, 212, 0.04) 100%);
  border: 1px solid rgba(62, 205, 166, 0.1);
  border-radius: 16px;
  padding: 64px;
  text-align: center;
  overflow: hidden;
}

.highlight::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

.highlight-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.highlight-title em {
  font-style: italic;
  color: var(--teal);
}

.highlight-desc {
  font-size: 1rem;
  color: var(--slate-300);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ── Contact / Demo Form ── */

.contact-section {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 100px 32px 40px;
  scroll-margin-top: 80px;
}

/* Soft teal halo behind the card */
.contact-section::before {
  content: '';
  position: absolute;
  inset: 70px 0 20px;
  background: radial-gradient(ellipse 75% 55% at 50% 28%, rgba(62, 205, 166, 0.06), transparent 72%);
  pointer-events: none;
}

.contact-header {
  position: relative;
  text-align: center;
  margin-bottom: 36px;
}

.contact-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 16px;
}

.contact-sub {
  font-size: 1rem;
  color: var(--slate-300);
  max-width: 440px;
  margin: 14px auto 0;
  line-height: 1.7;
}

.contact-form {
  position: relative;
  background: linear-gradient(160deg, rgba(23, 32, 56, 0.85) 0%, rgba(15, 23, 41, 0.85) 100%);
  border: 1px solid rgba(62, 205, 166, 0.1);
  border-radius: 18px;
  padding: 40px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* Top accent filament */
.contact-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-field label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--slate-400);
  margin-bottom: 9px;
}

.form-field input,
.form-field textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--white);
  background: rgba(10, 15, 26, 0.55);
  border: 1px solid rgba(122, 139, 181, 0.18);
  border-radius: 10px;
  padding: 13px 15px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--slate-400);
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: rgba(122, 139, 181, 0.32);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(10, 15, 26, 0.8);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.contact-submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  padding-top: 15px;
  padding-bottom: 15px;
}

.contact-submit svg {
  transition: transform 0.25s;
}

.contact-submit:hover svg {
  transform: translateX(3px);
}

.form-status {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 18px;
  text-align: center;
  min-height: 1.2em;
}

.form-status-ok { color: var(--teal-bright); }
.form-status-error { color: #f0807a; }

/* ── Footer ── */

.footer {
  border-top: 1px solid rgba(62, 205, 166, 0.06);
  padding: 48px 32px 32px;
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--teal);
  letter-spacing: 0.06em;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--slate-400);
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer-links a {
  color: var(--slate-400);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.25s;
}

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

/* ── Animations ── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Mobile nav toggle ── */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--slate-300);
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.25s;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .nav-inner { padding: 16px 20px; }

  .hero { padding: 100px 20px 60px; min-height: auto; }

  .stats {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 20px;
  }
  .stat + .stat::before { display: none; }

  .features-section { padding: 48px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .features-header { margin-bottom: 40px; }

  .highlight { padding: 40px 24px; margin: 0 20px; }

  .contact-section { padding: 64px 20px 24px; }
  .contact-form { padding: 28px 22px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
  .footer-left { align-items: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }

  .hero-actions { flex-direction: column; align-items: center; }

  .page { padding: 80px 20px 48px; }
  .page h1 { font-size: 1.8rem; }
  .page h2 { font-size: 1.15rem; }

  .page table { font-size: 0.82rem; }
  .page th, .page td { padding: 8px; }
}

@media (max-width: 600px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(62, 205, 166, 0.08);
    padding: 16px 20px 20px;
    gap: 14px;
  }
  .nav-links.open { display: flex; }
  .nav-inner { position: relative; }
  .stat-value { font-size: 2.2rem; }

  .hero-title { font-size: clamp(2.5rem, 8vw, 6.5rem); }

  /* Responsive tables - stack on mobile */
  .page table,
  .page thead,
  .page tbody,
  .page tr,
  .page th,
  .page td {
    display: block;
  }

  .page thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .page tr {
    margin-bottom: 12px;
    border: 1px solid var(--slate-700);
    border-radius: 6px;
    overflow: hidden;
  }

  .page td {
    border: none;
    border-bottom: 1px solid var(--slate-700);
    padding: 10px 12px;
  }

  .page td:last-child {
    border-bottom: none;
  }

  .page td::before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: var(--slate-400);
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }
}
