/* Peregrine download site. Same language as the panel and the client: Apple system colors, SF / Inter, glass. */
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-cyrillic-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Variable", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Variable", "Segoe UI Variable Display", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --r-card: 28px; --r-inner: 18px; --r-pill: 999px;
  --w: 1120px;
  --blue: #007aff; --indigo: #5e5ce6; --purple: #af52de; --teal: #30b0c7; --green: #34c759; --orange: #ff9500; --pink: #ff2d55; --cyan: #32ade6; --gray: #8e8e93;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-ink: #fff;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7; --bg-2: #ffffff; --surface: #ffffff; --surface-2: #f5f5f7; --fill: rgba(120,120,128,.1); --fill-2: rgba(120,120,128,.16);
  --text: #1d1d1f; --text-2: #6e6e73; --text-3: #86868b; --sep: rgba(0,0,0,.08); --border: rgba(0,0,0,.1);
  --glass: rgba(250,250,252,.72); --shadow: 0 2px 6px rgba(0,0,0,.04), 0 12px 40px -12px rgba(0,0,0,.12);
  --shadow-lg: 0 40px 90px -30px rgba(0,0,0,.35); --frame: #1d1d1f; --frame-2: #c9c9ce;
  --glow-1: rgba(94,92,230,.22); --glow-2: rgba(42,196,255,.18);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --blue: #0a84ff; --indigo: #5e5ce6; --purple: #bf5af2; --teal: #40c8e0; --green: #30d158; --orange: #ff9f0a; --pink: #ff375f; --cyan: #64d2ff;
  --accent: #0a84ff; --accent-hover: #2b95ff;
  --bg: #000; --bg-2: #0b0b0d; --surface: #1c1c1e; --surface-2: #2c2c2e; --fill: rgba(120,120,128,.2); --fill-2: rgba(120,120,128,.3);
  --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #6e6e73; --sep: rgba(255,255,255,.08); --border: rgba(255,255,255,.12);
  --glass: rgba(22,22,24,.72); --shadow: inset 0 0 0 .5px rgba(255,255,255,.08);
  --shadow-lg: 0 40px 100px -30px rgba(0,0,0,.9); --frame: #2c2c2e; --frame-2: #3a3a3c;
  --glow-1: rgba(94,92,230,.35); --glow-2: rgba(42,196,255,.2);
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.47 var(--font); letter-spacing: -0.022em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
html[data-theme="light"] .on-dark, html[data-theme="dark"] .on-light { display: none; }

.ico { display: inline-flex; width: 1.1em; height: 1.1em; flex: none; }
.ico svg { width: 100%; height: 100%; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--sep); }
.nav-in { max-width: var(--w); margin: 0 auto; height: 52px; padding: 0 22px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 17px/1 var(--font-display); letter-spacing: -0.02em; }
.links { display: flex; gap: 26px; margin-left: auto; font-size: 13px; color: var(--text-2); }
.links a { transition: color .2s; }
.links a:hover { color: var(--text); }
.nav-end { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn .ico { width: 18px; height: 18px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-weight: 500; font-size: 17px; cursor: pointer; white-space: nowrap; transition: background .2s, transform .3s var(--spring); }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }
.btn-sm { height: 28px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 18px; }
.btn-ghost { background: var(--fill); color: var(--text); }
.btn-ghost:hover { background: var(--fill-2); }
.btn[aria-disabled="true"] { background: var(--fill); color: var(--text-3); cursor: default; pointer-events: none; }
.link-more { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 17px; }
.link-more:hover { text-decoration: underline; }
.link-more .ico { width: 14px; height: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: 72px 22px 0; max-width: var(--w); margin: 0 auto; }
.glow { position: absolute; inset: -80px 0 auto; height: 760px; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 30% 30%, var(--glow-1), transparent 70%), radial-gradient(40% 45% at 72% 40%, var(--glow-2), transparent 70%); filter: blur(10px); }
.hero-icon { margin: 0 auto 18px; filter: drop-shadow(0 18px 30px rgba(59,48,196,.3)); }
h1 { font: 700 clamp(48px, 8vw, 88px)/1.04 var(--font-display); letter-spacing: -0.035em; margin: 0; }
.lead { font: 600 clamp(26px, 3.6vw, 40px)/1.12 var(--font-display); letter-spacing: -0.028em; margin: 10px 0 0; }
.grad { background: linear-gradient(90deg, var(--indigo), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.sub { max-width: 620px; margin: 18px auto 0; color: var(--text-2); font-size: 19px; line-height: 1.42; }
.cta { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 32px; flex-wrap: wrap; }
.meta { color: var(--text-3); font-size: 13px; margin: 14px 0 0; }

.devices { position: relative; margin: 56px auto 0; max-width: 980px; padding-bottom: 40px; }
.laptop { width: 88%; margin: 0 auto 0 0; }
.lid { background: var(--frame); padding: 1.4% 1.4% 1.6%; border-radius: 22px 22px 6px 6px; box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.08); }
.lid img { width: 100%; height: auto; border-radius: 10px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.base { height: 14px; margin: 0 -6%; background: linear-gradient(var(--frame-2), color-mix(in srgb, var(--frame-2) 70%, #000)); border-radius: 0 0 18px 18px / 0 0 14px 14px; position: relative; }
.base::before { content: ""; position: absolute; left: 50%; top: 0; width: 14%; height: 6px; transform: translateX(-50%); background: rgba(0,0,0,.18); border-radius: 0 0 8px 8px; }
.phone { position: absolute; right: 0; bottom: 0; width: 23%; background: var(--frame); padding: 1.1%; border-radius: 40px; box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.1); }
.phone img { width: 100%; border-radius: 32px; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; }

/* ---------- sections ---------- */
.section { max-width: var(--w); margin: 0 auto; padding: 110px 22px 0; }
h2 { font: 700 clamp(32px, 4.4vw, 48px)/1.08 var(--font-display); letter-spacing: -0.03em; margin: 0; }
h3 { font: 700 28px/1.14 var(--font-display); letter-spacing: -0.025em; margin: 0; }
.center { text-align: center; }
.sec-sub { color: var(--text-2); font-size: 19px; margin: 8px 0 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.feature { padding: 30px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); transition: transform .5s var(--spring); }
.feature:hover { transform: translateY(-3px); }
.f-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 18px; }
.f-ico .ico { width: 24px; height: 24px; }
.feature h3 { font-size: 21px; letter-spacing: -0.02em; }
.feature p { color: var(--text-2); margin: 8px 0 0; font-size: 15px; line-height: 1.45; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--fill); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; transition: background .25s var(--ease), color .2s, box-shadow .25s; }
.seg button .ico { width: 15px; height: 15px; }
.seg button[aria-selected="true"] { background: var(--bg-2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
html[data-theme="dark"] .seg button[aria-selected="true"] { background: var(--surface-2); }

/* film */
.film { position: relative; border-radius: var(--r-card); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; }
.film video { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; transform: translate(-50%, -50%); border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: rgba(255,255,255,.78); color: #1d1d1f; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 12px 40px rgba(0,0,0,.25); transition: transform .4s var(--spring), opacity .3s; }
.play:hover { transform: translate(-50%, -50%) scale(1.06); }
.play .ico { width: 30px; height: 30px; margin-left: 4px; }
.film.playing .play { opacity: 0; pointer-events: none; }

/* gallery */
.gallery-wrap { position: relative; }
.gallery { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 2px 30px; margin: 0 -2px; }
.gallery::-webkit-scrollbar { display: none; }
.shot { flex: none; scroll-snap-align: start; border: 0; padding: 0; background: none; cursor: zoom-in; text-align: left; }
.shot img { border-radius: var(--r-inner); box-shadow: var(--shadow), 0 0 0 .5px var(--sep); background: var(--surface); transition: transform .5s var(--spring); }
.shot:hover img { transform: scale(1.015); }
.gallery[data-kind="desktop"] .shot img { width: min(620px, 78vw); aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.gallery[data-kind="phone"] .shot img { width: 230px; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; border-radius: 30px; }
.shot span { display: block; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.gal-arrow { position: absolute; top: calc(50% - 30px); width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 4px 16px rgba(0,0,0,.14), 0 0 0 .5px var(--border); color: var(--text); transition: opacity .25s, transform .3s var(--spring); }
.gal-arrow:hover { transform: scale(1.06); }
.gal-arrow:disabled { opacity: 0; pointer-events: none; }
.gal-arrow .ico { width: 18px; height: 18px; }
.gal-arrow.prev { left: -14px; } .gal-arrow.next { right: -14px; }

/* platforms */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; align-items: stretch; }
.plat { position: relative; display: flex; flex-direction: column; padding: 32px 30px 28px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); transition: box-shadow .3s; }
.plat.mine { box-shadow: var(--shadow), 0 0 0 2px var(--accent); }
.plat.off { background: color-mix(in srgb, var(--surface) 55%, transparent); box-shadow: inset 0 0 0 1px var(--sep); }
.plat.off > :not(.soon) { opacity: .55; }
.p-glyph { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin-bottom: 20px; }
.p-glyph .ico { width: 32px; height: 32px; }
.plat h3 { font-size: 28px; }
.p-req { color: var(--text-2); font-size: 14px; margin: 4px 0 0; }
.p-ver { color: var(--text-3); font-size: 13px; margin: 14px 0 0; font-variant-numeric: tabular-nums; }
.p-body { flex: 1; margin: 20px 0 22px; padding: 16px 18px; border-radius: var(--r-inner); background: var(--surface-2); font-size: 14px; color: var(--text-2); }
html[data-theme="dark"] .p-body { background: rgba(255,255,255,.04); }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.perks .ico { width: 16px; height: 16px; color: var(--accent); margin-top: 1px; }
.qr-row { display: flex; align-items: center; gap: 16px; }
.qr { flex: none; width: 108px; height: 108px; padding: 8px; border-radius: 14px; background: #fff; }
.qr svg { width: 100%; height: 100%; }
.p-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p-actions .btn { height: 38px; padding: 0 18px; font-size: 15px; }
.p-actions .ico { width: 16px; height: 16px; }
.p-extra { display: flex; gap: 14px; margin-top: 14px; font-size: 13px; flex-wrap: wrap; }
.p-extra a, .p-extra button { color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; font-size: 13px; }
.p-extra a:hover, .p-extra button:hover { text-decoration: underline; }
.soon { position: absolute; top: 22px; right: 22px; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--fill); color: var(--text-2); font-size: 12px; font-weight: 500; }
.soon::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 12px; font-weight: 600; }
.pill.beta { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.pill.gray { background: var(--fill); color: var(--text-2); }

/* what's new */
.news { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; padding: 44px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); }
.news-head h3 { margin-top: 14px; font-size: 32px; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.news-list li { display: flex; gap: 14px; font-size: 16px; line-height: 1.45; }
.news-list li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: linear-gradient(var(--indigo), var(--cyan)); }

/* versions */
.versions { overflow: hidden; }
.v-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 18px; align-items: center; padding: 16px 24px; border-top: .5px solid var(--sep); }
.v-row:first-child { border-top: 0; }
.v-num { font: 600 17px/1.2 var(--font-display); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-info { font-size: 13px; color: var(--text-2); min-width: 0; }
.v-info .v-notes { color: var(--text); font-size: 14px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-files { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: var(--fill); font-size: 13px; color: var(--text); border: 0; cursor: pointer; transition: background .2s; white-space: nowrap; }
.chip:hover { background: var(--fill-2); }
.chip .ico { width: 14px; height: 14px; color: var(--accent); }
.chip.icon { width: 30px; padding: 0; justify-content: center; }
.chip.icon .ico { color: var(--text-2); }
.v-more { display: block; width: 100%; padding: 16px; border: 0; border-top: .5px solid var(--sep); background: none; color: var(--accent); font-size: 15px; cursor: pointer; }
.v-more:hover { background: var(--fill); }
.v-empty { padding: 40px 24px; text-align: center; color: var(--text-2); }
.withdrawn .v-num { text-decoration: line-through; color: var(--text-3); }

/* footer */
.footer { margin-top: 120px; border-top: .5px solid var(--sep); background: var(--bg-2); }
html[data-theme="light"] .footer { background: #f5f5f7; }
.footer-in { max-width: var(--w); margin: 0 auto; padding: 30px 22px 44px; font-size: 12px; color: var(--text-2); }
.footer-in .brand { font-size: 14px; color: var(--text); margin-bottom: 10px; }
.footer-in p { margin: 6px 0 0; max-width: 680px; }
.muted { color: var(--text-3); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0,0,0,.82); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); animation: fade .3s var(--ease); }
.lightbox figure { margin: 0; max-width: 88vw; max-height: 86vh; display: flex; flex-direction: column; align-items: center; animation: zoom .45s var(--spring); }
.lightbox img { max-width: 88vw; max-height: 80vh; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox figcaption { margin-top: 14px; color: rgba(255,255,255,.75); font-size: 14px; }
.lightbox .icon-btn { position: absolute; width: 44px; height: 44px; background: rgba(255,255,255,.14); color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255,255,255,.24); }
.lb-close { top: 22px; right: 22px; }
.lb-nav.prev { left: 22px; top: calc(50% - 22px); } .lb-nav.next { right: 22px; top: calc(50% - 22px); }
@keyframes fade { from { opacity: 0; } }
@keyframes zoom { from { opacity: 0; transform: scale(.94); } }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 120; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: var(--r-pill); background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 0 0 .5px var(--border); font-size: 14px; transition: opacity .3s, transform .45s var(--spring); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .platforms { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .news { grid-template-columns: 1fr; gap: 24px; padding: 32px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .links { display: none; }
  .nav-end { margin-left: auto; }
  .hero { padding-top: 48px; }
  .sub { font-size: 17px; }
  .lead .grad { display: block; }
  .devices { margin-top: 40px; padding-bottom: 24px; }
  .laptop { width: 92%; }
  .lid { border-radius: 12px 12px 4px 4px; }
  .lid img { border-radius: 5px; }
  .base { height: 8px; }
  .phone { width: 27%; border-radius: 22px; padding: 1.4%; }
  .phone img { border-radius: 18px; }
  .section { padding-top: 80px; }
  .features { grid-template-columns: 1fr; }
  .feature { padding: 24px; }
  .film { border-radius: 20px; }
  .film[data-kind="phone"] { aspect-ratio: 9 / 16; }
  .play { width: 64px; height: 64px; }
  .gal-arrow { display: none; }
  .gallery[data-kind="phone"] .shot img { width: 190px; border-radius: 24px; }
  .plat { padding: 26px 22px 22px; }
  .v-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 18px; }
  .v-files { justify-content: flex-start; }
  .news { padding: 24px; }
  .lb-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
