:root {
  color-scheme: dark;
  --bg: #07101f;
  --bg-deep: #040a14;
  --surface: rgba(17, 29, 51, 0.78);
  --surface-solid: #111d33;
  --surface-soft: rgba(255, 255, 255, 0.055);
  --border: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #9aa8bd;
  --primary: #6366f1;
  --primary-bright: #8b5cf6;
  --cyan: #22d3ee;
  --green: #10b981;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 48%, #22d3ee 100%);
  --container: 1160px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fd;
  --bg-deep: #eef1fa;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-soft: rgba(99, 102, 241, 0.065);
  --border: rgba(46, 55, 85, 0.13);
  --text: #0f172a;
  --muted: #64748b;
  --shadow: 0 28px 80px rgba(46, 55, 85, 0.13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  transition: background-color .3s ease, color .3s ease;
}

body.is-locked { overflow: hidden; }

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .16;
  pointer-events: none;
}
.ambient-one { top: -240px; left: -160px; background: #6366f1; }
.ambient-two { right: -240px; bottom: -260px; background: #22d3ee; opacity: .1; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.05rem; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { width: 37px; height: 37px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark.small { width: 31px; height: 31px; color: var(--primary); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary-bright); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { background: linear-gradient(135deg, #7c5cf5, #5b55e8); color: white; box-shadow: 0 12px 30px rgba(99, 102, 241, .28); }
.button-primary:hover { box-shadow: 0 16px 36px rgba(99, 102, 241, .4); }
.button-ghost { min-height: 40px; padding: 0 14px; color: var(--muted); border-color: var(--border); background: var(--surface-soft); }
.button-full { width: 100%; }

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(99, 102, 241, .22), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(34, 211, 238, .12), transparent 34%),
    #050c18;
  transition: opacity .45s ease, visibility .45s ease;
}
:root[data-theme="light"] .access-gate { background: radial-gradient(circle at 20% 15%, rgba(99,102,241,.14), transparent 34%), radial-gradient(circle at 80% 80%, rgba(34,211,238,.1), transparent 30%), #eef1fa; }
.is-unlocked .access-gate { opacity: 0; visibility: hidden; }

.gate-card {
  position: relative;
  width: min(100%, 450px);
  padding: 38px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}
.gate-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--gradient); }
.gate-brand { margin-bottom: 48px; }
.gate-copy h1 { margin: 12px 0 9px; font-size: clamp(2rem, 6vw, 2.6rem); letter-spacing: -.055em; }
.gate-copy p { margin: 0; color: var(--muted); line-height: 1.7; }
.password-form { margin-top: 30px; }
.password-form label { display: block; margin-bottom: 9px; font-size: .82rem; font-weight: 700; }
.password-field { position: relative; }
.password-field input { width: 100%; height: 52px; padding: 0 52px 0 15px; border: 1px solid var(--border); outline: none; border-radius: 12px; background: var(--surface-soft); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.password-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.password-field input::placeholder { color: var(--muted); }
.icon-button { display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.reveal-password { position: absolute; top: 6px; right: 7px; width: 40px; height: 40px; }
.form-error { min-height: 20px; margin: 7px 0 8px; color: #fb7185; font-size: .78rem; }
.gate-footnote { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 26px 0 0; color: var(--muted); font-size: .72rem; }
.gate-footnote span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.shake { animation: shake .36s ease; }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

.site-shell { min-height: 100vh; opacity: 0; filter: blur(8px); transition: opacity .55s ease .08s, filter .55s ease .08s; }
.is-unlocked .site-shell { opacity: 1; filter: none; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px); }
.header-inner { display: flex; height: 74px; align-items: center; justify-content: space-between; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { position: relative; width: 48px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 99px; background: var(--surface-soft); cursor: pointer; }
.theme-toggle::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform .25s ease; }
:root[data-theme="light"] .theme-toggle::before { transform: translateX(20px); }
.theme-icon { position: absolute; top: 7px; color: var(--muted); }
.theme-icon svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.sun-icon { right: 6px; }
.moon-icon { left: 6px; }
.logout-button svg { width: 17px; }

.hero { position: relative; padding: 94px 0 110px; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 50%; bottom: 0; width: min(90%, 1050px); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--border), transparent); }
.hero-grid { display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 70px; }
.hero-copy h1 { margin: 18px 0 24px; font-size: clamp(3.35rem, 6vw, 5.8rem); line-height: .98; letter-spacing: -.07em; }
.hero-copy h1 span { color: transparent; background: var(--gradient); background-clip: text; -webkit-background-clip: text; }
.hero-copy > p { max-width: 570px; margin: 0 0 32px; color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.trust-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 32px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-row svg { width: 16px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero-visual { position: relative; min-height: 470px; perspective: 1200px; }
.orbit { position: absolute; border: 1px solid rgba(99,102,241,.2); border-radius: 50%; }
.orbit-one { inset: 10% 4% 2% 8%; transform: rotate(-10deg); }
.orbit-two { inset: 22% 13% 12% 0; transform: rotate(22deg); }
.device { position: absolute; overflow: hidden; border: 1px solid rgba(148,163,184,.28); background: #f9fbff; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.phone-device { z-index: 3; top: 18px; left: 4%; width: 190px; height: 385px; padding: 12px; border-radius: 29px; transform: rotateY(12deg) rotateZ(-5deg); animation: float 6s ease-in-out infinite; }
.phone-top { position: absolute; z-index: 2; top: 7px; left: 50%; width: 60px; height: 14px; border-radius: 0 0 10px 10px; background: #0f172a; transform: translateX(-50%); }
.device-screen { height: 100%; padding: 32px 14px 14px; border-radius: 20px; background: linear-gradient(155deg,#fff,#f0f3ff); color: #17213a; }
.mini-logo { display: grid; width: 28px; height: 28px; margin-bottom: 28px; place-items: center; border-radius: 8px; background: var(--gradient); color: white; font-size: .72rem; font-weight: 800; }
.screen-title { font-size: .84rem; font-weight: 800; }
.screen-subtitle { margin-top: 4px; color: #8791a6; font-size: .45rem; }
.mini-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin: 16px 0; }
.mini-stats i { height: 44px; border-radius: 7px; background: #edf0fa; }
.mini-stats i:nth-child(2) { background: #e9e7ff; }
.mini-card { height: 46px; margin-top: 7px; border-radius: 8px; background: #edf0f6; }
.mini-card.accent { background: linear-gradient(90deg, rgba(99,102,241,.17),rgba(34,211,238,.1)); }
.mini-card.short { width: 72%; }
.desktop-device { z-index: 2; right: -4%; bottom: 42px; width: 430px; height: 290px; border-radius: 17px; transform: rotateY(-10deg) rotateZ(3deg); animation: float 7s ease-in-out .7s infinite reverse; }
.desktop-bar { display: flex; gap: 5px; height: 26px; align-items: center; padding: 0 11px; background: #e9edf7; }
.desktop-bar i { width: 6px; height: 6px; border-radius: 50%; background: #b4bfd2; }
.desktop-layout { display: grid; height: calc(100% - 26px); grid-template-columns: 58px 1fr; }
.mini-sidebar { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 18px; background: #111a2c; }
.mini-sidebar b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; background: var(--gradient); color: white; font-size: .65rem; }
.mini-sidebar i { width: 18px; height: 4px; border-radius: 4px; background: #47526a; }
.desktop-content { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #17213a; background: linear-gradient(135deg,#fbfcff,#edf0fa); }
.modal-window { width: 88%; overflow: hidden; border: 1px solid #dce2ef; border-radius: 13px; background: white; box-shadow: 0 14px 35px rgba(31,42,68,.14); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #e8ebf3; }
.modal-head > div { display: flex; flex-direction: column; gap: 2px; }
.modal-head b { font-size: .6rem; }
.modal-head span { color: #8a94a8; font-size: .4rem; }
.modal-head > i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 7px rgba(16,185,129,.5); }
.modal-body { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 14px; }
.mock-qr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; aspect-ratio: 1; padding: 6px; border: 1px solid #e2e6ef; border-radius: 8px; background: #fff; }
.mock-qr span { border-radius: 1px; background: #17213a; }
.mock-qr span:nth-child(2), .mock-qr span:nth-child(5), .mock-qr span:nth-child(7) { background: transparent; }
.mock-qr span:nth-child(1), .mock-qr span:nth-child(4), .mock-qr span:nth-child(6) { box-shadow: inset 0 0 0 3px #17213a, inset 0 0 0 5px white; }
.mock-task { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.mock-task em { align-self: flex-start; padding: 3px 5px; border-radius: 3px; background: #ede9fe; color: #6d4bd1; font-size: .34rem; font-style: normal; font-weight: 800; }
.mock-task strong { margin-top: 7px; font-size: .61rem; white-space: nowrap; }
.mock-task small { margin-top: 4px; color: #8791a6; font-size: .4rem; }
.task-progress { height: 4px; margin-top: 10px; overflow: hidden; border-radius: 5px; background: #e8ebf3; }
.task-progress i { display: block; width: 68%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#8b5cf6,#6366f1); }
.floating-badge { position: absolute; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(12px); font-size: .72rem; font-weight: 700; }
.floating-badge svg { width: 17px; fill: none; stroke: var(--cyan); stroke-width: 1.8; }
.badge-mobile { top: 20px; left: 36%; }
.badge-focus { right: 2%; bottom: 19px; }
@keyframes float { 50% { transform: translateY(-10px) rotateY(8deg) rotateZ(-3deg); } }

.downloads-section { padding: 100px 0 108px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.section-heading h2 { margin: 11px 0 0; font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.055em; }
.section-heading > p { max-width: 450px; margin: 0; color: var(--muted); line-height: 1.7; }
.app-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.app-card { position: relative; padding: 30px; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 15px 50px rgba(0,0,0,.08); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; animation: reveal .55s ease both; animation-delay: var(--delay); }
.app-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; opacity: .8; background: var(--gradient); }
.app-card:hover { transform: translateY(-5px); border-color: rgba(99,102,241,.4); box-shadow: var(--shadow); }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }
.app-card-top { display: flex; align-items: start; justify-content: space-between; }
.app-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 16px; background: linear-gradient(145deg, rgba(139,92,246,.2), rgba(99,102,241,.08)); color: #8b5cf6; }
.app-card-focus .app-icon { background: linear-gradient(145deg, rgba(34,211,238,.18), rgba(99,102,241,.08)); color: var(--cyan); }
.app-icon svg { width: 29px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.platform-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); font-size: .68rem; font-weight: 700; }
.platform-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.app-card-unavailable .platform-pill i { background: #f59e0b; box-shadow: 0 0 10px rgba(245,158,11,.55); }
.app-title-row { margin-top: 25px; }
.app-title-row h3 { margin: 0 0 6px; font-size: 1.4rem; letter-spacing: -.04em; }
.app-title-row span { color: var(--primary-bright); font-size: .75rem; font-weight: 700; }
.app-description { min-height: 53px; margin: 17px 0 19px; color: var(--muted); font-size: .88rem; line-height: 1.65; }
.app-flow { display: flex; align-items: center; gap: 9px; margin: -2px 0 18px; padding: 12px; border: 1px solid rgba(99,102,241,.18); border-radius: 11px; background: rgba(99,102,241,.07); }
.app-flow span { display: flex; min-width: 0; align-items: center; gap: 7px; color: var(--text); font-size: .66rem; font-weight: 700; }
.app-flow span b { display: grid; width: 20px; height: 20px; flex: none; place-items: center; border-radius: 50%; background: var(--primary); color: white; font-size: .58rem; }
.app-flow > i { color: var(--primary-bright); font-size: .8rem; font-style: normal; }
.feature-list { display: grid; gap: 9px; margin: 0; padding: 18px 0; border-top: 1px solid var(--border); list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .77rem; }
.feature-list svg { width: 15px; fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.app-meta { display: flex; justify-content: space-between; margin: 1px 0 18px; color: var(--muted); font-size: .66rem; }
.button-download { width: 100%; background: var(--surface-soft); border-color: var(--border); color: var(--text); }
.button-download:hover { border-color: var(--primary); background: rgba(99,102,241,.12); }
.button-unavailable { border-style: dashed; color: var(--muted); }
.button-unavailable:hover { color: var(--text); }
.install-note { display: flex; align-items: flex-start; gap: 17px; margin-top: 24px; padding: 22px 24px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface-soft); }
.note-icon { display: grid; width: 39px; height: 39px; flex: none; place-items: center; border-radius: 11px; background: rgba(34,211,238,.1); color: var(--cyan); }
.note-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.install-note h3 { margin: 0 0 6px; font-size: .9rem; }
.install-note p { margin: 0; color: var(--muted); font-size: .77rem; line-height: 1.65; }

.availability-dialog {
  width: min(calc(100% - 32px), 470px);
  padding: 38px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  outline: none;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 32px 100px rgba(0,0,0,.48);
}
.availability-dialog::backdrop { background: rgba(2,6,15,.72); backdrop-filter: blur(8px); }
.availability-dialog[open] { animation: dialog-in .24s ease both; }
.dialog-glow { position: absolute; top: -120px; left: -90px; width: 270px; height: 270px; border-radius: 50%; background: rgba(99,102,241,.2); filter: blur(55px); pointer-events: none; }
.dialog-close { position: absolute; top: 16px; right: 16px; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--muted); cursor: pointer; transition: color .2s ease, border-color .2s ease; }
.dialog-close:hover { border-color: var(--primary); color: var(--text); }
.dialog-close svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dialog-icon { position: relative; display: grid; width: 62px; height: 62px; margin-bottom: 24px; place-items: center; border-radius: 18px; background: linear-gradient(145deg, rgba(139,92,246,.2), rgba(99,102,241,.08)); color: var(--primary-bright); }
.dialog-icon svg { width: 31px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dialog-status { position: relative; display: inline-flex; align-items: center; gap: 7px; color: #f59e0b; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dialog-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.availability-dialog h2 { position: relative; margin: 13px 0 12px; font-size: clamp(1.65rem, 5vw, 2.1rem); line-height: 1.12; letter-spacing: -.05em; }
.availability-dialog p { position: relative; margin: 0 0 27px; color: var(--muted); font-size: .9rem; line-height: 1.7; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }

.site-footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; min-height: 110px; align-items: center; justify-content: space-between; gap: 30px; color: var(--muted); font-size: .75rem; }
.footer-inner .brand { color: var(--text); }
.footer-inner p { letter-spacing: .12em; text-transform: uppercase; }

@media (max-width: 960px) {
  .hero { padding-top: 70px; }
  .hero-grid { grid-template-columns: 1fr; gap: 55px; }
  .hero-copy { max-width: 690px; }
  .hero-visual { width: min(100%, 650px); margin-inline: auto; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .site-header .brand > span:last-child { display: none; }
  .logout-button { width: 40px; padding: 0; font-size: 0; }
  .hero { padding: 62px 0 82px; }
  .hero-copy h1 { font-size: clamp(3rem, 15vw, 4.2rem); }
  .hero-visual { min-height: 390px; transform: scale(.88); transform-origin: top center; margin-bottom: -45px; }
  .desktop-device { width: 370px; height: 250px; right: -10px; }
  .phone-device { width: 165px; height: 335px; left: 2px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 18px; }
  .app-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; justify-content: center; padding: 30px 0; text-align: center; }
  .footer-inner p { margin: 0; }
}

@media (max-width: 480px) {
  .gate-card { padding: 30px 22px; border-radius: 22px; }
  .gate-brand { margin-bottom: 38px; }
  .hero-visual { min-height: 330px; transform: scale(.74); width: 128%; margin-left: -14%; margin-bottom: -100px; }
  .downloads-section { padding: 82px 0; }
  .app-card { padding: 24px; }
  .install-note { padding: 19px; }
  .availability-dialog { padding: 31px 23px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
