:root {
  --bg: #f7f3ff; --card: #ffffff; --ink: #2e2442; --muted: #5e5474; --line: #e6ddfb; --soft: #ede6ff;
  --primary: #6a47d6; --primary-dark: #4a2fa8; --rose: #ffe0e8; --menthe: #ddf4e9; --citron: #fff0b8; --ciel: #e2eeff; --peche: #ffebd6;
  --display: 'Baloo 2', system-ui, sans-serif; --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --bg: #1c1628; --card: #2a2238; --ink: #f3eeff; --muted: #bdb3d1; --line: #43385a; --soft: #3a2f55; --primary: #8b6cf0; --primary-dark: #5b3cc4;
    --rose: #4a2433; --menthe: #1f3d31; --citron: #4a3b12; --ciel: #1e3048; --peche: #4a3020; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top nav a { text-decoration: none; color: var(--muted); font-weight: 800; font-size: 15px; padding: 8px 12px; border-radius: 12px; }
.top nav a:hover { background: var(--soft); color: var(--ink); }
.top nav a.lang { border: 2px solid var(--line); }
@media (max-width: 720px) { .top nav a:not(.lang):not(.gh) { display: none; } }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: var(--primary-dark); background: var(--soft); padding: 6px 14px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .kicker { color: #d7c9ff; } }
.hero h1 { font-size: clamp(42px, 6vw, 68px); font-weight: 800; margin: 18px 0 16px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 22px; border-radius: 18px; font-weight: 800; text-decoration: none; font-size: 17px; border: 2px solid var(--line); background: var(--card); color: var(--primary); }
.btn.primary { background: var(--primary); color: #fff; border-color: transparent; box-shadow: 0 5px 0 var(--primary-dark); }
.btn svg { width: 22px; height: 22px; }
.hero-phones { position: relative; height: 620px; }
.hero-phones .phone { position: absolute; }
.hero-phones .phone:nth-child(1) { left: 0; top: 40px; transform: rotate(-6deg); }
.hero-phones .phone:nth-child(2) { right: 0; top: 0; transform: rotate(4deg); z-index: 1; }
.bubu { position: absolute; left: 44%; bottom: -10px; width: 120px; z-index: 2; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .bubu { animation: none; } }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-phones { height: 520px; max-width: 420px; margin: 0 auto; width: 100%; }
}

/* Phone frame */
.phone { width: 250px; border-radius: 40px; padding: 10px; background: #15101f; box-shadow: 0 24px 60px rgba(46, 36, 66, 0.25), inset 0 0 0 2px #3a3150; }
.phone img { display: block; width: 100%; border-radius: 30px; }
.phone.small { width: 220px; }

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 46em; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 18px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.feature { background: var(--card); border-radius: 26px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.feature .ico { width: 46px; height: 46px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 20px; font-weight: 700; }
.feature p { color: var(--muted); font-size: 15px; }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; padding: 10px 4px 30px; }
.gallery figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.gallery .phone.small { width: 100%; max-width: 220px; }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .gallery .phone.small { border-radius: 30px; padding: 7px; }
  .gallery .phone.small img { border-radius: 23px; }
}
.gallery figcaption { font-weight: 800; color: var(--muted); font-size: 15px; text-align: center; max-width: 220px; }

.browser { border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: 0 24px 60px rgba(46, 36, 66, 0.18); border: 1px solid var(--line); }
.browser .bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: var(--soft); }
.browser .bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff8fab; }
.browser .bar i:nth-child(2) { background: #ffd66b; }
.browser .bar i:nth-child(3) { background: #4cc38a; }
.browser img { display: block; width: 100%; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.duo figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.duo figcaption { color: var(--muted); font-weight: 700; font-size: 15px; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

.install { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .install { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: s; background: var(--card); border-radius: 22px; padding: 16px 18px 16px 62px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 12px; background: var(--soft); color: var(--primary); font-family: var(--display); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps b { display: block; margin-bottom: 4px; }
pre { margin: 8px 0 0; background: #1f1830; color: #f3eeff; border-radius: 14px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre .c { color: #a99cc8; }
.card { background: var(--card); border-radius: 26px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 22px; }
.card ul { margin: 0; padding-left: 20px; color: var(--muted); }
.card li { margin: 4px 0; }
.privacy { background: linear-gradient(135deg, var(--rose), var(--soft)); border-radius: 32px; padding: 34px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.privacy div h3 { font-size: 20px; margin-bottom: 6px; }
.privacy div p { color: var(--muted); font-size: 15px; }
footer { padding: 40px 0 60px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }

/* fixes after review */
main { overflow-x: clip; }
.top nav a.gh { display: inline-flex; }
.top nav a.gh svg { width: 22px; height: 22px; }
.hero-phones { height: 580px; }
.hero-phones .phone { width: 236px; }
@media (max-width: 900px) {
  .hero-phones { height: 470px; }
  .hero-phones .phone { width: 190px; border-radius: 32px; padding: 8px; }
  .hero-phones .phone img { border-radius: 24px; }
  .hero-phones .phone:nth-child(1) { left: 4%; }
  .hero-phones .phone:nth-child(2) { right: 4%; }
  .bubu { width: 90px; }
}
.phone img, .browser img { height: auto; }

/* HTTPS: Caddy and nginx side by side */
.proxy { display: grid; grid-template-columns: 2fr 3fr; gap: 24px; align-items: start; }
.proxy .card { min-width: 0; }
.proxy .card p { color: var(--muted); margin: 0; }
.proxy pre { font-size: 13px; }
.proxy-note { margin: 22px 0 0; color: var(--muted); max-width: 60em; }
@media (max-width: 860px) { .proxy { grid-template-columns: 1fr; } }
