/* ====== Хопіць баяцца! — Fraction Site ====== */

:root {
  --ink: #111111;
  --ink-soft: #2a2a2a;
  --muted: #6b6b6b;
  --line: #e6e3dc;
  --paper: #faf8f3;
  --paper-2: #f2efe7;
  --red: #c8102e;
  --red-dark: #8d0a1f;
  --accent: #1b1b1b;
  --max: 1180px;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--red); }

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

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand-logo {
  height: 24px;
  width: auto;
  display: block;
}
.brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-meta b {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.brand-meta small {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
}
/* Footer (dark) brand variant */
.site-footer .brand-logo { height: 44px; }
.site-footer .brand-meta b { color: #fff; }
.site-footer .brand-meta small { color: rgba(255,255,255,0.55); }
.nav a {
  margin-left: 22px;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}
.nav a.active,
.nav a:hover { color: var(--red); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--red);
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 110px 24px 90px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(200,16,46,0.08), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--line);
}
.hero .kicker {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 auto 22px;
  max-width: 880px;
}
.hero h1 em {
  font-style: italic;
  color: var(--red);
}
.hero p.lead {
  max-width: 680px;
  margin: 0 auto 30px;
  font-size: 19px;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
  transition: all .2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--red); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ---- Sections ---- */
section {
  padding: 90px 24px;
}
.container {
  max-width: var(--max);
  margin: 0 auto;
}
.section-head {
  text-align: center;
  margin-bottom: 60px;
}
.section-kicker {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 auto;
  max-width: 780px;
}
.section-head p {
  max-width: 620px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 17px;
}

/* ---- About/Intro grid ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.two-col h3 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 18px;
  font-weight: 600;
}
.two-col p { color: var(--ink-soft); margin-bottom: 14px; }

/* ---- Principle cards (home preview) ---- */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.principle-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.principle-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border-color: #d9d5cb;
}
.principle-card .num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--red);
  font-size: 20px;
  margin-bottom: 10px;
}
.principle-card h4 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 0 10px;
  line-height: 1.25;
  font-weight: 600;
}
.principle-card p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* ---- Declaration (principles.html) ---- */
.declaration {
  max-width: 760px;
  margin: 0 auto;
}
.declaration .intro {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
  margin: 0 0 70px;
  padding: 0 20px;
}
.declaration h3 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  margin: 60px 0 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.declaration p {
  color: var(--ink-soft);
  margin-bottom: 18px;
  font-size: 18px;
  line-height: 1.75;
}
.declaration .emphatic {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  color: var(--ink);
  text-align: center;
  margin: 30px 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.declaration .stanza {
  display: block;
  margin: 14px 0;
  padding-left: 20px;
  border-left: 3px solid var(--red);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
}
.declaration blockquote {
  margin: 30px 0;
  padding: 0 0 0 28px;
  border-left: 4px solid var(--red);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
}
.divider {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 60px 0;
}

/* ---- Candidates grid ---- */
.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.candidate-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.candidate-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.08);
}
.candidate-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #1b1b1b 0%, #3a3a3a 100%);
  overflow: hidden;
}
.candidate-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.candidate-photo .placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.45);
  font-family: var(--serif);
  font-size: 96px;
  font-weight: 500;
}
.candidate-info {
  padding: 22px 24px 26px;
}
.candidate-info h3 {
  font-family: var(--serif);
  font-size: 24px;
  margin: 0 0 6px;
  line-height: 1.2;
  font-weight: 600;
}
.candidate-info .role {
  color: var(--red);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}
.candidate-info p {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 16px;
}
.candidate-info .more {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.candidate-info .more:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ---- Candidate page ---- */
.candidate-hero {
  padding: 80px 24px 60px;
  background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}
.candidate-hero .container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 60px;
  align-items: center;
}
.candidate-portrait {
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #1b1b1b 0%, #3a3a3a 100%);
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
.candidate-portrait img { width: 100%; height: 100%; object-fit: cover; }
.candidate-portrait .placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.45);
  font-family: var(--serif);
  font-size: 140px;
}
.candidate-meta .kicker {
  color: var(--red);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 14px;
}
.candidate-meta h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.candidate-meta .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 520px;
}
.candidate-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.candidate-quick div {
  border-top: 2px solid var(--red);
  padding-top: 10px;
}
.candidate-quick span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.candidate-quick b {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}
.candidate-bio {
  padding: 70px 24px;
}
.candidate-bio .container {
  max-width: 760px;
}
.candidate-bio h2 {
  font-family: var(--serif);
  font-size: 30px;
  margin: 40px 0 18px;
  font-weight: 600;
}
.candidate-bio p {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 16px;
}
.candidate-bio blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  margin: 30px 0;
  padding-left: 24px;
  border-left: 3px solid var(--red);
  color: var(--ink);
}

/* ---- Contacts ---- */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 28px;
  text-align: left;
  transition: border-color .2s ease, transform .2s ease;
}
.contact-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}
.contact-card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--paper-2);
  display: grid; place-items: center;
  margin-bottom: 18px;
  font-size: 20px;
}
.contact-card h4 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 0 0 6px;
  font-weight: 600;
}
.contact-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 10px;
}
.contact-card a {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}
.contact-card a:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ---- CTA band ---- */
.cta-band {
  background: var(--ink);
  color: #fff;
  padding: 80px 24px;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.2;
  max-width: 720px;
  margin: 0 auto 22px;
}
.cta-band p {
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto 30px;
  font-size: 17px;
}
.cta-band .btn-primary {
  background: var(--red);
}
.cta-band .btn-primary:hover {
  background: #fff;
  color: var(--ink);
}
.cta-band .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.cta-band .btn-ghost:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

/* ---- Footer ---- */
.site-footer {
  background: #0e0e0e;
  color: rgba(255,255,255,0.7);
  padding: 60px 24px 30px;
  font-size: 14px;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
}
.site-footer h5 {
  color: #fff;
  font-family: var(--serif);
  font-size: 16px;
  margin: 0 0 12px;
  font-weight: 600;
}
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer .bottom {
  max-width: var(--max);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

/* ---- Back link ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.back-link:hover { color: var(--red); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px 24px; flex-direction: column; }
  .nav.open { display: flex; }
  .nav a { margin: 10px 0; }
  .nav-toggle { display: inline-flex; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .candidate-hero .container { grid-template-columns: 1fr; gap: 36px; }
  .candidate-portrait { max-width: 320px; margin: 0 auto; }
  .site-footer .container { grid-template-columns: 1fr; gap: 26px; }
  section { padding: 70px 20px; }
  .hero { padding: 80px 20px 60px; }
}
