/* ==========================================================================
   PillBell — design tokens
   Teal seed matches the app's own color scheme (AppColors.seed #3F8F8A).
   Warm cream base + charcoal ink instead of stark white/black — "medical
   but not clinical," same brief the app's own theme file states.
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/PlusJakartaSans-Variable.ttf') format('truetype-variations');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --teal-primary: #3f8f8a;
  --teal-deep: #1b3f3c;
  --teal-soft: #e4f0ee;
  --cream: #fbf7ef;
  --ink: #23302e;
  --ink-soft: #5b6b68;
  --amber: #e0a93b;
  --line: rgba(27, 63, 60, 0.12);

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --container: 1120px;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

/* ---- Nav ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 247, 239, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--teal-deep);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

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

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--teal-deep);
}

.nav-links a[aria-current='page'] {
  color: var(--teal-deep);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--teal-deep);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--teal-primary);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--teal-deep);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--teal-primary);
}

.btn-soon {
  background: var(--teal-soft);
  color: var(--teal-deep);
  cursor: default;
}

.btn-small {
  padding: 9px 16px;
  font-size: 0.85rem;
}

/* ---- Hero ---- */

.hero {
  padding: 88px 0 96px;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-primary);
  margin: 0 0 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.8rem, 5.2vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--teal-deep);
}

.hero-tagline {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--teal-primary);
  margin: 0 0 20px;
}

.hero p.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 34px;
}

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

.hero-ctas .link-quiet {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--teal-deep);
  text-decoration: none;
  border-bottom: 1.5px solid var(--teal-primary);
  padding-bottom: 2px;
}

/* ---- Bell signature ---- */

.bell-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  aspect-ratio: 1;
}

.bell-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--teal-primary);
  opacity: 0;
  animation: ring-out 2.8s ease-out infinite;
}

.bell-ring.r2 {
  animation-delay: 0.6s;
}

.bell-ring.r3 {
  animation-delay: 1.2s;
}

@keyframes ring-out {
  0% {
    transform: scale(0.55);
    opacity: 0.55;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.bell-icon {
  position: relative;
  width: 44%;
  color: var(--teal-deep);
  filter: drop-shadow(0 12px 24px rgba(27, 63, 60, 0.18));
}

@media (prefers-reduced-motion: reduce) {
  .bell-ring {
    animation: none;
    display: none;
  }
}

/* ---- Sections ---- */

section {
  padding: 88px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 0 52px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  color: var(--teal-deep);
  margin: 10px 0 0;
  letter-spacing: -0.005em;
}

.section-soft {
  background: var(--teal-soft);
}

/* ---- Rhythm (numbered sequence) ---- */

.rhythm {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.rhythm-step {
  border-top: 2px solid var(--teal-primary);
  padding-top: 20px;
}

.rhythm-step .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--amber);
  display: block;
  margin-bottom: 10px;
}

.rhythm-step h3 {
  font-size: 1.05rem;
  margin: 0 0 10px;
  color: var(--teal-deep);
}

.rhythm-step p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.97rem;
}

/* ---- Two people split ---- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.person-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}

.person-card.patient {
  background: var(--teal-deep);
  color: var(--cream);
}

.person-card .tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  margin: 0 0 14px;
}

.person-card h3 {
  font-size: 1.5rem;
  margin: 0 0 18px;
}

.patient h3 {
  font-size: 1.9rem;
}

.person-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.patient li {
  font-size: 1.15rem;
}

.person-card li {
  padding-left: 22px;
  position: relative;
  color: inherit;
}

.person-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ---- Privacy trust block ---- */

.trust {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.trust p {
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.trust-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trust-link {
  display: block;
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  color: var(--teal-deep);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.trust-link span {
  display: block;
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-top: 4px;
}

.trust-link:hover {
  border-color: var(--teal-primary);
  transform: translateX(2px);
}

/* ---- Footer ---- */

footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
}

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

.footer-brand .brand {
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  max-width: 32ch;
  margin: 0;
}

.footer-col h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--teal-deep);
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---- Legal / content pages ---- */

.doc {
  padding: 64px 0 100px;
}

.doc .wrap {
  max-width: 760px;
}

.doc-header {
  margin-bottom: 48px;
}

.doc-header .eyebrow {
  margin-bottom: 12px;
}

.doc-header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--teal-deep);
  margin: 0 0 14px;
}

.doc-header .updated {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.doc h2 {
  font-size: 1.3rem;
  color: var(--teal-deep);
  margin: 44px 0 14px;
}

.doc h3 {
  font-size: 1.05rem;
  color: var(--teal-deep);
  margin: 28px 0 10px;
}

.doc p,
.doc li {
  color: var(--ink-soft);
  font-size: 1rem;
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

.doc strong {
  color: var(--ink);
}

.callout {
  background: var(--teal-soft);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 28px 0;
}

.callout p {
  margin: 0;
  color: var(--teal-deep);
}

.callout p + p {
  margin-top: 10px;
}

/* ---- Mobile nav ---- */

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

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--teal-deep);
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

/* ---- Responsive ---- */

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .bell-stage {
    max-width: 220px;
    margin: 0 auto;
  }

  .rhythm,
  .split,
  .trust {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 20px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 10px 0;
  }

  .nav .btn-primary,
  .nav .btn-soon {
    display: none;
  }
}

@media (max-width: 560px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}
