/* Blood Connect landing page. Tokens mirror the mobile app (AppThemeTokens). */
:root {
  --red: #cc0000;
  --red-deep: #990000;
  --red-soft: #ffd9d9;
  --ink: #1b1b1f;
  --ink-2: #4a4a52;
  --ink-3: #6c6c75;
  --bg: #ffffff;
  --bg-tint: #fbf5f5;
  --surface: #ffffff;
  --line: #ece4e4;
  --shadow: 0 18px 50px -20px rgba(120, 0, 0, 0.35);
  --radius: 18px;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3eded;
    --ink-2: #cfc6c6;
    --ink-3: #a59b9b;
    --bg: #121212;
    --bg-tint: #1a1515;
    --surface: #1e1a1a;
    --line: #2e2727;
    --red-soft: #3a1414;
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #f3eded;
  --ink-2: #cfc6c6;
  --ink-3: #a59b9b;
  --bg: #121212;
  --bg-tint: #1a1515;
  --surface: #1e1a1a;
  --line: #2e2727;
  --red-soft: #3a1414;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  max-width: 22ch;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
  color: var(--ink-2);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--red-soft);
  color: var(--ink);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

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

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--red);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}

.skip:focus {
  left: 8px;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------------------------------------------------------------- top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
}

.brand--small {
  font-size: 1rem;
}

.nav {
  display: none;
  gap: 22px;
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--ink-2);
}

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

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

.theme-toggle {
  margin-left: auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

@media (min-width: 900px) {
  .theme-toggle {
    margin-left: 0;
  }
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.theme-toggle .icon-moon {
  fill: currentColor;
  stroke: none;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.btn--primary {
  background: linear-gradient(180deg, #e01010, var(--red-deep));
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(204, 0, 0, 0.7);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.btn--dark {
  background: var(--ink);
  color: var(--bg);
}

.btn--light {
  background: #fff;
  color: var(--red-deep);
}

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 12px;
}

.cta-row--center {
  justify-content: center;
}

.cta-row .btn {
  flex: 1 1 260px;
}

@media (min-width: 720px) {
  .cta-row .btn {
    flex: 0 0 auto;
  }
}

.fineprint {
  font-size: 0.88rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: 48px 0 32px;
  background:
    radial-gradient(900px 480px at 85% 10%, color-mix(in srgb, var(--red) 14%, transparent), transparent 70%),
    var(--bg);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero {
    padding: 80px 0 72px;
  }
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--red);
  background: var(--red-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.6);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(204, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(204, 0, 0, 0);
  }
}

.accent {
  color: var(--red);
  display: block;
}

.lead {
  font-size: 1.15rem;
  max-width: 34em;
}

.hero__visual {
  position: relative;
  height: 460px;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 960px) {
  .hero__visual {
    height: 560px;
  }
}

.phone {
  width: 220px;
  border-radius: 34px;
  padding: 8px;
  background: #0d0d0f;
  box-shadow: var(--shadow);
}

.phone img {
  border-radius: 27px;
  width: 100%;
  height: auto;
}

@media (min-width: 960px) {
  .phone {
    width: 260px;
  }
}

.hero__visual .phone {
  position: absolute;
}

.phone--front {
  left: 0;
  top: 10px;
  z-index: 2;
}

.phone--back {
  right: 0;
  top: 60px;
  transform: rotate(4deg);
  opacity: 0.95;
}

/* ------------------------------------------------------------- sections */
.section {
  padding: 64px 0;
}

@media (min-width: 960px) {
  .section {
    padding: 96px 0;
  }
}

.section--tint {
  background: var(--bg-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 10px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 36px 0 28px;
  display: grid;
  gap: 16px;
}

@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.step__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}

.note {
  border-left: 4px solid var(--red);
  background: var(--red-soft);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  color: var(--ink);
}

.split {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  .split--reverse > :first-child {
    order: 0;
  }
}

.sms-steps {
  padding-left: 1.2em;
  margin: 0 0 1em;
  color: var(--ink-2);
}

.sms-steps li {
  margin-bottom: 8px;
}

.sms {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.93rem;
  line-height: 1.45;
}

.bubble--out {
  align-self: flex-end;
  background: var(--red);
  color: #fff;
  border-bottom-right-radius: 6px;
  font-weight: 600;
}

.bubble--in {
  align-self: flex-start;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}

.phones-pair {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.phones-pair .phone {
  width: min(46%, 240px);
}

.phone--offset {
  margin-top: 48px;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 14px;
}

.checks li {
  position: relative;
  padding-left: 34px;
  color: var(--ink-2);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

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

.cards {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--red-soft);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card p {
  margin: 0;
  font-size: 0.96rem;
}

.partner {
  display: grid;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 24px;
  background: var(--surface);
}

@media (min-width: 820px) {
  .partner {
    grid-template-columns: 1fr auto;
    padding: 48px;
  }
}

.partner p {
  margin: 0;
  max-width: 40em;
}

/* ------------------------------------------------------------- FAQ */
.faq {
  max-width: 820px;
}

.faq h2 {
  margin-bottom: 28px;
}

details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 12px;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 20px;
  font-weight: 700;
  position: relative;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--red);
}

details[open] summary::after {
  content: "\2212";
}

details p {
  padding: 0 20px 18px;
  margin: 0;
}

/* ------------------------------------------------------------- final CTA + footer */
.final {
  background: linear-gradient(160deg, var(--red), var(--red-deep));
  color: #fff;
  padding: 72px 0;
  text-align: center;
}

.final__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final img {
  border-radius: 16px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
  margin-bottom: 20px;
}

.final h2 {
  color: #fff;
  max-width: none;
}

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

.footer__inner {
  display: grid;
  gap: 12px;
}

.footer__legal {
  font-size: 0.9rem;
  max-width: 60em;
  margin: 0;
}

.footer__meta {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .pulse {
    animation: none;
  }
  .btn {
    transition: none;
  }
}
