:root {
  --canvas: #410613;
  --raised: #750000;
  --accent: #ea1744;
  --accent-deep: #a31919;
  --action: #5170ff;
  --action-deep: #3f56c2;
  --paper: #ffffff;
  --ink: #2a0710;
  --ink-soft: #6b4750;
  --tint: #fff1f3;
  --rule: #f2d9df;
  --on-canvas: #ffffff;
  --on-canvas-soft: rgba(255, 255, 255, .7);
  --on-canvas-line: rgba(255, 255, 255, .3);
  --display: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --radius: 20px;
  --wrap: 1200px;
}
/*
 * Theme "bold" — the app's own dark canvas for the hero, the feature band and the chrome;
 * white paper between; chunky pill buttons (5px border in the deep tone). Tokens on :root come
 * from theme.json, overridden by project.json → theme.tokens.
 */

:root { --gutter: clamp(16px, 4vw, 44px); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.ap {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 17px/1.65 var(--body);
    overflow-x: hidden;
}
.ap img { max-width: 100%; height: auto; }
.ap a { color: var(--accent); }
.ap a:hover { color: var(--ink); }
.ap :focus-visible { outline: 3px solid var(--action); outline-offset: 3px; border-radius: 4px; }
.ap-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ap-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.ap-skip {
    position: absolute; inset-inline-start: 8px; top: -60px; z-index: 50;
    background: var(--ink); color: #fff !important; padding: 10px 16px; border-radius: 6px;
}
.ap-skip:focus { top: 8px; }

.ap-h2 {
    font: 800 clamp(30px, 4.2vw, 50px)/1.1 var(--display);
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    max-width: 22ch;
}
.ap-lead { font-size: 19px; color: var(--ink-soft); max-width: 58ch; margin: 0 0 28px; }

/* The chunky pill: a filled action with a 5px border in its deep tone. */
.ap-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: 800 15px/1.1 var(--body); text-align: center;
    color: #fff !important; text-decoration: none;
    background: var(--action); border: 5px solid var(--action-deep); border-radius: 999px;
    padding: 10px 20px;
}
.ap-btn:hover { background: var(--action-deep); }
.ap-btn--accent { background: var(--accent); border-color: var(--accent-deep); }
.ap-btn--accent:hover { background: var(--accent-deep); }

/* ===== Header ===== */
.ap-top {
    position: sticky; top: 0; z-index: 20;
    background: var(--canvas);
    border-bottom: 3px solid var(--raised);
}
.ap-top__in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.ap-brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--on-canvas) !important; text-decoration: none;
    font: 800 24px/1 var(--display); letter-spacing: -0.02em;
}
.ap-brand img { border-radius: 9px; }
.ap-nav { display: flex; gap: 24px; }
.ap-nav a { color: var(--on-canvas-soft); text-decoration: none; font-weight: 700; font-size: 15px; }
.ap-nav a:hover, .ap-nav a[aria-current="page"] { color: var(--on-canvas); }
.ap-top__end { margin-inline-start: auto; }

/* ===== Hero ===== */
.ap-hero {
    background: var(--canvas);
    color: var(--on-canvas);
    padding: clamp(44px, 6vw, 80px) 0 clamp(52px, 7vw, 96px);
    overflow: hidden;
}
.ap-hero__in {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: clamp(32px, 5vw, 72px); align-items: center;
}
.ap-hero__in--solo { grid-template-columns: minmax(0, 1fr); }
.ap-hero__badge {
    display: inline-block; margin: 0 0 18px;
    font-weight: 800; font-size: 14px; letter-spacing: .02em;
    color: var(--on-canvas); background: var(--raised); padding: 6px 12px; border-radius: 999px;
}
.ap-hero__title {
    font: 800 clamp(38px, 5.2vw, 66px)/1.05 var(--display);
    letter-spacing: -0.03em;
    margin: 0 0 22px;
    overflow-wrap: break-word; hyphens: auto;
}
.ap-hero__title em { display: block; font-style: normal; color: var(--accent); }
.ap-hero__sub { font-size: 19px; color: var(--on-canvas-soft); margin: 0 0 30px; max-width: 48ch; }
.ap-hero__chips {
    list-style: none; padding: 0; margin: 30px 0 0;
    display: flex; flex-wrap: wrap; gap: 10px;
}
.ap-hero__chips li {
    font-weight: 700; font-size: 14px; color: var(--on-canvas);
    border: 1px solid var(--on-canvas-line); border-radius: 999px; padding: 6px 14px;
}

/* Store badges */
.ap-stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ap-stores a { display: block; height: 52px; }
.ap-stores img { display: block; height: 100%; width: auto; }
.ap-stores--center { justify-content: center; }

/* ===== Phone: an iPhone shape (19.5:9 screen, Dynamic Island) ===== */
.ap-phone {
    position: relative; justify-self: center;
    width: min(320px, 78vw); aspect-ratio: 9 / 19.5;
    padding: 12px; border-radius: 52px;
    background: linear-gradient(145deg, #3a3a3c, #1c1c1e 45%, #2c2c2e);
    box-shadow:
        inset 0 0 0 2px #4a4a4c,
        0 40px 80px rgba(0, 0, 0, .45),
        0 0 0 10px color-mix(in srgb, var(--accent) 18%, transparent);
}
.ap-phone::before {
    content: ''; position: absolute; inset-inline-end: -3px; top: 26%;
    width: 3px; height: 13%; border-radius: 0 3px 3px 0; background: #2c2c2e;
}
.ap-phone__screen {
    position: relative; width: 100%; height: 100%;
    border-radius: 40px; overflow: hidden; background: var(--canvas);
}
.ap-phone__screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: bottom; }
.ap-phone__island {
    position: absolute; top: 11px; left: 50%; transform: translateX(-50%); z-index: 1;
    width: 31%; height: 26px; border-radius: 999px; background: #000;
}

/* ===== Sections ===== */
.ap-section { padding: clamp(60px, 8vw, 112px) 0; }

.ap-shots { background: var(--tint); }
.ap-shots__strip {
    display: flex; gap: 18px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 8px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 20px;
    scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
}
.ap-shots__item { flex: 0 0 auto; margin: 0; scroll-snap-align: start; width: clamp(200px, 24vw, 260px); }
.ap-shots__item img { display: block; width: 100%; border-radius: 22px; box-shadow: 0 16px 36px color-mix(in srgb, var(--canvas) 18%, transparent); }

.ap-points__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.ap-points__list { display: grid; border-top: 3px solid var(--accent); }
.ap-points__item { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.ap-points__item h3 { font: 800 23px/1.25 var(--display); margin: 0 0 8px; }
.ap-points__item p { margin: 0; color: var(--ink-soft); }

.ap-features { background: var(--canvas); color: var(--on-canvas); }
.ap-features .ap-lead { color: var(--on-canvas-soft); }
.ap-features__list {
    list-style: none; margin: 36px 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px;
}
.ap-feature { background: var(--raised); border-radius: var(--radius); padding: 24px 24px 22px; }
.ap-feature__icon {
    display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px;
    border-radius: 14px; background: var(--action); border: 4px solid var(--action-deep);
    font-size: 22px; line-height: 1;
}
.ap-feature--accent .ap-feature__icon { background: var(--accent); border-color: var(--accent-deep); }
.ap-feature h3 { font: 800 21px/1.3 var(--display); margin: 0 0 6px; }
.ap-feature p { margin: 0; color: var(--on-canvas-soft); font-size: 16px; }

.ap-band { background: var(--tint); }
.ap-band__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.ap-band .ap-lead { margin: 0; }

.ap-faq__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.ap-faq__list { border-top: 3px solid var(--accent); }
.ap-faq__item { border-bottom: 1px solid var(--rule); }
.ap-faq__item summary {
    cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; gap: 16px;
    padding: 18px 0; font: 800 18px/1.4 var(--body);
}
.ap-faq__item summary::-webkit-details-marker { display: none; }
.ap-faq__item summary::after { content: '+'; font: 800 26px/0.9 var(--display); color: var(--accent); }
.ap-faq__item[open] summary::after { content: '–'; }
.ap-faq__item p { margin: 0 0 22px; color: var(--ink-soft); max-width: 68ch; }

.ap-download { background: var(--accent); color: #fff; text-align: center; padding: clamp(64px, 8vw, 104px) 0; }
.ap-download__in { display: flex; flex-direction: column; align-items: center; }
.ap-download__icon { border-radius: 22px; margin-bottom: 20px; box-shadow: 0 14px 34px color-mix(in srgb, var(--canvas) 45%, transparent); }
.ap-download .ap-h2 { margin-inline: auto; }
.ap-download .ap-lead { color: #fff; font-weight: 700; margin-inline: auto; } /* bold 19px = large text: white on Ick Red passes AA */

/* Text pages (about, contact, legal, 404) */
.ap-page { background: var(--canvas); color: var(--on-canvas); padding: clamp(48px, 7vw, 96px) 0; }
.ap-page__title { font: 800 clamp(36px, 5vw, 60px)/1.08 var(--display); letter-spacing: -0.03em; margin: 0 0 18px; overflow-wrap: break-word; }
.ap-page__lead { font-size: 20px; color: var(--on-canvas-soft); max-width: 52ch; margin: 0; }
.ap-page__action { margin: 28px 0 0; }
.ap-prose { max-width: calc(68ch + 2 * var(--gutter)); }
.ap-prose h2 { font: 800 28px/1.25 var(--display); margin: 40px 0 10px; }
.ap-prose h3 { font: 800 21px/1.3 var(--display); margin: 28px 0 8px; }
.ap-prose p { margin: 0 0 16px; }
.ap-prose ul, .ap-prose ol { margin: 0 0 16px; padding-inline-start: 22px; }
.ap-prose li { margin: 0 0 10px; }
.ap-note { font-size: 15px; color: var(--ink-soft); border-inline-start: 4px solid var(--accent); padding-block: 4px; padding-inline: 16px 0; }
.ap-note--legal { margin-bottom: 32px; }

/* ===== Footer ===== */
.ap-foot { background: var(--canvas); color: var(--on-canvas-soft); padding: 28px 0 36px; font-size: 14px; border-top: 3px solid var(--raised); }
.ap-foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.ap-foot__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.ap-foot a { color: var(--on-canvas) !important; text-decoration: none; }
.ap-foot a:hover { text-decoration: underline; }

.ap-langs { position: relative; }
.ap-langs summary {
    cursor: pointer; list-style: none; color: var(--on-canvas); font-weight: 700;
    border: 1px solid var(--on-canvas-line); border-radius: 999px; padding: 6px 14px;
}
.ap-langs summary::-webkit-details-marker { display: none; }
.ap-langs ul {
    position: absolute; bottom: calc(100% + 8px); inset-inline-end: 0; z-index: 30;
    list-style: none; margin: 0; padding: 8px;
    display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 2px;
    background: var(--raised); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    max-height: 70vh; overflow: auto;
}
.ap-langs li a { display: block; padding: 6px 10px; border-radius: 8px; }
.ap-langs li a:hover, .ap-langs li a[aria-current] { background: var(--canvas); text-decoration: none; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .ap-nav { display: none; }
    .ap-hero__in, .ap-points__in, .ap-faq__in { grid-template-columns: 1fr; }
    .ap-phone { width: min(280px, 72vw); }
}
@media (max-width: 560px) {
    body.ap { font-size: 16px; }
    .ap-top__in { gap: 12px; }
    .ap-btn { padding: 8px 14px; font-size: 14px; }
    .ap-stores a { height: 46px; }
    .ap-langs ul { grid-template-columns: minmax(140px, 1fr); inset-inline-end: auto; inset-inline-start: 0; }
}

/* Headings wrap in balanced lines (CJK titles would otherwise leave one character alone). */
.ap-hero__title, .ap-h2, .ap-page__title { text-wrap: balance; }
:lang(ko) .ap-hero__title, :lang(ko) .ap-h2 { word-break: keep-all; } /* Korean breaks at spaces */

/* Language switcher in the header: opens down, shows the name on wide screens and the code on phones. */
.ap-top__end { display: flex; align-items: center; gap: 12px; }
.ap-langs--top summary { padding: 7px 12px; font-size: 14px; white-space: nowrap; }
.ap-langs--top ul { bottom: auto; top: calc(100% + 10px); }
.ap-langs__code { display: none; }
@media (max-width: 560px) {
    .ap-langs__name { display: none; }
    .ap-langs__code { display: inline; }
    .ap-top__end { gap: 8px; }
    .ap-langs--top ul { inset-inline-start: auto; inset-inline-end: 0; grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}
.ap-langs li a { color: var(--on-canvas) !important; text-decoration: none; }
@media (min-width: 561px) { .ap-langs--top ul { grid-template-columns: repeat(3, minmax(130px, 1fr)); max-height: none; } }
