/* Agentic App Store website (docs/index.html): dark theme with the gold accent of the promo videos. */
:root {
  color-scheme: dark;
  --bg: #0b0e17; --bg-2: #10142a; --card: #141a2e;
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .16);
  --text: #e9edf6; --muted: #a3abc0; --gold: #f2c14e; --gold-2: #ffd978; --gold-ink: #1a1405;
  --radius: 16px;
  --font-head: "Sora", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-body: "Inter", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* Two languages live side by side in the HTML; the <html lang> picks one. */
html[lang="zh-Hant"] [lang="en"], html:not([lang="zh-Hant"]) [lang="zh-Hant"] { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { max-width: 100%; }
a { color: var(--gold-2); }
code { font-family: var(--font-mono); font-size: .9em; background: rgba(255, 255, 255, .07); padding: .1em .4em; border-radius: 6px; overflow-wrap: anywhere; }
pre { background: #080b14; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow: auto; font-family: var(--font-mono); font-size: .85rem; line-height: 1.55; color: #dfe5f3; margin: 0; }
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 10px; z-index: 100; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { left: 10px; }
svg.i { width: 1.1em; height: 1.1em; flex: none; }
svg.b { fill: currentColor; flex: none; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 14, 23, .85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .94rem; }
.nav-links a:hover { color: var(--text); }
.nav-icons { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); display: grid; place-items: center; text-decoration: none; }
.icon-btn:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .04); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-btn { height: 38px; min-width: 52px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.lang-btn:hover { border-color: var(--gold); color: var(--gold-2); }
@media (max-width: 820px) { .nav-links { display: none; } .nav-icons { margin-left: auto; } }
@media (max-width: 480px) { .nav-icons .opt { display: none; } }

/* hero */
.hero { position: relative; padding: 72px 0 64px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 420px at 12% 8%, rgba(242, 193, 78, .14), transparent 60%),
              radial-gradient(600px 420px at 92% 72%, rgba(143, 131, 255, .16), transparent 60%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 40%, #000, transparent); mask-image: radial-gradient(60% 60% at 50% 40%, #000, transparent); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid rgba(242, 193, 78, .35); border-radius: 999px; font-size: .8rem; color: var(--gold-2); background: rgba(242, 193, 78, .06); }
h1 { font-family: var(--font-head); font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.08; letter-spacing: -.01em; margin: 20px 0 18px; }
h1 .hl { color: var(--gold); font-style: normal; }
html[lang="zh-Hant"] h1 { font-size: clamp(2.1rem, 4.3vw, 3.2rem); line-height: 1.22; letter-spacing: 0; }
.nw { white-space: nowrap; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 580px; margin: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 12px; font: inherit; font-weight: 600; text-decoration: none; border: 1px solid var(--line-2); color: var(--text); background: rgba(255, 255, 255, .03); transition: transform .15s, background .15s, border-color .15s; cursor: pointer; }
.btn:hover { transform: translateY(-1px); border-color: var(--gold); }
.btn svg { width: 18px; height: 18px; }
.btn-gold { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.btn-gold:hover { background: var(--gold-2); border-color: transparent; }
.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 18px 28px; margin-top: 36px; }
.stat b { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--gold-2); line-height: 1.15; }
.stat span { display: block; max-width: 9.5em; color: var(--muted); font-size: .85rem; line-height: 1.4; margin-top: 2px; }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, auto); } }
.frame { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #0f1322; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(242, 193, 78, .08); }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #0c1020; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3150; flex: none; }
.frame-url { margin-left: 8px; flex: 1; min-width: 0; height: 20px; border-radius: 6px; background: #161c33; font-size: .72rem; color: var(--muted); padding: 0 10px; line-height: 20px; font-family: var(--font-mono); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.frame img { display: block; width: 100%; height: auto; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 44px; } }

/* sections */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--bg-2); }
.section-head { max-width: 780px; margin-bottom: 40px; }
.kicker { display: block; color: var(--gold); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .76rem; }
h2 { font-family: var(--font-head); font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 10px 0 12px; line-height: 1.18; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
h3 { font-family: var(--font-head); }
.fine { color: var(--muted); font-size: .85rem; }
.center { text-align: center; margin: 36px 0 0; }
.note { color: var(--muted); margin: 28px 0 0; }
@media (max-width: 600px) { .section { padding: 64px 0; } }

/* why cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1040px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(242, 193, 78, .12); color: var(--gold); display: grid; place-items: center; margin-bottom: 16px; }
.card .ic svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.12rem; margin: 0 0 10px; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* how: flow diagram */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1.15fr; align-items: stretch; gap: 10px; }
.node { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 14px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; min-width: 0; }
.node.end { border-color: rgba(242, 193, 78, .5); background: linear-gradient(180deg, rgba(242, 193, 78, .13), rgba(242, 193, 78, .03)); }
.node b { font-family: var(--font-head); font-size: 1rem; }
.node small { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.node .mono { font-family: var(--font-mono); color: var(--gold-2); font-size: .74rem; overflow-wrap: anywhere; }
.node svg { width: 26px; height: 26px; color: var(--gold); margin-bottom: 4px; }
.arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gold); font-size: .74rem; text-align: center; min-width: 58px; }
.arrow svg { width: 24px; height: 24px; }
.loop { text-align: center; margin: 18px 0 48px; }
.loop .pill { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border: 1px dashed var(--line-2); border-radius: 999px; color: var(--muted); font-size: .92rem; text-align: left; }
.loop .pill svg { width: 18px; height: 18px; color: var(--gold); }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .arrow { flex-direction: row; gap: 8px; min-height: 30px; }
  .arrow svg { transform: rotate(90deg); }
  .loop .pill { border-radius: 14px; }
}

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .shots { grid-template-columns: 1fr; } }
.shot { margin: 0; }
.shot img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.shot figcaption { color: var(--muted); font-size: .92rem; margin-top: 12px; }
.shot figcaption b { color: var(--text); }
.shot.wide { margin-top: 32px; }

/* demo */
.demo { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.demo video { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--line-2); background: #000; }
.demo p { color: var(--muted); }
@media (max-width: 860px) { .demo { grid-template-columns: 1fr; } }

/* apps */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .9rem; }
.chip small { font-size: .75rem; opacity: .75; }
.chip:hover { color: var(--text); border-color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: transparent; font-weight: 600; }
.search { margin-left: auto; width: 240px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text); font: inherit; }
.search::placeholder { color: var(--muted); }
@media (max-width: 700px) { .search { margin-left: 0; width: 100%; } }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.app { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.app:hover { border-color: var(--line-2); transform: translateY(-2px); }
.app-video { position: absolute; top: 10px; right: 10px; width: 46px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(11, 14, 23, .82); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); transition: transform .15s; }
.app-video::before { content: ""; position: absolute; inset: -6px; }
.app-video:hover { transform: scale(1.1); }
.app-video svg { width: 28px; height: 28px; }
.app-media { aspect-ratio: 16 / 10; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
.app-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.app-media.tile { display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #2b2a5c, #161b33 70%); }
.app-media.tile svg { width: 64px; height: 64px; color: var(--gold); }
.app-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.app-title { display: flex; align-items: center; gap: 10px; }
.app-title svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.app-title h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.app-desc { margin: 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.app.open .app-desc { display: block; }
.more { align-self: flex-start; background: none; border: 0; color: var(--gold-2); font: inherit; font-size: .85rem; padding: 0; cursor: pointer; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .72rem; padding: 3px 9px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--muted); }
.tag.ai { background: rgba(143, 131, 255, .2); color: #d4cfff; }
.tag.col { background: rgba(68, 215, 155, .14); color: #a6f2d3; }
.tag.set { background: rgba(242, 193, 78, .14); color: var(--gold-2); }
.app-foot { margin-top: auto; padding-top: 6px; }
.app-foot a { color: var(--gold-2); text-decoration: none; font-size: .9rem; display: inline-flex; gap: 7px; align-items: center; }
.app-foot a:hover { text-decoration: underline; }
.app-foot svg { width: 16px; height: 16px; }
.empty { color: var(--muted); padding: 24px 0; margin: 0; }

/* stories */
.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.story + .story { margin-top: 56px; }
.story.rev > img { order: 2; }
.story > img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line-2); display: block; }
.story h3 { font-size: 1.45rem; margin: 6px 0 12px; }
.story p { color: var(--muted); }
.story .btn { margin-top: 6px; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; gap: 22px; } .story.rev > img { order: 0; } }

/* videos */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px 24px; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); padding: 0; cursor: pointer; color: inherit; font: inherit; }
.yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
button.yt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .5)); }
.yt .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 44px; border-radius: 12px; background: rgba(242, 193, 78, .95); display: grid; place-items: center; z-index: 1; transition: transform .15s; color: var(--gold-ink); }
.yt:hover .play, .yt:focus-visible .play { transform: translate(-50%, -50%) scale(1.07); }
.yt .play svg { width: 24px; height: 24px; fill: currentColor; }
.yt .dur { position: absolute; right: 8px; bottom: 8px; z-index: 1; background: rgba(0, 0, 0, .78); color: #fff; font-size: .75rem; padding: 1px 7px; border-radius: 5px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video h3 { font-size: 1.02rem; margin: 12px 0 4px; line-height: 1.35; }
.video p { margin: 0; color: var(--muted); font-size: .88rem; }
.video .alt { margin-top: 6px; font-size: .84rem; }

/* video dialog */
.vd { width: min(960px, calc(100vw - 32px), max(420px, calc((100dvh - 240px) * 16 / 9))); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); color: var(--text); }
.vd::backdrop { background: rgba(5, 7, 13, .82); }
html:has(.vd[open]) { overflow: hidden; scrollbar-gutter: stable; }
.vd-box { max-height: calc(100dvh - 34px); overflow: auto; }
.vd-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; }
.vd-head h3 { flex: 1; min-width: 0; margin: 0; font-size: 1.02rem; line-height: 1.35; }
.vd-head .icon-btn { flex: none; background: none; cursor: pointer; }
.vd-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.vd-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vd-note { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; background: #000; color: var(--text); text-align: center; text-decoration: none; }
.vd-note[hidden] { display: none; }
.vd-list { list-style: none; margin: 0; padding: 10px 10px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.vd-list[hidden] { display: none; }
.vd-list button { width: 100%; height: 100%; display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid transparent; border-radius: 10px; background: none; color: inherit; font: inherit; font-size: .86rem; line-height: 1.35; text-align: left; cursor: pointer; }
.vd-list button:hover { background: rgba(255, 255, 255, .05); }
.vd-list button[aria-current="true"] { border-color: var(--gold); background: rgba(242, 193, 78, .08); }
.vd-list img { width: 96px; height: 54px; flex: none; object-fit: cover; border-radius: 6px; background: #000; }
.vd-list small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; }
.vd-foot { margin: 0; padding: 10px 18px 14px; text-align: right; font-size: .88rem; }
.vd-foot a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.vd-foot a:hover { text-decoration: underline; }

/* get started */
.start { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.start > div { min-width: 0; }
.start h3 { font-size: 1.15rem; margin: 0 0 10px; }
.start p { color: var(--muted); }
.urls { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.urls li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.urls code { color: var(--gold-2); }
.urls span { color: var(--muted); font-size: .92rem; }
.linklist { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.linklist a { display: inline-flex; align-items: flex-start; gap: 8px; text-decoration: none; }
.linklist a:hover { text-decoration: underline; }
.linklist svg { width: 16px; height: 16px; color: var(--gold); margin-top: .3em; }
@media (max-width: 860px) { .start { grid-template-columns: 1fr; } }

/* vision */
.quote { border-left: 3px solid var(--gold); padding: 4px 0 4px 24px; margin: 8px 0 0; max-width: 860px; }
.quote p { font-size: 1.12rem; line-height: 1.75; margin: 0 0 14px; }
.quote footer { color: var(--muted); font-size: .92rem; }
.vision { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; }
.vision-photo { margin: 0; }
.vision-photo img { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--line-2); }
.vision-photo figcaption { color: var(--muted); font-size: .84rem; line-height: 1.5; margin-top: 10px; }
@media (max-width: 860px) { .vision { grid-template-columns: 1fr; gap: 28px; } .vision-photo { max-width: 340px; } }

/* follow */
.follow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .follow { grid-template-columns: 1fr; } }
.follow a { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .15s; }
.follow a:hover { border-color: var(--gold); }
.follow .ic { width: 48px; height: 48px; border-radius: 12px; background: rgba(242, 193, 78, .1); color: var(--gold); display: grid; place-items: center; flex: none; }
.follow .ic svg { width: 24px; height: 24px; }
.follow b { display: block; font-family: var(--font-head); }
.follow small { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }

.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: .86rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .app, .app-video, .yt .play { transition: none; }
}
