/* ====================================
   Unpanic home page: Waterline look
   Paper sky, cobalt water, navy deep, orange figure.
   ==================================== */

/* Two fonts only: the app's handwritten brush font for headings, classic Helvetica for everything else.
   Caveat Brush is self-hosted (SIL OFL, see fonts/OFL-CaveatBrush.txt). */
@font-face { font-family: 'Caveat Brush'; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/caveat-brush.woff2) format('woff2'); }

:root {
  --paper: #F7F1E3;
  --sky: #EEE5CF;
  --ink: #141414;
  --ink-soft: #4A4740;
  --surface: #7EA6F2;
  --cobalt: #1D4ED8;
  --deep: #0E1B4D;
  --abyss: #3A2A36;
  --orange: #FF6B1A;
  --orange-soft: #FBD6BF;
  --pencil: #9DBDF7;
  --flare: #E8361C;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --hand: 'Caveat Brush', 'Comic Sans MS', cursive;
  --serif: var(--hand);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.home {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.home img { max-width: 100%; display: block; }
.home a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
.h-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.h-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.h-nav .brand img { height: 34px; width: auto; }
.h-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; align-items: center; }
.h-nav ul a { text-decoration: none; font-weight: 700; font-size: 16px; }
.h-nav ul a:hover { color: var(--cobalt); }
.pill {
  display: inline-block; text-decoration: none; font-weight: 700;
  border: 2px solid var(--ink); border-radius: 999px; padding: 10px 20px;
  background: var(--orange); color: var(--ink) !important; line-height: 1.1;
  transition: transform .15s ease;
}
.pill:hover { transform: translateY(-2px); }
.pill.ghost { background: transparent; }
.pill.light { background: var(--paper); }
.h-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; font-family: inherit; }
.h-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

/* ---------- Shared ---------- */
.eyebrow {
  display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 14px;
}
.h-title {
  font-family: var(--serif); font-weight: 400; line-height: 1.05;
  letter-spacing: 0; margin: 0 0 18px;
  font-size: clamp(36px, 5.4vw, 64px);
}
.h-title.md { font-size: clamp(30px, 4vw, 46px); }
.lede { font-size: clamp(18px, 2vw, 21px); max-width: 34em; margin: 0 0 22px; }
.hand { font-family: var(--hand); font-weight: 400; }
.phone {
  border: 3px solid var(--ink); border-radius: 34px; overflow: hidden;
  background: var(--paper); box-shadow: 10px 10px 0 var(--ink);
  width: 100%; max-width: 300px;
}
.phone img { width: 100%; height: auto; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badges img { height: 52px; width: auto; }
.note { font-size: 15px; color: var(--ink-soft); margin-top: 14px; }

/* ---------- Hero ---------- */
.hero-w { position: relative; background: var(--paper); overflow: hidden; }
.hero-w .wrap {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px;
  align-items: center; padding-top: 64px; padding-bottom: 0;
}
.hero-w .copy { padding-bottom: 120px; }
.hero-w .h-title { font-size: clamp(42px, 6.4vw, 80px); }
.hero-w .h-title .lower { color: var(--cobalt); }
.hero-w .phone-col { position: relative; display: flex; justify-content: center; align-self: end; z-index: 2; }
.hero-w .phone { transform: rotate(2deg); margin-bottom: -60px; }
.sun {
  position: absolute; width: 120px; height: 120px; border-radius: 50%;
  background: var(--flare); top: 40px; right: 6%; z-index: 0;
}
.waterline { position: relative; height: 90px; margin-top: -90px; z-index: 1; }
.waterline svg { width: 100%; height: 100%; display: block; }

/* ---------- Water sections ---------- */
.water { background: var(--cobalt); color: var(--paper); }
.deep { background: var(--deep); color: var(--paper); }
.sand { background: var(--sky); }
.band { padding: 96px 0; }
.water .eyebrow, .deep .eyebrow { color: var(--orange-soft); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev > :first-child { order: 2; }
.split .media { display: flex; justify-content: center; gap: 20px; }
.split .media .phone:nth-child(2) { margin-top: 48px; }

/* The ladder: four states */
.ladder { list-style: none; margin: 8px 0 0; padding: 0; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; }
.ladder li { padding: 16px 20px; color: var(--ink); }
.ladder li b { font-family: var(--hand); font-size: 28px; font-weight: 400; display: block; line-height: 1.1; }
.ladder li span { font-size: 15px; }
.ladder .s1 { background: var(--sky); }
.ladder .s2 { background: var(--pencil); }
.ladder .s3 { background: var(--surface); }
.ladder .s4 { background: var(--deep); color: var(--paper); }

/* Feature grid */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.card {
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink);
  border-radius: 18px; padding: 22px 22px 24px;
}
.card h3 { font-family: var(--hand); font-weight: 400; font-size: 30px; line-height: 1.05; margin: 0 0 8px; }
.card p { margin: 0; font-size: 16px; }
.card .tag {
  display: inline-block; font-size: 12px; font-weight: 700; background: var(--orange);
  border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; margin-bottom: 10px;
}

/* Plus */
.plus-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.plus-list { list-style: none; padding: 0; margin: 0 0 8px; }
.plus-list li { padding: 14px 0; border-top: 2px solid rgba(247, 241, 227, .25); }
.plus-list li b { display: block; font-size: 19px; }
.plus-list li span { font-size: 16px; opacity: .9; }
.price-card {
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink);
  border-radius: 22px; padding: 28px; box-shadow: 10px 10px 0 var(--orange);
}
.price-card h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 4px; }
.price-row { display: flex; gap: 14px; margin: 20px 0; }
.price {
  flex: 1; border: 2px solid var(--ink); border-radius: 14px; padding: 14px; text-align: center;
}
.price.best { background: var(--orange-soft); }
.price b { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.price small { font-size: 14px; }
.free-list { margin: 0; padding-left: 20px; font-size: 16px; }
.free-list li { margin: 4px 0; }
.fine { font-size: 13px; color: var(--ink-soft); margin: 16px 0 0; }
.fine a { color: var(--cobalt); }
.health-logos { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.health-logos span {
  border: 2px solid var(--paper); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px;
}

/* Steps */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.steps3 .n { font-family: var(--serif); font-weight: 400; font-size: 56px; color: var(--cobalt); line-height: 1; }
.steps3 h3 { font-family: var(--hand); font-weight: 400; font-size: 32px; margin: 6px 0 6px; }
.steps3 p { margin: 0; font-size: 17px; }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 32px; }
.posts article { border-top: 3px solid var(--ink); padding-top: 16px; }
.posts h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.15; margin: 0 0 8px; }
.posts h3 a { text-decoration: none; }
.posts h3 a:hover { color: var(--cobalt); }
.posts p { font-size: 16px; margin: 0 0 10px; color: var(--ink-soft); }
.posts .more { font-weight: 700; color: var(--cobalt); text-decoration: none; }

/* Privacy */
.priv-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.priv-list li { padding-left: 30px; position: relative; font-size: 17px; }
.priv-list li::before {
  content: ''; position: absolute; left: 0; top: 7px; width: 14px; height: 14px;
  background: var(--orange); border: 2px solid var(--paper); border-radius: 50%;
}

/* Download */
.dl { text-align: center; }
.dl .lede { margin-left: auto; margin-right: auto; }
.dl .badges { justify-content: center; }

/* Footer */
.h-foot { background: var(--ink); color: var(--paper); padding: 56px 0 32px; font-size: 15px; }
.h-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.h-foot h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; color: var(--pencil); }
.h-foot ul { list-style: none; margin: 0; padding: 0; }
.h-foot li { margin: 6px 0; }
.h-foot a { text-decoration: none; }
.h-foot a:hover { color: var(--orange); }
.h-foot .wm { background: var(--paper); display: inline-block; padding: 8px 12px; border-radius: 10px; }
.h-foot .wm img { height: 30px; width: auto; }
.h-foot .bottom { border-top: 1px solid rgba(247, 241, 227, .2); margin-top: 36px; padding-top: 20px; }
.h-foot .bottom p { margin: 4px 0; opacity: .85; }

/* ---------- Playable demo ---------- */
.demo-phone { position: relative; }
.try-btn {
  position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%);
  font: 700 17px/1.1 var(--sans); cursor: pointer; white-space: nowrap;
  box-shadow: 4px 4px 0 var(--ink);
}
.try-btn:hover { transform: translateX(-50%) translateY(-2px); }
.hero-w .phone.live { transform: none; width: 360px; max-width: 360px; height: min(760px, 86vh); margin-bottom: 0; }
.demo-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--paper); }
.try-line { margin: 16px 0 0; }
.try-link {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink);
  font: 700 17px/1.4 var(--sans); text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 4px; text-decoration-color: var(--cobalt);
}
.try-link:hover { color: var(--cobalt); }
.demo-sheet {
  position: fixed; inset: 0; z-index: 1000; background: var(--paper);
  display: flex; flex-direction: column;
}
.demo-sheet[hidden] { display: none; }
.demo-bar {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 8px 8px 8px 16px; padding-top: max(8px, env(safe-area-inset-top));
  border-bottom: 2px solid var(--ink);
}
.demo-name { font-family: var(--hand); font-size: 24px; margin-right: auto; }
.demo-bar .pill { padding: 8px 14px; font-size: 15px; font-weight: 700; }
.demo-x {
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  font-size: 32px; line-height: 1; color: var(--ink);
}
.demo-slot { flex: 1; min-height: 0; }
html.demo-locked, html.demo-locked body { overflow: hidden; }

/* Motion: gentle, and off when asked */
.rise { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  .pill { transition: none; }
  .try-btn:hover { transform: translateX(-50%); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-w .wrap, .split, .plus-grid { grid-template-columns: 1fr; }
  .split.rev > :first-child { order: 0; }
  .hero-w .copy { padding-bottom: 24px; }
  .hero-w .phone { max-width: 240px; margin-bottom: -40px; }
  .hero-w .phone.live { width: 340px; max-width: 100%; }
  .grid3, .steps3, .posts { grid-template-columns: 1fr; }
  .priv-list { grid-template-columns: 1fr; }
  .h-foot .cols { grid-template-columns: 1fr 1fr; }
  .band { padding: 72px 0; }
  .sun { width: 80px; height: 80px; top: 24px; right: 20px; }
  .split .media .phone { max-width: 220px; }
}
@media (max-width: 760px) {
  .h-toggle { display: block; }
  .h-nav ul {
    display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    background: var(--paper); border-bottom: 2px solid var(--ink); padding: 16px 20px 22px; gap: 16px;
  }
  .h-nav ul.active { display: flex; }
}
@media (max-width: 480px) {
  body.home { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .split .media .phone { max-width: 46%; border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
  .split .media .phone:nth-child(2) { margin-top: 28px; }
  .badges img { height: 46px; }
  .price-row { flex-direction: column; }
  .h-foot .cols { grid-template-columns: 1fr; }
}
