/* ═══════════════════════════════════════════════════════════════
   apps.krk.today — the one stylesheet.
   Order: tokens (light, dark), base, header, hero, app panels, why,
   games, contact, footer, reveal, breakpoints.

   Apple-like, like the product sites (../drivemanager/assets/css): system
   font only, big tight-tracked titles, the apps' own artwork is the
   colour. Colours live only in the token blocks; each app panel's colours
   are sampled from that app's hero art (--panel-<id>-*).
═══════════════════════════════════════════════════════════════ */
:root {
    color-scheme: light dark;

    --bg: #f5f5f7;
    --surface: #ffffff;
    --text: #1d1d1f;
    --text-2: #424245;
    --muted: #6e6e73;
    --hairline: rgba(0, 0, 0, .08);
    --accent: #0066cc;
    --accent-hover: #0058b0;
    --accent-text: #ffffff;
    --link: #0066cc;
    --focus: #0071e3;
    --nav-bg: rgba(245, 245, 247, .78);
    --chip: rgba(0, 0, 0, .05);
    --status-dot: #ff9f0a;
    --shadow-icon: 0 10px 24px -10px rgba(0, 0, 0, .35);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px -18px rgba(0, 0, 0, .2);

    /* App panels. dark text = on a dark panel; light = on a light one. */
    --panel-dark-text: #f5f5f7;
    --panel-dark-2: rgba(245, 245, 247, .78);
    --panel-dark-chip: rgba(255, 255, 255, .1);
    --panel-dark-link: #6cb4ff;
    --panel-light-text: #1d1d1f;
    --panel-light-2: #424245;
    --panel-light-chip: rgba(0, 0, 0, .06);
    --panel-light-link: #0066cc;
    --panel-photoselector-bg: #0f0c0a;
    --panel-photoselector-glow: rgba(255, 140, 50, .22);
    --panel-drivemanager-bg: #e6ebf5;
    --panel-light-ring: inset 0 0 0 1px rgba(0, 0, 0, .06);
    --panel-drivemanager-glow: rgba(120, 170, 255, .25);
    --panel-remotesync-bg: #132c62;
    --panel-remotesync-glow: rgba(90, 140, 255, .3);

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;

    --wrap: 1200px;
    --panel-max: 1240px;
    --gutter: 16px;
    --band-y: clamp(64px, 9vw, 128px);
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 28px;
    --r-pill: 980px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --surface: #1c1c1e;
        --text: #f5f5f7;
        --text-2: #d2d2d7;
        --muted: #a1a1a6;
        --hairline: rgba(255, 255, 255, .12);
        --accent: #0071e3;
        --accent-hover: #0077ed;
        --link: #4ea4ff;
        --focus: #4ea4ff;
        --nav-bg: rgba(22, 22, 23, .78);
        --chip: rgba(255, 255, 255, .08);
        --shadow-icon: 0 10px 28px -10px rgba(0, 0, 0, .8);
        --shadow-card: none;
    }
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.47 var(--font);
    letter-spacing: -.022em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
ul[role="list"], .icon-row, .lang-sw, .foot ul { list-style: none; margin: 0; padding: 0; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }

.btn {
    display: inline-flex; align-items: center; gap: .35em;
    min-height: 44px; padding: 10px 22px;
    border-radius: var(--r-pill);
    background: var(--accent); color: var(--accent-text);
    font-size: 17px; font-weight: 500; letter-spacing: -.01em;
    transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.more { font-size: 17px; }
.more::after { content: " ›"; }

.eyebrow { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.section-head { text-align: center; max-width: 760px; margin-inline: auto; }
.section-head h2 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.06; letter-spacing: -.035em; font-weight: 700; }
.section-head p { margin-top: 14px; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.35; color: var(--muted); }

/* ── Header ─────────────────────────────────────────────────── */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
}
.nav-in { display: flex; align-items: center; gap: 24px; min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 700; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-size: 13px; letter-spacing: -.005em; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.lang-sw { display: flex; gap: 2px; }
.lang-sw a {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 32px; padding: 4px 9px; border-radius: var(--r-pill);
    color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.lang-sw a:hover { color: var(--text); background: var(--chip); text-decoration: none; }
.lang-sw a[aria-current] { color: var(--text); background: var(--chip); }
.lang-sw img { width: 18px; height: auto; border-radius: 2px; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero { padding: clamp(56px, 8vw, 112px) 0 clamp(56px, 7vw, 96px); text-align: center; }
.hero-in { display: flex; flex-direction: column; align-items: center; }
.hero h1 {
    margin-top: 10px;
    font-size: clamp(44px, 8vw, 96px); line-height: 1.02; letter-spacing: -.045em; font-weight: 700;
    max-width: 100%;
    text-wrap: balance;
}
.hero .lede { margin-top: 22px; max-width: 690px; font-size: clamp(19px, 2vw, 24px); line-height: 1.38; color: var(--muted); text-wrap: pretty; }
.icon-row { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(20px, 4vw, 48px); margin-top: clamp(40px, 5vw, 60px); }
.icon-row a { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.icon-row a:hover { text-decoration: none; color: var(--text); }
.icon-row img { width: clamp(72px, 9vw, 104px); filter: drop-shadow(var(--shadow-icon)); transition: transform .35s var(--ease); }
.icon-row a:hover img, .icon-row a:focus-visible img { transform: translateY(-6px) scale(1.04); }
.status { display: inline-flex; align-items: center; gap: 10px; margin-top: 36px; padding: 8px 16px; border-radius: var(--r-pill); background: var(--chip); color: var(--text-2); font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status-dot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-dot) 22%, transparent); }
.hero-cta { margin-top: 28px; }

/* ── App panels ─────────────────────────────────────────────── */
.apps { padding: var(--band-y) 0 0; }
.apps .section-head { margin-bottom: clamp(40px, 5vw, 64px); }
.panel {
    --p-bg: #000; --p-glow: transparent;
    position: relative; isolation: isolate; overflow: hidden;
    width: min(var(--panel-max), 100% - 2 * var(--gutter));
    margin: 0 auto 20px;
    border-radius: var(--r-lg);
    background: radial-gradient(120% 60% at 50% 100%, var(--p-glow), transparent 70%), var(--p-bg);
    padding-top: clamp(48px, 6.5vw, 88px);
    text-align: center;
}
.panel--photoselector { --p-bg: var(--panel-photoselector-bg); --p-glow: var(--panel-photoselector-glow); }
.panel--drivemanager { --p-bg: var(--panel-drivemanager-bg); --p-glow: var(--panel-drivemanager-glow); }
.panel--remotesync { --p-bg: var(--panel-remotesync-bg); --p-glow: var(--panel-remotesync-glow); }
.panel--dark { --p-text: var(--panel-dark-text); --p-2: var(--panel-dark-2); --p-chip: var(--panel-dark-chip); --p-link: var(--panel-dark-link); color-scheme: dark; }
.panel--light { box-shadow: var(--panel-light-ring); --p-text: var(--panel-light-text); --p-2: var(--panel-light-2); --p-chip: var(--panel-light-chip); --p-link: var(--panel-light-link); color-scheme: light; }
.panel { color: var(--p-text); }

.panel-copy { display: flex; flex-direction: column; align-items: center; max-width: 820px; }
.panel-icon { width: clamp(72px, 8vw, 96px); filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .35)); }
.panel-cat { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; font-size: 15px; font-weight: 600; color: var(--p-2); }
.badge { padding: 3px 10px; border-radius: var(--r-pill); background: var(--p-chip); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.panel-name { margin-top: 8px; font-size: clamp(40px, 6vw, 72px); line-height: 1.04; letter-spacing: -.04em; font-weight: 700; }
.panel-tag { margin-top: 10px; font-family: var(--font-display); font-size: clamp(22px, 2.8vw, 32px); line-height: 1.18; letter-spacing: -.03em; font-weight: 600; text-wrap: balance; }
.panel-sum { margin-top: 16px; max-width: 680px; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.45; color: var(--p-2); text-wrap: pretty; }
.panel-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.panel-facts li { padding: 6px 14px; border-radius: var(--r-pill); background: var(--p-chip); font-size: 14px; color: var(--p-text); }
.panel-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; margin-top: 28px; }
.panel .more { color: var(--p-link); }
.panel-art { margin-top: clamp(36px, 5vw, 64px); display: flex; justify-content: center; }
.panel-art img {
    width: 100%;
    /* the art's top edge fades into the panel, its bottom sits on the panel's edge */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 14%);
}

/* ── Why ────────────────────────────────────────────────────── */
.why { padding: var(--band-y) 0; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: clamp(40px, 5vw, 64px); }
.why-card { padding: 32px 28px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-card); }
.why-ico { width: 34px; height: 34px; fill: none; stroke: var(--link); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.why-card h3 { margin-top: 18px; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
.why-card p { margin-top: 8px; font-size: 16px; line-height: 1.47; color: var(--muted); }

/* ── Games ──────────────────────────────────────────────────── */
.games { padding-bottom: var(--band-y); }
.games-card {
    display: flex; align-items: center; gap: 22px;
    padding: 24px 28px; border-radius: var(--r-md);
    background: var(--surface); box-shadow: var(--shadow-card); color: var(--text);
    transition: transform .3s var(--ease);
}
.games-card:hover { text-decoration: none; transform: translateY(-2px); }
.games-txt { display: flex; flex-direction: column; gap: 2px; }
.games-txt strong { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.games-txt span { color: var(--muted); font-size: 16px; }
.games-go { margin-left: auto; color: var(--link); white-space: nowrap; font-size: 16px; }

/* ── Contact ────────────────────────────────────────────────── */
.contact { padding: var(--band-y) 0; background: var(--surface); text-align: center; }
.contact-in { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.contact h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; }
.contact p:not(:last-child) { max-width: 560px; color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); }
.contact .btn { margin-top: 12px; }

/* ── Footer ─────────────────────────────────────────────────── */
.foot { padding: 40px 0 28px; font-size: 12px; line-height: 1.5; color: var(--muted); letter-spacing: -.005em; }
.foot a { color: var(--text-2); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.6fr; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--hairline); }
.foot-brand p { margin-top: 12px; max-width: 30ch; }
.foot-h { font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: -.005em; margin-bottom: 10px; }
.foot li + li { margin-top: 6px; }
.foot address { font-style: normal; }
.foot dl { margin: 10px 0 0; display: grid; gap: 2px; }
.foot dl div { display: flex; gap: 6px; flex-wrap: wrap; }
.foot dt::after { content: ":"; }
.foot dd { margin: 0; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; }

/* ── 404 ────────────────────────────────────────────────────── */
.nf { min-height: 60vh; }

/* ── Reveal (only with JS: content is visible without it) ───── */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
    .icon-row img, .btn, .games-card { transition: none; }
}

/* ── Breakpoints ────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 734px) {
    .nav-links { display: none; }
    .lang-sw--nav { margin-left: auto; }
    .why-grid { grid-template-columns: 1fr; }
    .games-card { flex-wrap: wrap; }
    .games-go { margin-left: 0; }
    .panel { border-radius: 22px; }
    .foot-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 380px) {
    .lang-code { display: none; }
    .brand span { font-size: 16px; }
}
