/*
 * Pi Remote — product site.
 *
 * One stylesheet, no JavaScript, no webfonts, no third-party anything.
 * The palette comes from the app itself: warm paper, ink, one orange accent,
 * and the blue-to-purple mark. Dark mode follows the system setting.
 */

:root {
  color-scheme: light dark;

  --bg: #f7f3ea;
  --bg-soft: #fdfaf4;
  --bg-card: #fffdf8;
  --bg-tint: #f2ece0;

  --ink: #1b1a17;
  --ink-soft: #484338;
  --muted: #6d6558;

  --line: rgba(27, 26, 23, 0.12);
  --line-strong: rgba(27, 26, 23, 0.22);

  --accent: #b2560d;
  --accent-ink: #8a4209;
  --accent-wash: rgba(178, 86, 13, 0.1);

  /* Sampled from the screenshots, so a framed shot blends into its card. */
  --shot-bg: #f0f1eb;

  --shadow: 0 30px 60px -34px rgba(73, 48, 12, 0.5);
  --radius: 20px;
  --maxw: 1120px;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --bg-soft: #1b1915;
    --bg-card: #1e1c17;
    --bg-tint: #191712;

    --ink: #f4efe3;
    --ink-soft: #d8d1c3;
    --muted: #a49b8a;

    --line: rgba(244, 239, 227, 0.14);
    --line-strong: rgba(244, 239, 227, 0.26);

    --accent: #e79044;
    --accent-ink: #f0a862;
    --accent-wash: rgba(231, 144, 68, 0.14);

    --shot-bg: var(--bg-card);

    --shadow: 0 34px 70px -40px rgba(0, 0, 0, 0.9);
  }
}

/* ── Base ─────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-weight: 650;
  letter-spacing: -0.022em;
  line-height: 1.12;
  margin: 0;
}

/* Balance short display lines; leave section headings to wrap naturally, which
   breaks Chinese far better than forcing even line lengths. */
h1 {
  text-wrap: balance;
}

h2,
h3 {
  text-wrap: pretty;
}

p {
  margin: 0;
  text-wrap: pretty;
}

img {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 40;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip:focus {
  top: 12px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 640;
  font-size: 0.97rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-inline-start: 8px;
  font-size: 0.9rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-inline-start: auto;
}

.lang {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.lang:hover {
  color: var(--ink);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8f0;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

@media (prefers-color-scheme: dark) {
  .btn {
    color: #21160c;
  }
}

.btn:hover {
  background: var(--accent-ink);
  color: #fff8f0;
  transform: translateY(-1px);
}

@media (prefers-color-scheme: dark) {
  .btn:hover {
    background: var(--accent-ink);
    color: #21160c;
  }
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--bg-tint);
  border-color: var(--ink);
  color: var(--ink);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 0.86rem;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 76px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 140%;
  background:
    radial-gradient(38% 42% at 74% 18%, rgba(255, 173, 128, 0.5), transparent 70%),
    radial-gradient(34% 38% at 90% 62%, rgba(255, 214, 140, 0.45), transparent 72%),
    radial-gradient(30% 34% at 58% 4%, rgba(198, 156, 255, 0.28), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

@media (prefers-color-scheme: dark) {
  .hero::before {
    opacity: 0.28;
  }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.5rem);
}

.lede {
  max-width: 34ch;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-facts li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-art {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 340px);
}

.phone {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

.section {
  padding-block: clamp(52px, 7vw, 92px);
}

.section--tint {
  background: var(--bg-tint);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 620px;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.section-head h2 {
  font-size: clamp(1.55rem, 3.1vw, 2.15rem);
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1rem;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.card-rule {
  width: 26px;
  height: 3px;
  margin-bottom: 20px;
  border-radius: 2px;
  background: var(--accent);
}

.card h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.62;
}

/* ── Steps ────────────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  counter-increment: step;
}

.shot {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--shot-bg);
  box-shadow: 0 24px 48px -40px rgba(73, 48, 12, 0.8);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.step h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 20px;
  font-size: 1.02rem;
}

.step h3::before {
  content: counter(step);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.step p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.62;
}

/* ── Feature rows ─────────────────────────────────────────────────────────── */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.feature + .feature {
  margin-top: clamp(48px, 6vw, 84px);
}

.feature--flip .feature-art {
  order: 2;
}

.feature-art {
  justify-self: center;
  width: min(100%, 300px);
}

.feature-copy h2 {
  font-size: clamp(1.4rem, 2.7vw, 1.85rem);
}

.feature-copy > p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.checks {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-inline-start: 24px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.checks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-wash);
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* ── Requirements ─────────────────────────────────────────────────────────── */

.need {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.need li {
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}

.need h3 {
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.need p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

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

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.plan {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.plan--pro {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent-wash) 60%, var(--bg-card)),
    var(--bg-card) 62%
  );
}

.plan h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan .price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
}

.plan .price {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.plan .price-unit {
  color: var(--muted);
  font-size: 0.86rem;
}

.plan .plan-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Get the app ──────────────────────────────────────────────────────────── */

.get-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 60px) clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--bg-soft);
  text-align: center;
}

.get-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 62% at 16% 116%, rgba(255, 176, 122, 0.42), transparent 72%),
    radial-gradient(52% 58% at 86% -14%, rgba(188, 152, 255, 0.34), transparent 70%);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .get-panel::before {
    opacity: 0.22;
  }
}

.get-panel > * {
  position: relative;
}

.get-panel h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.get-panel p {
  max-width: 46ch;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 11px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.store strong {
  font-size: 0.95rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.store span {
  color: var(--muted);
  font-size: 0.76rem;
}

a.store:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  color: var(--ink);
}

.store--soon {
  border-style: dashed;
  opacity: 0.72;
}

.get-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-footer {
  padding-block: 44px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.footer-brand img {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-tagline {
  margin-top: 8px;
}

.footer-note {
  flex-basis: 100%;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

/* ── 404 ──────────────────────────────────────────────────────────────────── */

.page-404 {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.notfound {
  max-width: 44ch;
  text-align: center;
}

.notfound .mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 24px;
}

.notfound h1 {
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.notfound p {
  color: var(--muted);
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

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

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    max-width: 46ch;
  }

  .hero-art {
    width: min(100%, 300px);
    margin-top: 12px;
  }

  .cards,
  .need {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: minmax(240px, 62%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    margin-inline: -24px;
    padding-inline: 24px;
    scrollbar-width: none;
  }

  .steps::-webkit-scrollbar {
    display: none;
  }

  .step {
    scroll-snap-align: start;
  }

  .feature,
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature--flip .feature-art {
    order: 0;
  }

  .feature-art {
    width: min(100%, 280px);
    order: 0;
  }
}

@media (max-width: 620px) {
  .cards,
  .need {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-facts {
    font-size: 0.82rem;
  }

  .header-inner {
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
