/* ============================================================
   LinuxDrive — shared styles
   ============================================================ */

:root {
  --ld-green: #22c55e;
  --ld-sky: #38bdf8;
  --ld-bg: #020617;
  --ld-ozon: #005bff;
}

[id] { scroll-margin-top: 88px; }

::selection { background: var(--ld-green); color: #0f172a; }

/* ---------- header ---------- */
.site-header { transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease; }
.site-header.scrolled {
  background-color: rgba(2, 6, 23, .92);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
}

.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 2px;
  background: var(--ld-green);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--ld-green); }

#mobile-menu { transition: max-height .3s ease, opacity .3s ease; max-height: 0; opacity: 0; overflow: hidden; }
#mobile-menu.open { max-height: 420px; opacity: 1; }

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #052e16; font-weight: 700;
  border-radius: .85rem;
  box-shadow: 0 8px 24px -6px rgba(34,197,94,.45);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 14px 30px -8px rgba(34,197,94,.55); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: rgba(148,163,184,.06);
  border: 1px solid rgba(148,163,184,.25);
  color: #e2e8f0; font-weight: 600;
  border-radius: .85rem;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn-outline:hover { transform: translateY(-2px); background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.45); }

.btn-avito {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: linear-gradient(135deg, #0af 0%, #0091ff 100%);
  color: #fff; font-weight: 700; border-radius: .85rem;
  box-shadow: 0 8px 24px -6px rgba(0,145,255,.45);
  transition: transform .2s ease, filter .2s ease;
}
.btn-avito:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* ---------- hero ---------- */
.hero-bg {
  background-color: #020617;
  background-image:
    radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(160,49%,20%,1) 0, transparent 50%);
}

.hero-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
  pointer-events: none;
}

.orb {
  position: absolute; border-radius: 9999px;
  filter: blur(90px); opacity: .35; pointer-events: none;
  will-change: transform;
}
.orb-1 { width: 420px; height: 420px; background: #16a34a; top: -120px; left: -120px; animation: orb-float-1 14s ease-in-out infinite; }
.orb-2 { width: 380px; height: 380px; background: #0ea5e9; bottom: -140px; right: -100px; animation: orb-float-2 18s ease-in-out infinite; }
.orb-3 { width: 260px; height: 260px; background: #7c3aed; top: 30%; right: 25%; opacity: .18; animation: orb-float-3 16s ease-in-out infinite; }

@keyframes orb-float-1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,40px) scale(1.12); } }
@keyframes orb-float-2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,-40px) scale(1.08); } }
@keyframes orb-float-3 { 0%,100% { transform: translate(0,0); } 33% { transform: translate(30px,-30px); } 66% { transform: translate(-25px,25px); } }

/* entrance animations */
.fade-up { opacity: 0; transform: translateY(26px); animation: fade-up .8s cubic-bezier(.22,.8,.32,1) forwards; }
@keyframes fade-up { to { opacity: 1; transform: translateY(0); } }
.d-1 { animation-delay: .08s; } .d-2 { animation-delay: .18s; } .d-3 { animation-delay: .3s; }
.d-4 { animation-delay: .44s; } .d-5 { animation-delay: .58s; } .d-6 { animation-delay: .72s; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.8,.32,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* typewriter */
.typewriter-caret::after {
  content: "▌"; margin-left: 2px; color: var(--ld-green);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* ---------- glass / cards ---------- */
.glass-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(10px);
}
.tech-glow { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.tech-glow:hover {
  transform: translateY(-5px);
  border-color: rgba(34,197,94,.45);
  box-shadow: 0 0 28px rgba(34,197,94,.18), 0 18px 40px -18px rgba(0,0,0,.6);
}

/* ---------- terminal (animated Ventoy menu) ---------- */
.terminal-wrap { position: relative; animation: term-float 7s ease-in-out infinite; }
@keyframes term-float { 0%,100% { transform: translateY(0) rotate(.4deg); } 50% { transform: translateY(-12px) rotate(-.4deg); } }

.terminal-glow {
  position: absolute; inset: -22px; border-radius: 2rem; z-index: -1;
  background: radial-gradient(60% 60% at 50% 40%, rgba(34,197,94,.28), transparent 70%);
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

.terminal {
  background: linear-gradient(180deg, rgba(10,16,32,.97), rgba(6,10,22,.97));
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 1.1rem;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
}
.term-body { position: relative; }
.term-body::after { /* scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.term-list {
  height: 322px; overflow: hidden; position: relative;
  scroll-behavior: smooth;
}
.term-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .9rem; margin: 0 .45rem;
  border-radius: .5rem; border-left: 3px solid transparent;
  font-size: .86rem; line-height: 1.2;
  color: #cbd5e1;
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
  white-space: nowrap;
}
.term-item .ti-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.term-item .ti-ver { color: #64748b; font-size: .74rem; margin-left: auto; padding-left: .75rem; flex: none; }
@media (max-width: 420px) {
  .term-item .ti-ver { display: none; }
}
.term-item.sel {
  background: linear-gradient(90deg, rgba(34,197,94,.22), rgba(34,197,94,.06));
  border-left-color: var(--ld-green);
  color: #bbf7d0;
}
.term-item.sel .ti-ver { color: #86efac; }
.term-item.booting { animation: boot-flash .5s ease; }
@keyframes boot-flash { 0% { background: rgba(34,197,94,.55); } 100% { background: rgba(34,197,94,.22); } }

/* ---------- page hero (subpages) ---------- */
.page-hero { position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(at 15% 0%, hsla(160,45%,22%,.55) 0, transparent 45%),
    radial-gradient(at 85% 0%, hsla(225,45%,28%,.55) 0, transparent 45%);
  pointer-events: none;
}

/* ---------- section headers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ld-green);
}
.eyebrow::before, .eyebrow::after { content: ""; height: 1px; width: 28px; background: rgba(34,197,94,.4); }

/* ---------- stats ---------- */
.stat-num { font-family: 'JetBrains Mono', monospace; }

/* ---------- difficulty dots ---------- */
.diff { display: inline-flex; gap: 3px; align-items: center; }
.diff i { width: 8px; height: 8px; border-radius: 9999px; background: rgba(148,163,184,.22); display: inline-block; }
.diff i.on { background: var(--ld-green); box-shadow: 0 0 6px rgba(34,197,94,.6); }

/* ---------- distro mini cards (index) ---------- */
.dist-mini { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.dist-mini:hover {
  transform: translateY(-4px);
  border-color: rgba(34,197,94,.4);
  box-shadow: 0 0 22px rgba(34,197,94,.14);
}

/* ---------- data tables ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th {
  text-align: left; padding: .7rem .9rem; color: #94a3b8;
  font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid rgba(148,163,184,.25);
  background: rgba(148,163,184,.05);
  white-space: nowrap;
}
.data-table td { padding: .7rem .9rem; border-bottom: 1px solid rgba(148,163,184,.1); color: #cbd5e1; vertical-align: top; }
.data-table tbody tr { transition: background-color .2s ease; }
.data-table tbody tr:hover { background: rgba(34,197,94,.05); }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .38rem .8rem; border-radius: 9999px;
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(148,163,184,.2);
  font-size: .8rem; color: #cbd5e1;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
a.chip:hover { border-color: rgba(34,197,94,.55); color: #bbf7d0; background: rgba(34,197,94,.08); }
.chip.chip-green { color: #bbf7d0; border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.1); }

/* ---------- steps ---------- */
.step-num {
  flex: none; width: 44px; height: 44px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4);
  color: var(--ld-green);
}

/* ---------- kbd ---------- */
.kbd {
  display: inline-block; padding: .1rem .5rem; border-radius: .4rem;
  background: #0f172a; border: 1px solid rgba(148,163,184,.35);
  border-bottom-width: 3px;
  font-family: 'JetBrains Mono', monospace; font-size: .82em; color: #e2e8f0;
  white-space: nowrap;
}

/* ---------- code blocks ---------- */
.code-block {
  background: #060b18; border: 1px solid rgba(148,163,184,.16);
  border-radius: .75rem; padding: 1rem 1.1rem;
  font-family: 'JetBrains Mono', monospace; font-size: .82rem; line-height: 1.9;
  color: #a7f3d0; overflow-x: auto;
}
.code-block .c { color: #64748b; } /* comment */
.code-block .p { color: #7dd3fc; } /* prompt */

/* ---------- callouts ---------- */
.callout { border-radius: .9rem; padding: 1rem 1.2rem; border: 1px solid; font-size: .92rem; }
.callout-warn { background: rgba(245,158,11,.07); border-color: rgba(245,158,11,.35); color: #fde68a; }
.callout-info { background: rgba(56,189,248,.07); border-color: rgba(56,189,248,.35); color: #bae6fd; }
.callout-ok   { background: rgba(34,197,94,.07); border-color: rgba(34,197,94,.35); color: #bbf7d0; }
.callout-bad  { background: rgba(248,113,113,.07); border-color: rgba(248,113,113,.35); color: #fecaca; }

/* ---------- phone frame + vertical video ---------- */
.phone-frame {
  position: relative;
  border-radius: 2.4rem;
  padding: 12px;
  background: linear-gradient(160deg, #1e293b, #0b1120 60%, #1e293b);
  border: 1px solid rgba(148,163,184,.3);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 50px -10px rgba(34,197,94,.15);
}
/* крупный, акцентный плеер (главная страница) */
.phone-frame.featured {
  border-color: rgba(34,197,94,.4);
  box-shadow:
    0 0 100px -12px rgba(34,197,94,.45),
    0 45px 90px -30px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.08);
  animation: phone-glow 5s ease-in-out infinite;
}
@keyframes phone-glow {
  0%, 100% { box-shadow: 0 0 80px -14px rgba(34,197,94,.35), 0 45px 90px -30px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.08); }
  50%      { box-shadow: 0 0 120px -10px rgba(34,197,94,.55), 0 45px 90px -30px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.08); }
}
.phone-notch {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 20px; border-radius: 9999px;
  background: #0b1120; border: 1px solid rgba(148,163,184,.18);
  z-index: 5;
}
.phone-screen {
  position: relative; border-radius: 1.7rem; overflow: hidden;
  background: #020617; aspect-ratio: 9 / 16;
}
.phone-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-fallback {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: .8rem;
  text-align: center; padding: 2rem; color: #64748b;
  background:
    radial-gradient(at 50% 30%, rgba(34,197,94,.1), transparent 60%),
    #060b18;
}
.video-fallback.show { display: flex; }

/* ---------- wide 16:9 video frame ---------- */
.wide-frame {
  position: relative;
  border-radius: 1.3rem;
  padding: 10px;
  background: linear-gradient(160deg, #1e293b, #0b1120 60%, #1e293b);
  border: 1px solid rgba(148,163,184,.3);
  box-shadow:
    0 0 90px -18px rgba(56,189,248,.28),
    0 45px 90px -30px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.08);
}
.wide-bar { display: flex; align-items: center; gap: 7px; padding: 4px 10px 12px; }
.wb-dot { width: 11px; height: 11px; border-radius: 9999px; display: inline-block; flex: none; }
.wide-bar-title {
  margin-left: .7rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; color: #64748b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wide-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: .85rem;
  overflow: hidden;
  background: #020617;
}
.wide-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- FAQ accordion ---------- */
.faq-item { border: 1px solid rgba(148,163,184,.15); border-radius: .9rem; background: rgba(255,255,255,.03); overflow: hidden; transition: border-color .25s ease; }
.faq-item[open] { border-color: rgba(34,197,94,.4); }
.faq-item summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: .8rem;
  padding: 1.05rem 1.3rem; font-weight: 600; color: #e2e8f0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-icon { margin-left: auto; color: var(--ld-green); transition: transform .25s ease; flex: none; }
.faq-item[open] summary .faq-icon { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.3rem 1.2rem 1.3rem; color: #94a3b8; font-size: .93rem; line-height: 1.75; }

/* ---------- spec box (distro cards) ---------- */
.spec-box dt { color: #64748b; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-top: .7rem; }
.spec-box dd { color: #e2e8f0; font-size: .86rem; margin-top: .12rem; }
.spec-box dd.mono { font-family: 'JetBrains Mono', monospace; font-size: .74rem; color: #a7f3d0; word-break: break-all; }

/* ---------- price ---------- */
.price-tag {
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(120deg, #4ade80, #22c55e 45%, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- ozon ---------- */
.ozon-accent { color: #4d8dff; }
.ozon-card {
  background: linear-gradient(150deg, rgba(0,91,255,.14), rgba(0,91,255,.04) 55%, rgba(2,6,23,0));
  border: 1px solid rgba(0,91,255,.35);
}

/* ---------- guide sub-nav ---------- */
.guide-nav { position: sticky; top: 64px; z-index: 30; background: rgba(2,6,23,.88); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(148,163,184,.12); }
.guide-nav .chips { display: flex; gap: .5rem; overflow-x: auto; padding: .7rem 0; scrollbar-width: thin; }
.guide-nav .chips::-webkit-scrollbar { height: 4px; }
.guide-nav .chips::-webkit-scrollbar-thumb { background: rgba(148,163,184,.3); border-radius: 2px; }

/* ---------- legal pages ---------- */
.legal h1 { font-size: 1.75rem; font-weight: 800; color: #f1f5f9; line-height: 1.3; }
.legal h2 { font-size: 1.15rem; font-weight: 700; color: #e2e8f0; margin-top: 2.2rem; margin-bottom: .9rem; padding-bottom: .5rem; border-bottom: 1px solid rgba(148,163,184,.15); }
.legal h4 { font-size: .95rem; font-weight: 700; color: #e2e8f0; margin-top: 1.1rem; margin-bottom: .4rem; }
.legal p, .legal li { font-size: .95rem; line-height: 1.75; color: #a8b3c5; }
.legal p { margin: .7rem 0; }
.legal ol { list-style: decimal; padding-left: 1.5rem; margin: .6rem 0; }
.legal ul { list-style: disc; padding-left: 1.5rem; margin: .6rem 0; }
.legal ol li, .legal ul li { margin: .55rem 0; padding-left: .3rem; }
.legal ol ol, .legal ul ul, .legal ol ul, .legal ul ol { margin: .3rem 0; }
.legal li::marker { color: #64748b; }
.legal b, .legal strong { color: #e2e8f0; font-weight: 600; }
.legal a { color: var(--ld-green); text-decoration: underline; text-underline-offset: 3px; }
.legal .meta { color: #64748b; font-size: .85rem; margin-top: .3rem; }
.legal .box {
  border: 1px solid rgba(34,197,94,.35); border-radius: .9rem;
  padding: 1.1rem 1.4rem; background: rgba(34,197,94,.06);
  margin-top: 2rem; font-size: .9rem; color: #bbf7d0;
}

/* ---------- footer ---------- */
.footer-link { color: #94a3b8; transition: color .2s ease; display: inline-flex; align-items: center; gap: .45rem; }
.footer-link:hover { color: var(--ld-green); }
.legal-note { line-height: 1.7; }

/* ---------- misc ---------- */
.marquee-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(34,197,94,.5), transparent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .fade-up, .reveal { opacity: 1; transform: none; }
}
