/* serinreader.com's front page (index.html): Serin's products by tier, drawn the way Serin Reader
   draws itself. The colours are the app's (core/ui Theme.kt: the commercial palette, its book
   covers and the three colour orbs); the mark, the black pills, the two-tone headline and the
   「繼續聆聽」 card are Design.kt's. This page loads only this file (not style.css). */
:root {
  --ground: #f5f5f2;
  --card: #ffffff;
  --tile: #f1f1ec;
  --hairline: #e6e6e1;
  --outline: #dcdcd5;
  --ink: #121212;
  --body: #262626;
  --muted: #656562;
  --faint: #9a9a94;
  --pill: #121212;
  --on-pill: #ffffff;
  --bezel: #121212;
  --accent: #4c4ce0;
  --accent-tint: #eeedff;
  --success: #2f6b3a;
  --mark-tint: rgba(18, 18, 18, 0.08);
  --orb1: 255, 155, 115;
  --orb2: 169, 155, 255;
  --orb3: 124, 199, 255;
  --orb-alpha: 0.55;
  --cover1: #ece8ff; --cover1-ink: #4637b8;
  --cover2: #ffe9df; --cover2-ink: #a6431c;
  --cover3: #e2f0ff; --cover3-ink: #1e5e99;
  --cover4: #e6f2e4; --cover4-ink: #2f6b3a;
  --shadow: 0 1px 2px rgba(18, 18, 18, 0.04), 0 10px 30px rgba(18, 18, 18, 0.07);
  --phone-shadow: 0 30px 60px -20px rgba(40, 36, 90, 0.35), 0 12px 24px -12px rgba(18, 18, 18, 0.25);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121212;
    --card: #1c1c1e;
    --tile: #2a2a2d;
    --hairline: #2e2e30;
    --outline: #3e3e41;
    --ink: #f2f2f0;
    --body: #e4e4e0;
    --muted: #a3a39c;
    --faint: #6e6e69;
    --pill: #f2f2f0;
    --on-pill: #121212;
    --bezel: #2a2a2d;
    --accent: #a5a5ff;
    --accent-tint: #2b2b55;
    --success: #8fd19b;
    --mark-tint: rgba(242, 242, 240, 0.1);
    --orb1: 224, 113, 79;
    --orb2: 122, 107, 224;
    --orb3: 63, 143, 204;
    --orb-alpha: 0.38;
    --cover1: #2b2745; --cover1-ink: #c9c1ff;
    --cover2: #3d2a22; --cover2-ink: #ffb797;
    --cover3: #1f3043; --cover3-ink: #9ccbff;
    --cover4: #1f3324; --cover4-ink: #9fd8aa;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    --phone-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 12px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.7 system-ui, -apple-system, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  overflow-x: hidden;
}
html:lang(zh-Hans) body { font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); }
p { margin: 0; }

/* ------------------------------------------------------------------ header and footer */
.top, main, .foot { max-width: 72rem; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top { display: flex; align-items: center; gap: 10px; padding-top: 16px; padding-bottom: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.06rem; letter-spacing: -0.01em;
}
.brand-zh { color: var(--muted); font-weight: 600; }
/* The app mark (Design.kt AppMark): a rounded square with a short waveform. */
.mark {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--pill); color: var(--on-pill);
}
.mark svg, .m-round svg, .m-nav svg {
  width: 56%; height: 56%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card); border: 1px solid var(--hairline); }
.langs button {
  min-width: 40px; min-height: 30px; border: 0; background: transparent; color: var(--muted);
  border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--pill); color: var(--on-pill); }
.navlink {
  display: inline-flex; align-items: center; min-height: 38px; padding: 6px 16px; border-radius: 999px;
  background: var(--pill); color: var(--on-pill); font-weight: 700; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
}
.navlink:hover { opacity: 0.88; }

.foot {
  margin-top: 56px; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--hairline);
  color: var(--muted); font-size: 0.92rem;
}
.foot .brand { font-size: 0.98rem; margin-bottom: 10px; }
.foot .mark { width: 26px; height: 26px; border-radius: 8px; }
.foot p { margin: 4px 0; }

/* ------------------------------------------------------------------ hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center;
  padding: 28px 0 8px;
}
.hero-text > * { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: 0.06s; }
.hero-text > :nth-child(3) { animation-delay: 0.12s; }
.hero-text > :nth-child(4) { animation-delay: 0.18s; }
/* Movement only: the words are never hidden, also where the animation does not run. */
@keyframes rise { from { transform: translateY(12px); } to { transform: none; } }

/* The app's headline (今天，想聽點什麼？): the first words in ink, the rest in grey. */
h1 {
  margin: 0 0 18px; font-size: clamp(2.3rem, 7vw, 4rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.03em;
}
h1 span { display: block; }
.soft { color: var(--muted); }
.lead { max-width: 34rem; color: var(--body); font-size: 1.08rem; line-height: 1.75; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px;
  border-radius: 999px; border: 1px solid var(--outline); background: var(--card); color: var(--ink);
  font-weight: 700; text-decoration: none; transition: transform 0.15s, background 0.15s, opacity 0.15s;
}
.btn:hover { background: var(--tile); }
.btn:active, .navlink:active, .callout:active { transform: scale(0.97); }
.btn.primary { background: var(--pill); border-color: var(--pill); color: var(--on-pill); }
.btn.primary:hover { opacity: 0.88; }

/* 「正在用 Serin Reader？」: a chip like the app's listening numbers, the dot in the accent. */
.callout {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 44px; padding: 8px 16px;
  border-radius: 22px; border: 1px solid var(--hairline); background: var(--card);
  color: var(--ink); font-weight: 700; font-size: 0.95rem; text-decoration: none; transition: border-color 0.15s;
}
.callout:hover { border-color: var(--accent); }
.dot, .m-pill::before, .product-status::before { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.callout-arrow { color: var(--accent); font-size: 1.15rem; line-height: 1; }

.btn:focus-visible, .callout:focus-visible, .navlink:focus-visible, .brand:focus-visible, .langs button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}

/* ------------------------------------------------------------------ the phone */
.hero-art { position: relative; display: flex; justify-content: center; padding: 8px 0 24px; }
.hero-art::before {
  content: ""; position: absolute; inset: -6% -4%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(closest-side at 28% 62%, rgba(var(--orb1), 0.42), transparent),
    radial-gradient(closest-side at 70% 26%, rgba(var(--orb2), 0.45), transparent),
    radial-gradient(closest-side at 74% 82%, rgba(var(--orb3), 0.4), transparent);
  filter: blur(18px);
}
.phone {
  position: relative; z-index: 1; width: 280px; max-width: 100%; padding: 9px; border-radius: 46px;
  background: var(--bezel); box-shadow: var(--phone-shadow);
  /* Keep screen text on fixed pixels, including at fractional display scales. */
}
.screen {
  position: relative; overflow: hidden; border-radius: 38px; background: var(--ground);
  aspect-ratio: 9 / 18.6; padding: 20px 14px 70px; font-size: 11px; line-height: 1.45; color: var(--ink);
  display: flex; flex-direction: column; gap: 10px;
}
/* Nothing on the screen shrinks: a longer language runs on under the tab bar instead. */
.screen > * { flex-shrink: 0; }
.m-top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.m-top .mark { width: 24px; height: 24px; border-radius: 7px; }
.m-round {
  margin-left: auto; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--hairline); background: var(--card); color: var(--ink);
}
.m-round svg { stroke-width: 2.1; }
.m-head { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; margin-top: 4px; }

/* The 「繼續聆聽」 card with the colour orbs (Design.kt Orbs: 0.16/0.65, 0.71/0.10, 0.89/0.91). */
.m-card, .product.featured { position: relative; overflow: hidden; isolation: isolate; }
.m-card {
  border-radius: 22px; background: var(--card); padding: 12px 13px 12px; display: flex; flex-direction: column; gap: 3px;
}
.orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; transform: translate(-50%, -50%);
  /* Static colour behind translucent text backgrounds, on both featured cards. */
}
.orb.o1 { left: 16%; top: 65%; width: 81%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(var(--orb1), var(--orb-alpha)), rgba(var(--orb1), calc(var(--orb-alpha) * 0.7)) 45%, rgba(var(--orb1), 0)); }
.orb.o2 { left: 71%; top: 10%; width: 97%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(var(--orb2), var(--orb-alpha)), rgba(var(--orb2), calc(var(--orb-alpha) * 0.7)) 45%, rgba(var(--orb2), 0)); }
.orb.o3 { left: 89%; top: 91%; width: 70%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(var(--orb3), var(--orb-alpha)), rgba(var(--orb3), calc(var(--orb-alpha) * 0.7)) 45%, rgba(var(--orb3), 0)); }
.m-chip {
  align-self: flex-start; margin-bottom: 4px; padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 85%, transparent); font-size: 9.5px; font-weight: 800;
}
.m-title { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; }
.m-chapter { color: var(--muted); font-size: 10px; }
.m-quote { color: var(--body); font-size: 10px; line-height: 1.6; padding-right: 50px; margin-top: 2px; }
.m-quote mark { background: color-mix(in srgb, var(--card) 55%, transparent); color: inherit; border-radius: 4px; padding: 1px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.m-progress { display: block; height: 3px; margin: 8px 58px 2px 0; border-radius: 3px; background: color-mix(in srgb, var(--ink) 14%, transparent); overflow: hidden; }
.m-progress span { display: block; width: 57%; height: 100%; background: var(--ink); border-radius: inherit; }
.m-meta { color: var(--muted); font-size: 9.5px; font-weight: 600; }
/* The black play button while audio plays: three bars bouncing like a level meter. */
.m-play {
  position: absolute; right: 12px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--pill); display: flex; align-items: center; justify-content: center; gap: 3px;
}
.m-play i { display: block; width: 3px; height: 14px; border-radius: 2px; background: var(--on-pill); transform-origin: center; animation: level 0.9s ease-in-out infinite; }
.m-play i:nth-child(2) { animation-delay: -0.3s; }
.m-play i:nth-child(3) { animation-delay: -0.6s; }
@keyframes level { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }
.m-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.m-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--hairline); font-size: 9.5px; font-weight: 800;
}
.m-pill::before { content: ""; width: 6px; height: 6px; }
.m-sub { font-size: 13px; font-weight: 800; margin-top: 4px; }
.m-row { display: flex; align-items: center; gap: 10px; }
.m-cover, .product-tile {
  flex: none; display: grid; place-items: center; font-weight: 700;
  background: var(--cover1); color: var(--cover1-ink);
}
.m-cover { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
.cover-2 { background: var(--cover2); color: var(--cover2-ink); }
.cover-3 { background: var(--cover3); color: var(--cover3-ink); }
.cover-4 { background: var(--cover4); color: var(--cover4-ink); }
.m-row-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.m-row-text b { font-size: 11.5px; }
.m-row-text small { color: var(--muted); font-size: 9.5px; }
.m-bar { display: block; height: 3px; margin-top: 4px; border-radius: 3px; background: var(--hairline); overflow: hidden; }
.m-bar span { display: block; height: 100%; background: var(--ink); border-radius: inherit; }
.m-bar.b1 span { width: 40%; }
.m-bar.b2 span { width: 28%; }
.m-bar.b3 span { width: 15%; }
/* The floating tab bar: Serin picked in a black pill. */
.m-nav {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow);
  font-size: 8.5px; font-weight: 800; white-space: nowrap;
}
.m-nav > span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 10px; border-radius: 999px; color: var(--ink); }
.m-nav > span.on { background: var(--pill); color: var(--on-pill); }
.m-nav svg { width: 13px; height: 13px; stroke-width: 2; }

/* ------------------------------------------------------------------ products */
.tier { margin: 64px 0 0; scroll-margin-top: 16px; }
.tier-head { margin-bottom: 18px; }
.tier h2 {
  margin: 0 0 6px; font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.25; font-weight: 800; letter-spacing: -0.02em;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
}
.tier-note { color: var(--muted); max-width: 42rem; }
.lab-sub {
  align-self: center; font-size: 0.85rem; font-weight: 800; letter-spacing: 0;
  padding: 2px 12px; border-radius: 999px; background: var(--cover2); color: var(--cover2-ink);
}
/* Serin Lab: its own panel, a step back from the products above. */
.tier.lab { padding: 28px 24px 24px; border-radius: 32px; background: var(--tile); }
.tier.lab .product { background: var(--card); }

/* A row's cards share its width (two products are two halves, not two thirds). */
.products { display: flex; flex-wrap: wrap; gap: 16px; }
.product {
  flex: 1 1 17.5rem; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 22px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 26px; box-shadow: var(--shadow);
  scroll-margin: 24px; transition: transform 0.2s, box-shadow 0.2s;
}
.product:hover { transform: translateY(-2px); }
.product.arrived { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint), var(--shadow); }
.product-head { display: flex; align-items: center; gap: 14px; }
/* A product's tile: one character on a book-cover colour, as the app's library draws a book. */
.product-tile { width: 50px; height: 50px; border-radius: 15px; font-size: 23px; }
.product-names { min-width: 0; }
.product-kicker { color: var(--muted); font-size: 0.82rem; font-weight: 700; line-height: 1.4; }
.product-name { margin: 0; font-size: 1.18rem; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.badge-lab {
  margin-left: auto; align-self: flex-start; flex: none; border-radius: 999px; padding: 1px 10px;
  background: var(--cover2); color: var(--cover2-ink); font-size: 0.78rem; font-weight: 800;
}
.product-desc { color: var(--body); }
.product-status {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--card); color: var(--ink); font-size: 0.85rem; font-weight: 700;
}
.product-status::before { content: ""; background: var(--faint); }
.product[data-state="live"] .product-status::before { background: var(--success); }
.product[data-state="testing"] .product-status::before { background: var(--accent); }
.product[data-state="building"] .product-status::before { background: var(--cover2-ink); }
.product-note { color: var(--muted); font-size: 0.88rem; margin-top: -4px; }
.product-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }

/* Serin Reader, across the grid: the 「繼續聆聽」 card's orbs behind what it does. */
.product.featured { flex-basis: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 26px; }
.product.featured .orb.o1 { width: 60%; }
.product.featured .orb.o2 { width: 70%; }
.product.featured .orb.o3 { width: 50%; }
.product-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.product.featured .product-name { font-size: 1.5rem; }
.product.featured .product-desc { max-width: 34rem; font-size: 1.04rem; }
.product.featured .product-status { background: color-mix(in srgb, var(--card) 80%, transparent); }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: center; }
.features li {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px;
  background: color-mix(in srgb, var(--card) 78%, transparent); border: 1px solid var(--hairline);
  font-weight: 700; line-height: 1.45;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
/* The app's check: a filled circle with a tick. */
.features li::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--pill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .features li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23121212' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
.nojs { padding: 18px 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--hairline); }

/* ------------------------------------------------------------------ wider screens */
@media (min-width: 880px) {
  .top { padding-top: 22px; padding-bottom: 22px; }
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; padding-top: 40px; }
  /* Bigger as a whole, so the screen keeps the app's proportions. */
  .phone { zoom: 1.14; }
  .product.featured { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; padding: 32px; }
}
@media (max-width: 520px) {
  .brand-zh { display: none; }
  .top .brand { font-size: 1rem; }
  .langs button { min-width: 34px; padding: 2px 7px; }
  .navlink { padding: 6px 12px; font-size: 0.9rem; }
  .hero { padding-top: 12px; gap: 28px; }
  .tier { margin-top: 48px; }
  .tier.lab { margin-left: -8px; margin-right: -8px; padding: 22px 14px 14px; border-radius: 26px; }
  .product, .product.featured { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
