/* mediswipe.app: the app's look on the web. Deep black, the pearl's soft light, glass surfaces
   and the app's gold accent. Dark only, like the app. */

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.11);
  --text: rgba(255, 255, 255, 0.94);
  --text-2: rgba(235, 235, 245, 0.64);
  --text-3: rgba(235, 235, 245, 0.4);
  --accent: #f6be45;
  --radius: 28px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* The same soft night-blue light the App Store art sits on. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(1100px 760px at 50% 26%, rgb(18 19 28), transparent 72%);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* Navigation */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
}
.brand img { width: 28px; height: 28px; border-radius: 22.5%; }
.top nav { display: flex; gap: 22px; }
.top nav a { text-decoration: none; color: var(--text-2); font-size: 14px; transition: color 0.2s; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }

/* Hero */
.hero { max-width: var(--max); margin: 0 auto; padding: 48px 16px 0; text-align: center; }
h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 600;
}
/* A touch of the pearl's thin-film shimmer. */
.shimmer {
  background: linear-gradient(100deg, #fff 10%, #dcd6ff 40%, #ffe3c4 65%, #d4f3ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin: 20px auto 0;
  max-width: 32ch;
  color: var(--text-2);
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.4;
}
.cta { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.soon {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  font-weight: 500;
}
.meta { margin: 0; color: var(--text-3); font-size: 13px; }

/* The pearl you can pull */
.stage {
  position: relative;
  height: min(50vh, 480px);
  min-height: 320px;
  margin-top: 8px;
  user-select: none;
  -webkit-user-select: none;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pearl {
  --d: clamp(150px, 26vw, 230px);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--d);
  height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  border-radius: 50%;
  touch-action: none;
  cursor: grab;
  transform: translate(0, 0);
  will-change: transform;
}
.pearl:active { cursor: grabbing; }
.pearl::before {
  content: "";
  position: absolute;
  inset: -42%;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(217, 224, 255, 0.17) 0, rgba(217, 224, 255, 0.06) 45%, transparent 70%);
}
/* A finger-sized margin around the pearl, like the app's hit slop. */
.pearl::after { content: ""; position: absolute; inset: -24px; border-radius: 50%; }
.pearl img { width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.pearl.beat img { animation: beat 1.2s ease-in-out infinite; }
.pearl.jiggle img { animation: jiggle 0.6s ease-out; }
.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  margin: 0;
  color: var(--text-3);
  font-size: 15px;
  transition: opacity 0.8s;
}
.hint.hidden { opacity: 0; }

/* A slow heartbeat while the pearl is held still, with the app's double beat. */
@keyframes beat {
  0%, 45%, 100% { transform: scale(1); }
  10% { transform: scale(1.047); }
  22% { transform: scale(1.005); }
  30% { transform: scale(1.03); }
}
@keyframes jiggle {
  20% { transform: scale(1.06, 0.95); }
  40% { transform: scale(0.97, 1.03); }
  60% { transform: scale(1.02, 0.99); }
  80% { transform: scale(0.995, 1.005); }
}

/* Screens */
.screens {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 16px 24px;
}
.phone {
  flex: 0 0 auto;
  width: 230px;
  margin: 0;
  aspect-ratio: 1206 / 2622;
  overflow: hidden;
  border: 8px solid #141416;
  border-radius: 40px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 40px 80px -24px rgba(0, 0, 0, 0.9),
    0 0 120px -30px rgba(200, 205, 255, 0.22);
}
.phone.main { width: 270px; }
.phone img { width: 100%; height: 100%; object-fit: cover; }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 104px 16px 0; }
h2 {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.sub { max-width: 40ch; margin: 0 auto 44px; text-align: center; color: var(--text-2); font-size: 19px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--stroke);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 45%);
}
.card svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 { margin: 18px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-2); font-size: 16px; }

.private { text-align: center; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 28px; }
.chip {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  font-size: 15px;
}
.private p { max-width: 46ch; margin: 0 auto 20px; color: var(--text-2); font-size: 19px; }
.more { color: var(--accent); text-decoration: none; font-weight: 500; }
.more:hover { text-decoration: underline; }

/* Support and privacy pages */
.doc { max-width: 720px; margin: 0 auto; padding: 64px 16px 0; }
.doc h1 { font-size: clamp(38px, 6vw, 56px); }
.doc .lede { margin: 16px 0 0; max-width: none; }
.doc h2 { margin: 48px 0 12px; text-align: left; font-size: 24px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--text-2); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.updated { margin: 12px 0 0; color: var(--text-3); font-size: 15px; }
.mail {
  display: inline-flex;
  margin-top: 28px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--stroke);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.mail:hover { background: rgba(255, 255, 255, 0.13); }
details {
  margin: 10px 0;
  padding: 0 22px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--stroke);
}
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  list-style: none;
  cursor: pointer;
  font-weight: 500;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--text-3); font-size: 24px; line-height: 1; transition: transform 0.3s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 20px; }

/* Footer */
footer {
  display: grid;
  gap: 10px;
  max-width: var(--max);
  margin: 128px auto 0;
  padding: 32px 16px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-3);
  font-size: 13px;
}
footer p { margin: 0; }
footer nav { display: flex; gap: 20px; }
footer nav a { color: var(--text-2); text-decoration: none; }
footer nav a:hover { color: var(--text); }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hero { padding-top: 44px; }
  .screens {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-top: 48px;
    gap: 18px;
  }
  .screens::-webkit-scrollbar { display: none; }
  .phone, .phone.main { width: 62vw; scroll-snap-align: center; }
  .section { padding-top: 80px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .pearl.beat img, .pearl.jiggle img { animation: none; }
  .hint, summary::after { transition: none; }
}
