/* The Groomery Shop – „Чертежът“ */
@font-face { font-family: "Podkova"; font-weight: 500; font-display: swap; src: url(fonts/podkova-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Podkova"; font-weight: 500; font-display: swap; src: url(fonts/podkova-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Podkova"; font-weight: 700; font-display: swap; src: url(fonts/podkova-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Podkova"; font-weight: 700; font-display: swap; src: url(fonts/podkova-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }

:root {
  --kraft: #bfa487;      /* хартията на визитката; заменя се от самата текстура */
  --ink: #1b1917;
  --chalk: #f4f1ea;
  --sage: #5d6a5d;       /* стените на салона */
  --rosette: #4a2a73;    /* розетката от състезанието */
  --gut: clamp(1.2rem, 5vw, 5rem);
  --sec: clamp(4rem, 8vw, 7.5rem);
}
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { font-family: "IBM Plex Sans", sans-serif; color: var(--ink); background: var(--kraft) url(img/kraft.webp); line-height: 1.6; overflow-x: clip; }
h1, h2, h3, caption, figcaption, blockquote p, dt { font-family: "Podkova", serif; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.04; text-wrap: balance; letter-spacing: -.015em; }
h2 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
p, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-underline-offset: .2em; }
table { border-collapse: collapse; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.demo-bar { background: var(--ink); color: var(--chalk); }

.btn, .toggle { display: inline-block; padding: .85rem 1.5rem; border: 2px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--chalk); font: 600 1rem/1.25 "IBM Plex Sans", sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn:hover { background: var(--rosette); border-color: var(--rosette); }
.btn--line { background: none; color: var(--ink); }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: var(--chalk); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.top { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 2rem; padding: .5rem var(--gut); background: var(--kraft) url(img/kraft.webp); border-bottom: 2px solid var(--ink); }
.brand { display: flex; align-items: center; gap: .8rem; margin-right: auto; font: 700 1.35rem/1 "Podkova", serif; text-decoration: none; }
.brand img { height: 54px; width: auto; }
.top nav { display: flex; gap: 1.8rem; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.top .btn { padding: .6rem 1.1rem; }

.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(1.5rem, 3vw, 3rem) var(--gut); min-height: calc(100svh - 8rem); }
.hero__text { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.9rem, 6.2vw, 6rem); line-height: .98; }
.hero__text > p { max-width: 29rem; margin-top: 1.6rem; font-size: 1.15rem; }
.board { display: grid; justify-items: center; gap: 1rem; min-width: 0; }
.board__works { display: grid; justify-items: center; align-items: end; width: 100%; }
.work { grid-area: 1 / 1; position: relative; aspect-ratio: var(--ar); height: min(68svh, 46rem); max-width: 100%; }
.js .work { visibility: hidden; }
.js .work.is-on { visibility: visible; }
.board:not(.js) .work:not(.is-on), .board:not(.js) .board__tools { display: none; }
.work__pic { position: absolute; inset: 0; overflow: hidden; background: var(--ink); }
.work__pic img { width: 100%; height: 100%; object-fit: fill; }
.work svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-linecap: round; }
.work svg path { vector-effect: non-scaling-stroke; }
.work .back { overflow: visible; stroke: var(--ink); stroke-width: 1; opacity: .4; }
.work .front { stroke: #fff; }
.front ellipse { stroke-width: 2; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.front .sh { stroke: #000; stroke-width: 5; opacity: .3; }
.front .c { stroke-width: 2; }
.front .ax { stroke-width: 1; stroke-dasharray: 7 6; opacity: .75; }
.is-on .front ellipse { animation: draw 1.1s ease-in-out calc(.25s + var(--i) * .45s) forwards; }
.is-on .front .c, .is-on .front .ax { animation: fade .5s linear calc(var(--i) * .45s) backwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
.is-plain .work svg { visibility: hidden; }
.work figcaption { position: absolute; left: 0; bottom: 0; padding: .5rem .9rem .4rem; background: var(--ink); color: var(--chalk); font-weight: 500; font-size: 1.25rem; line-height: 1.2; }
.board__tools { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: .7rem; }
.thumbs { display: flex; gap: .5rem; }
.thumbs button { padding: 0; border: 3px solid transparent; background: none; cursor: pointer; }
.thumbs img { width: 3.4rem; height: 3.4rem; object-fit: cover; }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.toggle { padding: 0 1.2rem; min-height: 3rem; }
.toggle[aria-pressed="false"] { background: none; color: var(--ink); }
:focus-visible { outline-color: var(--rosette); }

.master { background: var(--ink); color: var(--chalk); padding: var(--sec) var(--gut); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem clamp(2rem, 6vw, 6rem); align-items: center; }
.master__main { width: 100%; }
.master__text > p { margin-top: 1.2rem; max-width: 32rem; font-size: 1.1rem; }
.awards { margin-top: 2rem; }
.awards div { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; padding: .9rem 0; border-top: 1px solid #55504a; align-items: baseline; }
.awards dt { font-size: 1.5rem; font-weight: 700; color: #cdb396; line-height: 1; }
.awards b { display: block; font-size: 1.1rem; }
.master blockquote { grid-column: 1 / -1; max-width: 60rem; }
.master blockquote p { font-size: clamp(1.9rem, 4vw, 3.4rem); font-weight: 500; line-height: 1.12; text-wrap: balance; }
.master blockquote footer { margin-top: 1rem; color: #cdb396; }
.master :focus-visible, .prices :focus-visible { outline-color: #fff; }

.works { padding: var(--sec) var(--gut); }
.portraits { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.6rem, 1.2vw, 1.2rem); margin-top: 2.5rem; }
.portraits img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem) minmax(0, 18rem); gap: clamp(.6rem, 1.2vw, 1.2rem); margin-top: clamp(2.5rem, 5vw, 4.5rem); align-items: end; }
.ba h3 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.ba figure { position: relative; }
.ba img { width: 100%; }
.ba figcaption { position: absolute; left: 0; bottom: 0; padding: .4rem .8rem .3rem; background: var(--ink); color: var(--chalk); font-size: 1.15rem; line-height: 1.2; }

.prices { background: var(--sage); color: #fff; padding: var(--sec) var(--gut); }
.prices__head p { margin-top: .8rem; max-width: 34rem; font-size: 1.1rem; }
.prices__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem clamp(2rem, 6vw, 6rem); margin-top: 2.5rem; align-items: start; }
.prices table { width: 100%; }
.prices table + table { margin-top: 2.5rem; }
.prices caption { text-align: left; font-size: 1.6rem; font-weight: 700; padding-bottom: .5rem; line-height: 1.1; }
.prices th { text-align: left; font-weight: 400; }
.prices td, .prices th { padding: .42rem 1rem .42rem 0; border-top: 1px solid rgba(255,255,255,.3); }
.prices td:last-child, .prices th:last-child { text-align: right; padding-right: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prices td:last-child { font-weight: 600; }
.factors { margin-top: clamp(3rem, 6vw, 5rem); }
.factors > p { margin-top: .6rem; }
.factors ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem 2.5rem; margin-top: 1.6rem; }
.factors b { display: block; }

.visit { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem clamp(2rem, 6vw, 6rem); padding: var(--sec) var(--gut); align-items: center; }
.visit__photo { width: 100%; max-height: 46rem; object-fit: cover; }
.visit address { font-style: normal; margin-top: 1.2rem; font-size: 1.1rem; }
.visit table { margin: 1.3rem 0; }
.visit th { text-align: left; font-weight: 400; padding: .2rem 2rem .2rem 0; }
.visit td { font-weight: 600; white-space: nowrap; }
.links { line-height: 1.9; }
.code { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.code p { margin-top: .6rem; max-width: 34rem; }
.map-box { grid-column: 1 / -1; background: var(--chalk); justify-items: center; gap: 1.1rem; }
.map-box p { max-width: 28rem; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 3rem; padding: 2.5rem var(--gut); background: var(--chalk); }
.foot img { width: 130px; height: auto; }
.foot p:last-child { margin-left: auto; }
.page-legal { background: var(--chalk); }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin: 1.5rem 0 1rem; }
.legal h2 { font-size: 1.5rem; margin-bottom: .4rem; }
.legal p { margin: .6rem 0; }

@media (max-width: 900px) {
  .top { gap: 1rem; }
  .top nav { display: none; }
  .hero, .master, .visit, .prices__cols { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; }
  .work { height: auto; width: min(100%, 30rem); max-height: none; }
  .js .work { display: none; }
  .js .work.is-on { display: block; }
  .work .back { clip-path: inset(-24px -60px); } /* линиите да не минават през текста */
  .portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factors ul { grid-template-columns: 1fr 1fr; }
  .ba { grid-template-columns: 1fr 1fr; }
  .ba h3 { grid-column: 1 / -1; }
  .foot p:last-child { margin-left: 0; }
}
@media (max-width: 560px) {
  .factors ul { grid-template-columns: minmax(0, 1fr); }
  .brand { font-size: 1.1rem; gap: .5rem; } .brand span { max-width: 7rem; } .brand img { height: 44px; }
  .top .btn { padding: .55rem .8rem; }
  .thumbs { gap: .25rem; } .thumbs img { width: 2.9rem; height: 2.9rem; }
  .prices td, .prices th { padding-right: .6rem; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .is-on .front ellipse { animation: none; stroke-dashoffset: 0; }
  .is-on .front .c, .is-on .front .ax { animation: none; }
}
