/* ==========================================================================
   Тобота Юлія Сергіївна — адвокат. Базові стилі сайту.
   ========================================================================== */

:root {
  --bg:        #FBF9F6;
  --bg-alt:    #F3EFE8;
  --surface:   #FFFFFF;
  --ink:       #1C1B19;
  --ink-soft:  #45413C;
  --muted:     #6E6861;
  --line:      #E3DCD1;
  --accent:    #7A2231;
  --accent-2:  #9C3245;
  --accent-bg: #F6EDEE;
  --shadow:    0 1px 2px rgba(28,27,25,.04), 0 8px 28px rgba(28,27,25,.06);

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans:  "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1120px;
  --prose: 44rem;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-feature-settings: "liga" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }

p { margin: 0 0 1.15em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.prose { max-width: var(--prose); }
.center { text-align: center; }
.muted { color: var(--muted); }

.eyebrow {
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.rule { width: 56px; height: 2px; background: var(--accent); border: 0; margin: 0 0 1.6rem; }
.rule.is-center { margin-inline: auto; }

/* --------------------------------------------------------------- Header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,249,246,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

.brand { display: flex; flex-direction: column; line-height: 1.2; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__name { font-family: var(--serif); font-size: 1.32rem; font-weight: 600; letter-spacing: .01em; }
.brand__role { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  color: var(--ink-soft);
  font-size: .93rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 1.5px; background: var(--ink); content: ""; position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top:  6px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    inset: 74px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
}

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 13px 26px;
  border-radius: var(--r);
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .01em;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: #fff;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }

/* ------------------------------------------------------------------- Hero */

.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 7vw, 88px); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero h1 { margin-bottom: .35em; }
.hero__lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 36rem; }
.hero__role {
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1.6rem;
}

.portrait {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
/* --focus керує тим, яка частина фото лишається видимою після обрізання
   під формат рамки (4:5). 0% — верх фото, 100% — низ. Задається у style="--focus:…". */
.portrait img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center var(--focus, 20%);
}
.portrait--round { aspect-ratio: 1; border-radius: 50%; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 340px; }
}

/* ------------------------------------------------------------------ Quote */

.quote {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  line-height: 1.38;
  font-style: italic;
  color: var(--ink);
  margin: 0;
}
.quote__band {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
  padding: clamp(48px, 7vw, 84px) 0;
  text-align: center;
}
.quote__band .quote { max-width: 46rem; margin-inline: auto; }
.quote__author { margin-top: 1.4rem; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* --------------------------------------------------------------- Sections */

.section { padding: clamp(56px, 8vw, 96px) 0; }
/* Щоб закріплена шапка не перекривала секцію, на яку веде посилання-якір. */
.section[id] { scroll-margin-top: 92px; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { max-width: 42rem; margin-bottom: clamp(32px, 5vw, 52px); }
.section__head.is-center { margin-inline: auto; text-align: center; }
.section__head.is-center .rule { margin-inline: auto; }

/* ------------------------------------------------------------------- Grid */

.cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card:hover { border-color: #CFC4B5; transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .45em; }
.card p { color: var(--ink-soft); font-size: .97rem; margin-bottom: 0; }
.card__num {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: .08em;
}
.card ul { margin: .9rem 0 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: .95rem; }
.card ul li { margin-bottom: .35rem; }

/* ------------------------------------------------------------ Публікації */

.posts { display: grid; gap: 0; border-top: 1px solid var(--line); }

.post-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.post-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .45rem;
  margin: 0;
}

/* Дата публікації з іконкою календаря. Іконка — вбудований SVG, щоб
   не тягнути окремий файл і не залежати від шрифтових наборів. */
.post-date {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: none;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.post-date::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236E6861' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.2' y='3.4' width='11.6' height='10.4' rx='1.4'/%3E%3Cpath d='M2.2 6.8h11.6M5.4 2v2.7M10.6 2v2.7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.post-item h3 { margin-bottom: .4em; font-size: clamp(1.2rem, 2.1vw, 1.45rem); }
.post-item h3 a { color: var(--ink); }
.post-item h3 a:hover { color: var(--accent); }
.post-item p { color: var(--ink-soft); font-size: .97rem; margin-bottom: .7em; }
.post-item__more { font-size: .9rem; font-weight: 600; }

@media (max-width: 680px) {
  .post-item { grid-template-columns: 1fr; gap: 10px; }
  .post-item__meta { padding-top: 0; flex-direction: row; align-items: center; gap: 16px; }
}

/* ------------------------------------------------------------ Стаття */

.article { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.article__header { max-width: var(--prose); margin-bottom: clamp(28px, 4vw, 44px); }
.article__header h1 { font-size: clamp(1.95rem, 4vw, 2.85rem); }
.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.2rem;
}
.article__meta .post-date { font-size: .8rem; }

.article__body { max-width: var(--prose); font-size: 1.04rem; }
.article__body h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  margin-top: 2.4em;
  margin-bottom: .55em;
  padding-top: .2em;
}
.article__body h2:first-child { margin-top: 0; }
.article__body p { color: var(--ink-soft); }
.article__body > p:first-of-type { font-size: 1.12rem; color: var(--ink); }
.article__body ul { padding-left: 1.2rem; color: var(--ink-soft); }
.article__body li { margin-bottom: .6rem; }
.article__body strong { color: var(--ink); font-weight: 600; }

.callout {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  padding: 22px 26px;
  margin: 2em 0;
  border-radius: 0 var(--r) var(--r) 0;
}
.callout p { margin-bottom: 0; color: var(--ink); }

.signature {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
}
.signature span { display: block; font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

.back-link { display: inline-block; font-size: .9rem; font-weight: 600; margin-bottom: 1.6rem; }

.article-nav {
  max-width: var(--prose);
  margin-top: 3rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: .93rem;
  font-weight: 600;
}

/* ------------------------------------------------------------- Disclaimer */

.disclaimer {
  max-width: var(--prose);
  margin-top: 2.5rem;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
}
.disclaimer p { margin-bottom: 0; }

/* --------------------------------------------------------------- Контакти */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list li:first-child { padding-top: 0; }
.contact-list dt, .contact-list__label {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
.contact-list__value { font-size: 1.08rem; color: var(--ink); font-weight: 500; }
.contact-list__value a { color: var(--ink); border-bottom: 1px solid var(--line); }
.contact-list__value a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.contact-list__note { font-size: .88rem; color: var(--muted); line-height: 1.55; margin: .5rem 0 0; }
.contact-list__note:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- Свідоцтво */

.certificate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 2.4rem;
}
@media (max-width: 760px) { .certificate { grid-template-columns: 1fr; gap: 20px; } }

.cert-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 14px 4px;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease;
}
.cert-card:hover { border-color: #CFC4B5; transform: translateY(-2px); }
.cert-card__frame { display: block; overflow: hidden; border-radius: 2px; background: var(--bg-alt); }
.cert-card img { width: 100%; height: auto; transition: transform .35s ease; }
.cert-card__frame:hover img { transform: scale(1.02); }
.cert-card figcaption {
  margin: 12px 0 10px;
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.cert-foot__hint { margin: 1.7rem 0 0; font-size: .88rem; color: var(--muted); }

/* Посилання на документ (скан-копія свідоцтва тощо) */
.doc-link { font-weight: 600; display: inline-flex; align-items: baseline; gap: .4em; }
.doc-link::before {
  content: "";
  flex: none;
  width: 13px; height: 16px;
  background: var(--accent);
  clip-path: polygon(0 0, 68% 0, 100% 26%, 100% 100%, 0 100%);
  transform: translateY(2px);
}

.todo {
  display: inline-block;
  background: #FFF6D6;
  border: 1px dashed #D9B23A;
  color: #6B5312;
  border-radius: 3px;
  padding: 1px 8px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.cta-band {
  background: var(--ink);
  color: #F3EFE8;
  padding: clamp(48px, 7vw, 84px) 0;
  text-align: center;
}
.cta-band h2 { color: #FBF9F6; }
.cta-band p { color: #BFB7AC; max-width: 38rem; margin-inline: auto; }
.cta-band .btn { background: var(--accent); border-color: var(--accent); }
.cta-band .btn--ghost { background: transparent; border-color: #5A554E; color: #F3EFE8; }
.cta-band .btn--ghost:hover { background: #F3EFE8; color: var(--ink); border-color: #F3EFE8; }
.cta-band .btn-row { justify-content: center; }

/* --------------------------------------------------------------- Timeline */

.timeline { max-width: var(--prose); margin-top: 2.5rem; }
.timeline__item { position: relative; padding-left: 34px; padding-bottom: 2.6rem; border-left: 1px solid var(--line); }
.timeline__item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline__item::before {
  content: ""; position: absolute; left: -5px; top: .55rem;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.timeline__item h3 { margin-bottom: .5em; }
.timeline__item p { color: var(--ink-soft); }
.timeline__item p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- Footer */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 52px 0 36px;
  font-size: .92rem;
  color: var(--muted);
}
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { font-family: var(--sans); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }
.site-footer__bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }

/* ------------------------------------------------------------------ Print */

@media print {
  .site-header, .site-footer, .cta-band, .btn-row, .article-nav { display: none; }
  body { background: #fff; font-size: 12pt; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
