/* pon.chat homepage: the introduction and the downloads on one page. The
   colours are the app's default theme (warm coral, as site.css); the dark
   variant follows the system like the app. The other pages keep site.css. */
:root {
  --page: #f7f3f1;
  --page-2: #fbf8f6;
  --card: #ffffff;
  --ink: #241c1a;
  --ink-2: #4a3d39;
  --muted: #7a6b65;
  --line: rgba(60, 30, 20, 0.09);
  --line-strong: rgba(60, 30, 20, 0.16);
  --field: #f2ebe7;
  --accent: #c8402a;
  --accent-fill: #d4472f;
  --accent-deep: #b23722;
  --accent-soft: rgba(212, 71, 47, 0.1);
  --on-accent: #ffffff;
  --glow-a: rgba(238, 90, 63, 0.28);
  --glow-b: rgba(255, 176, 128, 0.32);
  --shadow: 0 1px 2px rgba(60, 30, 20, 0.05), 0 8px 24px -12px rgba(60, 30, 20, 0.18);
  --shadow-lift: 0 2px 4px rgba(60, 30, 20, 0.06), 0 22px 44px -18px rgba(60, 30, 20, 0.32);
  --frame: #1b1716;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #121010;
    --page-2: #171413;
    --card: #1d1817;
    --ink: #f5eeeb;
    --ink-2: #dacfca;
    --muted: #a5958e;
    --line: rgba(255, 235, 225, 0.08);
    --line-strong: rgba(255, 235, 225, 0.16);
    --field: #272120;
    --accent: #ff8b73;
    --accent-fill: #d9533a;
    --accent-deep: #c4452d;
    --accent-soft: rgba(255, 139, 115, 0.12);
    --glow-a: rgba(238, 90, 63, 0.3);
    --glow-b: rgba(255, 140, 90, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.35), 0 26px 50px -20px rgba(0, 0, 0, 0.75);
    --frame: #050404;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top bar: stays while scrolling, frosted over the page. */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--page) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}

.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand img {
  border-radius: 22.5%;
}

.bar-nav {
  display: flex;
  gap: 4px;
}

.bar-nav a {
  color: var(--ink-2);
  font-size: 15px;
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.bar-nav a:hover,
.bar-nav a:focus-visible {
  background: var(--field);
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 16px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, filter 0.2s;
}

.btn:focus-visible,
.bar-nav a:focus-visible,
.foot a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-fill), var(--accent-deep));
  color: var(--on-accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 10px 24px -10px rgba(200, 64, 42, 0.7);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 16px 30px -12px rgba(200, 64, 42, 0.75);
}

.btn-ghost {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong) inset;
}

.btn-ghost:hover {
  background: var(--field);
}

.btn-soon {
  background: var(--field);
  color: var(--muted);
  cursor: default;
}

.btn-block {
  display: flex;
  width: 100%;
  height: 46px;
  font-size: 16px;
  border-radius: 13px;
}

.btn-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 88px;
  background:
    radial-gradient(52% 60% at 82% 38%, var(--glow-a), transparent 70%),
    radial-gradient(38% 46% at 8% 0%, var(--glow-b), transparent 72%),
    linear-gradient(180deg, var(--page-2), var(--page));
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset, var(--shadow);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fb36b;
  box-shadow: 0 0 0 4px rgba(47, 179, 107, 0.16);
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.lead {
  margin: 0 0 32px;
  max-width: 30em;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.65;
}

@media (max-width: 1080px) {
  .lead br.wide {
    display: none;
  }
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-art {
  position: relative;
  height: 600px;
}

.glow {
  position: absolute;
  inset: 12% 6% 4% 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-a), transparent);
  filter: blur(30px);
}

/* A phone: the screenshot inside a dark frame with the island on top. */
.phone {
  position: relative;
  margin: 0;
  width: 270px;
  aspect-ratio: 660 / 1434;
  padding: 9px;
  border-radius: 46px;
  background: var(--frame);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 0 0 2px rgba(0, 0, 0, 0.05),
    0 40px 70px -28px rgba(60, 20, 10, 0.55),
    0 18px 30px -18px rgba(60, 20, 10, 0.35);
}

.phone::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 50%;
  width: 29%;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 37px;
  background: var(--field);
}

.hero-art .phone {
  position: absolute;
}

.phone-front {
  right: 4%;
  top: 30px;
  transform: rotate(4deg);
  z-index: 2;
}

.phone-back {
  left: 6%;
  top: 70px;
  transform: rotate(-7deg) scale(0.9);
  opacity: 0.96;
}

/* Sections */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.sub {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.download {
  padding: 96px 0 88px;
  border-top: 1px solid var(--line);
}

.platforms {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.platform {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 20px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset, var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.platform:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--line-strong) inset, var(--shadow-lift);
}

.platform h3 {
  margin: 18px 0 4px;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.meta {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.meta span {
  display: block;
  white-space: nowrap;
}

.p-icon,
.f-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
}

.p-icon svg,
.f-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.p-icon svg .fill {
  fill: currentColor;
  stroke-width: 1.4;
}

.how {
  margin: 16px 0 0;
  padding: 14px 0 0 1.25em;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.how li + li {
  margin-top: 6px;
}

.how li::marker {
  color: var(--accent);
  font-weight: 700;
}

.badge {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 600;
}

/* The visitor's own platform comes first, outlined. */
.platform.is-recommended {
  order: -1;
  box-shadow: 0 0 0 2px var(--accent-fill) inset, var(--shadow-lift);
}

.platform.is-recommended .badge {
  display: block;
}

.platform.is-soon .p-icon {
  background: var(--field);
  color: var(--muted);
}

.beta-note {
  margin: 28px auto 0;
  max-width: 820px;
  padding: 16px 22px;
  border-radius: 16px;
  background: var(--field);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  text-align: center;
}

.beta-note strong {
  color: var(--ink-2);
}

/* Features */
.features {
  padding: 96px 0 40px;
  background: linear-gradient(180deg, var(--page), var(--page-2));
  border-top: 1px solid var(--line);
}

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

.feature {
  padding: 26px 26px 24px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line) inset, var(--shadow);
}

.feature h3 {
  margin: 18px 0 6px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

.showcase {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 36px;
  margin: 72px 0 0;
  padding: 0 0 72px;
}

.showcase .phone {
  width: 240px;
  border-radius: 42px;
}

.showcase .phone img {
  border-radius: 34px;
}

.showcase .phone::after {
  top: 17px;
  height: 20px;
}

.showcase .phone-raised {
  width: 270px;
  margin-bottom: 36px;
  border-radius: 46px;
}

.showcase .phone-raised img {
  border-radius: 37px;
}

/* Closing call */
.closing {
  padding: 24px 0 96px;
  background: var(--page-2);
}

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px;
  border-radius: 32px;
  background:
    radial-gradient(60% 90% at 50% 0%, var(--glow-a), transparent 70%),
    var(--card);
  box-shadow: 0 0 0 1px var(--line) inset, var(--shadow);
}

.closing-icon {
  border-radius: 22.5%;
  box-shadow: 0 14px 30px -12px rgba(200, 64, 42, 0.6);
  margin-bottom: 22px;
}

.closing p {
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 17px;
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  background: var(--page-2);
  color: var(--muted);
  font-size: 14px;
}

.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 28px;
  padding-top: 28px;
  padding-bottom: 40px;
}

.foot .brand {
  font-size: 16px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

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

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

.foot p {
  margin: 0;
}

/* Narrower windows */
@media (max-width: 1080px) {
  .platforms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 48px 0 24px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .cta {
    justify-content: center;
  }

  .hero-art {
    height: 650px;
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }

  .phone-front {
    right: 2%;
  }

  .phone-back {
    left: 2%;
  }

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

  .showcase .phone {
    width: 200px;
  }

  .showcase .phone-raised {
    width: 222px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .bar-nav a {
    padding: 7px 10px;
  }

  /* R319 (B9): a phone keeps 下载 and the language switch (English is
     longer; the footer links to help). */
  .bar-nav a[href="#features"],
  .bar-nav a[href="/support"] {
    display: none;
  }

  .lead br.wide {
    display: none;
  }

  .cta {
    flex-direction: column;
    width: 100%;
  }

  .cta .btn {
    width: 100%;
  }

  .hero-art {
    height: 510px;
  }

  .hero-art .phone {
    width: 210px;
    border-radius: 38px;
    padding: 7px;
  }

  .hero-art .phone img {
    border-radius: 31px;
  }

  .hero-art .phone::after {
    top: 15px;
    height: 17px;
  }

  .download,
  .features {
    padding-top: 64px;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .platforms,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .showcase {
    gap: 12px;
    margin-top: 48px;
    padding-bottom: 48px;
  }

  .showcase .phone {
    width: 30%;
    padding: 5px;
    border-radius: 24px;
  }

  .showcase .phone img {
    border-radius: 19px;
  }

  .showcase .phone::after {
    top: 9px;
    height: 10px;
  }

  .showcase .phone-raised {
    width: 34%;
    margin-bottom: 20px;
    border-radius: 26px;
  }

  .showcase .phone-raised img {
    border-radius: 21px;
  }

  .closing-inner {
    padding: 48px 20px;
    border-radius: 24px;
  }

  .foot-inner {
    flex-direction: column;
    text-align: center;
  }
}

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

  .btn,
  .platform {
    transition: none;
  }

  .btn-primary:hover,
  .platform:hover {
    transform: none;
  }
}
