/* StomaCompass website. Palette and type from assets/brand/BRAND.md.
   Structure borrowed from bevel.health: floating pill nav, centred hero,
   big rounded cards on an off-white ground, one dark card, sparse footer. */

:root {
  --blue: #2563eb;
  --green: #0f9d70;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ground: #f8fafc;
  --card: #eef3fa;
  --white: #ffffff;
  --radius: 28px;
  --max: 1160px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
h3 { font-size: 1.6rem; letter-spacing: -0.02em; }
p { margin: 0; }
.muted { color: var(--ink-soft); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  position: sticky; top: 16px; z-index: 10;
  width: max-content; max-width: calc(100% - 32px); margin: 16px auto 0;
  display: flex; align-items: center; gap: 22px;
  padding: 8px 8px 8px 18px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(14px);
  border-radius: 999px; box-shadow: 0 2px 12px rgba(15,23,42,.08);
}
.nav img { height: 30px; }
.nav .symbol { display: none; }
.nav a { flex-shrink: 0; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav .btn { color: var(--white); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--white); text-decoration: none;
  font-weight: 700; font-size: 16px; transition: transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:hover:active { transform: scale(0.97); }
}
.btn.small { padding: 8px 16px; font-size: 14px; }
.btn.blue { background: var(--blue); }

/* Hero */
.hero {
  position: relative; isolation: isolate; text-align: center;
  padding: 80px 20px 0; overflow: hidden;
  /* The bottom edge is one shallow curve, not a straight cut: the wash and the
     phone both end on it, and the page background shows through the corners. */
  --hero-sag: clamp(56px, 9vw, 150px);
  border-radius: 0 0 50% 50% / 0 0 var(--hero-sag) var(--hero-sag);
}
.hero::before {
  /* the soft blue-to-green wash behind the phone; tall enough to show at the
     bottom of the first screen on load */
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 35% 100%, rgba(37,99,235,.28), transparent 70%),
    radial-gradient(60% 70% at 70% 100%, rgba(15,157,112,.28), transparent 70%);
  z-index: -1;
}
.hero p.lead { max-width: 560px; margin: 20px auto 32px; font-size: 1.25rem; }
.hero .phone { margin: 56px auto -140px; } /* cropped by the section below, like Bevel */

/* Store badges. Both are placeholders until the listings exist. */
.stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stores a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 12px;
  background: var(--ink); color: var(--white); text-decoration: none;
  text-align: left; line-height: 1.1; cursor: default;
}
.stores svg { width: 26px; height: 26px; fill: currentColor; }
.stores small { display: block; font-size: 11px; font-weight: 400; opacity: .8; }
.stores b { font-size: 17px; }
.soon { margin-top: 14px; font-size: 14px; }

/* Phone frame. Put a 1170x2532 screenshot in screens/ and it fills the screen. */
.phone {
  width: 300px; aspect-ratio: 9 / 19.3;
  border-radius: 44px; padding: 10px;
  background: #1e293b; box-shadow: 0 30px 60px -20px rgba(15,23,42,.45);
}
.phone img, .phone .blank {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  border-radius: 36px; background: var(--white);
}
.phone .blank {
  display: grid; place-items: center; color: var(--ink-soft); font-size: 14px;
  background: linear-gradient(#fff, var(--card));
}

/* Sections & cards */
section { padding: 96px 0 0; }
#what { padding-top: 140px; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head p { margin-top: 16px; font-size: 1.2rem; }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 36px 32px 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
}
.card p { color: var(--ink-soft); flex: 1; }
.card .phone {
  width: 100%; max-width: 260px; margin: 20px auto -80px;
  aspect-ratio: 9 / 12; border-radius: 40px 40px 0 0; padding: 10px 10px 0;
}
.card .phone img, .card .phone .blank { border-radius: 32px 32px 0 0; }

.wide {
  background: var(--white); border: 1px solid var(--card);
  border-radius: var(--radius); padding: 56px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.wide h2 { margin-bottom: 22px; }
.wide .phone { width: 260px; aspect-ratio: 9 / 16; justify-self: center; }
.wide ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.wide li b { display: block; color: var(--ink); }
.wide li { color: var(--ink-soft); }

.dark {
  background: radial-gradient(80% 100% at 50% 0%, #1e3a5f, var(--ink) 70%);
  color: var(--white); text-align: center;
  border-radius: var(--radius); padding: 96px 32px;
}
.dark p { max-width: 520px; margin: 18px auto 0; color: #cbd5e1; font-size: 1.15rem; }
.dark .rows { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.dark .rows span {
  padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  font-size: 15px; color: #e2e8f0;
}

/* Footer */
footer { padding: 96px 0 40px; }
footer .row { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
footer img { height: 34px; }
footer nav { display: flex; gap: 28px; }
footer nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
footer .fine { margin-top: 40px; font-size: 14px; }

/* Legal pages */
.doc { max-width: 720px; margin: 64px auto 0; padding: 0 20px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
.doc .dated { margin: 12px 0 40px; }
.doc h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.doc p, .doc li { margin-bottom: 14px; }
.doc ul { padding-left: 22px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 16px; }
.doc th, .doc td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--card); vertical-align: top; }

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .card .phone { max-width: 220px; }
  .wide { grid-template-columns: 1fr; padding: 36px 28px; }
  .wide .phone { margin: 0 auto; }
  .nav { gap: 8px; padding: 6px 6px 6px 10px; }
  .nav a { white-space: nowrap; font-size: 13px; }
  .nav .btn.small { padding: 8px 12px; font-size: 13px; }
  .nav .wordmark { display: none; }
  .nav .symbol { display: block; }
  section { padding-top: 64px; }
}

/* Motion. Two moments only: the hero settling on first paint, and each big
   block arriving as it scrolls into view. Everything else stays still. */
@keyframes settle {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.hero > h1, .hero > .lead, .hero > .stores, .hero > .soon, .hero > .phone {
  animation: settle 600ms var(--ease-out) both;
}
.hero > .lead   { animation-delay: 60ms; }
.hero > .stores { animation-delay: 120ms; }
.hero > .soon   { animation-delay: 180ms; }
.hero > .phone  { animation-delay: 240ms; } /* the page lands on the product */

.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (min-width: 861px) { /* three columns: stagger; one column: each card reveals itself */
  .cards .reveal:nth-child(2) { transition-delay: 60ms; }
  .cards .reveal:nth-child(3) { transition-delay: 120ms; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes settle { from { opacity: 0; } to { opacity: 1; } }
  .hero > .lead, .hero > .stores, .hero > .soon, .hero > .phone { animation-delay: 0ms; }
  .reveal { transform: none; transition: opacity 300ms var(--ease-out); }
  .cards .reveal:nth-child(n) { transition-delay: 0ms; }
  .btn, .btn:active { transition: none; transform: none; }
}
