/* Pip website — frosted glass on a soft night-sky gradient, with the glow pet. */

:root {
  --night-top: #0b1020;
  --night-bottom: #141b2e;
  --glass-fill: rgba(255, 255, 255, 0.06);
  --glass-fill-strong: rgba(255, 255, 255, 0.1);
  --glass-rim: rgba(255, 255, 255, 0.16);
  --text-primary: #eef2fb;
  --text-secondary: #aeb8cf;
  --text-tertiary: #76819b;
  --pet-core: #c9ebff;
  --pet-mid: #6cbbff;
  --pet-edge: #3274ff;
  --pet-glow: #4da3ff;
  --pet-eye: #0c2240;
  --pet-blush: #ff8fb1;
  --accent-warm: #ff9a1f;
  --accent-red: #ff4530;
  --radius-card: 22px;
  --page-gutter: 16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--night-bottom);
  background-image:
    radial-gradient(900px 600px at 12% -10%, rgba(77, 163, 255, 0.28), transparent 60%),
    radial-gradient(800px 500px at 100% 10%, rgba(154, 107, 255, 0.22), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(52, 211, 153, 0.14), transparent 60%),
    linear-gradient(180deg, var(--night-top), var(--night-bottom));
  background-attachment: fixed;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--pet-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  width: min(1080px, 100% - 2 * var(--page-gutter));
  margin: 0 auto;
}

/* ── Glass ───────────────────────────────────────────── */

.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-rim);
  border-radius: var(--radius-card);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ── Header ──────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
}
.brand:hover { text-decoration: none; }

.site-nav { display: flex; align-items: center; gap: 18px; font-weight: 700; font-size: 15px; }
.site-nav a { color: var(--text-secondary); }
.site-nav a:hover { color: var(--text-primary); text-decoration: none; }

@media (max-width: 640px) {
  .site-nav .nav-link { display: none; }
}

/* ── Buttons ─────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(180deg, var(--pet-mid), var(--pet-edge));
  box-shadow: 0 8px 26px rgba(77, 163, 255, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgba(77, 163, 255, 0.6); text-decoration: none; }
.button:disabled { opacity: 0.6; cursor: default; transform: none; }
.button-small { padding: 8px 16px; font-size: 14px; }
.button-ghost {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}
.button-ghost:hover { background: rgba(255, 255, 255, 0.14); box-shadow: none; }
.button-google {
  background: white;
  color: #1f2430;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
}
.button-google:hover { box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4); }
.button-google img { width: 18px; height: 18px; }

/* ── The pet ─────────────────────────────────────────── */

.pet {
  --pet-size: 64px;
  display: inline-block;
  position: relative;
  width: var(--pet-size);
  height: var(--pet-size);
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, white 0%, var(--pet-core) 22%, var(--pet-mid) 62%, var(--pet-edge) 100%);
  box-shadow:
    0 0 calc(var(--pet-size) * 0.35) var(--pet-glow),
    0 0 calc(var(--pet-size) * 0.9) rgba(77, 163, 255, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  animation: pet-bob 3s ease-in-out infinite;
}
.pet::before, .pet::after {
  /* the eyes */
  content: "";
  position: absolute;
  top: 38%;
  width: 13%;
  height: 20%;
  border-radius: 999px;
  background: var(--pet-eye);
  animation: pet-blink 4.4s infinite;
}
.pet::before { left: 30%; }
.pet::after { right: 30%; }
.pet .pet-smile {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 18%;
  height: 9%;
  transform: translateX(-50%);
  border: calc(var(--pet-size) * 0.05) solid var(--pet-eye);
  border-top: none;
  border-radius: 0 0 999px 999px;
}
.pet .pet-blush {
  position: absolute;
  top: 58%;
  width: 17%;
  height: 9%;
  border-radius: 50%;
  background: var(--pet-blush);
  opacity: 0.55;
}
.pet .pet-blush.left { left: 14%; }
.pet .pet-blush.right { right: 14%; }
.pet .pet-shine {
  position: absolute;
  left: 22%;
  top: 14%;
  width: 26%;
  height: 15%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: rotate(-28deg);
}
.pet-small { --pet-size: 30px; }
.pet-tiny { --pet-size: 22px; animation: none; }
.pet-large { --pet-size: 120px; }

.pet.theme-sunny { --pet-core: #fff4c2; --pet-mid: #ffce4d; --pet-edge: #ff9a1a; --pet-glow: #ffb938; --pet-eye: #3a2200; }
.pet.theme-mint { --pet-core: #d6ffee; --pet-mid: #5fe0ac; --pet-edge: #12a877; --pet-glow: #34d399; --pet-eye: #06281b; }
.pet.theme-blossom { --pet-core: #ffe1f0; --pet-mid: #ff97c6; --pet-edge: #ec4b8c; --pet-glow: #ff73ae; --pet-eye: #3b0a22; --pet-blush: #ff4f86; }
.pet.theme-grape { --pet-core: #eeddff; --pet-mid: #b18cff; --pet-edge: #7446f5; --pet-glow: #9a6bff; --pet-eye: #1e0b45; }
.pet.theme-snow { --pet-core: #ffffff; --pet-mid: #e3eaf3; --pet-edge: #a6b4c8; --pet-glow: #cfddf0; --pet-eye: #1b2433; }
.pet[class*="theme-"] { box-shadow: 0 0 calc(var(--pet-size) * 0.35) var(--pet-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.55); }

@keyframes pet-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6%); }
}
@keyframes pet-blink {
  0%, 94%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.12); }
}

@media (prefers-reduced-motion: reduce) {
  .pet, .pet::before, .pet::after, .demo-pet, .demo-mark, .demo-dropdown { animation: none !important; }
  .demo-dropdown, .demo-mark-3 { opacity: 1; }
  .demo-pet { left: 91%; top: 39%; }
}

/* ── Hero ────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: center;
  padding: 72px 0 48px;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-rim);
}

h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 18px 0 16px;
  font-weight: 900;
}
h1 .glow-text {
  background: linear-gradient(90deg, var(--pet-core), var(--pet-mid) 45%, #b18cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-secondary); margin: 0 0 26px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--text-tertiary); }

/* A little scripted demo: in a fake TextEdit, the pet walks the path Format → Text → Show Ruler */
.demo {
  position: relative;
  padding: 14px 14px 12px;
  overflow: hidden;
}
/* The stage is a size container: rows, text and the pet's path all use its
   height (cqh), so everything lines up at any width */
.demo-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  container-type: size;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  font-weight: 700;
}
/* (cq units on the stage itself would measure the page; its children measure the stage) */
.demo-stage > * { font-size: 3.4cqh; }
.demo-stage span { white-space: nowrap; }
.demo-menubar {
  position: absolute; left: 0; right: 0; top: 0;
  height: 10cqh;
  display: flex; align-items: center; gap: 4.5cqh;
  padding: 0 4cqh;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
}
.demo-menubar .demo-menu-app { color: var(--text-primary); font-weight: 900; }
.demo-menu-apple { width: 3cqh; height: 3cqh; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.demo-document { position: absolute; left: 8%; right: 8%; top: 20cqh; display: grid; gap: 3cqh; }
.demo-document span { height: 2cqh; border-radius: 4px; background: rgba(255, 255, 255, 0.1); }
.demo-document span.short { width: 60%; }
.demo-dropdown {
  position: absolute;
  display: grid;
  padding: 1.5cqh 0;
  border-radius: 8px;
  background: rgba(30, 38, 56, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color: var(--text-primary);
  opacity: 0;
}
.demo-dropdown span { display: flex; justify-content: space-between; align-items: center; height: 7.5cqh; padding: 0 4cqh; }
.demo-dropdown em { font-style: normal; color: var(--text-secondary); }
/* The Format menu opens under its title; the Text submenu lines up with the Text row */
.demo-format-menu { left: 42%; top: 10cqh; width: 36%; animation: demo-format-menu 10s ease-in-out infinite; }
.demo-text-menu { left: 77%; top: 17.5cqh; width: 21%; animation: demo-text-menu 10s ease-in-out infinite; }
/* Pip's marks sit inside their target, so they always wrap it exactly */
.demo-target { position: relative; }
.demo-mark { position: absolute; inset: -0.6cqh -1.2cqh; opacity: 0; pointer-events: none; }
.demo-mark b {
  position: absolute; left: -1.8cqh; top: -1.8cqh;
  width: 3.8cqh; height: 3.8cqh; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 2.4cqh; font-weight: 900; font-style: normal; color: #fff;
  background: var(--accent-red);
}
.demo-mark-1 {
  inset: -1.2cqh -2cqh;
  border: 2.5px solid var(--accent-red); border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 69, 48, 0.6);
  animation: demo-mark-1 10s ease-in-out infinite;
}
.demo-mark-2, .demo-mark-3 {
  inset: 0.3cqh 1cqh;
  border: 2px solid #4da3ff; border-radius: 6px;
  box-shadow: 0 0 12px rgba(77, 163, 255, 0.55);
}
.demo-mark-2 { animation: demo-mark-2 10s ease-in-out infinite; }
.demo-mark-3 { animation: demo-mark-3 10s ease-in-out infinite; }
.demo-mark-2 b, .demo-mark-3 b { background: #4da3ff; }
.demo-pet {
  position: absolute;
  left: 80%; top: 80%;
  animation: demo-route 10s ease-in-out infinite;
}
.demo-caption { margin: 12px 2px 0; font-size: 14px; color: var(--text-secondary); }
.demo-caption strong { color: var(--text-primary); }
/* 10s loop: Format (1) → menu opens → Text (2) → submenu opens → Show Ruler (3) */
@keyframes demo-route {
  0%, 6% { left: 80%; top: 80%; }
  16%, 30% { left: 57%; top: 9%; }
  40%, 54% { left: 72%; top: 24%; }
  64%, 86% { left: 91%; top: 39%; }
  96%, 100% { left: 80%; top: 80%; }
}
@keyframes demo-mark-1 {
  0%, 15% { opacity: 0; transform: scale(0.7); }
  19%, 31% { opacity: 1; transform: scale(1); }
  35%, 100% { opacity: 0; }
}
@keyframes demo-format-menu {
  0%, 29% { opacity: 0; transform: translateY(-4px); }
  32%, 90% { opacity: 1; transform: translateY(0); }
  94%, 100% { opacity: 0; }
}
@keyframes demo-mark-2 {
  0%, 39% { opacity: 0; }
  43%, 55% { opacity: 1; }
  59%, 100% { opacity: 0; }
}
@keyframes demo-text-menu {
  0%, 53% { opacity: 0; transform: translateX(-4px); }
  56%, 90% { opacity: 1; transform: translateX(0); }
  94%, 100% { opacity: 0; }
}
@keyframes demo-mark-3 {
  0%, 63% { opacity: 0; }
  67%, 88% { opacity: 1; }
  92%, 100% { opacity: 0; }
}
/* ── Sections ────────────────────────────────────────── */

section { padding: 44px 0; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 10px; font-weight: 900; }
.section-lede { color: var(--text-secondary); margin: 0 0 28px; max-width: 40em; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) {
  .steps, .features { grid-template-columns: minmax(0, 1fr); }
}
.card { padding: 22px; }
.card h3 { margin: 10px 0 6px; font-size: 19px; font-weight: 800; }
.card p { margin: 0; color: var(--text-secondary); font-size: 15px; }
.step-number {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-red));
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.feature-icon { font-size: 26px; }
kbd {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.themes-row { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; margin-top: 10px; }
.theme-chip { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; color: var(--text-secondary); }

/* ── Pricing ─────────────────────────────────────────── */

.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 18px; }
@media (max-width: 760px) { .pricing { grid-template-columns: minmax(0, 1fr); } }
.plan { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.plan-featured { border-color: rgba(77, 163, 255, 0.6); box-shadow: 0 0 0 1px rgba(77, 163, 255, 0.35), 0 20px 60px rgba(77, 163, 255, 0.22); }
.plan-name { font-weight: 900; font-size: 20px; }
.plan-price { font-size: 42px; font-weight: 900; line-height: 1; }
.plan-price small { font-size: 16px; color: var(--text-secondary); font-weight: 700; }
.plan ul { margin: 0; padding-left: 20px; color: var(--text-secondary); }
.plan li { margin: 4px 0; }

/* ── Footer and simple pages ─────────────────────────── */

.site-footer {
  margin: 40px 0 28px;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 14px;
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-secondary); }

.center-card {
  max-width: 460px;
  margin: 12vh auto 0;
  padding: 34px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.center-card h1 { font-size: 30px; margin: 6px 0 0; }
.center-card p { margin: 0; color: var(--text-secondary); }
.status-line { font-size: 14px; color: var(--text-tertiary); min-height: 1.5em; }
.status-line.error { color: #ff8a80; }

.prose { padding: 26px; }
.prose h1 { font-size: 36px; }
.prose h2 { font-size: 22px; margin-top: 26px; }
.prose p, .prose li { color: var(--text-secondary); }

.button-disabled { opacity: 0.55; cursor: default; pointer-events: none; }
