/* ============================================================
   БРИАПРОДЖЕКТ — идейна версия
   Design tokens + base + components
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Design tokens ---------- */
:root {
  /* Palette — brand-aligned: petrol teal + cream on warm off-white */
  --paper:       #F5F1EA;   /* main surface (warm off-white) */
  --paper-2:     #FFFFFF;   /* clean sheets */
  --ink:         #141C1F;   /* primary text — deep near-black with teal undertone */
  --ink-2:       #2A383D;   /* secondary heading */
  --muted:       #68726F;   /* body muted / captions */
  --line:        rgba(20, 28, 31, 0.12);
  --line-strong: rgba(20, 28, 31, 0.28);
  --accent:      #2D6878;   /* petrol teal — main brand accent */
  --accent-ink:  #1D4852;   /* deep petrol — hover / darker usage */
  --accent-2:    #C9BE6B;   /* muted cream-yellow — secondary brand accent */
  --dark:        #0F2A32;   /* inverted surface (deep petrol) */
  --dark-ink:    #EDE7D1;   /* on-dark text (cream-tinted) */

  /* Type */
  --font-serif: "Noto Serif Display", "Noto Serif", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --page-pad: clamp(16px, 4vw, 48px);
  --max-w:    1320px;
  --gutter:   clamp(16px, 2vw, 28px);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.section {
  padding-block: clamp(56px, 9vw, 128px);
}
.section--tight  { padding-block: clamp(40px, 6vw, 72px); }
.section--dark   { background: var(--dark); color: var(--dark-ink); }
.section--paper2 { background: var(--paper-2); }

/* ---------- Typography scale ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.display {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(40px, 7.2vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.display em {
  font-style: italic;
  color: var(--accent);
}
h1, .h1 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(32px, 4.8vw, 64px); line-height: 1.08; letter-spacing: -0.015em; }
h2, .h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -0.01em; }
h3, .h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; }
h4, .h4 { font-family: var(--font-sans);  font-weight: 600; font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; }

.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }

/* Links */
a.link {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
a.link:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--paper-2); }
.btn--light { border-color: var(--dark-ink); color: var(--dark-ink); }
.btn--light:hover { background: var(--dark-ink); color: var(--dark); }
.btn .arrow { display: inline-block; transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 241, 234, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 104px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo__full {
  display: block;
  height: 72px;
  width: auto;
  max-width: 320px;
}
.site-header .logo__full {
  height: 80px;
}
.site-footer .logo__full {
  height: 120px;
  max-width: 420px;
  /* Логото е за светъл фон; на тъмен фон го леко просветляваме */
  filter: brightness(1.02);
}
/* Legacy mark+text lockup — запазено за съвместимост */
.logo__mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
}
.logo__mark img,
.logo__mark svg {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.logo__text {
  display: flex; flex-direction: column; line-height: 1;
}
.logo__name {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 0.01em;
}
.logo__sub {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.nav__links {
  display: flex; gap: clamp(14px, 2.2vw, 32px);
  align-items: center;
}
.nav__links a {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  padding: 8px 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.nav__links a:hover { color: var(--ink); border-color: var(--ink); }
.nav__links a.is-active { color: var(--ink); border-color: var(--accent); }
.nav__cta { margin-left: 12px; padding: 10px 16px; font-size: 12.5px; }

.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  align-items: center; justify-content: center;
}
.nav__toggle span {
  width: 22px; height: 1.5px; background: var(--ink);
  position: relative;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 1.5px; background: var(--ink);
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after  { top:  7px; }

@media (max-width: 880px) {
  .site-header { z-index: 2000; isolation: isolate; }
  /* Backdrop — dims page behind the open menu */
  .nav__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26, 24, 20, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
    z-index: 1998;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .nav__backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }
  .nav__links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(82vw, 380px);
    height: 100vh;
    z-index: 1999;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 96px var(--page-pad) 32px;
    gap: 18px;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    border-left: 1px solid var(--line);
    overflow-y: auto;
    box-shadow: -16px 0 32px rgba(26, 24, 20, 0.12);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a { font-size: 22px; font-family: var(--font-serif); }
  .nav__toggle { display: inline-flex; position: relative; z-index: 2001; }
  .nav__cta { margin-left: 0; }
  /* Prevent body scroll when menu is open */
  body.menu-open { overflow: hidden; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-block: clamp(80px, 12vw, 160px) clamp(60px, 8vw, 96px);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
}
.hero__eyebrow { margin-bottom: 24px; }
.hero__title   { margin-bottom: 28px; }
.hero__lead    { margin-bottom: 40px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.stat {
  background: var(--paper);
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat__num {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat__num sup {
  font-size: 0.4em;
  vertical-align: top;
  color: var(--accent);
  margin-left: 2px;
}
.stat__label {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

/* ============================================================
   Section header
   ============================================================ */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 64px);
}
@media (max-width: 880px) { .section-head { grid-template-columns: 1fr; } }
.section-head__title { }
.section-head__desc  { color: var(--ink-2); }

/* ============================================================
   Projects grid (featured on home)
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}
.project {
  position: relative;
  background: var(--paper-2);
  overflow: hidden;
  isolation: isolate;
}
.project__visual {
  position: relative;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #cfc5b6 0%, #a79a87 100%);
  overflow: hidden;
}
.project__visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20,19,17,.6) 100%);
  opacity: 0; transition: opacity .35s var(--ease);
}
.project:hover .project__visual::after { opacity: 1; }
.project__visual img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease);
}
.project:hover .project__visual img { transform: scale(1.04); }

.project__meta {
  padding: 18px 20px 22px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.project__title {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.project__tag {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 4px;
}
.project__loc {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

/* Variable spans for editorial rhythm */
.project--wide  { grid-column: span 12; }
.project--half  { grid-column: span 6; }
.project--third { grid-column: span 4; }
.project--two-thirds { grid-column: span 8; }
@media (max-width: 880px) {
  .project--wide, .project--half, .project--third, .project--two-thirds {
    grid-column: span 12;
  }
}

/* Placeholder visuals — tonal teal/cream gradients per typology */
.ph-residential { background: linear-gradient(135deg, #3e7c8a 0%, #1D4852 100%); }
.ph-public      { background: linear-gradient(135deg, #5a7076 0%, #23404a 100%); }
.ph-commercial  { background: linear-gradient(135deg, #7a8a7e 0%, #2f5560 100%); }
.ph-industrial  { background: linear-gradient(135deg, #4d6268 0%, #162a30 100%); }
.ph-interior    { background: linear-gradient(135deg, #b9b590 0%, #706a44 100%); }
.ph-master      { background: linear-gradient(135deg, #6e8288 0%, #2a4850 100%); }
.ph-mixed       { background: linear-gradient(135deg, #9aa48a 0%, #4d5a52 100%); }
.ph-renovation  { background: linear-gradient(135deg, #c2b88c 0%, #5f5a38 100%); }
.ph-landscape   { background: linear-gradient(135deg, #7a8f80 0%, #33473c 100%); }
.ph-religious   { background: linear-gradient(135deg, #8d8069 0%, #3e3522 100%); }

/* Text-only project cards (ПУП, OУП, проекти без рендери) */
.project--text .project__visual {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #2D6878 0%, #1D4852 100%);
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  color: var(--paper);
}
.project--text.project--half .project__visual,
.project--text.project--two-thirds .project__visual {
  aspect-ratio: 16/9;
}
.project--text .project__visual::after {
  background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,.22) 100%);
}
.tcard__kind {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 220, 138, .85); /* cream accent */
  font-weight: 500;
}
.tcard__title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-top: auto;
  color: #F5F1EA;
}
.tcard__meta {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(245, 241, 234, .75);
}
.tcard__client {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(232, 220, 138, .75);
  font-style: italic;
}
/* Variant tint for industrial/commercial text cards so they don't all look the same */
.project--text.variant-cream .project__visual {
  background: linear-gradient(135deg, #C9BE6B 0%, #9B9249 100%);
  color: #1D2428;
}
.project--text.variant-cream .tcard__kind { color: rgba(29, 72, 82, .78); }
.project--text.variant-cream .tcard__title { color: #141311; }
.project--text.variant-cream .tcard__meta { color: rgba(29, 36, 40, .72); }
.project--text.variant-cream .tcard__client { color: rgba(29, 72, 82, .85); }

.project--text.variant-deep .project__visual {
  background: linear-gradient(135deg, #1D4852 0%, #0D252C 100%);
}
/* Text cards: simplify the bottom meta bar since info is inside the visual */
.project--text .project__meta {
  padding: 14px 20px 16px;
  border-top: 1px solid rgba(29, 72, 82, .08);
}
.project--text .project__title {
  font-size: 15px;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.project--text .project__loc { display: none; }

.ph-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 20px;
  font-family: var(--font-serif);
  font-size: 28px;
  color: rgba(255,255,255,.88);
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
  letter-spacing: -0.01em;
}

/* ============================================================
   Geography section (typographic)
   ============================================================ */
.geo {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 980px) { .geo { grid-template-columns: 1fr; } }

.geo__regions {
  display: grid;
  gap: clamp(20px, 2.4vw, 32px);
}
.geo__region {
  padding-top: clamp(16px, 1.8vw, 22px);
  border-top: 1px solid var(--line);
}
.geo__region:first-child {
  padding-top: 0;
  border-top: none;
}
.geo__region-label {
  font-family: var(--font-sans);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.geo__region-cities {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 0;
}
.geo__region-cities strong {
  font-weight: 500;
  color: var(--accent);
  font-style: italic;
}
.geo__office-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  vertical-align: 3px;
}
.geo__stats { display: grid; gap: 32px; }
.geo__stat {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.geo__stat .big {
  font-family: var(--font-serif);
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 1;
}
.geo__stat .label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   Services (phases)
   ============================================================ */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
@media (max-width: 980px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .services { grid-template-columns: 1fr; } }

.service {
  background: var(--paper-2);
  padding: 32px 28px;
  border-top: 3px solid var(--ink);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 240px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(20,19,17,.18); }
.service__phase {
  font-family: var(--font-serif);
  color: var(--accent);
  font-size: 18px;
}
.service__title { font-family: var(--font-serif); font-size: 24px; line-height: 1.15; }
.service__desc { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.service__list { display: grid; gap: 6px; margin-top: 8px; }
.service__list li {
  font-size: 13.5px;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
}
.service__list li::before {
  content: "";
  position: absolute; left: 0; top: 10px;
  width: 6px; height: 1px; background: var(--accent);
}

/* ============================================================
   Numbers strip
   ============================================================ */
.numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(233,228,219,.14);
}
@media (max-width: 780px) { .numbers { grid-template-columns: repeat(2, 1fr); } }

.number {
  padding: 40px 28px;
  border-right: 1px solid rgba(233,228,219,.14);
  border-bottom: 1px solid rgba(233,228,219,.14);
}
.number:last-child { border-right: 0; }
.number__n {
  font-family: var(--font-serif);
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.number__l {
  margin-top: 14px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(233,228,219,.65);
}

/* ============================================================
   Journal teaser
   ============================================================ */
.journal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
@media (max-width: 980px) { .journal { grid-template-columns: 1fr; } }

.post {
  display: block;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  transition: border-color .2s var(--ease);
}
.post:hover { border-color: var(--ink); }
.post__meta {
  display: flex; gap: 16px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.post__meta .dot { color: var(--accent); }
.post__title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  transition: color .2s var(--ease);
}
.post:hover .post__title { color: var(--accent); }
.post__excerpt { color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding-block: clamp(64px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
@media (max-width: 880px) { .cta-band { grid-template-columns: 1fr; } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--dark);
  color: var(--dark-ink);
  padding-block: clamp(56px, 7vw, 80px);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(233,228,219,.14);
}
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__logo { margin-bottom: 18px; }
.footer__logo .logo__name { color: var(--dark-ink); }
.footer__logo .logo__sub  { color: rgba(237,231,209,.6); }

.footer__about { color: rgba(233,228,219,.78); font-size: 14px; max-width: 36ch; }

.footer__h {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(233,228,219,.55);
  margin-bottom: 16px;
}
.footer__links { display: grid; gap: 10px; }
.footer__links a { color: var(--dark-ink); font-size: 14.5px; }
.footer__links a:hover { color: var(--paper); }

.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  font-size: 12.5px;
  color: rgba(233,228,219,.55);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   Sub-page hero
   ============================================================ */
.page-hero {
  padding-block: clamp(80px, 10vw, 140px) clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.page-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}
@media (max-width: 880px) { .page-hero__grid { grid-template-columns: 1fr; } }
.page-hero__eyebrow { margin-bottom: 16px; }
.page-hero__title { margin-bottom: 24px; }
.page-hero__lead { color: var(--ink-2); }

/* ============================================================
   Studio page
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 5vw, 96px);
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }

.prose p { font-size: 17px; line-height: 1.65; color: var(--ink-2); margin-bottom: 20px; max-width: 62ch; }
.prose p.first-para::first-letter {
  font-family: var(--font-serif);
  float: left;
  font-size: 4.6em;
  line-height: 0.9;
  padding: 8px 12px 0 0;
  color: var(--accent);
}

.values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 640px) { .values { grid-template-columns: 1fr; } }
.value {
  background: var(--paper-2);
  padding: 28px 24px;
  min-height: 180px;
}
.value__n {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.value__title {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.2;
  margin-top: 6px;
  margin-bottom: 10px;
}
.value__desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }

/* ---------- Process steps ---------- */
.process {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.step {
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: 24px;
  padding: 32px 28px;
  background: var(--paper-2);
  align-items: start;
}
@media (max-width: 720px) { .step { grid-template-columns: 1fr; gap: 10px; } }
.step__n { font-family: var(--font-serif); font-size: 32px; color: var(--accent); line-height: 1; }
.step__t { font-family: var(--font-serif); font-size: 22px; line-height: 1.2; }
.step__d { color: var(--ink-2); font-size: 15px; line-height: 1.6; }

/* ============================================================
   Clients page — testimonials & references
   ============================================================ */
.testimonials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2vw, 32px);
}
@media (max-width: 720px) { .testimonials { grid-template-columns: 1fr; } }
.testimonial {
  margin: 0;
  padding: 32px;
  background: var(--paper);
  border-left: 2px solid var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}
.testimonial blockquote {
  margin: 0 0 20px 0;
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.45;
  color: var(--ink);
}
.testimonial blockquote p { margin: 0; }
.testimonial figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.testimonial__name { font-weight: 500; font-size: 14.5px; color: var(--ink); letter-spacing: 0.01em; }
.testimonial__role { font-size: 13px; color: var(--muted); }
.testimonial--placeholder {
  background: repeating-linear-gradient(45deg,
    rgba(45,104,120,0.03) 0 10px,
    rgba(45,104,120,0.06) 10px 20px);
  border-left-color: var(--line-strong);
  border-left-style: dashed;
}
.testimonial--placeholder blockquote,
.testimonial--placeholder .testimonial__name,
.testimonial--placeholder .testimonial__role { color: var(--muted); font-style: italic; }

.refs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 900px) { .refs { grid-template-columns: repeat(2, 1fr); } }
.ref {
  background: var(--paper);
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}
.ref--placeholder {
  background: repeating-linear-gradient(45deg,
    rgba(45,104,120,0.03) 0 10px,
    rgba(45,104,120,0.06) 10px 20px);
}
.ref--placeholder span {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: italic;
}

/* ============================================================
   Projects page — filters + full grid
   ============================================================ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.filter {
  padding: 8px 14px;
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  transition: all .2s var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter .count {
  color: var(--muted);
  font-size: 11px;
  margin-left: 6px;
}
.filter.is-active .count { color: rgba(245,241,234,.6); }

/* ============================================================
   Contact page
   ============================================================ */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 80px);
}
@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } }

.contact__info { display: grid; gap: 28px; align-content: start; }
.contact__block h4 { margin-bottom: 8px; color: var(--muted); }
.contact__block p { font-size: 16.5px; color: var(--ink-2); }
.contact__block a { border-bottom: 1px solid var(--line); }
.contact__block a:hover { border-color: var(--accent); color: var(--accent); }

.form { display: grid; gap: 18px; background: var(--paper-2); padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); }
.form__row { display: grid; gap: 6px; }
.form__row--split { grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form__row--split { grid-template-columns: 1fr; } }

.form label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.form input, .form select, .form textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 2px;
  font-size: 16px;
  outline: 0;
  transition: border-color .2s var(--ease);
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); }
.form textarea { min-height: 120px; resize: vertical; }

.form__submit { margin-top: 8px; justify-self: start; }

.form__note { font-size: 13px; color: var(--muted); }

/* ============================================================
   Utilities
   ============================================================ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin-block: clamp(32px, 4vw, 56px);
}

.hr-accent {
  width: 56px; height: 2px; background: var(--accent); margin-bottom: 24px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Print */
@media print {
  .site-header, .site-footer, .nav__toggle, .btn, .cookie-banner { display: none; }
  body { background: #fff; color: #000; }
}

/* ============================================================
   Legal pages (Privacy / Cookies) — prose typography
   ============================================================ */
.legal {
  max-width: 72ch;
  margin-inline: auto;
}
.legal h2 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}
.legal h2:first-child { margin-top: 0; }
.legal h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.legal p strong { color: var(--ink); font-weight: 600; }
.legal ul {
  margin: 0 0 18px 0;
  padding-left: 0;
  list-style: none;
}
.legal ul li {
  position: relative;
  padding-left: 22px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.legal ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 13px;
  width: 10px; height: 1px;
  background: var(--accent);
}
.legal a { color: var(--accent-ink); border-bottom: 1px solid var(--line-strong); }
.legal a:hover { color: var(--accent); border-color: var(--accent); }
.legal__meta {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

/* ============================================================
   Contact form — GDPR consent checkbox
   ============================================================ */
.form__consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 8px;
  padding: 14px 16px;
  background: rgba(45, 104, 120, 0.04);
  border-left: 2px solid var(--accent);
}
.form__consent input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}
.form__consent label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  cursor: pointer;
}
.form__consent a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form__consent a:hover { color: var(--accent); }

/* ============================================================
   Cookie banner — informational (bottom-right card)
   ============================================================ */
.cookie-banner {
  position: fixed;
  left: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 100;
  max-width: 380px;
  padding: 20px 22px 18px;
  background: var(--dark);
  color: var(--dark-ink);
  border-left: 3px solid var(--accent-2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-banner__title {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--dark-ink);
}
.cookie-banner__text {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(237, 231, 209, 0.78);
  margin-bottom: 14px;
}
.cookie-banner__text a {
  color: var(--accent-2);
  border-bottom: 1px solid rgba(201, 190, 107, 0.4);
  padding-bottom: 1px;
}
.cookie-banner__text a:hover { border-color: var(--accent-2); }
.cookie-banner__actions {
  display: flex; gap: 10px; align-items: center; justify-content: flex-end;
}
.cookie-banner__btn {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 9px 16px;
  border: 1px solid var(--accent-2);
  color: var(--dark-ink);
  background: var(--accent-2);
  color: var(--dark);
  transition: background .2s var(--ease);
}
.cookie-banner__btn:hover { background: var(--dark-ink); border-color: var(--dark-ink); }
@media (max-width: 520px) {
  .cookie-banner {
    left: 12px; right: 12px; bottom: 12px; max-width: none;
  }
}

/* ========== Diploma project block ========== */
.diploma__head { max-width: 960px; margin-bottom: 48px; }
.diploma__head .eyebrow { letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px; font-weight: 500; }
.diploma__head .display { color: var(--dark-ink); letter-spacing: -0.01em; }
.diploma__head .lead { color: var(--dark-ink); opacity: 0.82; font-size: 17px; line-height: 1.65; }

.diploma__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  margin-bottom: 48px;
}
.diploma__fig { margin: 0; overflow: hidden; display: flex; flex-direction: column; }
.diploma__fig img {
  width: 100%; height: 100%; object-fit: cover;
  flex: 1 1 auto;
  display: block;
  filter: saturate(0.95);
  transition: filter .4s var(--ease), transform .8s var(--ease);
}
.diploma__fig:hover img { filter: saturate(1.02); transform: scale(1.015); }
.diploma__fig--main { grid-column: 1 / 2; grid-row: 1 / 3; }
.diploma__fig--main img { aspect-ratio: 3 / 2; }
.diploma__fig--plan { grid-column: 2 / 3; grid-row: 1 / 2; }
.diploma__fig--detail { grid-column: 2 / 3; grid-row: 2 / 3; }
.diploma__fig figcaption {
  font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dark-ink); opacity: 0.6; padding-top: 12px;
}

.diploma__facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(237, 231, 209, 0.18);
}
.diploma__fact { display: flex; flex-direction: column; gap: 6px; }
.diploma__fact-label {
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); opacity: 0.85;
}
.diploma__fact-value {
  font-size: 15px; line-height: 1.4; color: var(--dark-ink);
}

@media (max-width: 860px) {
  .diploma__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .diploma__fig--main, .diploma__fig--plan, .diploma__fig--detail {
    grid-column: 1; grid-row: auto;
  }
  .diploma__facts { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 520px) {
  .diploma__facts { grid-template-columns: 1fr; }
}
