@font-face {
    font-family: 'MontserratSlides';
    src: url('/fonts/Montserrat.ttf') format('truetype');
    font-weight: 100 900;
    font-display: block;
}

:root {
    --bg: #0b0d12;
    --bg2: #12151d;
    --card: #161a23;
    --line: #262b37;
    --text: #eef0f4;
    --muted: #9aa1b0;
    --gold: #deb559;
    --gold2: #f0cd7a;
    --danger: #ff6b6b;
    --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 Inter, system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 4.5vw, 52px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 680px; }
.pad { padding-top: 64px; padding-bottom: 64px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.gold { color: var(--gold); }
.error { color: var(--danger); font-size: 14px; margin: 8px 0 0; }
.inline { display: inline; margin: 0; }

/* Buttons and forms */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--gold); color: #14110a; border: 0; border-radius: 10px;
    padding: 12px 20px; font: 600 15px Inter, sans-serif; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--gold2); color: #14110a; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg2); color: var(--text); }
.danger { color: var(--danger); }
.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.link:hover { color: var(--text); }

label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
input, textarea, select {
    width: 100%; background: var(--bg); color: var(--text);
    border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: 15px Inter, sans-serif;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
input[type=color] { padding: 4px; height: 42px; }
input[type=range] { padding: 0; accent-color: var(--gold); }
input[type=checkbox] { width: auto; accent-color: var(--gold); }
.row2, .row3 { display: grid; gap: 12px; }
.row2 { grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: 1fr 1fr 1fr; }
.row3.tight { margin-top: 14px; gap: 8px; }
.form .btn-block { margin-top: 24px; }

/* Nav and footer */
.nav { border-bottom: 1px solid var(--line); background: rgba(11, 13, 18, .9); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; color: var(--text); letter-spacing: -0.02em; }
.brand img { width: 20px; height: 22px; }
.brand:hover { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--text); }
.foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Landing */
.hero { padding: 72px 0 40px; background: radial-gradient(900px 500px at 75% 10%, rgba(222, 181, 89, .12), transparent 60%); }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--gold); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.lead { font-size: 19px; color: #c9cdd6; max-width: 560px; }
.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.hero-phones { display: flex; justify-content: center; }
.hero-phones img {
    width: 34%; height: auto; border-radius: 18px; border: 4px solid #1f2430;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}
.hero-phones img:nth-child(1) { transform: rotate(-6deg) translate(18px, 16px); }
.hero-phones img:nth-child(2) { position: relative; z-index: 2; transform: translateY(-10px); }
.hero-phones img:nth-child(3) { transform: rotate(6deg) translate(-18px, 16px); }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; margin-top: 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card p { color: #c3c7d0; margin: 0; }
.step {
    width: 34px; height: 34px; border-radius: 50%; background: rgba(222, 181, 89, .15); color: var(--gold);
    display: grid; place-items: center; font-weight: 700; margin-bottom: 14px;
}
.band { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature p { color: #c3c7d0; margin: 0; }
.price { display: flex; flex-direction: column; }
.price.featured { border-color: var(--gold); }
.amount { font-size: 40px; font-weight: 800; color: var(--text) !important; margin: 4px 0 12px !important; }
.amount span { font-size: 16px; color: var(--muted); font-weight: 500; }
.price ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.price li { padding: 6px 0 6px 24px; position: relative; color: #c3c7d0; }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: #c3c7d0; }

/* Sign in */
.auth h1 { font-size: 28px; }
.auth .btn-block { margin-top: 20px; }
.hint { font-size: 14px; color: var(--muted); margin: 18px 0 0; }

/* Dashboard */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.page-head h1 { font-size: 32px; margin-bottom: 4px; }
.empty { text-align: center; padding: 48px; }
.empty .btn { margin-top: 20px; }
.shows { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px; }
.show { color: var(--text); }
.show:hover { color: var(--text); }
.show-thumb {
    aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; position: relative;
    background: linear-gradient(#161b25, #07080b); border: 1px solid var(--line);
}
.show-thumb img { width: 100%; height: 100%; object-fit: cover; }
.show-thumb span {
    position: absolute; left: 10px; right: 10px; bottom: 14px; text-align: center;
    font: 600 14px/1.3 'MontserratSlides', Inter, sans-serif; text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
}
.show-thumb img + span { background: linear-gradient(transparent, rgba(0, 0, 0, .6)); padding-top: 30px; }
.show:hover .show-thumb { border-color: var(--gold); }
.show-meta { padding: 10px 2px; display: flex; flex-direction: column; }

/* Editor */
body.app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
body.app main { flex: 1; min-height: 0; }
.editor { display: grid; grid-template-columns: 170px 1fr 340px; height: 100%; }
.ed-slides { border-right: 1px solid var(--line); padding: 14px; overflow-y: auto; }
.ed-thumbs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.thumb {
    position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; background: none;
    cursor: pointer; line-height: 0;
}
.thumb canvas { width: 100%; height: auto; border-radius: 8px; }
.thumb.on { border-color: var(--gold); }
.thumb span {
    position: absolute; top: 6px; left: 6px; background: rgba(0, 0, 0, .7); color: #fff;
    font: 600 12px/20px Inter, sans-serif; min-width: 20px; border-radius: 10px; padding: 0 6px;
}
.ed-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ed-bar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.ed-title { flex: 1; background: transparent; border-color: transparent; font-weight: 700; font-size: 17px; padding: 6px 8px; }
.ed-title:hover { border-color: var(--line); }
.toggle { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; white-space: nowrap; }
.ed-canvas-wrap { flex: 1; min-height: 0; position: relative; }
.ed-canvas-wrap canvas {
    position: absolute; top: 18px; bottom: 18px; left: 0; right: 0; margin: auto;
    height: calc(100% - 36px); width: auto; max-width: calc(100% - 36px); aspect-ratio: 9 / 16;
    border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.ed-nav { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 0 0 14px; }
.ed-panel { border-left: 1px solid var(--line); padding: 4px 18px 24px; overflow-y: auto; }
.ed-panel details { padding: 14px 0; }
.ed-panel summary { font-size: 15px; }
.ed-panel label { margin-top: 12px; }
.ed-panel .btn-block { margin-top: 12px; }
.img-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.img-row label { margin: 0; }
.toggle.check { margin-top: 16px; }
.product-has { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.product-has img { width: 64px; max-height: 120px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); }
.product-has div { display: flex; flex-direction: column; gap: 8px; }
.product-has label { margin: 0; }
.sources { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; }
.sources li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sources p { margin: 0 0 4px; color: #c3c7d0; }
.sources a { word-break: break-all; }

@media (max-width: 900px) {
    .hero-in, .grid3, .grid2 { grid-template-columns: 1fr; }
    .hide-sm { display: none; }
    .row3 { grid-template-columns: 1fr; }
    body.app { height: auto; overflow: visible; }
    .editor { grid-template-columns: 1fr; }
    .ed-slides { order: 2; border: 0; }
    .ed-thumbs { flex-direction: row; overflow-x: auto; }
    .thumb { flex: 0 0 90px; }
    .ed-canvas-wrap { height: 72vh; flex: none; }
    .ed-panel { order: 3; border: 0; }
}
