/* TEGURA — база: reset, типография, header/footer, бутони, форми, утилити */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Хартиено зърно върху целия сайт */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3, .card-h { font-size: var(--text-h3); line-height: 1.25; }
/* ⚑ 08-05 · `.card-h` е h2, което ИЗГЛЕЖДА като h3 (висяща #222).
   Картите бяха <h3> направо след <h1> — това е прескочен ред на
   заглавията и екранният четец губи структурата. Нивото се вдига на h2,
   а РАЗМЕРЪТ остава същият, за да няма визуална промяна. */

p { max-width: var(--measure); }

a { color: inherit; text-decoration-color: var(--copper); text-underline-offset: 3px; }
a:hover { color: var(--copper-deep); }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: var(--radius);
}

::selection { background: var(--copper); color: var(--paper); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-section); }
.section--warm { background: var(--paper-warm); }
.section--dark {
  background: var(--pine);
  color: var(--on-pine);
}
.section--dark ::selection { background: var(--copper-on-dark); color: var(--pine); }

/* Надредие — малки главни букви над заглавие */
.overline {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 1.1rem;
}
.section--dark .overline { color: var(--copper-on-dark); }

.lead { font-size: var(--text-lg); color: var(--ink-soft); }
.section--dark .lead { color: var(--on-pine-soft); }

/* ---------- Бутони ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.8rem 1.7rem;
  background: var(--copper-btn, var(--copper));
  color: var(--paper);
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--copper-deep);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--dur-fast) ease, transform var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
  box-shadow: 3px 3px 0 0 var(--ink);
}
.btn:hover {
  background: var(--copper-deep);
  color: var(--paper);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 0 var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); transform: none; box-shadow: none; }
.section--dark .btn--ghost { color: var(--on-pine); border-color: oklch(93% 0.015 110 / 0.4); }
.section--dark .btn--ghost:hover { background: var(--on-pine); color: var(--pine); }

.link-tel {
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid var(--copper);
  padding-bottom: 1px;
}
.link-tel:hover { border-color: var(--copper-deep); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(96.5% 0.013 85 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 22px; color: var(--copper); }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.8rem);
  list-style: none;
  padding: 0;
}
.nav-list a {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 0.15rem;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--copper); color: var(--ink); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--copper); color: var(--copper-deep); }
.nav-cta { display: inline-flex; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 48px;
  height: 48px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.5rem;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .nav-list a { display: block; padding: 0.8rem 0.3rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav-list a[aria-current="page"] { border-bottom-color: var(--copper); }
  .nav-cta { margin-top: 0.9rem; justify-content: center; }
  .header-tel { display: none; }
}

/* ---------- Мобилен CTA бар ---------- */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--pine);
  border-top: 1px solid oklch(93% 0.015 110 / 0.2);
  padding: 0.6rem var(--gutter);
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
  gap: 0.75rem;
}
.mobile-cta a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}
.mobile-cta .m-tel { color: var(--on-pine); border: 1px solid oklch(93% 0.015 110 / 0.4); }
.mobile-cta .m-look { background: var(--copper); color: var(--paper); }
@media (max-width: 700px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 76px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pine);
  color: var(--on-pine-soft);
  padding-block: var(--space-block) 2rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 2rem;
}
.site-footer .brand { color: var(--on-pine); font-size: 1.3rem; margin-bottom: 0.8rem; }
.site-footer h3 {
  font-family: var(--font-text);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--on-pine);
  margin-bottom: 0.9rem;
}
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--on-pine-soft); text-decoration: none; }
.site-footer a:hover { color: var(--copper-on-dark); }
.footer-legal {
  border-top: 1px solid oklch(93% 0.015 110 / 0.15);
  padding-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}

/* ---------- Форма ---------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field .hint { font-size: 0.85rem; color: var(--ink-faint); }
.section--dark .field .hint { color: var(--on-pine-soft); }
.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  min-height: 48px;
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; }
.field input[type="file"] { padding: 0.6rem 0.9rem; background: transparent; border-style: dashed; }
.section--dark .field input[type="file"] { color: var(--on-pine); }
.form-status { font-weight: 600; min-height: 1.5em; }
.form-status.is-ok { color: var(--copper-on-dark); }
.form-status.is-err { color: oklch(70% 0.19 25); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Placeholder за снимка (докато клиентът предостави кадри) ---------- */
.ph {
  position: relative;
  display: grid;
  place-content: center;
  gap: 0.4rem;
  text-align: center;
  padding: 1.5rem;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, oklch(25% 0.022 55 / 0.05) 14px 15px),
    var(--paper-deep);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  min-height: 220px;
}
.ph .ph-tag {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper-deep);
}
.ph .ph-desc { font-size: 0.9rem; max-width: 34ch; margin-inline: auto; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .nav-list a { transition: none; }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -64px;
  left: 1rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top var(--dur-fast) ease;
}
.skip-link:focus-visible { top: 0.6rem; color: var(--paper); }
