/* RamScope page: a Windows 10 desktop, matching the app's native look (Floppy's page is its Win95 twin). */

:root {
  --accent: #0078d7;
  --accent-dark: #005a9e;
  --window: #f0f0f0;
  --paper: #fff;
  --ink: #000;
  --muted: #5d5d5d;
  --line: #d9d9d9;
  --ui: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --mono: Consolas, 'Courier New', monospace;
  --taskbar-h: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

html[lang="ru"] [data-lang="en"],
html[lang="en"] [data-lang="ru"] { display: none !important; }

html { background: #061f4a; }

body {
  margin: 0;
  min-height: 100vh;
  /* The Windows 10 "hero" wallpaper: deep blue with soft light beams. */
  background:
    linear-gradient(105deg, transparent 0 22%, rgba(255, 255, 255, .07) 22% 30%, transparent 30% 36%,
                    rgba(255, 255, 255, .05) 36% 41%, transparent 41%),
    radial-gradient(ellipse at 35% 20%, #1a8ae6 0%, #0a4c9c 50%, #061f4a 100%) fixed;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: .92em; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hero :focus-visible, .taskbar :focus-visible { outline-color: var(--paper); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

.desktop {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 16px calc(var(--taskbar-h) + 48px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* The cover on the project lists grows into this hero (same view-transition-name). */
@view-transition { navigation: auto; }
.hero { color: var(--paper); text-align: center; view-transition-name: cover-ramscope; }
.taskbar { view-transition-name: taskbar; }

.hero-icon { display: block; width: 90px; margin: 0 auto 8px; }
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 10vw, 76px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.tagline {
  max-width: 560px;
  margin: 14px auto 28px;
  font-size: 19px;
  color: rgba(255, 255, 255, .88);
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 230px;
  padding: 10px 22px;
  border: 2px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .08);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.btn small { font-weight: 400; font-size: 13px; opacity: .85; }
.btn:hover { background: rgba(255, 255, 255, .18); border-color: var(--paper); }
.btn:active { background: rgba(255, 255, 255, .26); }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn-accent:hover { background: #1883d7; border-color: #1883d7; }
.btn-accent:active { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- windows ---------- */

.window {
  margin: 0;
  background: var(--window);
  border: 1px solid rgba(0, 0, 0, .35);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .38);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin: 0;
  padding: 0 0 0 10px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 400;
}

.caption-buttons { display: flex; margin-left: auto; height: 100%; }
.caption-buttons span { position: relative; width: 46px; height: 100%; }
.caption-buttons span::before,
.caption-buttons span::after { content: ""; position: absolute; left: 50%; top: 50%; }
.cap-min::before { width: 10px; height: 1px; margin: 0 0 0 -5px; background: #222; }
.cap-max::before { width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 1px solid #222; }
.cap-close::before,
.cap-close::after { width: 13px; height: 1px; margin-left: -6.5px; background: #222; transform: rotate(45deg); }
.cap-close::after { transform: rotate(-45deg); }

.app-window { width: min(100%, 560px); align-self: center; }
.app-window .shot { display: block; width: 100%; }

.window-body { padding: 18px 22px 22px; }
.window-body > p { margin: 0 0 12px; }
.window-body > p:last-child { margin-bottom: 0; }

#about .window-body { background: var(--paper); }

.features { list-style: none; margin: 0; padding: 0; }
.features li {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.features li:first-child { border-top: 0; padding-top: 0; }

.group-title { margin: 22px 0 8px; font-size: 18px; font-weight: 600; color: #003e92; }
.steps { margin: 0; padding-left: 24px; }
.steps li { margin: 4px 0; }
.hint {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: #f2f8fd;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- taskbar ---------- */

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--taskbar-h) + env(safe-area-inset-bottom));
  padding: 0 max(0px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(0px, env(safe-area-inset-left));
  background: rgba(16, 16, 16, .88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--paper);
}

.start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 18px 0 14px;
  color: var(--paper);
  font-size: 15px;
  text-decoration: none;
}
.start svg { width: 20px; height: 20px; }
.start:hover { background: rgba(255, 255, 255, .1); }
.start:focus-visible { outline-offset: -4px; }

.tray { display: flex; align-items: center; gap: 16px; height: 100%; padding: 0 16px; font-size: 13px; }
.clock { font-variant-numeric: tabular-nums; white-space: nowrap; }

.lang-switch { font-weight: 600; }
.lang-other {
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  color: #9fd0ff;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.lang-other:hover { color: var(--paper); }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .desktop { padding-top: 36px; gap: 28px; }
  .tagline { font-size: 17px; }
  .btn { flex: 1 1 100%; min-width: 0; }
  .window-body { padding: 14px 14px 18px; }
  .features li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .caption-buttons span { width: 36px; }
  .clock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .btn { transition: none; }
}
