/* ============================================================
   PillVault Website — Stylesheet
   Brand color: #6750a4 (Material Design 3 Purple)
   ============================================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #6750a4;
  --primary-light: #d0bcff;
  --primary-dark: #4a3880;
  --accent: #e8f5e9;
  --success: #1b5e20;
  --warning: #664900;
  --error: #93000a;
  --bg: #ffffff;
  --bg-alt: #f8f6fc;
  --bg-dark: #1c1b1f;
  --text: #1c1b1f;
  --text-light: #49454f;
  --text-lighter: #79747e;
  --border: #e0dce5;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --transition: 0.25s ease;
}

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

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary-dark);
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  font-weight: 700;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}
h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}
h3 {
  font-size: 1.35rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

nav a {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

nav a:hover {
  color: var(--primary);
}
nav a:hover::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text);
  cursor: pointer;
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(
    170deg,
    var(--bg) 0%,
    var(--bg-alt) 50%,
    var(--accent) 100%
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 20px;
}
.hero h1 span {
  color: var(--primary);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 28px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  color: var(--primary);
}
.stat span {
  font-size: 0.88rem;
  color: var(--text-lighter);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  width: 300px;
  height: 600px;
  background: var(--bg);
  border-radius: 36px;
  box-shadow:
    var(--shadow-lg),
    0 0 0 6px #333;
  overflow: hidden;
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--primary-light) 0%,
    var(--accent) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.phone-screen .app-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  object-fit: contain;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(103, 80, 164, 0.3);
}

.phone-screen h3 {
  color: var(--primary-dark);
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.phone-screen p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.mock-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 16px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.mock-card .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-green {
  background: #1b5e20;
}
.dot-orange {
  background: #e65100;
}
.dot-blue {
  background: var(--primary);
}

.mock-card span {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
}

/* ---------- Features Section ---------- */
.features {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-top: 12px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
}

.icon-purple {
  background: #f3effb;
}
.icon-green {
  background: #e8f5e9;
}
.icon-orange {
  background: #fff3e0;
}
.icon-blue {
  background: #e3f2fd;
}
.icon-red {
  background: #fce4ec;
}
.icon-teal {
  background: #e0f2f1;
}

.feature-card h3 {
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ---------- How It Works ---------- */
.how-it-works {
  padding: 100px 0;
  background: var(--bg-alt);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.step h3 {
  margin-bottom: 8px;
}
.step p {
  color: var(--text-light);
  font-size: 0.93rem;
}

/* ---------- Benefits / Why ---------- */
.benefits {
  padding: 100px 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.benefit-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  transition: background var(--transition);
}

.benefit-card:hover {
  background: #f0ecf8;
}

.benefit-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}

.benefit-card h3 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}
.benefit-card p {
  color: var(--text-light);
  font-size: 0.92rem;
}

/* ---------- CTA Section ---------- */
.cta {
  padding: 80px 0;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: #fff;
  text-align: center;
}

.cta h2 {
  color: #fff;
  margin-bottom: 16px;
}
.cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.btn-white {
  background: #fff;
  color: var(--primary);
}
.btn-white:hover {
  background: #f0ecf8;
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ---------- FAQ ---------- */
.faq {
  padding: 100px 0;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin-top: 12px;
  color: var(--text-light);
  font-size: 0.95rem;
  padding-right: 40px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 14px;
}
.footer-brand .logo .logo-icon {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.footer-brand .logo .logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.footer-brand p {
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 10px;
}
.footer-col a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}
.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom a:hover {
  color: #fff;
}

/* ---------- Legal Pages ---------- */
.legal-page {
  padding: 60px 0 100px;
}

.legal-page .container {
  max-width: 800px;
}

.legal-page h1 {
  margin-bottom: 8px;
}

.legal-updated {
  color: var(--text-lighter);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.legal-page h3 {
  font-size: 1.15rem;
  margin-top: 28px;
  margin-bottom: 8px;
}

.legal-page p,
.legal-page li {
  color: var(--text-light);
  margin-bottom: 12px;
}

.legal-page ul,
.legal-page ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page ul li {
  list-style: disc;
}

/* ---------- Support Page ---------- */
.support-hero {
  padding: 60px 0 40px;
  background: var(--bg-alt);
  text-align: center;
}

.support-hero p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-top: 12px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.support-content {
  padding: 60px 0 100px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}

.support-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
}

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

.support-card .card-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.support-card h3 {
  margin-bottom: 10px;
}
.support-card p {
  color: var(--text-light);
  font-size: 0.93rem;
  margin-bottom: 18px;
}

/* ---------- About Page ---------- */
.about-hero {
  padding: 80px 0 60px;
  background: linear-gradient(170deg, var(--bg) 0%, var(--bg-alt) 100%);
  text-align: center;
}

.about-hero p {
  color: var(--text-light);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 16px auto 0;
}

.about-section {
  padding: 80px 0;
}
.about-section:nth-child(even) {
  background: var(--bg-alt);
}

.about-section .container {
  max-width: 800px;
}

.about-section h2 {
  margin-bottom: 20px;
}
.about-section p {
  color: var(--text-light);
  margin-bottom: 14px;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.value-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.value-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.value-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.value-card p {
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-visual {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner nav {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }

  .header-inner nav.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow);
  }

  .header-inner nav.open ul {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .hero {
    padding: 40px 0;
  }
  .features,
  .how-it-works,
  .benefits,
  .faq {
    padding: 60px 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .cta,
  .site-footer,
  .hero-visual {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
  }
}
