/*
  Общие стили для всех страниц sereda-family.com.
  Источник — shared/site.css; при сборке он копируется в папку каждого сайта (см. build.sh).
  Акцентные цвета страница может переопределить в своём :root (см. dmitry/index.html).
*/
:root {
  /* Палитра взята из семейной иллюстрации */
  --bg: #f7f1ea;          /* тёплый бумажный фон */
  --ink: #4a1c1c;         /* тёмно-бордовые контуры */
  --muted: #8a6a66;
  --accent: #4a4e9c;      /* выделенное слово в заголовке */
  --highlight: #f0892a;   /* приветствие, подчёркивание, точка статуса */
  --glow-1: #a9dceb;      /* мазок слева за картинкой */
  --glow-2: var(--highlight); /* мазок справа за картинкой */
  --card: #fffffb;        /* подложка под картинкой */
  --pill-bg: #fffdf9;
  --pill-line: #e6d9cf;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1715;
    --ink: #f6eee6;
    --muted: #b8a9a2;
    --accent: #9aa0ff;
    --pill-bg: #25201d;
    --pill-line: #3a322d;
  }
}

* { box-sizing: border-box; margin: 0; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 16px 24px;
  overflow-x: hidden;
}

main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Иллюстрация; пропорции берутся из атрибутов width/height у <img> */
.portrait {
  position: relative;
  width: min(100%, 520px);
  animation: rise .9s cubic-bezier(.2,.7,.2,1) both;
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(74, 28, 28, .06), 0 18px 50px rgba(74, 28, 28, .14);
}
/* Декоративные «мазки» за картинкой */
.portrait::before,
.portrait::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .45;
}
.portrait::before { width: 45%; height: 45%; left: -6%; top: 18%; background: var(--glow-1); }
.portrait::after  { width: 40%; height: 40%; right: -4%; bottom: 8%; background: var(--glow-2); opacity: .22; }

@media (prefers-color-scheme: dark) {
  .portrait img { box-shadow: 0 20px 60px rgba(0,0,0,.5); }
}

/* Монограмма — для страниц без картинки (как фавиконка: буква + точка) */
.monogram {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(140px, 40vw, 200px);
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--accent);
  color: var(--card);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(84px, 24vw, 120px);
  line-height: 1;
  rotate: -4deg;
  /* тень + цветные «мазки» вокруг (у .portrait это ::before/::after) */
  box-shadow: 0 18px 50px rgba(74, 28, 28, .18),
              -40px -10px 90px 10px color-mix(in srgb, var(--glow-1) 40%, transparent),
              40px 30px 90px 10px color-mix(in srgb, var(--glow-2) 30%, transparent);
  animation: rise .9s cubic-bezier(.2,.7,.2,1) both;
}
.monogram::after {
  content: "";
  position: absolute;
  top: 9%; right: 9%;
  width: 18%; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--highlight);
}
@media (prefers-color-scheme: dark) {
  .monogram { color: var(--bg); }
}
.monogram + .hello { margin-top: 32px; }

.hello {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(26px, 5vw, 34px);
  color: var(--highlight);
  margin-top: 20px;
  rotate: -3deg;
  animation: rise .9s .15s cubic-bezier(.2,.7,.2,1) both;
}

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(40px, 9vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  animation: rise .9s .25s cubic-bezier(.2,.7,.2,1) both;
}
h1 .accent { color: var(--accent); position: relative; white-space: nowrap; }
/* Рукописное подчёркивание */
h1 .accent svg {
  position: absolute;
  left: -2%; bottom: -0.18em;
  width: 104%; height: .32em;
  overflow: visible;
}
h1 .accent path {
  stroke: var(--highlight);
  stroke-width: 7;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw 1s .9s ease-out forwards;
}

.tagline {
  margin-top: 18px;
  font-size: clamp(17px, 3.6vw, 19px);
  color: var(--muted);
  animation: rise .9s .35s cubic-bezier(.2,.7,.2,1) both;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 8px 16px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  font-size: 15px;
  color: var(--muted);
  box-shadow: 0 2px 10px rgba(74, 28, 28, .05);
  animation: rise .9s .45s cubic-bezier(.2,.7,.2,1) both;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--highlight);
  animation: pulse 2.2s ease-out infinite;
}

/* Ссылки на личные страницы (главная) */
.people {
  margin-top: 24px;
  animation: rise .9s .45s cubic-bezier(.2,.7,.2,1) both;
}
.people + .status { margin-top: 28px; animation-delay: .55s; }
.people p {
  font-family: "Caveat", cursive;
  font-size: 24px;
  color: var(--muted);
}
.people ul {
  list-style: none;
  padding: 0;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}
.people a {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  border: 2px solid var(--person, var(--accent));
  color: var(--person, var(--accent));
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  text-decoration: none;
  transition: background .2s, color .2s, translate .2s;
}
.people a:hover,
.people a:focus-visible {
  background: var(--person, var(--accent));
  color: var(--bg);
  translate: 0 -2px;
}

footer {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 32px;
}
footer a { color: inherit; text-underline-offset: 3px; }
footer a:hover { color: var(--accent); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--highlight) 55%, transparent); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  h1 .accent path { stroke-dashoffset: 0; }
}
