/*
Theme Name: C'est la vie Buildings
Theme URI: https://cestlavie.studio
Author: C'est la vie Buildings
Description: Custom theme for C'est la vie Buildings — architecture & interior design studio. Drafting-sheet inspired design system.
Version: 1.0
Text Domain: cestlavie
*/

/* ============ TOKENS ============ */
:root{
  --ink:#14181C;
  --ink-soft:#232A31;
  --limestone:#F2EEE6;
  --limestone-dim:#E8E2D6;
  --concrete:#B9B2A6;
  --blueprint:#1D3C5E;
  --blueprint-bright:#2F5E8C;
  --brass:#9C7A42;
  --brass-bright:#B6914F;
  --text:#211E1A;
  --text-soft:#5B564D;
  --line:rgba(33,30,26,0.18);
  --line-strong:rgba(33,30,26,0.35);
  --paper-line:rgba(20,24,28,0.08);

  --display:'Archivo', sans-serif;
  --body:'IBM Plex Sans', sans-serif;
  --mono:'IBM Plex Mono', monospace;
}

/* ============ RESET ============ */
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{animation-duration:0.001ms !important;animation-iteration-count:1 !important;transition-duration:0.001ms !important;scroll-behavior:auto !important;}
}
body{
  margin:0;
  background:var(--limestone);
  color:var(--text);
  font-family:var(--body);
  font-size:16px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
ul{margin:0;padding:0;list-style:none;}
h1,h2,h3,h4,p{margin:0;}
button{font:inherit;background:none;border:0;cursor:pointer;color:inherit;}
:focus-visible{outline:2px solid var(--blueprint-bright);outline-offset:3px;}

/* ============ SCROLL PROGRESS ============ */
.scroll-progress{
  position:fixed;top:0;left:0;right:0;height:2px;
  background:transparent;z-index:60;pointer-events:none;
}
.scroll-progress span{
  display:block;height:100%;width:0%;
  background:var(--brass);
}


/* ============ TOP BAR ============ */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:20px 34px;
  background:var(--ink);
  font-family:var(--mono);
  position:sticky;top:0;z-index:55;
}
.brandmark{
  display:flex;
  align-items:center;
  gap:12px;
  order:2;
}
.brandmark .brandmark-name,.brandmark .brandmark-sub{color:var(--limestone);}
.nav-toggle{
  order:1;
  display:flex;flex-direction:column;justify-content:center;gap:5px;
  width:30px;height:22px;
  flex:none;
}
.nav-toggle span{
  display:block;height:1px;width:100%;background:var(--limestone);
  transition:transform .3s ease, opacity .3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(6px) rotate(45deg);}
.nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0;}
.nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-6px) rotate(-45deg);}

.nav-drawer{
  position:fixed;inset:0;z-index:54;
  background:var(--ink);
  display:flex;align-items:center;justify-content:center;
  /* page-turn: the sheet swings in from its left edge, like turning a page */
  /* gentle page-turn: the sheet swings a little from its left edge while fading in */
  visibility:hidden;opacity:0;
  transform-origin:left center;
  transform:perspective(2200px) rotateY(-28deg);
  transition:opacity .7s ease, transform .9s cubic-bezier(.22,.61,.36,1), visibility 0s linear .9s;
}
.nav-drawer.is-open{
  visibility:visible;opacity:1;
  transform:perspective(2200px) rotateY(0deg);
  transition:opacity .7s ease, transform .9s cubic-bezier(.22,.61,.36,1), visibility 0s;
}
.nav-drawer .main-nav ul{display:flex;flex-direction:column;align-items:center;gap:22px;}
@media (prefers-reduced-motion:reduce){
  .nav-drawer,.nav-drawer.is-open{transform:none;}
}
.nav-drawer .main-nav a{
  font-family:var(--display);font-weight:800;
  font-size:clamp(28px,6vw,52px);
  text-transform:uppercase;color:var(--limestone);
  letter-spacing:-0.01em;
}
.nav-drawer .main-nav a:hover{color:var(--brass);}
.nav-drawer .main-nav a::after{display:none;}
.brandmark-icon{
  width:62px;height:40px;
  flex:none;
  color:var(--limestone);
}
.brandmark-text{
  display:flex;
  flex-direction:column;
  align-items:center;
  line-height:1;
}
.brandmark-name{
  font-family:var(--display);
  font-weight:700;
  font-size:18px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  white-space:nowrap;
}
.brandmark .brandmark-sub{
  display:flex;
  align-items:center;
  gap:7px;
  font-family:var(--display);
  font-weight:500;
  font-size:9.5px;
  letter-spacing:.3em;
  text-transform:uppercase;
  color:var(--brass);
  margin-top:5px;
}
.brandmark-sub::before,.brandmark-sub::after{
  content:"";
  width:14px;height:1px;
  background:currentColor;
  opacity:.8;
}
/* wordmark draft-in (classes added by main.js; letters outline first, then fill) */
.brandmark.bm-anim .bm-ch{
  display:inline-block;
  opacity:0;transform:translateY(.45em);
  color:transparent;
  -webkit-text-stroke:.7px var(--limestone);
}
.brandmark.bm-anim .brandmark-sub .bm-ch{-webkit-text-stroke-color:var(--brass);}
.brandmark.bm-anim .brandmark-sub::before{transform:scaleX(0);transform-origin:right;}
.brandmark.bm-anim .brandmark-sub::after{transform:scaleX(0);transform-origin:left;}
.brandmark.bm-play .bm-ch{
  opacity:1;transform:none;
  color:var(--limestone);
  -webkit-text-stroke-color:transparent;
  transition:
    opacity .7s ease var(--d),
    transform 1s cubic-bezier(.2,.7,.2,1) var(--d),
    color .8s ease calc(var(--d) + 650ms),
    -webkit-text-stroke-color .8s ease calc(var(--d) + 650ms);
}
.brandmark.bm-play .brandmark-sub .bm-ch{color:var(--brass);}
.brandmark.bm-play .brandmark-sub::before,
.brandmark.bm-play .brandmark-sub::after{
  transform:scaleX(1);
  transition:transform 1.1s cubic-bezier(.3,.7,.2,1) 2200ms;
}
@media (max-width:720px){
  .brandmark-icon{width:46px;height:30px;}
  .brandmark-name{font-size:14px;}
}
@media (max-width:720px){
  .topbar{padding:14px 18px;}
}

/* ============ HERO ============ */
.hero{
  display:grid;
  grid-template-columns:1.6fr 1fr;
  gap:40px;
  padding:70px 34px 50px;
  align-items:end;
  position:relative;
  overflow:hidden;
}
.hero-head{max-width:720px;position:relative;z-index:1;}
.hero-eyebrow{
  font-family:var(--mono);
  font-size:12.5px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--blueprint);
  margin-bottom:22px;
  display:flex;align-items:center;gap:10px;
}
.hero-eyebrow::before{content:'';width:22px;height:1px;background:var(--brass);}
.hero-head h1{
  font-family:var(--display);
  font-weight:900;
  font-size:clamp(42px,7vw,96px);
  line-height:0.98;
  letter-spacing:-0.01em;
  text-transform:uppercase;
}
.hero-head h1 em{
  font-style:normal;color:var(--blueprint);
}
.hero-sub{
  margin-top:26px;
  font-size:17px;
  max-width:460px;
  color:var(--text-soft);
}
.hero-cta{
  margin-top:40px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:var(--mono);
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
  border-bottom:1px solid var(--brass);
  padding-bottom:6px;
}
.hero-cta svg{width:14px;height:14px;transition:transform .2s ease;}
.hero-cta:hover svg{transform:translateY(3px);}

.dim-col{
  border-left:1px solid var(--line-strong);
  padding-left:26px;
  display:flex;
  flex-direction:column;
  gap:26px;
  position:relative;z-index:1;
}
.dim-item .dim-v{font-variant-numeric:tabular-nums;}
.dim-item .dim-n{
  font-family:var(--mono);font-size:11px;color:var(--brass);letter-spacing:.1em;
}
.dim-item .dim-l{
  font-family:var(--mono);font-size:11px;color:var(--text-soft);letter-spacing:.1em;text-transform:uppercase;margin-top:4px;
}
.dim-item .dim-v{
  font-family:var(--display);font-weight:700;font-size:26px;margin-top:4px;
}
@media (max-width:900px){
  .hero{grid-template-columns:1fr;padding:50px 18px 30px;}
  .dim-col{border-left:0;border-top:1px solid var(--line-strong);padding-left:0;padding-top:20px;flex-direction:row;flex-wrap:wrap;gap:24px;}
}

/* reveal animation */
.reveal{opacity:0;transform:translateY(16px);transition:opacity .6s ease, transform .6s ease;}
.reveal.is-visible{opacity:1;transform:translateY(0);}
.reveal-stagger > *{opacity:0;transform:translateY(16px);transition:opacity .5s ease, transform .5s ease;}
.reveal-stagger.is-visible > *{opacity:1;transform:translateY(0);}
.reveal-stagger.is-visible > *:nth-child(1){transition-delay:.02s;}
.reveal-stagger.is-visible > *:nth-child(2){transition-delay:.1s;}
.reveal-stagger.is-visible > *:nth-child(3){transition-delay:.18s;}
.reveal-stagger.is-visible > *:nth-child(4){transition-delay:.26s;}

.d1{transition-delay:.08s !important;}
.d2{transition-delay:.18s !important;}
.d3{transition-delay:.28s !important;}
.d4{transition-delay:.4s !important;}

/* drafting-pen wipe reveal, used for the hero headline */
.reveal-wipe .wipe-line{
  display:block;
  clip-path:inset(-4% 100% -16% 0);
  transition:clip-path .85s cubic-bezier(.32,.72,.23,1);
}
.reveal-wipe.is-visible .wipe-line{clip-path:inset(-4% -2% -16% 0);}
.reveal-wipe.is-visible .wipe-line:nth-child(1){transition-delay:.05s;}
.reveal-wipe.is-visible .wipe-line:nth-child(2){transition-delay:.17s;}
.reveal-wipe.is-visible .wipe-line:nth-child(3){transition-delay:.29s;}

/* left-to-right sweep reveal, used for the scale-ruler dividers */
.reveal-sweep{clip-path:inset(0 100% 0 0);transition:clip-path .9s cubic-bezier(.3,.7,.2,1);}
.reveal-sweep.is-visible{clip-path:inset(0 -1% 0 0);}

/* ============ SECTION SHELL ============ */
.section{padding:84px 34px;}
.section-tight{padding:56px 34px;}
@media (max-width:720px){
  .section{padding:56px 18px;}
  .section-tight{padding:40px 18px;}
}
.section-head{
  display:flex;justify-content:space-between;align-items:baseline;
  margin-bottom:48px;gap:20px;flex-wrap:wrap;
}
.section-label{
  font-family:var(--mono);font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--blueprint);
}
.section-head h2{
  font-family:var(--display);font-weight:900;font-size:clamp(28px,4vw,46px);text-transform:uppercase;letter-spacing:-0.01em;
}
.section-note{font-family:var(--mono);font-size:12px;color:var(--text-soft);max-width:260px;text-align:right;}
@media (max-width:720px){ .section-note{text-align:left;} }

/* ============ FULL-BLEED TILE STACK (category browser + project listings) ============ */
.tile-stack{display:flex;flex-direction:column;border-top:1px solid var(--line-strong);}
.tile{
  position:relative;
  display:flex;align-items:flex-end;
  min-height:40vh;
  overflow:hidden;
  border-bottom:1px solid var(--line-strong);
  background:var(--limestone-dim);
}
.tile .cover-glyph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}
.tile .cover-glyph svg{width:32%;height:32%;color:var(--blueprint);opacity:.55;}
.tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .7s cubic-bezier(.2,.7,.2,1);}
.tile:hover img{transform:scale(1.035);}
.tile::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(0deg, rgba(20,24,28,.8) 0%, rgba(20,24,28,.18) 45%, transparent 72%);
}
.tile-body{
  position:relative;z-index:2;width:100%;
  display:flex;justify-content:space-between;align-items:flex-end;
  padding:30px 34px;color:var(--limestone);
}
.tile-name{
  font-family:var(--display);font-weight:900;
  font-size:clamp(26px,4vw,46px);
  text-transform:uppercase;letter-spacing:-0.01em;
}
.tile-sub{
  font-family:var(--mono);font-size:12.5px;letter-spacing:.06em;
  color:var(--limestone);opacity:.8;margin-top:6px;
}
.tile-code{
  font-family:var(--mono);font-size:13px;font-weight:500;letter-spacing:.18em;
  color:var(--limestone);margin-top:8px;
}
.tile-code:empty{display:none;}
.project-code{
  font-family:var(--mono);font-size:clamp(13px,1.4vw,16px);font-weight:500;
  letter-spacing:.18em;color:var(--brass);margin-top:12px;
}
.project-code:empty{display:none;}
.tile-meta{
  font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;
  display:flex;align-items:center;gap:10px;opacity:.85;flex:none;
}
.tile-meta svg{width:14px;height:14px;transition:transform .2s ease;}
.tile:hover .tile-meta svg{transform:translateX(4px);}
@media (max-width:720px){
  .tile{min-height:230px;}
  .tile-body{padding:20px 18px;flex-direction:column;align-items:flex-start;gap:8px;}
}

/* homepage: contained tiles with breathing room + hairline separators */
.home-projects{max-width:1240px;margin:0 auto;padding:clamp(24px,4vw,48px) clamp(16px,5vw,64px) clamp(40px,6vw,72px);}
.home-projects .tile-stack{border-top:0;}
.home-projects .tile{border-bottom:0;min-height:clamp(260px,42vh,460px);}
.home-projects .tile-sep{display:block;height:1px;background:var(--line);margin:clamp(18px,2.4vw,30px) 0;}

/* topbar tagline: says what the site is */
.topbar-tagline{
  order:1;flex:1;margin:0 24px;text-align:center;
  font-family:var(--mono);font-size:12px;letter-spacing:.2em;text-transform:uppercase;
  color:var(--limestone);opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.topbar-tagline i{font-style:normal;color:var(--brass);margin:0 .6em;}
.topbar-tagline .tg-short{display:none;}
@media (max-width:900px){
  .topbar-tagline .tg-full{display:none;}
  .topbar-tagline .tg-short{display:inline;}
}
@media (max-width:520px){.topbar-tagline{margin:0 10px;font-size:10px;letter-spacing:.14em;}}

/* homepage tiles: calm, clean photo with a quiet caption line underneath */
.home-projects .tile-stack{gap:clamp(28px,4vw,52px);}
.home-projects .tile-sep{display:none;}
.home-projects .tile{
  background:transparent;overflow:hidden;border-bottom:0;border-radius:3px;
  min-height:clamp(300px,50vh,540px);padding-bottom:58px;
}
.home-projects .tile img,.home-projects .tile .cover-glyph{
  inset:0 0 58px 0;height:calc(100% - 58px);border-radius:3px;
}
.home-projects .tile img{box-shadow:0 1px 2px rgba(20,24,28,.08);}
.home-projects .tile::after{display:none !important;}
.home-projects .tile-body{
  position:absolute;left:0;right:0;bottom:0;height:58px;padding:0;
  align-items:center;color:var(--ink);border-bottom:1px solid var(--line);
}
.home-projects .tile-name{font-size:clamp(15px,1.6vw,19px);font-weight:700;letter-spacing:.14em;transition:color .3s ease;}
.home-projects .tile:hover .tile-name{color:var(--brass);}
.home-projects .tile-meta{opacity:.6;font-size:11px;}

/* tile hover: slow zoom + dark veil + centred CTA with a brass underline drawing in (pointer devices only) */
.tile-cta{display:none;}
@media (hover:hover){
  .tile img{transition:transform 1.4s cubic-bezier(.2,.7,.2,1);}
  .tile:hover img{transform:scale(1.08) translate(-1%,-1%);}
  .tile::before{
    content:'';position:absolute;inset:0;z-index:1;
    background:rgba(20,24,28,.45);opacity:0;transition:opacity .6s ease;
  }
  .tile:hover::before{opacity:1;}
  .tile .tile-cta{
    display:block;position:absolute;z-index:2;left:50%;top:50%;
    transform:translate(-50%,calc(-50% + 10px));opacity:0;
    font-family:var(--mono);font-size:clamp(14px,1.3vw,17px);font-weight:500;letter-spacing:.24em;text-transform:uppercase;color:var(--limestone);
    padding-bottom:12px;white-space:nowrap;text-shadow:0 1px 12px rgba(0,0,0,.45);
    background:linear-gradient(var(--brass),var(--brass)) no-repeat left bottom / 0 1px;
    transition:opacity .5s ease, transform .5s ease, background-size .7s cubic-bezier(.2,.7,.2,1) .15s;
  }
  .tile:hover .tile-cta{opacity:1;transform:translate(-50%,-50%);background-size:100% 1px;}
}

/* anchor jumps (#proekti, #studio…) land below the sticky top bar, not under it */
#proekti,#studio,#uslugi,#kontakti{scroll-margin-top:72px;}

/* homepage sections share the tile column's left/right edges (backgrounds stay full-width) */
#studio,#uslugi,#kontakti,.home .site-footer{
  --col-pad:clamp(16px,5vw,64px);
  padding-left:max(var(--col-pad), calc((100% - 1240px) / 2 + var(--col-pad)));
  padding-right:max(var(--col-pad), calc((100% - 1240px) / 2 + var(--col-pad)));
}

/* centered-caption variant, used on project listing pages */
.tile-stack-center .tile{align-items:center;}
.tile-stack-center .tile::after{background:rgba(20,24,28,.42);}
.tile-stack-center .tile-body{
  flex-direction:column;align-items:center;text-align:center;gap:10px;
  padding:34px;
}
.tile-stack-center .tile-meta{justify-content:center;}
.tile-stack-center .tile.is-hidden{display:none;}

/* category / archive listings: gently contained, whole house visible, quiet captions */
.tax-project_type .page-header,.tax-project_type .listing-bar,
.post-type-archive-project .page-header,.post-type-archive-project .listing-bar{
  --col-pad:clamp(16px,3vw,40px);
  padding-left:max(var(--col-pad), calc((100% - 1440px) / 2 + var(--col-pad)));
  padding-right:max(var(--col-pad), calc((100% - 1440px) / 2 + var(--col-pad)));
}
.tile-stack-center{
  max-width:1440px;margin:0 auto;border-top:0;
  padding:clamp(16px,2vw,28px) clamp(16px,3vw,40px) clamp(40px,5vw,64px);
  gap:clamp(16px,2vw,28px);
}
.tile-stack-center .tile{
  min-height:0;aspect-ratio:16/9;border-bottom:0;
  align-items:flex-end;
}
.tile-stack-center .tile::after{background:linear-gradient(0deg, rgba(20,24,28,.45) 0%, rgba(20,24,28,0) 32%);}
.tile-stack-center .tile-body{
  flex-direction:row;align-items:flex-end;justify-content:space-between;text-align:left;gap:16px;
  padding:clamp(14px,2vw,26px) clamp(16px,2.4vw,30px);
}
.tile-stack-center .tile-name{font-size:clamp(17px,1.7vw,23px);font-weight:700;letter-spacing:.02em;opacity:.78;}
.tile-stack-center .tile-sub{font-size:11.5px;opacity:.6;margin-top:4px;}
.tile-stack-center .tile-meta{opacity:.6;font-size:11px;}
.tile-stack-center .tile:hover .tile-name,.tile-stack-center .tile:hover .tile-meta{opacity:1;}
.tile-stack-center .tile-name,.tile-stack-center .tile-meta{transition:opacity .25s ease;}
@media (max-width:720px){
  .tile-stack-center .tile{aspect-ratio:4/3;}
  .tile-stack-center .tile-body{flex-direction:column;align-items:flex-start;gap:6px;}
}

/* dark listing utility bar: filter + search, echoes the project-sheet chrome */
.listing-bar{
  display:flex;justify-content:space-between;align-items:center;
  background:var(--ink);color:var(--limestone);
  padding:18px 34px;
  font-family:var(--mono);font-size:12px;letter-spacing:.1em;text-transform:uppercase;
  position:relative;
}
.listing-bar .lb-group{display:flex;align-items:center;gap:22px;}
.listing-bar button{
  display:flex;align-items:center;gap:8px;color:var(--limestone);background:none;border:0;cursor:pointer;
}
.listing-bar svg{width:14px;height:14px;}
.listing-search{display:flex;align-items:center;gap:8px;}
.listing-search input{
  background:transparent;border:0;border-bottom:1px solid rgba(242,238,230,.4);
  color:var(--limestone);font-family:var(--mono);font-size:12px;letter-spacing:.05em;
  padding:4px 2px;width:150px;
}
.listing-search input::placeholder{color:rgba(242,238,230,.5);text-transform:uppercase;}
.filter-menu{
  position:absolute;top:100%;left:34px;z-index:10;
  background:var(--ink);border:1px solid rgba(242,238,230,.2);
  display:none;flex-direction:column;min-width:220px;
}
.filter-menu.is-open{display:flex;}
.filter-menu a{padding:12px 18px;color:var(--limestone);font-size:12px;letter-spacing:.06em;text-transform:uppercase;border-bottom:1px solid rgba(242,238,230,.12);}
.filter-menu a:hover{background:rgba(242,238,230,.08);color:var(--brass-bright);}
.filter-menu a:last-child{border-bottom:0;}
@media (max-width:720px){
  .listing-bar{padding:14px 18px;}
  .listing-search input{width:100px;}
}

/* ============ ABOUT / PULL QUOTE ============ */
.about-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center;
}
.pull-quote{
  font-family:var(--display);
  font-weight:800;
  font-size:clamp(24px,3.4vw,38px);
  line-height:1.15;
  letter-spacing:-0.005em;
}
.pull-quote span{color:var(--blueprint);}
.about-grid h2{
  font-family:var(--display);font-weight:700;font-size:clamp(22px,2.6vw,30px);line-height:1.25;letter-spacing:-0.01em;max-width:480px;
}
.about-body{color:var(--text-soft);margin-top:22px;max-width:480px;font-size:15.5px;}
.about-figure{
  border:1px solid var(--line-strong);
  aspect-ratio:1/1;
  display:flex;align-items:center;justify-content:center;
  background:var(--ink);
}
.about-figure svg{width:70%;height:70%;color:var(--limestone);}
.about-logo{flex-direction:column;gap:0;aspect-ratio:auto;width:100%;max-width:380px;justify-self:center;padding:52px 32px;}
.about-logo .about-logo-icon{width:42%;height:auto;color:var(--limestone);}
.about-logo-name{
  margin-top:22px;
  font-family:var(--display);font-weight:700;font-size:clamp(18px,1.9vw,24px);letter-spacing:.14em;
  color:var(--limestone);
}
.about-logo-sub{
  display:flex;align-items:center;gap:10px;margin-top:8px;
  font-family:var(--display);font-weight:600;font-size:clamp(10px,.9vw,12px);letter-spacing:.42em;text-transform:uppercase;
  color:var(--brass);
}
.about-logo-sub::before,.about-logo-sub::after{content:"";width:26px;height:1px;background:var(--brass);}
@media (max-width:900px){
  .about-grid{grid-template-columns:1fr;gap:34px;}
  .about-figure{order:-1;max-width:320px;margin:0 auto;}
}

/* ============ SERVICES ============ */
.services-list{border-top:1px solid var(--line-strong);max-width:980px;margin:0 auto;}
#uslugi .section-head,#kontakti .section-head{justify-content:center;text-align:center;}
#kontakti .contact-grid{max-width:980px;margin:0 auto;gap:64px;}
#uslugi .service-row{grid-template-columns:1fr 1fr;gap:48px;}
#uslugi .service-row p{max-width:none;}
@media (max-width:720px){ #uslugi .service-row{grid-template-columns:1fr;gap:8px;} }
.service-row{
  display:grid;grid-template-columns:1fr 1.3fr;gap:28px;
  padding:28px 0;border-bottom:1px solid var(--line);
  align-items:start;
}
.service-row h3{font-family:var(--display);font-weight:800;font-size:21px;text-transform:uppercase;}
.service-row p{color:var(--text-soft);font-size:15px;max-width:440px;}
@media (max-width:720px){
  .service-row{grid-template-columns:1fr;gap:8px;}
}

/* ============ CONTACT (dark / blueprint) ============ */
.contact-section{
  --c-bg:#FAF8F4;--c-fg:var(--ink);--c-line:rgba(20,24,28,.35);--c-label:var(--brass);--c-label-op:1;
  background:var(--c-bg);
  color:var(--c-fg);
  border-top:1px solid var(--line-strong);
  position:relative;
}
.contact-section .section-label{color:var(--c-label);opacity:var(--c-label-op);}
.contact-section .section-head h2{color:var(--c-fg);}
.contact-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:50px;
}
.contact-info dl{display:flex;flex-direction:column;gap:18px;margin-top:10px;}
.contact-info dt{font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;opacity:.65;}
.contact-info dd{font-family:var(--display);font-weight:700;font-size:19px;margin:4px 0 0;}
.contact-info a{border-bottom:1px solid var(--c-line);}
.contact-info a:hover{border-color:var(--c-fg);}

.cform{display:flex;flex-direction:column;gap:16px;}
.cform label{font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;opacity:.7;display:block;margin-bottom:6px;}
.cform .req{color:var(--brass);}
.cform input,.cform textarea{
  width:100%;background:transparent;border:0;border-bottom:1px solid var(--c-line);
  color:var(--c-fg);font-family:var(--body);font-size:15px;padding:8px 2px;
}
.cform input:focus,.cform textarea:focus{border-color:var(--brass-bright);}
.cform button{
  margin-top:10px;align-self:flex-start;
  font-family:var(--mono);font-size:12.5px;letter-spacing:.1em;text-transform:uppercase;
  border:1px solid var(--c-fg);padding:12px 26px;
  transition:background .2s ease,color .2s ease,border-color .2s ease;
}
.cform button:hover{background:var(--brass);border-color:var(--brass);color:#fff;}
@media (max-width:720px){ .contact-grid{grid-template-columns:1fr;gap:34px;} }

/* ============ FOOTER ============ */
.site-footer{
  padding:28px 34px;
  display:flex;justify-content:space-between;align-items:center;
  font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--text-soft);
  border-top:1px solid var(--line);flex-wrap:wrap;gap:10px;
}
@media (max-width:720px){ .site-footer{padding:20px 18px;} }
.footer-places{display:flex;align-items:center;gap:8px;}
.place-link{
  font:inherit;letter-spacing:inherit;color:inherit;
  background:none;border:0;padding:0;cursor:pointer;
  border-bottom:1px solid var(--line-strong);
  transition:color .2s,border-color .2s;
}
.place-link:hover,.place-link[aria-expanded="true"]{color:var(--brass);border-color:var(--brass);}
.place-panel{
  display:grid;grid-template-columns:minmax(240px,1fr) 2fr;
  border-top:1px solid var(--line);
  margin:0 34px 34px;
  background:var(--ink);color:var(--limestone);
}
.place-panel[hidden]{display:none;}
.place-info{padding:28px;display:flex;flex-direction:column;gap:14px;align-items:flex-start;}
.place-info .section-label{color:var(--brass);}
.place-address{font-family:var(--display);font-weight:600;font-size:19px;line-height:1.35;}
.place-open{font-family:var(--mono);font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;border-bottom:1px solid var(--brass);padding-bottom:2px;}
.place-open:hover{color:var(--brass);}
.place-close{
  margin-top:auto;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--limestone);opacity:.7;background:none;border:0;padding:0;cursor:pointer;
}
.place-close:hover{opacity:1;}
.place-map{min-height:360px;}
.place-map iframe{width:100%;height:100%;min-height:360px;border:0;display:block;filter:grayscale(.35) contrast(1.05);}
@media (max-width:720px){
  .place-panel{grid-template-columns:1fr;margin:0 18px 18px;}
  .place-map,.place-map iframe{min-height:280px;}
}

/* ============ PAGE HEADER (sub-pages) ============ */
.page-header{padding:70px 34px 40px;}
.page-header .section-eyebrow{font-family:var(--mono);font-size:12px;color:var(--blueprint);letter-spacing:.14em;text-transform:uppercase;margin-bottom:18px;}
.page-header h1{font-family:var(--display);font-weight:900;font-size:clamp(34px,6vw,64px);text-transform:uppercase;letter-spacing:-0.01em;max-width:900px;}
.page-header .lede{margin-top:20px;max-width:560px;color:var(--text-soft);font-size:16.5px;}

/* ============ PROJECT SINGLE ============ */
.project-hero-figure{
  background:var(--ink);border:1px solid var(--line-strong);
  aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;margin:0 34px 0;
  overflow:hidden;position:relative;
}
.project-hero-figure svg{width:60%;height:60%;color:var(--limestone);}
.project-hero-figure img{width:100%;height:100%;object-fit:cover;}
.project-hero-figure .cover-glyph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}
.project-hero-figure .cover-glyph svg{width:50%;height:50%;}
.project-gallery{
  display:grid;grid-template-columns:repeat(2,1fr);gap:1px;
  background:var(--line);margin:1px 34px 0;
}
.project-gallery img{width:100%;height:100%;object-fit:cover;aspect-ratio:4/3;display:block;}
@media (max-width:720px){
  .project-gallery{grid-template-columns:1fr;margin-left:18px;margin-right:18px;}
}
.project-plans{padding:70px 34px 0;}
.project-plans .section-head{margin-bottom:28px;}
.plan-figure{
  background:#fff;border:1px solid var(--line-strong);
  max-width:1100px;margin:0 auto 28px;
}
.plan-figure img{width:100%;height:auto;display:block;}
.plan-canvas{position:relative;}
.plan-room{
  position:absolute;transform:translate(-50%,-50%);
  display:flex;flex-direction:column;align-items:center;gap:3px;
  white-space:nowrap;pointer-events:none;
  color:var(--ink);font-family:var(--display);font-weight:700;
  font-size:clamp(8px,1.05vw,14px);letter-spacing:.02em;line-height:1;
  text-shadow:0 0 3px rgba(255,255,255,.95),0 0 6px rgba(255,255,255,.8);
}
.plan-room b{font-weight:500;font-size:.82em;text-transform:uppercase;letter-spacing:.08em;white-space:pre-line;text-align:center;line-height:1.15;}
.plan-room--light{color:#fff;text-shadow:0 0 3px rgba(0,0,0,.9),0 0 6px rgba(0,0,0,.7);}
@media (max-width:720px){ .plan-room{font-size:7.5px;} }
.plan-figure figcaption{
  display:flex;justify-content:space-between;
  padding:14px 20px;border-top:1px solid var(--line);
  font-family:var(--mono);font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-soft);
}
@media (max-width:720px){
  .project-plans{padding:50px 18px 0;}
}
.project-specs{
  display:grid;grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong);
  margin:40px 34px 0;
}
.project-specs div{padding:18px 22px;border-left:1px solid var(--line);}
.project-specs div:first-child{border-left:0;}
.project-specs .pk{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--text-soft);}
.project-specs .pv{font-family:var(--display);font-weight:700;font-size:19px;margin-top:6px;}
.project-body{padding:50px 34px;max-width:760px;font-size:16px;color:var(--text-soft);}
.project-body p + p{margin-top:16px;}
.inquiry-btn{
  display:inline-flex;align-items:center;gap:12px;margin-top:34px;padding:15px 28px;
  background:var(--ink);color:var(--limestone);border:1px solid var(--ink);
  font-family:var(--mono);font-size:12px;letter-spacing:.12em;text-transform:uppercase;
  transition:background .25s,color .25s,border-color .25s;
}
.inquiry-btn span{transition:transform .25s;}
.inquiry-btn:hover{background:var(--brass);border-color:var(--brass);color:#fff;}
.inquiry-btn:hover span{transform:translateX(4px);}
.project-nav{
  display:flex;justify-content:space-between;padding:28px 34px 60px;
  border-top:1px solid var(--line);font-family:var(--mono);font-size:12px;text-transform:uppercase;letter-spacing:.06em;
}
.project-nav a:hover{color:var(--blueprint);}
@media (max-width:720px){
  .project-specs{grid-template-columns:repeat(2,1fr);}
  .project-specs div{border-left:0;border-top:1px solid var(--line);}
  .project-hero-figure,.project-specs,.project-body,.project-nav{margin-left:18px;margin-right:18px;padding-left:0;padding-right:0;}
}

/* ============ 404 ============ */
.not-found{padding:120px 34px;text-align:center;}
.not-found .nf-code{font-family:var(--mono);color:var(--brass);letter-spacing:.2em;}
.not-found h1{font-family:var(--display);font-weight:900;font-size:clamp(40px,8vw,100px);margin-top:14px;}

/* ============ SEO additions ============ */
.home-label{
  font-family:var(--mono);font-weight:400;font-size:12px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--blueprint);margin:0 0 clamp(16px,2vw,24px);
}
.service-links{max-width:980px;margin:28px auto 0;display:flex;flex-wrap:wrap;gap:10px 28px;justify-content:center;
  font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;}
.service-links a{border-bottom:1px solid var(--line-strong);padding-bottom:3px;transition:color .2s,border-color .2s;}
.service-links a:hover{color:var(--brass);border-color:var(--brass);}
.cform-note{font-size:12.5px;opacity:.7;margin:4px 0 0;}
.cform-note a{border-bottom:1px solid currentColor;}
.project-body h2{font-family:var(--display);font-weight:800;font-size:20px;text-transform:uppercase;color:var(--ink);margin:38px 0 12px;letter-spacing:0;}
.project-body ul{margin:12px 0 0 20px;}
.project-body a:not(.inquiry-btn){border-bottom:1px solid currentColor;}
/* lang="bg" switches IBM Plex to Bulgarian (handwritten-style) letterforms; keep the approved standard Cyrillic look */
html,body,input,textarea,button{font-feature-settings:"locl" 0;}
/* odd number of gallery photos: last one spans the full row instead of leaving an empty cell */
@media (min-width:721px){ .project-gallery img:last-child:nth-child(odd){grid-column:1 / -1;aspect-ratio:16/9;} }

/* show whole buildings: no cropping of render photos in tiles */
.home-projects .tile{min-height:0;aspect-ratio:3/2;}
.home-projects .tile img,.home-projects .tile .cover-glyph{object-fit:contain;}
.tile-stack-center .tile{aspect-ratio:3/2;}
.tile-stack-center .tile img{object-fit:contain;}
@media (max-width:720px){
  .home-projects .tile{min-height:0;}
  .tile-stack-center .tile{aspect-ratio:3/2;}
}

/* ===== design previews (?design=1|2|3) ===== */
.dv1 .home-projects .tile,.dv2 .home-projects .tile,.dv3 .home-projects .tile{
  display:flex;aspect-ratio:auto;min-height:0;padding:0;overflow:hidden;
}
.dv1 .home-projects .tile img,.dv2 .home-projects .tile img,.dv3 .home-projects .tile img{
  position:static;inset:auto;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;border-radius:0;box-shadow:none;
}
.dv1 .home-projects .tile-body,.dv2 .home-projects .tile-body,.dv3 .home-projects .tile-body{
  position:static;height:auto;border-bottom:0;
}
/* 1: compact two-column cards on a soft panel */
.dv1 .home-projects .tile-stack{display:grid;grid-template-columns:repeat(2,1fr);gap:clamp(16px,2.4vw,32px);}
.dv1 .home-projects .tile{flex-direction:column;background:var(--limestone-dim);border-radius:3px;}
.dv1 .home-projects .tile-body{padding:14px 18px;}
.dv1 .home-projects .tile-name{font-size:14px;}
@media(max-width:720px){.dv1 .home-projects .tile-stack{grid-template-columns:1fr;}}
/* 2: dark gallery, three columns */
.dv2 body{background:var(--ink);}
.dv2 .home-projects{max-width:none;background:var(--ink);}
.dv2 .home-projects .home-label{color:var(--limestone);opacity:.7;}
.dv2 .home-projects .tile-stack{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(14px,1.8vw,26px);max-width:1400px;margin:0 auto;}
.dv2 .home-projects .tile{flex-direction:column;background:#1c2127;}
.dv2 .home-projects .tile-body{padding:12px 16px;color:var(--limestone);}
.dv2 .home-projects .tile-name{font-size:13px;color:var(--limestone);}
.dv2 .home-projects .tile-meta{color:var(--limestone);opacity:.6;}
@media(max-width:900px){.dv2 .home-projects .tile-stack{grid-template-columns:1fr 1fr;}}
@media(max-width:560px){.dv2 .home-projects .tile-stack{grid-template-columns:1fr;}}
/* 3: editorial list, big name left, small photo right */
.dv3 .home-projects .tile-stack{display:flex;flex-direction:column;gap:0;border-top:1px solid var(--line-strong);}
.dv3 .home-projects .tile{flex-direction:row;align-items:center;gap:clamp(16px,3vw,40px);padding:clamp(16px,2vw,24px) 0;border-bottom:1px solid var(--line-strong);background:transparent;}
.dv3 .home-projects .tile img{order:2;width:clamp(180px,34%,420px);flex:none;}
.dv3 .home-projects .tile-body{order:1;flex:1;padding:0;}
.dv3 .home-projects .tile-name{font-size:clamp(20px,3.4vw,44px);letter-spacing:.06em;}
@media(max-width:600px){.dv3 .home-projects .tile{flex-direction:column;align-items:stretch;}.dv3 .home-projects .tile img{width:100%;order:1}.dv3 .home-projects .tile-body{order:2;}}

/* restore the loved hover: dark veil + slow zoom + centred "Виж проектите →" (over the photo only) */
@media (hover:hover){
  .home-projects .tile::before{inset:0 0 58px 0;}
  .home-projects .tile .tile-cta{top:calc(50% - 29px);}
  .dv1 .home-projects .tile::before,.dv2 .home-projects .tile::before,.dv3 .home-projects .tile::before{inset:0;}
  .dv1 .home-projects .tile .tile-cta,.dv2 .home-projects .tile .tile-cta,.dv3 .home-projects .tile .tile-cta{top:calc(50% - 20px);}
  .dv3 .home-projects .tile .tile-cta{left:auto;right:calc(clamp(180px,34%,420px) / 2);transform:translate(50%,calc(-50% + 10px));font-size:12px;}
  .dv3 .home-projects .tile:hover .tile-cta{transform:translate(50%,-50%);}
}

/* ===== homepage: full-width bands, photo melts into its own blurred extension ===== */
.home-projects{max-width:none;padding-left:0;padding-right:0;}
.home-projects .home-label{padding:0 max(16px,calc((100% - 1240px)/2 + 16px));margin-bottom:18px;}
.home-projects .tile-stack{gap:clamp(18px,2.4vw,34px);}
html:not([class*="dv"]) .home-projects .tile{
  width:100%;height:clamp(300px,40vw,600px);min-height:0;aspect-ratio:auto;padding:0;
  border-radius:0;overflow:hidden;background:var(--limestone-dim);display:block;
}
html:not([class*="dv"]) .home-projects .tile::after{
  display:block !important;content:'';position:absolute;inset:-30px;z-index:0;
  background:var(--bg) center/cover no-repeat;filter:blur(34px) saturate(1.08);transform:scale(1.08);opacity:.95;
}
html:not([class*="dv"]) .home-projects .tile img{
  position:absolute;z-index:1;top:0;bottom:0;left:0;right:0;margin:0 auto;width:auto;max-width:100%;height:100%;aspect-ratio:3/2;
  object-fit:cover;border-radius:0;box-shadow:none;
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 13%,#000 87%,transparent 100%);
  mask-image:linear-gradient(to right,transparent 0,#000 13%,#000 87%,transparent 100%);
}
html:not([class*="dv"]) .home-projects .tile::before{inset:0;z-index:2;}
html:not([class*="dv"]) .home-projects .tile .tile-cta{top:50%;z-index:3;}
html:not([class*="dv"]) .home-projects .tile-body{
  position:absolute;z-index:3;left:0;right:0;bottom:0;height:auto;
  padding:70px max(16px,calc((100% - 1240px)/2 + 16px)) 22px;border-bottom:0;
  color:var(--limestone);background:linear-gradient(0deg,rgba(20,24,28,.6),transparent);
}
html:not([class*="dv"]) .home-projects .tile-name{color:var(--limestone);font-size:clamp(18px,2.2vw,28px);}
html:not([class*="dv"]) .home-projects .tile:hover .tile-name{color:var(--limestone);}
html:not([class*="dv"]) .home-projects .tile-meta{color:var(--limestone);opacity:.85;}

/* lighter, airier bands: bright blurred extension, light caption strip with ink text */
html:not([class*="dv"]) .home-projects .tile::after{
  filter:blur(34px) saturate(.95) brightness(1.18);opacity:.55;
}
html:not([class*="dv"]) .home-projects .tile{background:var(--limestone);}
html:not([class*="dv"]) .home-projects .tile-body{
  color:var(--ink);background:linear-gradient(0deg,rgba(242,238,230,.92) 0%,rgba(242,238,230,.55) 55%,transparent 100%);
  padding-top:90px;
}
html:not([class*="dv"]) .home-projects .tile-name,
html:not([class*="dv"]) .home-projects .tile:hover .tile-name,
html:not([class*="dv"]) .home-projects .tile-meta{color:var(--ink);text-shadow:none;}
html:not([class*="dv"]) .home-projects .tile-meta{opacity:.7;}

/* calm middle tone: not glaring, not dark */
html:not([class*="dv"]) .home-projects .tile{background:#6f7476;}
html:not([class*="dv"]) .home-projects .tile::after{
  filter:blur(34px) saturate(.8) brightness(.92);opacity:.8;
}
html:not([class*="dv"]) .home-projects .tile-body{
  color:var(--limestone);background:linear-gradient(0deg,rgba(24,28,31,.5) 0%,rgba(24,28,31,.22) 55%,transparent 100%);
  padding-top:80px;
}
html:not([class*="dv"]) .home-projects .tile-name,
html:not([class*="dv"]) .home-projects .tile:hover .tile-name,
html:not([class*="dv"]) .home-projects .tile-meta{color:var(--limestone);}
html:not([class*="dv"]) .home-projects .tile-meta{opacity:.85;}

/* ===== PREVIEW ?design=mix : option 1 / 2 / 3 on the first three sections ===== */
html.dvmix .home-projects{max-width:none;padding:0 0 60px;}
html.dvmix .home-projects .home-label{max-width:1240px;margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;}
html.dvmix .home-projects .tile-stack{gap:clamp(44px,6vw,84px);}
html.dvmix .home-projects .tile-sep{display:none;}
html.dvmix .home-projects .tile{
  display:block;position:relative;overflow:hidden;min-height:0;height:auto;aspect-ratio:auto;padding:0;
  background:transparent;border:0;border-radius:0;
}
html.dvmix .home-projects .tile::after{display:none !important;content:none;}
html.dvmix .home-projects .tile img{position:static;display:block;inset:auto;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;background:#e4dfd3;border-radius:0;box-shadow:none;}
html.dvmix .home-projects .tile .cover-glyph{position:relative;inset:auto;height:auto;aspect-ratio:3/2;}

/* OPTION 1 (and every section after 3): framed card, whole photo, caption under it */
html.dvmix .home-projects .tile{width:min(980px,calc(100% - 32px));margin:0 auto;border:1px solid var(--line);}
html.dvmix .home-projects .tile-body{
  position:relative;z-index:3;left:auto;right:auto;bottom:auto;height:auto;
  background:var(--limestone);color:var(--ink);padding:18px 24px;border:0;align-items:center;
}
html.dvmix .home-projects .tile-name{color:var(--ink);font-size:clamp(15px,1.7vw,20px);font-weight:700;letter-spacing:.14em;text-shadow:none;}
html.dvmix .home-projects .tile-meta{color:var(--ink);opacity:.65;font-size:11px;}
html.dvmix .home-projects .tile:hover .tile-name{color:var(--brass);}
@media (hover:hover){
  html.dvmix .home-projects .tile::before{inset:0 0 auto 0;height:auto;aspect-ratio:3/2;width:100%;}
  html.dvmix .home-projects .tile .tile-cta{top:calc((100% - 62px)/2);}
}

/* OPTION 2 (second section): split row — text left, photo right */
html.dvmix .home-projects .tile:nth-of-type(2){
  width:min(1240px,calc(100% - 32px));display:grid;grid-template-columns:minmax(230px,1fr) 2fr;align-items:center;border:0;
}
html.dvmix .home-projects .tile:nth-of-type(2) img,
html.dvmix .home-projects .tile:nth-of-type(2) .cover-glyph{grid-column:2;grid-row:1;}
html.dvmix .home-projects .tile:nth-of-type(2) .tile-body{
  grid-column:1;grid-row:1;background:transparent;flex-direction:column;align-items:flex-start;gap:16px;
  padding:0 clamp(16px,3vw,40px) 0 0;border-top:1px solid var(--ink);padding-top:22px;align-self:center;
}
html.dvmix .home-projects .tile:nth-of-type(2) .tile-name{font-size:clamp(22px,2.8vw,38px);letter-spacing:.04em;}
@media (hover:hover){
  html.dvmix .home-projects .tile:nth-of-type(2)::before{inset:0 0 0 33.3%;aspect-ratio:auto;width:auto;height:auto;}
  html.dvmix .home-projects .tile:nth-of-type(2) .tile-cta{left:66.6%;top:50%;}
}
@media (max-width:720px){
  html.dvmix .home-projects .tile:nth-of-type(2){display:block;}
  html.dvmix .home-projects .tile:nth-of-type(2) .tile-body{padding:18px 4px;border-top:0;}
}

/* OPTION 3 (third section): full-bleed cinematic, whole photo, big title on the image */
html.dvmix .home-projects .tile:nth-of-type(3){
  width:100%;height:clamp(420px,78vh,800px);background:#e4dfd3;border:0;
}
html.dvmix .home-projects .tile:nth-of-type(3) img,
html.dvmix .home-projects .tile:nth-of-type(3) .cover-glyph{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;}
html.dvmix .home-projects .tile:nth-of-type(3) .tile-body{
  position:absolute;left:0;right:0;bottom:0;background:linear-gradient(0deg,rgba(20,24,28,.5),transparent);
  color:var(--limestone);padding:70px max(16px,calc((100% - 1240px)/2 + 16px)) 26px;
}
html.dvmix .home-projects .tile:nth-of-type(3) .tile-name{color:var(--limestone);font-size:clamp(26px,4.2vw,58px);font-weight:300;letter-spacing:.16em;}
html.dvmix .home-projects .tile:nth-of-type(3) .tile-meta{color:var(--limestone);opacity:.9;}
html.dvmix .home-projects .tile:nth-of-type(3):hover .tile-name{color:var(--limestone);}
@media (hover:hover){
  html.dvmix .home-projects .tile:nth-of-type(3)::before{inset:0;aspect-ratio:auto;height:auto;}
  html.dvmix .home-projects .tile:nth-of-type(3) .tile-cta{top:50%;}
}

/* ===== FINAL (default on home): option 3 for every section, photo feathers sideways into the page background ===== */
html.dvmix .home-projects .tile:nth-of-type(n){
  width:100%;max-width:none;margin:0;display:block;height:clamp(380px,62vh,700px);aspect-ratio:auto;
  background:var(--limestone);border:0;overflow:hidden;position:relative;
}
html.dvmix .home-projects .tile:nth-of-type(n) img,
html.dvmix .home-projects .tile:nth-of-type(n) .cover-glyph{
  position:absolute;top:0;bottom:0;left:0;right:0;margin:0 auto;inset:0 0 0 0;
  width:auto;max-width:100%;height:100%;aspect-ratio:3/2;object-fit:cover;grid-column:auto;grid-row:auto;background:transparent;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16%,#000 84%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 16%,#000 84%,transparent 100%);
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{
  position:absolute;left:0;right:0;bottom:0;grid-column:auto;grid-row:auto;
  flex-direction:row;align-items:flex-end;gap:10px;border:0;
  background:linear-gradient(0deg,rgba(20,24,28,.38),transparent);
  color:var(--limestone);padding:70px max(16px,calc((100% - 1240px)/2 + 16px)) 26px;
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{color:var(--limestone);font-size:clamp(26px,4.2vw,58px);font-weight:300;letter-spacing:.16em;}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-meta{color:var(--limestone);opacity:.9;}
html.dvmix .home-projects .tile:nth-of-type(n):hover .tile-name{color:var(--limestone);}
@media (hover:hover){
  html.dvmix .home-projects .tile:nth-of-type(n)::before{
    inset:0 0 0 0;margin:0 auto;width:auto;height:100%;aspect-ratio:3/2;max-width:100%;
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16%,#000 84%,transparent 100%);
    mask-image:linear-gradient(90deg,transparent 0,#000 16%,#000 84%,transparent 100%);
  }
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-cta{left:50%;top:50%;}
}
@media (max-width:720px){
  html.dvmix .home-projects .tile:nth-of-type(n){height:auto;aspect-ratio:3/2;}
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{flex-direction:column;align-items:flex-start;padding:40px 16px 14px;}
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{font-size:24px;}
}

/* caption shade only under the photo, feathered like it (no grey band across the page) */
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{background:none;}
html.dvmix .home-projects .tile:nth-of-type(n)::after{
  display:block !important;content:'' !important;position:absolute;z-index:1;
  top:0;bottom:0;left:0;right:0;inset:0;margin:0 auto;width:auto;max-width:100%;height:100%;aspect-ratio:3/2;
  background:linear-gradient(0deg,rgba(20,24,28,.42) 0%,rgba(20,24,28,0) 38%);
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16%,#000 84%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 16%,#000 84%,transparent 100%);
  filter:none;opacity:1;transform:none;pointer-events:none;
}

/* caption sits inside the solid part of the photo, not in the faded sides */
html.dvmix .home-projects .tile:nth-of-type(n){--h:clamp(380px,62vh,700px);}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{
  left:0;right:0;margin:0 auto;width:100%;max-width:calc(var(--h)*1.5);
  padding:70px 17% 24px 17%;box-sizing:border-box;
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{font-size:clamp(22px,3.1vw,44px);letter-spacing:.12em;}
@media (max-width:720px){
  html.dvmix .home-projects .tile:nth-of-type(n){--h:66vw;}
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding:40px 14% 12px 14%;}
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{font-size:20px;}
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding:70px calc(var(--h)*.255) 24px calc(var(--h)*.255);}
@media (max-width:720px){
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding:40px 14px 12px 14px;}
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding:70px calc(var(--h)*.2) 22px calc(var(--h)*.2);gap:18px;}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{font-size:calc(var(--h)*.052);letter-spacing:.1em;white-space:nowrap;}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-meta{white-space:nowrap;}
@media (max-width:720px){
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding:40px 14px 12px 14px;flex-direction:row;align-items:flex-end;justify-content:space-between;}
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{font-size:18px;}
}

/* lighter, smoother edge: narrow eased fade (~8% each side) */
html.dvmix .home-projects .tile:nth-of-type(n) img,
html.dvmix .home-projects .tile:nth-of-type(n) .cover-glyph,
html.dvmix .home-projects .tile:nth-of-type(n)::after,
html.dvmix .home-projects .tile:nth-of-type(n)::before{
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,0) 0,rgba(0,0,0,.1) 1.5%,rgba(0,0,0,.3) 3%,rgba(0,0,0,.6) 5%,rgba(0,0,0,.88) 7%,#000 9%,#000 91%,rgba(0,0,0,.88) 93%,rgba(0,0,0,.6) 95%,rgba(0,0,0,.3) 97%,rgba(0,0,0,.1) 98.5%,rgba(0,0,0,0) 100%);
  mask-image:linear-gradient(90deg,rgba(0,0,0,0) 0,rgba(0,0,0,.1) 1.5%,rgba(0,0,0,.3) 3%,rgba(0,0,0,.6) 5%,rgba(0,0,0,.88) 7%,#000 9%,#000 91%,rgba(0,0,0,.88) 93%,rgba(0,0,0,.6) 95%,rgba(0,0,0,.3) 97%,rgba(0,0,0,.1) 98.5%,rgba(0,0,0,0) 100%);
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding-left:calc(var(--h)*.12);padding-right:calc(var(--h)*.12);}
@media (max-width:720px){html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding-left:14px;padding-right:14px;}}

/* title as in option 3: large, thin, wide-spaced */
html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{
  font-size:clamp(26px,calc(var(--h)*.09),58px);font-weight:300;letter-spacing:.16em;white-space:normal;line-height:1.12;
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding-left:calc(var(--h)*.1);padding-right:calc(var(--h)*.1);}
@media (max-width:720px){
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{font-size:22px;letter-spacing:.12em;}
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding-left:14px;padding-right:14px;}
}

/* smaller tiles, very soft narrow edge, tagline to the left */
html.dvmix .home-projects .tile:nth-of-type(n){--h:clamp(260px,44vh,500px);height:var(--h);}
html.dvmix .home-projects .tile:nth-of-type(n) img,
html.dvmix .home-projects .tile:nth-of-type(n) .cover-glyph,
html.dvmix .home-projects .tile:nth-of-type(n)::after,
html.dvmix .home-projects .tile:nth-of-type(n)::before{
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,0) 0,rgba(0,0,0,.03) .6%,rgba(0,0,0,.1) 1.2%,rgba(0,0,0,.25) 2%,rgba(0,0,0,.5) 3%,rgba(0,0,0,.75) 4%,rgba(0,0,0,.92) 5%,#000 6%,#000 94%,rgba(0,0,0,.92) 95%,rgba(0,0,0,.75) 96%,rgba(0,0,0,.5) 97%,rgba(0,0,0,.25) 98%,rgba(0,0,0,.1) 98.8%,rgba(0,0,0,.03) 99.4%,rgba(0,0,0,0) 100%);
  mask-image:linear-gradient(90deg,rgba(0,0,0,0) 0,rgba(0,0,0,.03) .6%,rgba(0,0,0,.1) 1.2%,rgba(0,0,0,.25) 2%,rgba(0,0,0,.5) 3%,rgba(0,0,0,.75) 4%,rgba(0,0,0,.92) 5%,#000 6%,#000 94%,rgba(0,0,0,.92) 95%,rgba(0,0,0,.75) 96%,rgba(0,0,0,.5) 97%,rgba(0,0,0,.25) 98%,rgba(0,0,0,.1) 98.8%,rgba(0,0,0,.03) 99.4%,rgba(0,0,0,0) 100%);
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{font-size:clamp(20px,calc(var(--h)*.085),42px);letter-spacing:.14em;}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding-left:calc(var(--h)*.09);padding-right:calc(var(--h)*.09);padding-top:50px;}
@media (min-width:901px){.topbar-tagline{text-align:left;margin-left:28px;}}
@media (max-width:720px){html.dvmix .home-projects .tile:nth-of-type(n){--h:60vw;height:auto;aspect-ratio:3/2;}}
html.dvmix .home-projects .tile:nth-of-type(n){--h:clamp(300px,53vh,600px);height:var(--h);}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{font-size:clamp(18px,calc(var(--h)*.07),36px);letter-spacing:.12em;}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding-left:calc(var(--h)*.07);padding-right:calc(var(--h)*.07);}
@media (max-width:720px){html.dvmix .home-projects .tile:nth-of-type(n){--h:60vw;height:auto;aspect-ratio:3/2;}}

/* ===== v3: title straddles photo edge, softer smoothstep fade, optional previews (?tone=1 ?tag=c) ===== */
html.dvmix .home-projects .tile:nth-of-type(n){height:calc(var(--h) + 56px);}
html.dvmix .home-projects .tile:nth-of-type(n) img,
html.dvmix .home-projects .tile:nth-of-type(n) .cover-glyph,
html.dvmix .home-projects .tile:nth-of-type(n)::before{
  bottom:auto;height:var(--h);
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,0.000) 0.00%,rgba(0,0,0,0.002) 0.50%,rgba(0,0,0,0.016) 1.00%,rgba(0,0,0,0.049) 1.50%,rgba(0,0,0,0.104) 2.00%,rgba(0,0,0,0.180) 2.50%,rgba(0,0,0,0.275) 3.00%,rgba(0,0,0,0.384) 3.50%,rgba(0,0,0,0.500) 4.00%,rgba(0,0,0,0.616) 4.50%,rgba(0,0,0,0.725) 5.00%,rgba(0,0,0,0.820) 5.50%,rgba(0,0,0,0.896) 6.00%,rgba(0,0,0,0.951) 6.50%,rgba(0,0,0,0.984) 7.00%,rgba(0,0,0,0.998) 7.50%,rgba(0,0,0,1.000) 8.00%,rgba(0,0,0,1.000) 92.00%,rgba(0,0,0,0.998) 92.50%,rgba(0,0,0,0.984) 93.00%,rgba(0,0,0,0.951) 93.50%,rgba(0,0,0,0.896) 94.00%,rgba(0,0,0,0.820) 94.50%,rgba(0,0,0,0.725) 95.00%,rgba(0,0,0,0.616) 95.50%,rgba(0,0,0,0.500) 96.00%,rgba(0,0,0,0.384) 96.50%,rgba(0,0,0,0.275) 97.00%,rgba(0,0,0,0.180) 97.50%,rgba(0,0,0,0.104) 98.00%,rgba(0,0,0,0.049) 98.50%,rgba(0,0,0,0.016) 99.00%,rgba(0,0,0,0.002) 99.50%,rgba(0,0,0,0.000) 100.00%),linear-gradient(180deg,#000 78%,rgba(0,0,0,0) 100%);
  mask-image:linear-gradient(90deg,rgba(0,0,0,0.000) 0.00%,rgba(0,0,0,0.002) 0.50%,rgba(0,0,0,0.016) 1.00%,rgba(0,0,0,0.049) 1.50%,rgba(0,0,0,0.104) 2.00%,rgba(0,0,0,0.180) 2.50%,rgba(0,0,0,0.275) 3.00%,rgba(0,0,0,0.384) 3.50%,rgba(0,0,0,0.500) 4.00%,rgba(0,0,0,0.616) 4.50%,rgba(0,0,0,0.725) 5.00%,rgba(0,0,0,0.820) 5.50%,rgba(0,0,0,0.896) 6.00%,rgba(0,0,0,0.951) 6.50%,rgba(0,0,0,0.984) 7.00%,rgba(0,0,0,0.998) 7.50%,rgba(0,0,0,1.000) 8.00%,rgba(0,0,0,1.000) 92.00%,rgba(0,0,0,0.998) 92.50%,rgba(0,0,0,0.984) 93.00%,rgba(0,0,0,0.951) 93.50%,rgba(0,0,0,0.896) 94.00%,rgba(0,0,0,0.820) 94.50%,rgba(0,0,0,0.725) 95.00%,rgba(0,0,0,0.616) 95.50%,rgba(0,0,0,0.500) 96.00%,rgba(0,0,0,0.384) 96.50%,rgba(0,0,0,0.275) 97.00%,rgba(0,0,0,0.180) 97.50%,rgba(0,0,0,0.104) 98.00%,rgba(0,0,0,0.049) 98.50%,rgba(0,0,0,0.016) 99.00%,rgba(0,0,0,0.002) 99.50%,rgba(0,0,0,0.000) 100.00%),linear-gradient(180deg,#000 78%,rgba(0,0,0,0) 100%);
  -webkit-mask-composite:source-in;mask-composite:intersect;
}
html.dvmix .home-projects .tile:nth-of-type(n)::after{display:none !important;}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{
  background:none;color:var(--ink);padding:0 calc(var(--h)*.07) 30px calc(var(--h)*.07);
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-name{color:var(--ink);text-shadow:none;}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-meta{color:var(--ink);opacity:.7;}
html.dvmix .home-projects .tile:nth-of-type(n):hover .tile-name{color:var(--brass);}
@media (hover:hover){html.dvmix .home-projects .tile:nth-of-type(n) .tile-cta{top:calc(var(--h)/2);}}
@media (max-width:720px){
  html.dvmix .home-projects .tile:nth-of-type(n){--h:62vw;height:calc(var(--h) + 44px);aspect-ratio:auto;}
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding:0 14px 20px;}
}
/* preview: cooler neutral palette */
html.tnc{--limestone:#F4F4F1;--limestone-dim:#EAEAE6;}
html.tnc body{background:#F4F4F1;}
/* preview: tagline centred */
@media (min-width:901px){html.tagc .topbar-tagline{text-align:center;margin:0 24px;}}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding-bottom:46px;}
@media (max-width:720px){html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding-bottom:32px;}}

/* v4: title back inside the photo, light colour (as option 3); tagline centred; small label hidden */
.home-projects .home-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0;padding:0;}
html.dvmix .home-projects{padding-top:clamp(20px,3vw,40px);}
html.dvmix .home-projects .tile:nth-of-type(n){height:var(--h);}
html.dvmix .home-projects .tile:nth-of-type(n) img,
html.dvmix .home-projects .tile:nth-of-type(n) .cover-glyph,
html.dvmix .home-projects .tile:nth-of-type(n)::before,
html.dvmix .home-projects .tile:nth-of-type(n)::after{
  bottom:0;height:100%;
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,0.000) 0.00%,rgba(0,0,0,0.002) 0.50%,rgba(0,0,0,0.016) 1.00%,rgba(0,0,0,0.049) 1.50%,rgba(0,0,0,0.104) 2.00%,rgba(0,0,0,0.180) 2.50%,rgba(0,0,0,0.275) 3.00%,rgba(0,0,0,0.384) 3.50%,rgba(0,0,0,0.500) 4.00%,rgba(0,0,0,0.616) 4.50%,rgba(0,0,0,0.725) 5.00%,rgba(0,0,0,0.820) 5.50%,rgba(0,0,0,0.896) 6.00%,rgba(0,0,0,0.951) 6.50%,rgba(0,0,0,0.984) 7.00%,rgba(0,0,0,0.998) 7.50%,rgba(0,0,0,1.000) 8.00%,rgba(0,0,0,1.000) 92.00%,rgba(0,0,0,0.998) 92.50%,rgba(0,0,0,0.984) 93.00%,rgba(0,0,0,0.951) 93.50%,rgba(0,0,0,0.896) 94.00%,rgba(0,0,0,0.820) 94.50%,rgba(0,0,0,0.725) 95.00%,rgba(0,0,0,0.616) 95.50%,rgba(0,0,0,0.500) 96.00%,rgba(0,0,0,0.384) 96.50%,rgba(0,0,0,0.275) 97.00%,rgba(0,0,0,0.180) 97.50%,rgba(0,0,0,0.104) 98.00%,rgba(0,0,0,0.049) 98.50%,rgba(0,0,0,0.016) 99.00%,rgba(0,0,0,0.002) 99.50%,rgba(0,0,0,0.000) 100.00%);mask-image:linear-gradient(90deg,rgba(0,0,0,0.000) 0.00%,rgba(0,0,0,0.002) 0.50%,rgba(0,0,0,0.016) 1.00%,rgba(0,0,0,0.049) 1.50%,rgba(0,0,0,0.104) 2.00%,rgba(0,0,0,0.180) 2.50%,rgba(0,0,0,0.275) 3.00%,rgba(0,0,0,0.384) 3.50%,rgba(0,0,0,0.500) 4.00%,rgba(0,0,0,0.616) 4.50%,rgba(0,0,0,0.725) 5.00%,rgba(0,0,0,0.820) 5.50%,rgba(0,0,0,0.896) 6.00%,rgba(0,0,0,0.951) 6.50%,rgba(0,0,0,0.984) 7.00%,rgba(0,0,0,0.998) 7.50%,rgba(0,0,0,1.000) 8.00%,rgba(0,0,0,1.000) 92.00%,rgba(0,0,0,0.998) 92.50%,rgba(0,0,0,0.984) 93.00%,rgba(0,0,0,0.951) 93.50%,rgba(0,0,0,0.896) 94.00%,rgba(0,0,0,0.820) 94.50%,rgba(0,0,0,0.725) 95.00%,rgba(0,0,0,0.616) 95.50%,rgba(0,0,0,0.500) 96.00%,rgba(0,0,0,0.384) 96.50%,rgba(0,0,0,0.275) 97.00%,rgba(0,0,0,0.180) 97.50%,rgba(0,0,0,0.104) 98.00%,rgba(0,0,0,0.049) 98.50%,rgba(0,0,0,0.016) 99.00%,rgba(0,0,0,0.002) 99.50%,rgba(0,0,0,0.000) 100.00%);
  -webkit-mask-composite:source-over;mask-composite:add;
}
html.dvmix .home-projects .tile:nth-of-type(n)::after{
  display:block !important;content:'' !important;position:absolute;z-index:1;top:0;left:0;right:0;margin:0 auto;
  width:auto;max-width:100%;aspect-ratio:3/2;pointer-events:none;
  background:linear-gradient(0deg,rgba(20,24,28,.42) 0%,rgba(20,24,28,0) 38%);
}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{color:var(--limestone);padding-bottom:22px;}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-name,
html.dvmix .home-projects .tile:nth-of-type(n):hover .tile-name{color:var(--limestone);}
html.dvmix .home-projects .tile:nth-of-type(n) .tile-meta{color:var(--limestone);opacity:.9;}
@media (hover:hover){html.dvmix .home-projects .tile:nth-of-type(n) .tile-cta{top:50%;}}
@media (max-width:720px){
  html.dvmix .home-projects .tile:nth-of-type(n){--h:62vw;height:var(--h);}
  html.dvmix .home-projects .tile:nth-of-type(n) .tile-body{padding-bottom:12px;}
}
@media (min-width:901px){.topbar-tagline{text-align:center;margin:0 24px;}}
@media (min-width:901px){
  .topbar{position:sticky;}
  .topbar-tagline{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;flex:none;max-width:60%;}
}
