/* Altimeter website. Light by default, dark from the system setting or the
   theme button ([data-theme] on <html> wins over the system). */
:root {
  --bg: #FAF8FF; --sky1: #EDE6FF; --sky2: #FAF8FF; --ink: #1D1640; --sub: #5E5878;
  --violet: #6046B7; --card: #FFFFFF; --chip: rgba(96,70,183,.10); --line: #E4DCFA;
  --hl: #FFE066; --btn: #1D1640; --btn-text: #FFFFFF; --m1: #DCD2FF; --m2: #B7A6F4;
  --m3: #8B72E0; --m4: #6046B7; --snow: #FFFFFF; --panel1: #EFE9FF; --panel2: #FAF8FF;
  --dawn: #FFE3B3; --contour: .10; --shadow: rgba(40,20,90,.25);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110D24; --sky1: #0D0A1F; --sky2: #1B1540; --ink: #F3F0FC; --sub: #B3ABD6;
    --violet: #A08CFF; --card: #1E1940; --chip: rgba(255,255,255,.08); --line: #332B5E;
    --hl: #5B3FC4; --btn: #F3F0FC; --btn-text: #110D24; --m1: #2B2366; --m2: #3A2E85;
    --m3: #4E3DA8; --m4: #2A2160; --snow: #C9BFF0; --panel1: #211B48; --panel2: #151131;
    --dawn: #3B2D7A; --contour: .18; --shadow: rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #110D24; --sky1: #0D0A1F; --sky2: #1B1540; --ink: #F3F0FC; --sub: #B3ABD6;
  --violet: #A08CFF; --card: #1E1940; --chip: rgba(255,255,255,.08); --line: #332B5E;
  --hl: #5B3FC4; --btn: #F3F0FC; --btn-text: #110D24; --m1: #2B2366; --m2: #3A2E85;
  --m3: #4E3DA8; --m4: #2A2160; --snow: #C9BFF0; --panel1: #211B48; --panel2: #151131;
  --dawn: #3B2D7A; --contour: .18; --shadow: rgba(0,0,0,.45);
  color-scheme: dark;
}

/* Theme-only elements */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: revert; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}
:root[data-theme="dark"] .only-dark { display: revert; }
:root[data-theme="dark"] .only-light { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); overflow-x: hidden;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased; transition: background .3s, color .3s;
}
a { color: inherit; }
img { max-width: 100%; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.pre { white-space: pre-line; }
.hl { background: linear-gradient(180deg, transparent 56%, var(--hl) 56%, var(--hl) 90%, transparent 90%); padding: 0 .12em; margin: 0 -.06em; border-radius: .08em; }
.sec-title { margin: 0; font-size: 48px; line-height: 1.05; font-weight: 800; letter-spacing: -1.5px; }
.sec-sub { margin: 14px 0 0; font-size: 18px; line-height: 1.5; color: var(--sub); max-width: 620px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.sec-head .sec-sub { margin: 0; max-width: 460px; font-size: 17px; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

/* Phone frame (the store screenshots' frame) */
.phone { padding: 9px; border-radius: 48px; background: #111015; box-shadow: 0 40px 80px rgba(40,20,90,.30), inset 0 0 0 2px #3A3745; }
.phone img { display: block; width: 100%; height: auto; border-radius: 40px; }

/* Buttons */
.store-btn { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; background: var(--btn); color: var(--btn-text); padding: 15px 24px; border-radius: 16px; font-weight: 700; font-size: 17px; box-shadow: 0 12px 28px var(--shadow); transition: transform .2s; }
.store-btn:hover { transform: translateY(-2px); }
.store-btn svg { width: 18px; height: 21px; }
.pill-group { display: flex; background: var(--chip); border-radius: 40px; padding: 4px; }
.lang-select { appearance: none; border: 0; background: var(--chip); color: var(--ink); font: 700 14px/1 inherit; height: 44px; padding: 0 34px 0 16px; border-radius: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 20px; height: 20px; }

/* Hero */
.hero { position: relative; background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 70%); overflow: hidden; }
.contours { position: absolute; left: -140px; top: 60px; width: 760px; height: 760px; opacity: var(--contour); pointer-events: none; }
.drift { transform-box: fill-box; transform-origin: center; animation: drift 20s ease-in-out infinite; }
.sky { position: absolute; inset: 0 0 auto 0; width: 100%; height: 520px; pointer-events: none; }
.topbar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 6px 16px rgba(40,20,90,.25); }
.nav { display: flex; gap: 28px; font-size: 15px; font-weight: 600; }
.nav a { text-decoration: none; color: var(--sub); }
.nav a:hover { color: var(--ink); }
.controls { display: flex; align-items: center; gap: 8px; }
.hero-grid { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: center; padding: 48px 0 0; }
.hero-copy { padding-bottom: clamp(180px, 27vw, 320px); animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
.laurels { display: flex; gap: 22px; flex-wrap: wrap; }
.laurel { display: flex; align-items: center; gap: 2px; }
.laurel svg { width: 22px; height: 46px; fill: var(--violet); }
.laurel .flip { transform: scaleX(-1); }
.laurel b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.laurel .stars { font-size: 11px; color: #F5B300; letter-spacing: 2px; }
.laurel small { display: block; font-size: 11px; font-weight: 600; color: var(--sub); max-width: 110px; line-height: 1.2; }
.laurel > div { text-align: center; padding: 0 2px; }
.hero h1 { margin: 26px 0 0; font-size: 76px; line-height: 1.02; font-weight: 800; letter-spacing: -2.5px; }
.hero-sub { margin: 22px 0 0; font-size: 20px; line-height: 1.5; font-weight: 500; color: var(--sub); max-width: 520px; }
.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
.cta-row span { font-size: 14px; font-weight: 600; color: var(--sub); }
.hero-phone { position: relative; min-height: 640px; padding-bottom: clamp(60px, 8vw, 140px); display: flex; justify-content: center; align-items: flex-start; }
.hero-phone .phone-float { position: relative; width: 290px; margin-top: 10px; z-index: 2; --r: -6deg; animation: float 6s ease-in-out infinite; }
.chip-place { position: absolute; left: 2%; top: 70px; z-index: 3; transform: rotate(-4deg); display: flex; align-items: center; gap: 8px; background: var(--card); color: var(--ink); padding: 10px 16px; border-radius: 40px; box-shadow: 0 16px 36px rgba(40,20,90,.22); font-weight: 700; font-size: 17px; white-space: nowrap; }
.chip-place svg { width: 16px; height: 21px; }
.chip-place span { color: var(--violet); }
.chip-alt { position: absolute; right: 0; top: 330px; z-index: 3; transform: rotate(6deg); background: #6046B7; color: #FFFFFF; padding: 16px 20px; border-radius: 26px; box-shadow: 0 22px 44px rgba(40,20,90,.35); min-width: 150px; text-align: center; }
.chip-alt .num { font-size: 34px; font-weight: 700; letter-spacing: -1px; }
.chip-alt small { display: block; font-size: 14px; font-weight: 600; opacity: .85; margin-top: 2px; }
.range { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(200px, 24vw, 360px); z-index: 1; pointer-events: none; }

/* Live readouts */
.live { padding-block: 64px 8px; }
.live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 32px; }
.tile { background: var(--card); border-radius: 28px; padding: 24px; box-shadow: 0 1px 0 var(--line), 0 18px 40px rgba(40,20,90,.08); }
.tile-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--violet); }
.tile-head i { width: 8px; height: 8px; border-radius: 50%; background: #2E9D66; animation: twinkle 3s ease-in-out infinite; }
.tile .val { font-size: 52px; font-weight: 700; letter-spacing: -2px; margin-top: 10px; }
.tile .val small { font-size: 20px; color: var(--sub); letter-spacing: 0; }
.tile p { margin: 4px 0 0; font-size: 14px; color: var(--sub); }
.tile-compass { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tile-compass svg { flex: none; width: 104px; height: 104px; }
.needle { transition: transform 1.2s cubic-bezier(.3,1.4,.5,1); }

/* Ribbon */
.ribbon { padding-block: 72px 24px; }
.ribbon svg { display: block; width: 100%; height: auto; margin-top: 28px; }
.ribbon .draw { stroke-dasharray: 100; stroke-dashoffset: 100; }
.ribbon.seen .draw { animation: draw 2.6s .2s ease-out forwards; }
.ribbon-list { display: none; flex-direction: column; margin-top: 20px; border-top: 1px solid var(--line); }
.ribbon-list div { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ribbon-list span:first-child { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--violet); background: var(--card); }
.dot.local { background: #FFE066; }

/* Gallery */
.gallery { padding: 56px 0 24px; }
.gallery-head > span { font-size: 14px; font-weight: 600; color: var(--sub); }
.row { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 32px max(24px, calc((100% - 1192px) / 2)) 24px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.panel { flex: 0 0 300px; height: 600px; scroll-snap-align: start; position: relative; overflow: hidden; border-radius: 32px; background: linear-gradient(180deg, var(--panel1) 0%, var(--panel2) 100%); box-shadow: 0 1px 0 var(--line); transition: transform .35s cubic-bezier(.2,.9,.3,1.2); }
.panel:hover { transform: translateY(-8px); }
.panel-copy { padding: 28px 24px 0; position: relative; z-index: 2; }
.panel h3 { margin: 0; font-size: 28px; line-height: 1.08; font-weight: 800; letter-spacing: -.8px; }
.panel p { margin: 10px 0 0; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--sub); }
.panel .hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 120px; z-index: 1; }
.panel .phone-wrap { position: absolute; left: 50%; top: 170px; width: 220px; margin-left: -110px; z-index: 2; }
.panel .phone { padding: 7px; border-radius: 38px; }
.panel .phone img { border-radius: 32px; }

/* Badges */
.badges { padding-block: 56px; }
.case { margin-top: 32px; background: var(--card); border-radius: 36px; padding: 28px; box-shadow: 0 1px 0 var(--line), 0 24px 60px rgba(40,20,90,.10); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { border: 0; cursor: pointer; font: 700 15px/1 inherit; padding: 0 18px; height: 44px; border-radius: 40px; background: var(--chip); color: var(--ink); }
.tab[aria-selected="true"] { background: #6046B7; color: #FFFFFF; }
.tabpanel[hidden] { display: none; }
.climb { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
.climb label { font-weight: 700; font-size: 15px; }
.climb input { flex: 1 1 260px; accent-color: #6046B7; height: 44px; }
.climb output { font-size: 20px; font-weight: 700; min-width: 110px; text-align: right; }
.medals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 12px; margin-top: 18px; }
.grid6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 10px; margin-top: 26px; }
.badge { text-align: center; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.badge:hover { transform: rotate(0deg) scale(1.05) !important; }
.badge img { width: 100%; max-width: 150px; height: auto; display: block; margin: 0 auto; transition: filter .5s, opacity .5s, transform .5s cubic-bezier(.3,1.6,.5,1); }
.badge b { display: block; font-size: 15px; font-weight: 800; margin-top: 2px; }
.badge small { display: block; font-size: 13px; font-weight: 600; color: var(--sub); }
.medal.locked img { filter: grayscale(1); opacity: .35; }
.medal:not(.locked) small { color: #2E9D66; }
.medal.latest img { transform: scale(1.06); }
.case-note { margin: 18px 0 0; font-size: 14px; font-weight: 600; color: var(--sub); }

/* Pro */
.pro { padding-block: 24px 64px; }
.pro-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; background: #6046B7; color: #FFFFFF; border-radius: 36px; padding: 52px; position: relative; overflow: hidden; }
.pro-card .hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 110px; opacity: .35; }
.pro-card > div, .pro-card ul { position: relative; }
.pro-word { color: #FFE066; text-shadow: 0 0 28px rgba(255,224,102,.55); white-space: nowrap; }
.pro-word svg { width: .8em; height: .8em; vertical-align: -.05em; margin-right: .12em; }
.pro-card p { margin: 16px 0 0; font-size: 18px; line-height: 1.5; opacity: .9; max-width: 440px; }
.pro-card .store-btn { margin-top: 26px; background: #FFFFFF; color: #1D1640; box-shadow: none; }
.pro-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pro-card li { display: flex; gap: 12px; align-items: center; font-size: 18px; font-weight: 600; }
.pro-card li span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; }

/* Final */
.final { position: relative; height: 560px; overflow: hidden; background: linear-gradient(180deg, var(--bg) 0%, var(--dawn) 100%); }
.final svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.final .wrap { position: relative; z-index: 2; padding-top: 72px; }
.final h2 { margin: 0; font-size: 84px; line-height: .98; font-weight: 800; letter-spacing: -3px; }
.sun { transition: transform .2s linear; }

/* Footer */
.footer { background: var(--m4); color: #FFFFFF; }
.footer .wrap { padding-top: 22px; padding-bottom: 36px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 600; }
.footer img { width: 28px; height: 28px; border-radius: 8px; vertical-align: middle; margin-right: 10px; }

/* Climb pill + toast */
.hud { position: fixed; left: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; background: var(--card); color: var(--ink); padding: 10px 18px 10px 10px; border-radius: 24px; box-shadow: 0 18px 44px rgba(40,20,90,.30); animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.toast[hidden] { display: none; }
.toast img { width: 56px; height: 56px; }
.toast small { display: block; font-size: 12px; font-weight: 700; color: var(--violet); }
.toast b { font-size: 16px; }
.alt-pill { transition: opacity .3s, transform .3s; }
.alt-pill.idle { opacity: 0; transform: translateY(8px); }
.alt-pill { background: #1D1640; color: #FFFFFF; padding: 9px 14px; border-radius: 40px; font-size: 14px; font-weight: 700; box-shadow: 0 10px 24px rgba(40,20,90,.3); }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 24px 24px 72px; }
.legal h1 { font-size: 40px; line-height: 1.1; letter-spacing: -1px; margin: 24px 0 8px; }
.legal h2 { font-size: 22px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--sub); line-height: 1.65; }
.legal a { color: var(--violet); }
.legal .note { background: var(--chip); padding: 12px 16px; border-radius: 14px; font-weight: 600; color: var(--ink); }
.legal-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 24px; max-width: 1240px; margin: 0 auto; }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-10px) rotate(var(--r)); } }
@keyframes drift { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.star { animation: twinkle 3s ease-in-out infinite; }

@media (max-width: 900px) {
  .hero-grid, .pro-card { grid-template-columns: 1fr; }
  .hero-grid { padding-top: 24px; }
  .hero h1 { font-size: 46px; letter-spacing: -1.5px; }
  .hero-copy { padding-bottom: 0; }
  .hero-phone { min-height: 560px; margin-bottom: 120px; }
  .hero-phone .phone-float { width: 250px; }
  .chip-alt { top: 280px; }
  .nav { display: none; }
  .topbar { flex-wrap: nowrap; }
  .lang-select { max-width: 132px; text-overflow: ellipsis; font-size: 13px; padding-left: 12px; }
  .sec-title { font-size: 36px; }
  .live-grid { grid-template-columns: 1fr; }
  .ribbon svg { display: none; }
  .ribbon-list { display: flex; }
  .medals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pro-card { padding: 32px 24px; }
  .final h2 { font-size: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ribbon .draw { stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}
[dir="rtl"] .chip-place { left: auto; right: 2%; }
[dir="rtl"] .chip-alt { right: auto; left: 0; }
[dir="rtl"] .hud { left: auto; right: 16px; align-items: flex-end; }
