/*
Theme Name: Hristov
Theme URI: https://hristov.top/
Author: Hristov
Description: Едностраничен сайт с дълга начална страница, спокойна типография и секции за подход, принципи, екип, писма и контакт.
Version: 1.0.0
Text Domain: hristov
*/

:root {
  --paper: #f4f1eb;
  --ink: #1d1c1a;
  --body: #4e4b46;
  --muted: #8a847b;
  --line: #e3ddd4;
  --blue: #5d7eae;
  --blue-deep: #3e628f;
  --header: rgba(244, 241, 235, 0.92);
  --serif: "Libre Baskerville", "Iowan Old Style", Palatino, serif;
  --sans: "Karla", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 78px;
  padding: 0 32px;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}
.brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-deep);
  text-decoration: none;
  letter-spacing: 0.16em;
  font-size: 15px;
  font-weight: 500;
}
.brand img,
.footer-brand img,
.contact-side img {
  display: block;
  height: 36px;
  width: auto;
}
.footer-brand img { height: 28px; }
.footer-brand { display: block; }
.nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  max-width: 42%;
}
.nav a {
  color: #6f6a63;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav-toggle {
  display: none;
  grid-column: 3;
  justify-self: end;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  padding: 0;
}
.nav-toggle span,
.nav-toggle span:before,
.nav-toggle span:after {
  display: block;
  height: 1px;
  width: 22px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span:before,
.nav-toggle span:after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span:before { top: -7px; }
.nav-toggle span:after { top: 7px; }

.deck { background: var(--paper); }
.sheet {
  position: sticky;
  top: 78px;
  z-index: 1;
  min-height: calc(100vh - 78px);
  background: var(--paper);
}
.sheet:nth-child(2) { z-index: 2; }
.sheet:nth-child(3) { z-index: 3; }
.sheet:nth-child(4) { z-index: 4; }
.sheet:nth-child(5) { z-index: 5; }
.sheet:nth-child(6) { z-index: 6; }
.sheet:nth-child(7) { z-index: 7; }
.frame {
  width: min(1200px, calc(100% - 72px));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.page { min-height: calc(100vh - 78px); background: #f7f5f1; }
.page + .page { border-left: 1px solid var(--line); }
.page-plain { background: #f7f5f1; }
.page-mid { display: flex; align-items: center; }
.page-copy { padding: 64px 56px 72px; }
.page-mid .page-copy { padding-top: 48px; padding-bottom: 48px; }
.page-grid {
  background-color: #f3efe8;
  background-image:
    linear-gradient(rgba(186, 170, 156, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(186, 170, 156, 0.35) 1px, transparent 1px);
  background-size: 28px 28px;
}
.page-photo {
  background: url("assets/street.jpg?v=3") center center / cover no-repeat;
}
.page-stage {
  display: flex;
  align-items: center;
  padding: 28px;
  background: #f7f5f1;
}
.card {
  width: 100%;
  border: 1px solid #c9d3e0;
  border-radius: 12px;
  padding: 36px 40px 32px;
  background-color: rgba(246, 248, 252, 0.92);
  background-image:
    linear-gradient(rgba(168, 188, 214, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 188, 214, 0.45) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero {
  position: sticky;
  top: 78px;
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: flex-end;
  color: #f4f1eb;
  background: #111;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/hero-firefly.png") center center / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.84) 32%, rgba(0,0,0,.5) 48%, rgba(0,0,0,0) 66%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 96px));
  margin: 0 0 12vh 48px;
}
.hero h1 {
  margin: 0;
  color: #f7f4ef;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 3.4vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}
.hero h1 span { display: block; }

.page-copy h2,
.archive-wrap h2,
.card h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.lede {
  margin: 0 0 22px;
  color: #8ea0bf;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.25;
}
.lede-small { font-size: 22px; margin-bottom: 8px; }
.page-copy p,
.card p { margin: 0 0 16px; }
.page-copy p:last-child,
.card p:last-child { margin-bottom: 0; }
.sheet-archive {
  background-color: #f3efe8;
  background-image:
    linear-gradient(rgba(186, 170, 156, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(186, 170, 156, 0.28) 1px, transparent 1px);
  background-size: 28px 28px;
}
.archive-wrap {
  width: min(760px, calc(100% - 72px));
  margin: 0 auto;
  padding: 72px 0 88px;
}

.tenets { margin: 8px 0 22px; padding-left: 18px; }
.tenets li { margin: 0 0 12px; color: var(--ink); }

.team {
  display: grid;
  gap: 28px;
  margin-top: 12px;
}
.person h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}
.role {
  margin: 4px 0 10px;
  color: var(--blue);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
}

.filters {
  display: flex;
  gap: 12px;
  margin: 8px 0 18px;
}
.filters select {
  appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f6a63' stroke-width='1.2'/%3E%3C/svg%3E") right 12px center no-repeat;
  border: 1px solid #d9d2c8;
  border-radius: 4px;
  color: var(--ink);
  padding: 10px 36px 10px 12px;
}
.letters { width: 100%; border-collapse: collapse; }
.letters th, .letters td {
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}
.letters th { color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }
.letters td { color: var(--ink); }
.empty-note { color: var(--muted); }

.form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form input, .form textarea {
  width: 100%;
  border: 1px solid #d5cec4;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}
.form input:focus, .form textarea:focus { border-color: var(--blue-deep); }
.form textarea { min-height: 110px; resize: vertical; }
.form button, .text-link {
  justify-self: stretch;
  border: 0;
  border-radius: 2px;
  background: #1d1c1a;
  color: #fff;
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
}
.side-brand {
  letter-spacing: 0.16em;
  color: var(--blue-deep);
  font-size: 15px;
}
.contact-side a { color: var(--ink); text-decoration: none; }
.hp { position: absolute; left: -9999px; }
.notice {
  margin: 0 0 12px;
  color: var(--blue-deep);
}
.contact-meta { margin-top: 28px; color: var(--ink); }
.contact-meta a { color: var(--blue-deep); text-decoration: none; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 36px 40px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.site-footer a { color: var(--muted); text-decoration: none; }

.page-wrap { width: min(760px, calc(100% - 48px)); margin: 48px auto 80px; }
section[id] { scroll-margin-top: 78px; }
.trp-floating-switcher { display: none !important; }
.page-wrap h1 { font-family: var(--serif); font-weight: 400; color: var(--ink); }

@media (max-width: 1100px) {
  .brand { position: static; transform: none; }
  .site-header { justify-content: space-between; }
  .nav { max-width: none; }
}
@media (max-width: 860px) {
  .site-header { padding: 0 18px; }
  .brand { position: static; transform: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    display: none;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 0;
    padding: 8px 18px 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-top: 1px solid var(--line); }
  .hero-inner { width: calc(100% - 40px); margin: 0 20px 10vh; }
  .hero h1 { font-size: clamp(28px, 7.6vw, 40px); }
  .sheet { position: relative; top: auto; min-height: 0; }
  .sheet.hero { min-height: calc(100vh - 78px); }
  .frame, .page { min-height: 0; }
  .frame { width: 100%; display: block; border: 0; }
  .page + .page { border-left: 0; border-top: 1px solid var(--line); }
  .page-photo { min-height: 280px; }
  .page-copy, .card { padding: 36px 22px; }
  .page-stage { padding: 18px; }
  .form-row { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; padding: 24px 22px 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { position: relative; top: auto; }
}
