/* Aceleași culori ca aplicația: noaptea albastru-cerneală și accentul coral. */
:root {
  --bg: #0b0f1a;
  --surface: #151b2b;
  --line: #2a3247;
  --text: #ffffff;
  --muted: #b8c0d4;
  --accent: #ff7a59;
  --glow: rgba(255, 122, 89, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 84px; }

/* Lumina de sus e fasciculul proiectorului peste o sală întunecată. */
body {
  margin: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% -8%, rgba(255, 122, 89, 0.16) 0%, transparent 70%) no-repeat,
    radial-gradient(ellipse 90% 60% at 50% -5%, #24163a 0%, var(--bg) 70%) no-repeat,
    var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }

/* Granulația peliculei, peste toată pagina; nu prinde clicurile. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 12px; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); }

/* Bara de sus rămâne lipită sus, ca în aplicație. */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px max(24px, calc((100% - 1120px) / 2));
  background: rgba(11, 15, 26, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(42, 50, 71, 0.6);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
nav { display: flex; gap: 26px; align-items: center; font-size: 15px; color: var(--muted); }
nav a:hover { color: var(--text); }
.nav-github { padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }

main { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.hero { text-align: center; padding: 120px 0 64px; }
h1 { font-size: clamp(46px, 8vw, 96px); line-height: 1; margin: 0 0 28px; letter-spacing: -0.04em; text-shadow: 0 0 80px rgba(255, 122, 89, 0.18); }
h1 span { color: var(--accent); }
.hero .lead { max-width: 640px; margin: 0 auto 36px; }

.buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  transition: border-color 0.15s, transform 0.15s;
}
.button:hover { border-color: var(--muted); transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #1a0d08; border-color: var(--accent); }

/* Capturile stau într-o fereastră, ca pe ecran. */
.window {
  margin: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.window img { display: block; width: 100%; }
.hero-shot { box-shadow: 0 0 0 1px rgba(255, 122, 89, 0.15), 0 40px 140px var(--glow), 0 30px 80px rgba(0, 0, 0, 0.6); }

/* Scena de sus: desktopul, iar telefonul în fața lui. În spate, aceeași
   captură, încețoșată, luminează pagina ca un ecran într-o sală întunecată. */
.stage { position: relative; isolation: isolate; margin: 0 0 56px; padding-right: 7%; }
.stage::before {
  content: "";
  position: absolute;
  inset: 6% 10% 0 4%;
  z-index: -1;
  background: url("img/home.jpg") center / cover;
  filter: blur(80px) saturate(1.6);
  opacity: 0.55;
}
.stage-phone { position: absolute; right: 0; bottom: -40px; width: 22%; }

/* Telefonul: ecranul cu ramă neagră și colțuri rotunde. */
.phone {
  margin: 0;
  border: 8px solid #05070d;
  border-radius: 34px;
  overflow: hidden;
  background: #05070d;
  box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, 0.7);
}
.phone img { display: block; width: 100%; border-radius: 26px; }

/* Un cadru de film între capitole: benzi negre sus și jos, colțuri întunecate
   și titlul peste imagine, ca un generic. */
.frame { position: relative; margin: 48px 0; padding: 28px 0; background: #000; border-radius: 6px; overflow: hidden; }
.frame img { display: block; width: 100%; aspect-ratio: 2.39; object-fit: cover; object-position: center 30%; filter: grayscale(1) contrast(1.1) brightness(0.8); }
.frame::after { content: ""; position: absolute; inset: 28px 0; box-shadow: inset 0 0 160px 40px #000; pointer-events: none; }
.frame figcaption { position: absolute; left: 6%; bottom: 14%; z-index: 1; max-width: 460px; }
.frame b { display: block; font-size: clamp(30px, 4.5vw, 56px); line-height: 1.05; letter-spacing: -0.03em; }
.frame span { display: block; margin-top: 10px; color: #d6dbe8; font-size: clamp(15px, 1.6vw, 18px); }

/* Pe Android telefonul stă singur, mai îngust decât capturile de desktop. */
.android .phone { width: min(320px, 100%); justify-self: center; }
.buttons.start { justify-content: flex-start; margin-top: 28px; }

/* Capitolele apar pe rând la derulare, unde browserul știe asta fără JavaScript. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .row, .frame, .grid, .compare, .server, .download {
      animation: appear linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}
@keyframes appear { from { opacity: 0; transform: translateY(40px); } }


/* Rânduri cu text și captură, alternând partea. */
.row { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; padding: 72px 0; }
.row.flip .text { order: 2; }
.row p { color: var(--muted); }
.row ul { padding: 0; margin: 20px 0 0; list-style: none; }
.row li { padding-left: 26px; position: relative; margin: 8px 0; }
.row li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.note { border-left: 2px solid var(--accent); padding-left: 14px; font-size: 15px; }

.grid { padding: 72px 0; text-align: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 36px; text-align: left; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 12px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Comparația cu Stremio: trei coloane, iar coloana Noctura e cea luminată. */
.compare { padding: 72px 0; text-align: center; }
.compare .lead { margin: 0 auto 36px; max-width: 640px; }
.table { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-align: left; background: var(--surface); }
.tr { display: grid; grid-template-columns: 3fr 5fr 5fr; gap: 24px; padding: 18px 24px; border-top: 1px solid var(--line); font-size: 15px; }
.tr:first-child { border-top: 0; }
.tr span { color: var(--muted); }
.tr .yes { color: var(--text); padding-left: 26px; position: relative; }
.tr .yes::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.tr.head { background: #10162a; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.tr.head span { color: var(--muted); }
.tr.head span:nth-child(2) { color: var(--accent); }
.compare .small { max-width: 760px; margin: 20px auto 0; text-align: left; }

.server {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 72px 0;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, #171d30 0%, var(--bg) 100%);
}
.server p { color: var(--muted); }
.server ul { padding: 0; margin: 16px 0; list-style: none; }
.server li { padding-left: 26px; position: relative; margin: 8px 0; }
.server li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.server .buttons { justify-content: flex-start; margin-top: 8px; }
.note a { color: var(--accent); }
.terminal {
  margin: 0;
  padding: 24px;
  border-radius: 12px;
  background: #070a12;
  border: 1px solid var(--line);
  font: 14px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-x: auto;
}
.dim { color: #6b7490; }
.ok { color: #6ee7b7; }

.download { text-align: center; padding: 72px 0 24px; }
.download .lead { margin: 0 0 36px; }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.platform {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.15s, transform 0.15s;
}
.platform:hover { border-color: var(--accent); transform: translateY(-2px); }
.platform b { font-size: 22px; }
.platform span { color: var(--muted); font-size: 15px; }
.small { color: var(--muted); font-size: 15px; margin-top: 28px; }
.small a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

footer { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; padding: 72px 24px 48px; border-top: 1px solid var(--line); margin-top: 72px; }
footer .brand { color: var(--text); font-size: 17px; margin-bottom: 8px; }
footer p { margin: 0; }

/* Pagina de documentație a serverului: o coloană de citit, cu cuprins sus. */
.doc { max-width: 780px; padding-top: 64px; }
.doc h1 { font-size: clamp(40px, 6vw, 60px); }
.doc h2 { font-size: clamp(26px, 3vw, 32px); margin: 56px 0 12px; }
.doc p, .doc li { color: var(--muted); }
.doc b { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 8px 0; }
.doc a:not(.button) { color: var(--accent); }
.doc .terminal { margin: 16px 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 8px; }
.toc a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--text) !important; background: var(--surface); }
.toc a:hover { border-color: var(--accent); }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.doc th { background: #10162a; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.doc td { color: var(--muted); }
.doc td:first-child { white-space: nowrap; color: var(--text); }

/* Pe ecrane înguste totul stă pe o coloană. */
@media (max-width: 820px) {
  nav a:not(.nav-github) { display: none; }
  .row, .server { grid-template-columns: 1fr; gap: 28px; }
  .row.flip .text { order: 0; }
  .server { padding: 28px; }
  .tr { grid-template-columns: 1fr; gap: 6px; }
  .tr.head { display: none; }
  .tr span:last-child::before { content: "Stremio: "; color: var(--text); font-weight: 600; }
  .hero { padding-top: 64px; }
  .stage { padding-right: 0; margin-bottom: 32px; }
  .stage-phone { display: none; }
  .frame figcaption { position: static; padding: 20px 20px 0; }
  .frame::after { display: none; }
  .doc td:first-child { white-space: normal; }
}
