/* ---------------------------------------------------------------
   ТОДОР СТОЯНОВ — визитка / портфолио
   --------------------------------------------------------------- */

:root {
  --sand-50:  #faf6ee;   /* страницата */
  --sand-100: #f4ece0;   /* редуващи се секции */
  --sand-150: #ece1d1;
  --sand-200: #e0d3bd;   /* рамки */
  --sand-300: #cfbc9d;

  --ink:     #2a211a;   /* основен текст */
  --ink-dim: #6f6153;   /* второстепенен текст */
  --cocoa:   #4a2b1d;   /* заглавия — шоколад */
  --cocoa-soft: #6d4430;
  --bordo:      #a01034;   /* акцентът — бордо */
  --bordo-soft: #c33552;
  --bordo-deep: #7a0c27;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --radius: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--sand-50);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: .005em;
  color: var(--cocoa);
}
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.eyebrow {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bordo);
  margin-bottom: .9em;
  font-weight: 700;
}

.section-lede {
  color: var(--ink-dim);
  max-width: 56ch;
  font-size: 1.05rem;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--bordo); color: #fff;
  padding: .6rem 1rem; font-weight: 700;
}
.skip:focus { left: 0; }

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

/* ------------------------------ header ------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 246, 238, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sand-200);
}

.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 126px;
}

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }

.brand-logo { width: auto; height: 104px; }

@media (max-width: 760px) {
  .header-inner { min-height: 96px; }
  .brand-logo { height: 76px; }
}

@media (max-width: 440px) {
  .header-inner { min-height: 82px; }
  .brand-logo { height: 62px; }
}

.nav { display: flex; gap: 1.9rem; }
.nav a {
  text-decoration: none; font-size: .88rem; font-weight: 500;
  color: var(--ink-dim); position: relative; padding: .25rem 0;
  transition: color .25s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--bordo);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--cocoa); }
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .8rem; }

.lang { display: flex; border: 1px solid var(--sand-200); border-radius: 100px; overflow: hidden; }
.lang button {
  background: none; border: 0; cursor: pointer;
  color: var(--ink-dim); font-family: inherit;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  padding: .4rem .7rem;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.lang button.is-active { background: var(--bordo); color: #fff; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.burger span {
  display: block; width: 22px; height: 2px; background: var(--cocoa);
  margin: 4px 0; transition: transform .3s var(--ease), opacity .2s var(--ease);
}

/* ------------------------------ hero --------------------------- */

.hero { position: relative; overflow: hidden; }

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(115% 90% at 82% 0%, #f0e2ca, transparent 62%),
    radial-gradient(90% 80% at 8% 100%, #f9efdb, transparent 60%),
    var(--sand-100);
}

.hero-inner {
  position: relative;
  padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(3.5rem, 8vw, 6rem);
  max-width: 46rem;
}
.hero h1 { margin-bottom: .35em; }
.hero .lede {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--ink-dim);
  max-width: 46ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

.btn {
  display: inline-block; text-decoration: none;
  font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .95rem 1.9rem; border-radius: var(--radius);
  transition: transform .25s var(--ease), background .25s var(--ease),
              color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--bordo); color: #fff; }
.btn-primary:hover { background: var(--bordo-deep); }
.btn-ghost { border: 1px solid var(--sand-300); color: var(--ink); }
.btn-ghost:hover { border-color: var(--cocoa); color: var(--cocoa); }

.hero-strip {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--bordo-soft), var(--cocoa), transparent);
  opacity: .55;
}

/* ------------------------------ stats -------------------------- */

.stats { background: var(--sand-150); }
.stats-inner {
  display: grid; grid-template-columns: repeat(3, 1fr);
  text-align: center;
  padding: 2.6rem 0;
}
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat + .stat { border-left: 1px solid var(--sand-300); }
.stat b {
  font-family: var(--font-display); font-size: clamp(2.1rem, 4.5vw, 3rem);
  color: var(--cocoa); line-height: 1;
}
.stat span {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim);
}

/* ------------------------------ about -------------------------- */

section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.stats, .hero { padding: 0; }

.about-inner {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.about-text p { color: var(--ink-dim); }

.about-media {
  display: grid; grid-template-columns: 1fr 1fr; gap: .8rem;
}
.about-media img {
  width: 100%; height: auto;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(74, 43, 29, .1);
}
.about-media img:nth-child(odd) { transform: translateY(-14px); }

/* ------------------------------ boxes -------------------------- */

.box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-top: 2.5rem;
}

.box-card {
  padding: 0; border: 0; cursor: pointer; background: none;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 8px 22px rgba(74, 43, 29, .12);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.box-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(74, 43, 29, .2);
}
.box-card img {
  width: 100%; height: auto;
  transition: transform .6s var(--ease);
}
.box-card:hover img { transform: scale(1.04); }

/* ------------------------------ gallery ------------------------ */

.gallery { background: var(--sand-100); }

.gallery-tools {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  margin: 2.4rem 0 1.2rem;
}

.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters button {
  background: #fff; cursor: pointer; font-family: inherit;
  border: 1px solid var(--sand-200);
  color: var(--ink-dim);
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  padding: .5rem 1rem; border-radius: 100px;
  transition: all .25s var(--ease);
}
.filters button:hover { border-color: var(--cocoa); color: var(--cocoa); }
.filters button.is-active { background: var(--bordo); border-color: var(--bordo); color: #fff; }

.search { flex: 0 1 260px; }
.search input {
  width: 100%; font-family: inherit; font-size: .9rem;
  background: #fff; color: var(--ink);
  border: 1px solid var(--sand-200);
  border-radius: 100px; padding: .6rem 1.1rem;
}
.search input::placeholder { color: var(--ink-dim); opacity: .75; }
.search input:focus { border-color: var(--bordo); outline: none; }

.result-count {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-dim); margin: 0 0 1.4rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--sand-200);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  padding: 0; text-align: left; font-family: inherit; color: inherit;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--sand-300);
  box-shadow: 0 10px 24px rgba(74, 43, 29, .12);
}

/* No aspect-ratio and no object-fit here on purpose: the label crops are not
   all the same shape, and any fixed box would shave a slice off some of them.
   height:auto lets every photo show in full. */
.card img {
  width: 100%; height: auto;
  transition: transform .5s var(--ease);
}
.card:hover img { transform: scale(1.05); }

.card-body {
  padding: .8rem .9rem 1rem;
  background: var(--sand-200);
  border-top: 1px solid var(--sand-300);
}
.card-body h3 {
  font-family: var(--font-body);
  font-size: .92rem; font-weight: 600; line-height: 1.3;
  margin: 0 0 .25rem; color: var(--bordo);
}
.card-body span {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bordo);
}

.empty { text-align: center; color: var(--ink-dim); padding: 3rem 0; }

/* ------------------------------ process ------------------------ */

.steps {
  list-style: none; margin: 2.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1.6rem;
}
.steps li { border-top: 1px solid var(--sand-300); padding-top: 1.2rem; }
.step-no {
  font-family: var(--font-display); font-size: 1.6rem; color: var(--bordo);
  display: block; margin-bottom: .4rem;
}
.steps h3 { margin-bottom: .4rem; }
.steps p { color: var(--ink-dim); font-size: .93rem; margin: 0; }

/* ------------------------------ contact ------------------------ */

.contact { background: var(--sand-150); }
.contact-inner {
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--sand-300);
}
.contact-list span {
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim);
}
.contact-list a, .contact-list b {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
  text-decoration: none; color: var(--cocoa);
  transition: color .25s var(--ease);
}
.contact-list a:hover { color: var(--bordo); }

/* ------------------------------ footer ------------------------- */

/* same translucent sand band as the header */
.site-footer {
  background: rgba(250, 246, 238, .88);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--sand-200);
  padding: 1.4rem 0;
}
.footer-inner {
  display: flex; flex-direction: column; gap: .7rem;
  justify-content: center; align-items: center;
  min-height: 96px;
}
.footer-logo { width: auto; height: 76px; }
.site-footer p { margin: 0; font-size: .85rem; color: var(--ink-dim); }

@media (max-width: 440px) {
  .footer-inner { min-height: 72px; }
  .footer-logo { height: 58px; }
}

/* ------------------------------ lightbox ----------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(32, 22, 16, .9);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.lightbox[hidden] { display: none; }

.lb-figure { margin: 0; max-width: 760px; width: 100%; }
.lb-figure img {
  width: 100%; border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.lb-figure figcaption {
  text-align: center; padding-top: 1.1rem;
  display: flex; flex-direction: column; gap: .3rem;
}
.lb-figure strong {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: #fff;
}
.lb-figure span {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: #e2c47a;
}

.lb-close, .lb-nav {
  background: none; border: 0; cursor: pointer;
  color: #fff; line-height: 1;
  transition: color .25s var(--ease), transform .25s var(--ease);
}
.lb-close { position: absolute; top: 1.2rem; right: 1.6rem; font-size: 2.4rem; }
.lb-nav { font-size: 3.2rem; padding: 0 1rem; flex: none; }
.lb-close:hover, .lb-nav:hover { color: var(--bordo-soft); }
.lb-next:hover { transform: translateX(3px); }
.lb-prev:hover { transform: translateX(-3px); }

/* ------------------------------ responsive --------------------- */

@media (max-width: 900px) {
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .about-media img:nth-child(odd) { transform: none; }
}

@media (max-width: 760px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 96px 0 auto;
    background: var(--sand-50);
    flex-direction: column; gap: 0;
    padding: .5rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--sand-200);
    box-shadow: 0 12px 24px rgba(74, 43, 29, .1);
    transform: translateY(-120%);
    transition: transform .35s var(--ease);
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--sand-200); font-size: 1rem; }

  .stats-inner { grid-template-columns: 1fr; gap: 1.6rem; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--sand-300); padding-top: 1.6rem; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
  .lb-nav { font-size: 2.2rem; padding: 0 .3rem; }
}
