/* ===================================================================
   N1MM Rotor Client — shared dark stylesheet
   Aesthetic modelled on the MiniBook site, re-themed for dark mode.
   =================================================================== */

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

:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #21262d;
  --border:    #30363d;
  --border2:   #3d444d;
  --accent:    #2f81f7;
  --accent2:   #58a6ff;
  --accent-dim:rgba(47,129,247,.14);
  --text:      #e6edf3;
  --text2:     #c9d1d9;
  --muted:     #8b949e;
  --warn:      #d29922;
  --ok:        #3fb950;
  --tag-bg:    rgba(47,129,247,.12);
  --radius:    10px;
  --shadow:    0 8px 24px rgba(0,0,0,.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ── Layout ───────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--border); }

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.section-sub {
  color: var(--muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

/* ── NAV ──────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.nav-logo:hover { text-decoration: none; }
.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #1f6feb);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.nav-links {
  display: flex;
  gap: 18px;
  list-style: none;
  flex-wrap: nowrap;
}
.nav-links a {
  color: var(--muted);
  font-size: .85rem;
  transition: color .15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent2); font-weight: 600; }

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .1s, background .15s;
  text-decoration: none;
}
.btn:hover { opacity: .92; transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border2); }
.btn-outline:hover { background: var(--bg3); }

/* ── Tag / badges ─────────────────────────────── */
.tag {
  display: inline-block;
  background: var(--tag-bg);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: .68rem;
  color: var(--accent2);
  margin-top: 8px;
  margin-right: 3px;
}

/* ── HERO ─────────────────────────────────────── */
.hero {
  padding: 96px 0 88px;
  text-align: center;
  background:
    radial-gradient(900px 380px at 50% -8%, rgba(47,129,247,.18), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero .logo-badge {
  width: 84px; height: 84px;
  margin: 0 auto 26px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), #1f6feb);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  box-shadow: var(--shadow);
}
.hero .hero-logo {
  margin: 0 auto 24px;
  max-width: 620px;
  line-height: 0;
}
.hero .hero-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 14px;
  line-height: 1.1;
}
.hero .lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 30px;
}
.hero-actions {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero-meta {
  font-size: .85rem;
  color: var(--muted);
  display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap;
}
.hero-meta .dot { opacity: .5; }

/* ── Feature grid ─────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  transition: border-color .15s, transform .12s;
}
.feature-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.feature-card .fc-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: inline-flex;
  width: 46px; height: 46px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent-dim);
}
.feature-card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: .9rem; }

/* ── Platform strip ───────────────────────────── */
.platforms { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.platform-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 999px; padding: 10px 22px; font-weight: 600; font-size: .95rem;
}
.platform-pill .pp-icon { font-size: 1.2rem; }

/* ── Page header ──────────────────────────────── */
.page-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.breadcrumb { font-size: .83rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.page-header .page-sub { color: var(--muted); font-size: 1rem; }

/* ── Download cards ───────────────────────────── */
.dl-main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dl-main-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  transition: border-color .15s;
}
.dl-main-card:hover { border-color: var(--accent); }
.dl-main-icon {
  font-size: 2rem; margin-bottom: 14px;
  width: 58px; height: 58px; border-radius: 12px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
}
.dl-main-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.dl-main-plat { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.dl-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.dl-badge-version {
  background: var(--tag-bg); color: var(--accent2);
  font-size: .78rem; font-weight: 700; padding: 3px 12px;
  border-radius: 20px; border: 1px solid var(--border2);
}
.dl-badge-date, .dl-badge-size {
  background: var(--bg3); color: var(--muted);
  font-size: .78rem; font-weight: 600; padding: 3px 12px;
  border-radius: 20px; border: 1px solid var(--border);
}
.dl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.dl-btn-primary { font-size: 1rem; padding: 12px 24px; }
.dl-sep { border: none; border-top: 1px solid var(--border); margin: 4px 0 20px; }
.dl-reqs h4 { font-size: .85rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.dl-reqs ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dl-reqs li { font-size: .84rem; color: var(--muted); display: flex; align-items: flex-start; gap: 8px; }
.dl-reqs li::before { content: '✓'; color: var(--ok); font-weight: 700; font-size: .8rem; line-height: 1.5; }
.dl-note {
  margin-top: auto; padding-top: 18px;
  font-size: .82rem; color: var(--text2); line-height: 1.5;
}
.dl-note .note-box {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
}
code, .mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; }
.dl-note code, .note-box code {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; font-size: .82em; color: var(--accent2);
}

/* ── Info callouts ────────────────────────────── */
.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--bg2); border-radius: 8px; padding: 14px 18px;
  font-size: .9rem; color: var(--text2); margin: 18px 0;
}
.callout.warn { border-left-color: var(--warn); }
.callout strong { color: var(--text); }

/* ── Guide ────────────────────────────────────── */
.guide-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.guide-toc {
  position: sticky; top: 72px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px;
}
.guide-toc h4 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 12px;
}
.guide-toc ul { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.guide-toc a {
  color: var(--text2); font-size: .86rem; display: block;
  padding: 5px 10px; border-radius: 6px; transition: background .15s, color .15s;
}
.guide-toc a:hover { background: var(--bg3); color: var(--text); text-decoration: none; }

.guide-section { padding: 12px 0 40px; scroll-margin-top: 72px; }
.guide-section + .guide-section { border-top: 1px solid var(--border); padding-top: 34px; }
.guide-section h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-num {
  width: 30px; height: 30px; flex: none;
  background: var(--accent); color: #fff;
  border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 800;
}
.guide-section h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.guide-section p { color: var(--text2); margin-bottom: 12px; }
.guide-section ul, .guide-section ol { color: var(--text2); margin: 0 0 14px 22px; }
.guide-section li { margin-bottom: 6px; }
.steps { counter-reset: step; list-style: none; margin-left: 0 !important; }
.steps > li {
  position: relative; padding-left: 42px; margin-bottom: 16px; min-height: 30px;
}
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border2); color: var(--accent2);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem;
}
.kbd {
  font-family: ui-monospace, monospace; font-size: .8em;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 5px; padding: 2px 7px; color: var(--text);
}
.spec-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 8px 0 16px; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.spec-table th { color: var(--muted); font-weight: 600; width: 40%; }
.spec-table td { color: var(--text2); }

/* ── Screenshots / lightbox ───────────────────── */
.screenshot-frame {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.screenshot-frame img, .screenshot-img {
  display: block;
  width: auto;            /* keep native proportions, never upscale */
  max-width: 100%;
  height: auto;
  max-height: 460px;
  margin: 0 auto;
  border-radius: 7px;
  border: 1px solid var(--border);
}
.screenshot-caption {
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
  margin-top: 8px;
}

/* Screenshot rows: frames hug their image, group is centred so a wide
   desktop shot and a tall phone shot stay balanced side by side. */
.shot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-start;
  justify-content: center;
}
.shot-row .screenshot-frame { flex: 0 1 auto; max-width: 100%; }
.phone-shot img { max-height: 500px; }

/* ── Changelog ────────────────────────────────── */
.changelog { max-width: 760px; }
.cl-item { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cl-item:last-child { border-bottom: none; }
.cl-ver {
  flex: none; width: 74px; font-weight: 700; color: var(--accent2);
  font-family: ui-monospace, monospace; font-size: .9rem;
}
.cl-body h4 { font-size: .95rem; margin-bottom: 4px; }
.cl-body ul { margin: 0 0 0 18px; color: var(--muted); font-size: .88rem; }

/* ── Footer ───────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 30px 0; text-align: center; }
.footer-inner { color: var(--muted); font-size: .82rem; line-height: 1.9; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; gap: 24px; }
  .guide-toc { position: static; }
}
@media (max-width: 860px) {
  .dl-main-grid { grid-template-columns: 1fr; }
  .showcase { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero h1 { font-size: 2.2rem; }
  section { padding: 56px 0; }
}
@media (max-width: 520px) {
  .dl-main-card { padding: 24px; }
  .hero .lead { font-size: 1.05rem; }
}
