/* atlasmy landing: a "desktop" with the Разбор app icon; the icon opens a window (wide
   screens) or a bottom sheet (phones). Made from the owner's design export, without its
   runtime: no inline styles or scripts, so the page runs under a strict CSP. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/inter-latin.woff2') format('woff2');
  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 {
  --sage: #8BA888;
  --sage-dark: #6E8A6B;
  --ink: #2B2B2B;
  --muted: #6E685F;
  --paper: #F2EEE6;
  --line: #E2DBCE;
  --field: #CFDCC4;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--field);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; }

/* ---- desktop ---- */

.desk {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--field);
  background-image:
    linear-gradient(180deg, rgba(207,220,196,0) 0%, rgba(207,220,196,0) 55%, rgba(170,190,160,0.35) 100%),
    url('assets/lake.webp');
  background-size: cover, cover;
  background-position: center, center 70%;
  background-repeat: no-repeat;
}

.bar {
  position: relative;
  z-index: 3;
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(240,236,227,0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(43,43,43,0.06);
  font-size: 14px;
}
.logo { height: 28px; width: 118px; display: block; }
.lang { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: rgba(43,43,43,0.07); }
.lang button {
  height: 26px; min-width: 34px; padding: 0 8px; border: 0; border-radius: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer;
  background: transparent; color: var(--muted);
}
.lang button[aria-pressed="true"] { background: #FFFDFA; color: var(--ink); box-shadow: 0 1px 2px rgba(43,43,43,0.12); }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; }

.apps {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: calc(50% + 22px);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.app {
  position: relative;
  width: 104px;
  padding: 8px 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform .15s;
}
.app:hover { transform: translateY(-2px); }
.app:active { transform: scale(.96); }
.app[aria-expanded="true"] { background: rgba(255,253,250,0.28); }
.app:focus-visible, .btn:focus-visible, .close:focus-visible, .lang button:focus-visible {
  outline: 3px solid #4A6447; outline-offset: 2px;
}
.halo {
  position: absolute; left: 6px; top: -4px; width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,226,170,0.75) 0%, rgba(255,226,170,0.25) 45%, rgba(255,226,170,0) 70%);
  pointer-events: none;
  animation: halo 4s ease-in-out infinite;
}
.ring {
  position: absolute; left: -22px; top: -26px; width: 148px; height: 135px; z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255,214,150,0.9)) drop-shadow(0 0 10px rgba(255,200,120,0.45));
  animation: twinkle 4s ease-in-out infinite;
}
.tile {
  position: relative; z-index: 1; width: 68px; height: 68px; border-radius: 18px;
  background: linear-gradient(160deg, #9BB698 0%, #7E9C7B 100%);
  color: #1F2B1E;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px rgba(40,55,30,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}
.tile svg { width: 34px; height: 34px; }
.app-name { font-size: 14px; font-weight: 600; color: #FFFDFA; text-shadow: 0 1px 3px rgba(30,40,25,0.6); line-height: 1.25; }

@keyframes twinkle { 0%, 100% { opacity: .85; transform: scale(1) rotate(0deg); } 50% { opacity: 1; transform: scale(1.06) rotate(4deg); } }
@keyframes halo { 0%, 100% { opacity: .55; } 50% { opacity: .9; } }

/* ---- window ---- */

.scrim { display: none; }
.win {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, calc(100% - 32px));
  max-height: calc(100% - 64px);
  overflow-y: auto;
  background: var(--paper);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(40,55,30,0.32);
  animation: win-open .28s cubic-bezier(.2,.8,.2,1) both;
}
.win[hidden], .scrim[hidden] { display: none; }
@keyframes win-open { from { opacity: 0; transform: translate(-50%,-46%) scale(.96); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }

.win-head {
  position: sticky; top: 0; z-index: 1;
  height: 44px; padding: 0 10px 0 18px;
  display: flex; align-items: center; gap: 10px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.win-icon { width: 20px; height: 20px; border-radius: 6px; background: var(--sage); display: flex; align-items: center; justify-content: center; }
.win-icon svg { width: 12px; height: 12px; }
.win-name { flex: 1; font-size: 14px; font-weight: 600; }
.close {
  width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.close svg { width: 16px; height: 16px; }

.win-body {
  padding: 30px 34px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: center;
}
.pitch { display: flex; flex-direction: column; gap: 18px; }
.badge { align-self: flex-start; padding: 5px 10px; border-radius: 10px; background: #E6EDE2; color: #4A6447; font-size: 13px; font-weight: 600; }
h2 { margin: 0; font-size: 40px; line-height: 1.06; font-weight: 800; letter-spacing: -0.03em; }
.mark {
  background: #DCE8D3; color: #4A6447; padding: 0 8px; border-radius: 8px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.lead { margin: 0; font-size: 17px; line-height: 1.55; color: #4F4A43; }
.ctas { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  height: 50px; padding: 0 20px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 17px; text-decoration: none;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-main { background: var(--sage); color: #1F2B1E; font-weight: 700; box-shadow: 0 3px 0 var(--sage-dark), 0 8px 18px rgba(80,110,76,0.22); }
.btn-main:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sage-dark); }
.btn-alt { padding: 0 18px; border: 1.5px solid #CFC7BA; background: #FFFDFA; color: var(--ink); font-weight: 600; }
.free { font-size: 14px; color: var(--muted); }
.disclaimer { margin: 0; font-size: 13px; line-height: 1.5; color: #8A847A; }

/* Phone mock-up: the app's home screen under the frame picture. */
.phone { position: relative; width: 240px; height: 481px; justify-self: center; filter: drop-shadow(0 22px 30px rgba(60,50,30,0.24)); }
.phone-screen { position: absolute; left: 5.82%; top: 2.14%; width: 88.46%; height: 95.74%; border-radius: 23.8px; object-fit: cover; background: #F7F4EF; }
.phone-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.phone-in-sheet { display: none; }

/* ---- phones: the window becomes a bottom sheet ---- */

@media (max-width: 760px) {
  .desk {
    background-image:
      linear-gradient(180deg, #D3DFC9 0%, #CFDCC4 38%, rgba(207,220,196,0) 62%),
      url('assets/lake.webp');
    background-size: 100% 100%, auto 62%;
    background-position: top, 38% bottom;
  }
  .bar { height: 48px; padding: 0 14px; }
  .logo { height: 26px; width: 110px; }
  .apps { top: calc(50% + 24px); }
  .app { width: 100px; border-radius: 16px; }
  .app:hover { transform: none; }
  .tile { width: 64px; height: 64px; border-radius: 17px; }
  .tile svg { width: 32px; height: 32px; }

  .scrim {
    display: block;
    position: fixed; inset: 0; z-index: 4;
    background: rgba(30,28,24,0.32);
    animation: fade .25s ease both;
  }
  .win {
    position: fixed;
    z-index: 5;
    left: 0; right: 0; bottom: 0; top: auto;
    transform: none;
    width: auto;
    max-height: calc(100% - 64px);
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -12px 40px rgba(40,55,30,0.28);
    animation: sheet-up .34s cubic-bezier(.2,.8,.2,1) both;
  }
  .win-head { height: 52px; padding: 0 8px 0 16px; }
  .win-icon { width: 22px; height: 22px; }
  .win-icon svg { width: 13px; height: 13px; }
  .win-name { font-size: 15px; }
  .close { width: 44px; height: 44px; border-radius: 12px; }
  .close svg { width: 18px; height: 18px; }

  .win-body { display: block; padding: 22px 20px calc(34px + env(safe-area-inset-bottom, 0px)); }
  .pitch { gap: 16px; }
  h2 { font-size: 32px; line-height: 1.08; }
  .mark { padding: 0 6px; }
  .lead { font-size: 16px; }
  .phone-aside { display: none; }
  .phone-in-sheet { display: block; align-self: center; width: 210px; height: 421px; margin: 4px 0; filter: drop-shadow(0 18px 26px rgba(60,50,30,0.22)); }
  .phone-in-sheet .phone-screen { border-radius: 20.8px; }
  .ctas { flex-direction: column; align-items: stretch; gap: 16px; }
  .btn { height: 52px; }
  .free, .disclaimer { text-align: center; }
  .disclaimer { font-size: 12px; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .ring, .halo, .win, .scrim { animation: none !important; }
}
