/* tvoj-golos.by — editorial style: dark moss / warm paper, wide-tracked serif caps */

:root {
  --moss: #2f3a2f;
  --moss-deep: #1c231d;
  --on-dark: #ece6d8;
  --on-dark-muted: #b7b09f;
  --line-dark: rgba(236, 230, 216, .32);

  --paper: #ebe8e0;
  --paper-alt: #e3dfd5;
  --ink: #262624;
  --ink-muted: #6d6a62;
  --line-light: #c8c3b7;

  --accent: #8a7a5a;

  --serif: "Forum", "Cormorant Garamond", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.22, .8, .24, 1);

  --pad-x: clamp(20px, 4.5vw, 64px);
  --max: 1320px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--moss-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .3s ease, opacity .3s ease; }
a:hover { color: var(--accent); }

p { margin: 0 0 1em; }

/* ---------- slides (sections) ---------- */

.slide {
  position: relative;
  padding: 44px var(--pad-x) 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.slide > .inner { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; flex: 1; display: flex; flex-direction: column; }

.slide--dark {
  background: var(--moss) url("shadow.svg") center / cover no-repeat;
  color: var(--on-dark);
}
.slide--plain-dark { background: var(--moss-deep); color: var(--on-dark); }
.slide--light { background: var(--paper); color: var(--ink); }
.slide--light-alt { background: var(--paper-alt); color: var(--ink); }

.slide--hero { min-height: 100vh; min-height: 100svh; }
.slide--page { min-height: 78vh; min-height: 78svh; }

/* live leaf-shadow canvas (assets/komorebi.js) + curtain folds over it */
.fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.fx.is-live { opacity: 1; }
.slide--dark::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.26) 0%, rgba(0,0,0,0) 14%, rgba(0,0,0,.14) 26%, rgba(0,0,0,0) 40%,
      rgba(0,0,0,.08) 52%, rgba(0,0,0,.2) 62%, rgba(0,0,0,.03) 72%, rgba(0,0,0,.16) 84%, rgba(0,0,0,.34) 100%),
    radial-gradient(ellipse at 40% 45%, rgba(0,0,0,0) 45%, rgba(0,0,0,.45) 100%);
}

.slide-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.25;
  margin: 0 0 clamp(36px, 6vw, 72px);
}

.slide-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: auto;
  padding-top: 40px;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.slide--light .slide-foot, .slide--light-alt .slide-foot { color: var(--ink-muted); }
.slide-foot .num { font-size: 11px; letter-spacing: .06em; }
.slide-foot a { text-decoration: none; }

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 32px;
  flex-wrap: wrap;
  margin-bottom: clamp(48px, 10vh, 120px);
}
.brand {
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.nav { display: flex; gap: 8px 28px; flex-wrap: wrap; }
.nav a {
  position: relative;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 0;
  opacity: .8;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .6s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: inherit; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

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

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7.4vw, 104px);
  line-height: 1.02;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.slide--page .hero-title { font-size: clamp(36px, 6vw, 84px); }
.hero-title .ch { display: inline-block; white-space: pre; }
.hero-sub {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin: 0 0 clamp(48px, 9vh, 110px);
}
.hero-move { will-change: transform, opacity; }

/* ---------- labels & columns ---------- */

.label {
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  line-height: 1.6;
  margin: 0 0 22px;
}
.slide--light .label, .slide--light-alt .label { color: var(--ink-muted); }

.cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
.cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* the vertical rule is a pseudo-element so it can be drawn top → down */
.col {
  position: relative;
  padding: 4px clamp(14px, 1.6vw, 24px) 8px;
  font-size: 13px;
  line-height: 1.6;
  min-height: 100%;
}
.col::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--line-dark);
  transform-origin: top;
}
.slide--light .col::before, .slide--light-alt .col::before { background: var(--line-light); }
.col--plain { padding-left: 0; }
.col--plain::before { display: none; }
.col p:last-child { margin-bottom: 0; }

.col .label { min-height: 3.2em; }
.col-intro { font-size: 13px; padding-right: clamp(14px, 2vw, 32px); }
.col-intro p { max-width: 32ch; }

.cols--tall .col { min-height: 300px; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { margin: 0 0 .55em; padding-left: 14px; position: relative; }
.list li::before { content: "—"; position: absolute; left: 0; opacity: .6; }

/* doorway columns on the home hero: the whole column is the link */
.door {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding-bottom: 14px;
}
.door:hover { color: inherit; }
.door .teaser-title { transition: letter-spacing .8s var(--ease); }
.door:hover .teaser-title { letter-spacing: .16em; }
.door p { opacity: .85; }
.door .more { margin-top: auto; align-self: flex-start; }
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(236,230,216,0) 0%, rgba(236,230,216,.06) 100%);
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}
.door:hover::after { opacity: 1; }

/* ---------- person / card ---------- */

.card-media {
  aspect-ratio: 3 / 4;
  width: min(100%, 210px);
  margin: 26px 0 26px;
  overflow: hidden;
  background: #d9d5cb;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter .8s ease, transform 1.2s var(--ease);
}
.card-media--round { aspect-ratio: 1; border-radius: 50%; }
.card-media--contain { background: #dcd8ce; padding: 10px; }
.card-media--contain img { object-fit: contain; }
.card:hover .card-media img { filter: grayscale(0); transform: scale(1.03); }

.card-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.25;
  margin: 0 0 36px;
  min-height: 2.5em;
}
.card .label { min-height: 3.2em; margin-bottom: 12px; font-size: 9.5px; }
.card p, .card li { font-size: 12.5px; }

/* ---------- teasers / links ---------- */

.teaser-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 0 0 18px;
  min-height: 2.6em;
}
.teaser-title a { text-decoration: none; }
.more {
  position: relative;
  display: inline-block;
  margin-top: 8px;
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 4px;
}
.more::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
}
.more:hover { color: inherit; }
.more:hover::after, .door:hover .more::after { animation: underline-run .9s var(--ease); }
@keyframes underline-run {
  0% { transform: scaleX(1); transform-origin: right; }
  45% { transform: scaleX(0); transform-origin: right; }
  46% { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}

/* ---------- diplomas grid ---------- */

.docs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-light);
}
.doc {
  border-left: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  padding: 22px 20px 26px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.doc:hover { color: inherit; }
.doc .frame {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.doc img {
  max-height: 100%;
  width: auto;
  filter: grayscale(1) sepia(.12) contrast(1.02);
  box-shadow: 0 10px 24px rgba(30, 30, 25, .18);
  transition: filter .7s ease, transform .9s var(--ease), box-shadow .9s var(--ease);
}
.doc:hover img { filter: none; transform: translateY(-6px) rotate(-1deg); box-shadow: 0 22px 36px rgba(30, 30, 25, .22); }
.doc-title {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 0 0 8px;
}
.doc .label { margin: 0; font-size: 9.5px; }

/* ---------- reviews ---------- */

.reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.reviews .col { display: flex; justify-content: center; padding-top: 12px; padding-bottom: 12px; }
.reviews a { display: block; transition: transform .9s var(--ease); }
.reviews a:hover { transform: translateY(-6px); }
.reviews img {
  width: 100%;
  max-width: 210px;
  height: auto;
  border: 1px solid var(--line-dark);
}
.slide--light .reviews img, .slide--light-alt .reviews img { border-color: var(--line-light); }

/* ---------- contacts ---------- */

.contact-big {
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: .06em;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 6px;
  word-break: break-word;
}

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

.site-foot {
  background: var(--moss-deep);
  color: var(--on-dark-muted);
  padding: 28px var(--pad-x) 32px;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.site-foot .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}
.site-foot a { text-decoration: none; color: var(--on-dark); }
.site-foot a:hover { color: var(--on-dark-muted); }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* ---------- article (blog) ---------- */

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
}
.article-head { padding-right: clamp(16px, 3vw, 48px); }
.article-head .slide-title { margin-bottom: 24px; }
.article-body {
  border-left: 1px solid var(--line-light);
  padding-left: clamp(20px, 3vw, 48px);
  font-size: 15.5px;
  line-height: 1.75;
  max-width: 760px;
}
.back {
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
}

.photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.photos a { display: block; overflow: hidden; }
.photos img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: grayscale(.85) contrast(1.03);
  transition: filter .8s ease, transform 1.4s var(--ease);
}
.photos a:hover img { filter: none; transform: scale(1.04); }

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

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 94vw;
  max-height: 94vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(20, 24, 20, .9); }
.lightbox img { max-width: 94vw; max-height: 90vh; width: auto; height: auto; }
.lightbox[open] img { animation: lb-in .7s var(--ease); }
.lightbox[open]::backdrop { animation: fade-in .5s ease; }
@keyframes lb-in { from { opacity: 0; transform: scale(.96); filter: blur(8px); } }
@keyframes fade-in { from { opacity: 0; } }
.lightbox button {
  position: fixed;
  top: 14px; right: 18px;
  background: none;
  border: 0;
  color: var(--on-dark);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 10px;
}

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

.form { grid-column: span 3; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px clamp(16px, 2vw, 32px);
}
.fld { display: flex; flex-direction: column; }
.fld--wide { grid-column: 1 / -1; }
.fld .label { margin-bottom: 8px; }
.fld input, .fld select, .fld textarea {
  font: inherit;
  font-size: 16px;            /* 16px keeps iOS from zooming into the field */
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-light);
  border-radius: 0;
  padding: 8px 0 10px;
  outline: none;
  transition: border-color .4s ease;
  -webkit-appearance: none;
  appearance: none;
}
.fld select {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236d6a62'/%3E%3C/svg%3E") right 2px center no-repeat;
  padding-right: 20px;
}
.fld textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.fld input::placeholder, .fld textarea::placeholder { color: #a5a094; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-bottom-color: var(--ink); }
.fld input:user-invalid { border-bottom-color: #9a4a3a; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 28px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 70ch;
  cursor: pointer;
}
.consent input {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  margin: 2px 0 0;
  accent-color: var(--moss);
}

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 30px; }
.btn {
  position: relative;
  font: inherit;
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--on-dark);
  background: var(--moss);
  border: 0;
  padding: 16px 30px 15px;
  cursor: pointer;
  overflow: hidden;
  transition: background-color .5s ease, opacity .3s ease;
}
.btn:hover { background: var(--moss-deep); }
.btn[disabled] { opacity: .55; cursor: progress; }
.form-status { margin: 0; font-size: 13px; color: var(--ink-muted); }
.form-status.ok { color: var(--moss); }
.form-status.err { color: #9a4a3a; }
.form.is-sent .form-grid, .form.is-sent .consent { opacity: .45; pointer-events: none; transition: opacity .6s ease; }

/* ---------- legal pages ---------- */

.legal { max-width: 780px; font-size: 15px; line-height: 1.75; }
.legal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 44px 0 14px;
}
.legal > .label:first-child + h2 { margin-top: 20px; }
.legal p { margin-bottom: .9em; }
mark.todo { background: #f0dc9c; color: var(--ink); padding: 0 3px; }

/* =====================================================================
   Motion. html.anim is set by an inline script in <head> (never under
   prefers-reduced-motion), so without JS everything is simply visible.
   ===================================================================== */

/* the veil: first visit — a wordmark curtain; next pages — a quick dissolve */
.veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--moss-deep);
  color: var(--on-dark);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
html.anim .veil { display: flex; }
.veil-mark {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: .3em;
  text-transform: uppercase;
  padding-left: .3em;
  white-space: nowrap;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 1s ease, filter 1.2s var(--ease), letter-spacing 1.6s var(--ease);
}
.veil-bar {
  position: absolute;
  left: 50%;
  top: calc(50% + 34px);
  width: 120px;
  height: 1px;
  margin-left: -60px;
  background: var(--line-dark);
  overflow: hidden;
}
.veil-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--on-dark);
  transform: scaleX(0);
  transform-origin: left;
}
html.first.go .veil-mark { opacity: 1; filter: none; letter-spacing: .42em; }
html.first.go .veil-bar::after { transform: scaleX(1); transition: transform 1.25s cubic-bezier(.65, 0, .35, 1); }
html:not(.first) .veil-mark, html:not(.first) .veil-bar { display: none; }

/* lifting: the curtain slides up and the content animates in through it */
html.ready .veil { transform: translateY(-100%); transition: transform 1.1s cubic-bezier(.77, 0, .18, 1); }
html.ready:not(.first) .veil { transform: none; opacity: 0; transition: opacity .55s ease; }
html.ready .veil-mark { opacity: 0; transform: translateY(-30px); transition: opacity .5s ease, transform 1s var(--ease); }
html.done .veil { visibility: hidden; }

/* leaving the page: the veil comes back */
html.leaving .veil { visibility: visible; transform: none; opacity: 1; transition: opacity .38s ease; pointer-events: all; }

/* reveal units */
html.anim .rv {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(8px);
  transition:
    opacity .9s cubic-bezier(.2, .9, .3, 1) var(--d, 0ms),
    transform 1.2s var(--ease) var(--d, 0ms),
    filter 1.1s var(--ease) var(--d, 0ms);
}
html.anim .rv.in { opacity: 1; transform: none; filter: none; }

/* columns: the rule draws down while the text resolves */
html.anim .col.rv { transform: none; }
html.anim .col.rv::before { transform: scaleY(0); transition: transform 1.6s var(--ease) var(--d, 0ms); }
html.anim .col.rv.in::before { transform: scaleY(1); }

/* images open like a shutter */
html.anim .rv-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease) var(--d, 0ms); }
html.anim .rv-img.in { clip-path: inset(0 0 0 0); }

/* hero title — per character, solid early while still de-blurring */
html.anim .hero-title .ch {
  opacity: 0;
  transform: translateY(.35em);
  filter: blur(10px);
  transition:
    opacity .5s ease calc(var(--i) * 45ms + 120ms),
    transform 1.1s var(--ease) calc(var(--i) * 45ms + 120ms),
    filter 1s var(--ease) calc(var(--i) * 45ms + 120ms);
}
html.anim.ready .hero-title .ch { opacity: 1; transform: none; filter: none; }

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

@media (max-width: 1080px) {
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .cols .col-intro { grid-column: 1 / -1; padding-left: 0; }
  .cols .col-intro::before { display: none; }
  .col-intro p { max-width: 60ch; }
  .form { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .slide { padding-top: 28px; padding-bottom: 20px; }
  .slide--page { min-height: 0; }
  .topbar { flex-direction: column; align-items: flex-start; margin-bottom: 56px; }
  .nav { gap: 2px 18px; }
  .hero-title { letter-spacing: .07em; }
  .hero-sub { letter-spacing: .2em; line-height: 1.8; margin-bottom: 48px; }

  .cols, .cols--3 { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .col { padding-left: 16px; padding-right: 0; font-size: 14px; }
  .col .label, .card .label, .card-name, .teaser-title { min-height: 0; }
  .card p, .card li { font-size: 14px; }
  .card-name { margin-bottom: 14px; }
  .card-media { width: 160px; margin: 18px 0; }
  .cols--tall .col { min-height: 0; }
  .door .more { margin-top: 12px; }

  .reviews { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(-1 * var(--pad-x)); -webkit-overflow-scrolling: touch; }
  .reviews .col { flex: 0 0 72%; scroll-snap-align: start; }

  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { padding: 16px 12px 18px; }
  .doc .frame { height: 140px; }
  .doc-title { font-size: 13px; }

  .article { grid-template-columns: minmax(0, 1fr); }
  .article-head { padding-right: 0; }
  .article-body { padding-left: 16px; }
  .photos { grid-template-columns: minmax(0, 1fr); }

  .form { grid-column: auto; padding-left: 0; }
  .form::before { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .btn { width: 100%; }

  .slide-foot { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .fx { opacity: 1; }
}
