/* Pear for two: the iPhone app's site. Plain CSS, no build step, no external requests.
   Colours come from PearPet/Sources/PearUI/Theme.swift (leaf, leafFill, leafBright, ink, blush,
   widget paper, meadow). Type is the system's rounded face, like the app. */

:root {
  color-scheme: light dark;
  --paper: #fffaf0;
  --paper-2: #fde8dc;
  --card: #ffffff;
  --card-2: #f4f9e9;
  --ink: #2b2433;
  --muted: #5d5566;
  --line: rgba(43, 36, 51, 0.1);
  --leaf: #3d8c38;
  --link: #2c7329;
  --btn: #338030;
  --on-btn: #ffffff;
  --blush: #ff6b8f;
  --glow: rgba(255, 107, 143, 0.18);
  --meadow-1: #f7fce6;
  --meadow-2: #dcf2bd;
  --shadow: 0 1px 2px rgba(43, 36, 51, 0.06), 0 12px 32px -12px rgba(43, 36, 51, 0.18);
  --round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Nunito", "Quicksand", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  --wrap: 68rem;
  --gutter: clamp(1rem, 5vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #08150d;
    --paper-2: #0f2416;
    --card: #12271a;
    --card-2: #163220;
    --ink: #f3f1ea;
    --muted: #b6bdb0;
    --line: rgba(255, 255, 255, 0.1);
    --leaf: #9cd670;
    --link: #a9df7f;
    --btn: #9cd670;
    --on-btn: #12240f;
    --glow: rgba(255, 107, 143, 0.12);
    --meadow-1: #173d1f;
    --meadow-2: #08170d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--paper) 0, var(--paper) 40rem, var(--paper-2) 100%);
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--round); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 0.18em; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--blush); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 0.5rem; z-index: 50; background: var(--card); color: var(--ink); padding: 0.5rem 1rem; border-radius: 10px; }
.skip:focus { left: 0.5rem; }

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

/* ── top bar ── */
.bar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; gap: 1.5rem; height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--round); font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; gap: 1.4rem; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 34rem) { .nav .wide { display: none; } }

/* ── buttons and the App Store badge slot ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--round); font-weight: 700; font-size: 1.05rem;
  color: var(--on-btn); background: var(--btn);
  padding: 0.8rem 1.4rem; border-radius: 999px; text-decoration: none;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--btn) 80%, transparent);
}
/* TODO(owner): the badge slot. See the comment in index.html. */
.store { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.store-badge { display: inline-block; height: 54px; }
.store-badge img { height: 54px; width: auto; }
.store-soon {
  display: inline-flex; align-items: center; gap: 0.6rem;
  height: 54px; padding: 0 1.3rem; border-radius: 12px;
  background: var(--ink); color: var(--paper);
  font-family: var(--round); font-weight: 700; font-size: 1.02rem;
}
.store-soon svg { width: 22px; height: 22px; fill: currentColor; }
.fine { font-size: 0.9rem; color: var(--muted); }

/* ── hero ── */
.hero { position: relative; overflow-x: clip; padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 8vw, 6rem); }
.hero::before {
  content: ""; position: absolute; inset: -10rem -20vw auto auto; width: 46rem; height: 46rem; z-index: -1;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--round); font-weight: 700; font-size: 0.95rem; color: var(--link); margin-bottom: 1rem; }
.kicker::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--blush); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.06; }
.hero h1 em { font-style: normal; color: var(--leaf); }
.hero .lede { margin: 1.25rem 0 2rem; font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--muted); max-width: 32rem; }

.art { position: relative; aspect-ratio: 1; max-width: 30rem; width: 100%; justify-self: center; }
.meadow {
  position: absolute; inset: 6%; border-radius: 50%;
  background: linear-gradient(180deg, var(--meadow-1), var(--meadow-2));
  box-shadow: inset 0 -20px 60px -30px rgba(61, 140, 56, 0.35);
}
.art .pet { position: absolute; inset: 14%; width: 72%; animation: bob 4.5s ease-in-out infinite; }
.art .float { position: absolute; width: 36%; filter: drop-shadow(0 14px 22px rgba(43, 36, 51, 0.22)); }
.art .float img { border-radius: 15.3%/15.3%; width: 100%; }
.art .f1 { left: -4%; bottom: 2%; transform: rotate(-7deg); }
.art .f2 { right: -4%; top: 4%; transform: rotate(6deg); }
@keyframes bob { 50% { transform: translateY(-3%); } }
@media (prefers-reduced-motion: reduce) { .art .pet { animation: none; } }

/* ── sections ── */
section { padding: clamp(3rem, 7vw, 5rem) 0; }
.head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.head h2 { font-size: clamp(2rem, 4.6vw, 3rem); }
.head p { margin-top: 0.9rem; color: var(--muted); font-size: 1.12rem; }

/* features: a bento of real widget renders */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
  padding: 1.6rem; display: flex; flex-direction: column; gap: 1.3rem;
}
.tile.span2 { grid-column: span 2; }
.tile.full { grid-column: 1 / -1; }
.tile .shot { display: grid; place-items: center; min-height: 12rem; background: var(--card-2); border-radius: 20px; padding: 1.4rem; }
.tile .shot img { border-radius: 15.3%/15.3%; filter: drop-shadow(0 10px 18px rgba(43, 36, 51, 0.16)); }
.tile .shot.small img { width: min(170px, 100%); }
.tile .shot.medium img { width: min(364px, 100%); border-radius: 7.1%/15.3%; }
.tile h3 { font-size: 1.4rem; }
.tile p { color: var(--muted); margin-top: 0.4rem; }
.tile .pill { display: inline-block; margin-right: 0.35rem; }

.surfaces { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; padding: 0; list-style: none; }
.surfaces li { font-size: 0.92rem; padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--card-2); color: var(--ink); border: 1px solid var(--line); }

/* the Pet's stages */
.grow { background: linear-gradient(180deg, transparent, var(--card-2) 30%, var(--card-2) 70%, transparent); }
.stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.8rem; list-style: none; padding: 0; margin: 0; }
.stages li { text-align: center; }
.stages img { width: 100%; max-width: 150px; margin: 0 auto 0.4rem; }
.stages b { display: block; font-family: var(--round); font-size: 1.05rem; }
.stages span { font-size: 0.88rem; color: var(--muted); }
.note { margin-top: 2rem; text-align: center; font-family: var(--round); font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 1.5rem); }
.note small { display: block; margin-top: 0.4rem; font-family: var(--text); font-weight: 400; font-size: 1rem; color: var(--muted); }

/* privacy points */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; list-style: none; padding: 0; margin: 0; }
.points li { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 1.4rem; }
.points h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.points p { color: var(--muted); font-size: 0.98rem; }
.more { margin-top: 1.5rem; }

/* pricing */
.price {
  display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 2rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 3rem);
}
.price h2 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.85rem; }
.ticks li { position: relative; padding-left: 2rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
@media (prefers-color-scheme: dark) {
  .ticks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%2312240f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}
.ticks b { font-family: var(--round); }
.price .crowned { width: min(260px, 100%); justify-self: center; }

/* closing call */
.cta { text-align: center; }
.cta img { width: 150px; margin: 0 auto 1rem; }
.cta h2 { font-size: clamp(2rem, 4.6vw, 3rem); }
.cta p { color: var(--muted); margin: 0.8rem auto 1.8rem; max-width: 30rem; }
.cta .store { align-items: center; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; font-size: 0.92rem; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.foot nav { display: flex; gap: 1.4rem; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* ── document pages: privacy, support, terms ── */
.doc { max-width: 44rem; margin: 0 auto; padding: clamp(2.5rem, 7vw, 4.5rem) var(--gutter) 4rem; }
.doc h1 { font-size: clamp(2.3rem, 6vw, 3.2rem); }
.doc .updated { margin-top: 0.6rem; color: var(--muted); font-size: 0.95rem; }
.doc .lede { margin-top: 1.4rem; font-size: 1.15rem; }
.doc h2 { font-size: 1.45rem; margin: 2.6rem 0 0.8rem; }
.doc h3 { font-size: 1.1rem; margin: 1.4rem 0 0.4rem; }
.doc p, .doc ul, .doc ol, .doc dl { margin: 0 0 0.9rem; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin-bottom: 0.4rem; }
.doc dt { font-weight: 650; margin-top: 0.8rem; }
.doc dd { margin: 0.15rem 0 0; color: var(--muted); }
.doc .box { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem 1.4rem; margin: 1.6rem 0; }
.doc .box ul { margin: 0; }
.doc .box li:last-child { margin-bottom: 0; }
.doc details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0.2rem 1.3rem; margin-bottom: 0.8rem; }
.doc summary { cursor: pointer; font-family: var(--round); font-weight: 700; font-size: 1.12rem; padding: 0.95rem 0; }
.doc details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 0.9rem; }
.doc details > :last-child { margin-bottom: 1.1rem; }
.doc code { font-size: 0.92em; background: var(--card-2); padding: 0.1em 0.35em; border-radius: 6px; }

/* ── narrow screens ── */
@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .art { max-width: 24rem; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile.span2 { grid-column: span 2; }
  .points { grid-template-columns: 1fr; }
  .price { grid-template-columns: 1fr; text-align: left; }
  .price .crowned { width: 180px; grid-row: 1; }
  .stages { grid-template-columns: repeat(3, 1fr); row-gap: 1.6rem; }
}
@media (max-width: 34rem) {
  .art { max-width: 19rem; }
  .bento { grid-template-columns: 1fr; }
  .tile.span2 { grid-column: auto; }
  .tile { padding: 1.1rem; border-radius: 24px; }
  .tile .shot { padding: 1rem; min-height: 0; }
}
