/* Примерен сайт в тъмен „кино“ стил: цветовете и шрифтът идват от шаблона (templates.js → CSS променливи). */
:root {
  --bg: #0b0c0d; --surface: #141618; --ink: #efece6; --muted: #a4a7ab; --accent: #ff5a1f; --accentInk: #120700; --line: rgba(255, 255, 255, .12);
  --display: Georgia, serif;
  --pad: clamp(16px, 2.6vw, 40px);
  --r: 24px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 "Manrope", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--accentInk); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: .95; letter-spacing: -.02em; }
.upper h1, .upper h2, .upper .logo, .upper .pm-marquee-in, .upper .card b, .upper .foot-word { text-transform: uppercase; letter-spacing: 0; }
.ital h1, .ital h2, .ital .foot-word { font-style: italic; font-weight: 600; }

/* филмово зърно */
body::after { content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .6s steps(4) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-4%, 3%); } 50% { transform: translate(3%, -5%); } 75% { transform: translate(-2%, 4%); } }

/* бутони */
.b { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 0; position: relative; overflow: hidden; isolation: isolate; transition: color .4s var(--ease); }
.b-main { background: var(--accent); color: var(--accentInk); }
.b-main::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateY(101%); transition: transform .5s var(--ease); }
.b-main:hover::before { transform: translateY(0); }
.b-main:hover { color: var(--bg); }
.b-ghost { color: var(--ink); background: rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.b-ghost:hover { background: rgba(255, 255, 255, .16); }
.b-sm { min-height: 42px; padding: 0 18px; font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* навигация */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 28px; padding: 14px var(--pad); transition: background-color .4s, transform .6s var(--ease); }
.nav.solid { background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav.away { transform: translateY(-110%); }
.logo { font: 700 1.3rem/1.1 var(--display); text-decoration: none; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links { display: flex; gap: 26px; margin-left: auto; font-weight: 500; font-size: .95rem; }
.links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.links a:hover { color: var(--ink); }

/* hero: снимката е на цял екран, името е огромно отдолу */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent) 0%, transparent 28%, color-mix(in srgb, var(--bg) 35%, transparent) 55%, var(--bg) 100%); }
.hero-in { padding: 120px var(--pad) clamp(36px, 5vw, 64px); }
.where { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 600; font-size: .92rem; }
.where svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.name { font-size: clamp(3rem, 13vw, 13rem); line-height: .9; margin-left: -.03em; text-wrap: balance; overflow-wrap: normal; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: clamp(22px, 3vw, 40px); }
.tagline { max-width: 34em; font-size: 1.12rem; color: var(--ink); opacity: .9; }
.chip { position: absolute; top: 96px; right: var(--pad); display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
  background: rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 600; font-size: .9rem; }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.cue { position: absolute; left: 50%; bottom: 0; width: 1.5px; height: 48px; background: var(--line); overflow: hidden; }
.cue i { position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: var(--ink); animation: cue 2s var(--ease) infinite; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

/* лента в цвета на акцента */
.pm-marquee { overflow: hidden; padding: 26px 0; background: var(--accent); color: var(--accentInk); }
.pm-marquee-in { display: flex; width: max-content; gap: 28px; align-items: center; white-space: nowrap; font: 700 clamp(2rem, 4.6vw, 4.4rem)/1 var(--display); letter-spacing: -.01em; }
.pm-marquee-in i { width: .28em; height: .28em; border-radius: 50%; background: currentColor; flex: none; }

/* услуги и цени: като плакат, снимка следва мишката */
.sec { padding: clamp(100px, 13vw, 190px) var(--pad) clamp(80px, 9vw, 140px); position: relative; }
.sec-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; margin-bottom: clamp(40px, 5vw, 80px); }
.sec-head h2 { font-size: clamp(3rem, 8vw, 8.5rem); }
.sec-head p { color: var(--muted); font-size: 1.1rem; max-width: 26em; }
.sec-head .note { margin-top: 8px; font-size: .9rem; opacity: .8; }
.menu { border-top: 1px solid var(--line); }
.menu li { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); transition: padding .5s var(--ease); position: relative; }
.menu li::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.menu li:hover { padding-left: 16px; }
.menu li:hover::after { transform: scaleX(1); }
.menu b { display: block; font: 700 clamp(1.5rem, 3vw, 2.8rem)/1.05 var(--display); letter-spacing: -.01em; }
.upper .menu b { text-transform: uppercase; letter-spacing: 0; }
.ital .menu b { font-style: italic; font-weight: 600; }
.menu span { display: block; margin-top: 6px; color: var(--muted); font-size: .98rem; }
.menu em { font: 700 clamp(1.2rem, 2vw, 1.8rem)/1 var(--display); font-style: normal; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.peek { position: fixed; left: 0; top: 0; z-index: 15; width: 300px; aspect-ratio: 4 / 3; pointer-events: none; overflow: hidden; border-radius: 18px; opacity: 0; visibility: hidden; }
.peek img { width: 100%; height: 100%; object-fit: cover; }

/* галерия: хоризонтални табла */
.hgal { background: var(--surface); }
.hgal-pin { height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.hgal-track { display: flex; gap: clamp(20px, 2vw, 32px); padding: 0 var(--pad); will-change: transform; }
.hgal-intro { flex: none; width: min(32vw, 440px); display: flex; flex-direction: column; justify-content: center; gap: 22px; padding-right: 3vw; }
.hgal-intro h2 { font-size: clamp(3rem, 6vw, 6.5rem); }
.hgal-intro p { color: var(--muted); font-size: 1.1rem; }
.card { flex: none; position: relative; width: min(60vw, 820px); height: min(72vh, 620px); overflow: hidden; border-radius: var(--r); background: var(--bg); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .8) 100%); }
.card figcaption { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: clamp(22px, 3vw, 40px); }
.card b { display: block; font: 700 clamp(2.2rem, 4.6vw, 4.6rem)/.95 var(--display); color: var(--accent); }
.ital .card b { font-style: italic; font-weight: 600; }
.card span { display: block; margin-top: 8px; font-size: 1.1rem; }

/* снимката, която се отваря до целия екран */
.reveal { position: relative; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.reveal-frame { position: absolute; inset: 0; clip-path: inset(18% 22% round 24px); }
.reveal-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); }
.reveal-frame::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.reveal-text { position: relative; z-index: 1; padding: 0 var(--pad); text-align: center; font-size: clamp(2.6rem, 7vw, 7rem); max-width: 12em; }

/* контакти */
.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 90px); padding: clamp(100px, 12vw, 170px) var(--pad); align-items: stretch; }
.contact h2 { font-size: clamp(3rem, 7vw, 7.4rem); margin-bottom: clamp(30px, 4vw, 56px); }
.info { border-top: 1px solid var(--line); margin-bottom: 36px; }
.info div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: clamp(1.05rem, 1.4vw, 1.3rem); }
.info dt { color: var(--muted); font-size: .95rem; align-self: center; }
.info dd { font-weight: 600; }
.map { border-radius: var(--r); overflow: hidden; min-height: 420px; background: var(--surface); }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; filter: grayscale(1) invert(.92) contrast(.9) brightness(.9); }

/* футър: името отново, на цяла ширина */
.foot { overflow: hidden; padding: 40px var(--pad) 0; background: #000; }
.foot-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.foot-word { font: 700 12vw/.85 var(--display); white-space: nowrap; text-align: center; margin: 4vw 0 0; transform: translateY(14%); }

/* лентата „примерен сайт“ */
.saitovo-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; width: min(760px, calc(100% - 24px)); display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 20px;
  border-radius: 20px; background: #fbf7f0; color: #17201b; box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .5); font-family: "Manrope", system-ui, sans-serif; }
.saitovo-bar p { display: grid; gap: 2px; font-size: .9rem; line-height: 1.35; flex: 1; min-width: 0; }
.saitovo-bar b { font-size: .98rem; }
.saitovo-bar span { color: #4d5a52; }
.saitovo-bar a { flex: none; padding: 12px 20px; border-radius: 999px; background: #b84d1a; color: #fff; font-weight: 800; text-decoration: none; font-size: .95rem; }
.embed .saitovo-bar { display: none; }

@media (max-width: 860px) {
  .links { display: none; }
  .nav .b-sm { margin-left: auto; }
  .hero-row { flex-direction: column; align-items: stretch; gap: 22px; }
  .chip { top: auto; bottom: auto; position: relative; right: auto; align-self: flex-start; margin: 0 var(--pad) 0; order: -1; display: none; }
  .sec-head, .contact { grid-template-columns: 1fr; }
  .menu li { padding: 20px 0; }
  .peek { display: none; }
  .hgal-pin { height: auto; overflow: visible; display: block; padding: 90px 0; }
  .hgal-track { flex-direction: column; }
  .hgal-intro { width: auto; padding: 0 0 8px; }
  .card { width: 100%; height: 64vh; max-height: 520px; }
  .reveal { height: 80vh; }
  .info div { grid-template-columns: 7em 1fr; }
  .saitovo-bar { flex-direction: column; align-items: stretch; text-align: center; padding: 14px; }
  .saitovo-bar span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body::after, .chip i, .cue i { animation: none; }
  .reveal-frame { clip-path: none; }
  .card img, .reveal-frame img { transform: none; }
}
/* без анимации (или без JS): галерията е в колона, вместо да се плъзга */
html:not(.pm) .hgal-pin { height: auto; overflow: visible; display: block; padding: clamp(90px, 10vw, 160px) 0; }
html:not(.pm) .hgal-track { flex-wrap: wrap; }
html:not(.pm) .hgal-intro { width: 100%; }
html:not(.pm) .card { width: calc(50% - 16px); height: 460px; }
@media (max-width: 860px) { html:not(.pm) .card { width: 100%; } }
/* долната лента „примерен сайт“ не бива да покрива бутоните в hero */
html:not(.embed) .hero-in { padding-bottom: 120px; }
@media (max-width: 860px) { html:not(.embed) .hero-in { padding-bottom: 150px; } }
.nav .b-sm { white-space: nowrap; flex: none; }
.logo { flex: 0 1 auto; min-width: 0; }
@media (max-width: 480px) { .nav { gap: 12px; } .nav .b-sm { padding: 0 14px; font-size: .84rem; } .logo { font-size: 1.1rem; } }
