/* Цвета сайта и общие правила. */
:root {
  --ink: #413f32;
  --muted: #827e70;
  --paper: #faf7ef;
  --orange: #b95436;
  --line: #e7dfd1;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, sans-serif;
}
header,
main,
footer {
  max-width: 1180px;
  margin: auto;
}
header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 36px;
  border-bottom: 1px solid var(--line);
}
a {
  color: inherit;
  text-decoration: none;
}
.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  color: var(--orange);
  font-size: 36px;
}
.tag {
  font-size: 11px;
  letter-spacing: 2px;
  background: #edeadd;
  border: 1px solid #ddd9c8;
  padding: 11px 16px;
  border-radius: 30px;
}
.tag span {
  margin-left: 12px;
  color: var(--orange);
}
main {
  padding: 0 36px;
}
/* Приветствие и письмо в конверте. */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  min-height: 620px;
  padding: 62px 0 64px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b95436;
}
h1,
h2,
.note p {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
h1 {
  font-size: clamp(48px, 5.8vw, 74px);
  line-height: 1.04;
  letter-spacing: -2.8px;
  margin: 26px 0;
}
h1 em {
  color: var(--orange);
  font-weight: 400;
}
.intro {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 27px;
}
.primary {
  border: 0;
  background: var(--orange);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 17px 23px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.primary:hover {
  background: #98432a;
}
.primary span {
  font-size: 20px;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
}
.illustration {
  height: 440px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse, #f0e4cd 0%, transparent 69%);
}
.sun {
  position: absolute;
  right: 17px;
  top: 4px;
  color: #c09948;
  font-size: 95px;
  font-weight: 400;
  transform: rotate(10deg);
}
.spark {
  position: absolute;
  color: #bb8559;
  font-size: 36px;
}
.s1 {
  left: 10px;
  top: 125px;
}
.s2 {
  right: 6px;
  bottom: 82px;
  font-size: 26px;
}
.note {
  position: absolute;
  background: #fffdf6;
  box-shadow: 0 12px 35px #69502f15;
  width: 260px;
  height: 292px;
  transform: rotate(-9deg);
  top: 38px;
  left: calc(50% - 130px);
  padding: 26px 25px;
  border: 1px solid #eee4d3;
}
.little-heart {
  color: var(--orange);
  font-size: 35px;
}
.note p {
  font-size: 28px;
  line-height: 1.28;
  margin: 15px 0;
}
.note p em {
  color: var(--orange);
}
.note-sign {
  font-size: 10px;
  color: #9f8f78;
}
.envelope {
  width: 310px;
  height: 185px;
  position: absolute;
  bottom: 38px;
  left: calc(50% - 155px);
  background: #dac09a;
  border-radius: 5px;
  transform: rotate(6deg);
  box-shadow: 0 15px 25px #69502f13;
  overflow: hidden;
}
.envelope:before,
.envelope:after {
  content: "";
  position: absolute;
  inset: 0;
  background: #e5cda9;
  clip-path: polygon(0 0, 53% 55%, 0 100%);
}
.envelope:after {
  background: #ead5b5;
  clip-path: polygon(100% 0, 47% 55%, 100% 100%);
}
.flap {
  position: absolute;
  inset: 0;
  background: #e0c7a3;
  clip-path: polygon(0 100%, 50% 43%, 100% 100%);
  z-index: 1;
}
.envelope > span {
  position: absolute;
  z-index: 2;
  top: 84px;
  left: 135px;
  font-size: 27px;
  color: #b95436;
  transform: rotate(-8deg);
}
.art-caption {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  white-space: nowrap;
  font-family: Georgia, serif;
  font-style: italic;
  color: #96846d;
  font-size: 14px;
}
/* Список ребят и поиск. */
.people-section {
  padding: 38px 0 52px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 25px;
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
h2 {
  font-size: 32px;
  letter-spacing: -0.7px;
  margin: 14px 0;
}
.muted {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: 8px 13px;
  border-radius: 7px;
  gap: 8px;
  min-width: 245px;
}
.search span {
  font-size: 26px;
  color: var(--muted);
}
input,
textarea {
  font: inherit;
  color: var(--ink);
}
.search input {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  outline: 0;
  font-size: 13px;
}
.demo {
  font-size: 12px;
  color: #8a6b43;
  background: #f2ebdd;
  padding: 12px 15px;
  border-radius: 6px;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 26px;
}
.person {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 23px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.person:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px #58412609;
  border-color: #d1bda4;
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 25px;
  flex-shrink: 0;
}
.peach {
  background: #f5dfd0;
  color: #ac6d4d;
}
.sage {
  background: #e0e7d9;
  color: #778568;
}
.lavender {
  background: #e9e2ed;
  color: #9681a1;
}
.sand {
  background: #eee5cc;
  color: #aa9358;
}
.person strong {
  font-size: 16px;
  font-weight: 500;
}
.person small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.person .arrow {
  margin-left: auto;
  color: #ac9b85;
  font-size: 22px;
}
.bottom-note {
  text-align: center;
  background: #f0eee2;
  border-radius: 10px;
  padding: 27px;
  margin: 0 0 50px;
}
.bottom-note > span {
  font-size: 30px;
  color: var(--orange);
}
.bottom-note p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin: 6px 0;
}
.bottom-note strong {
  font-weight: 400;
  color: var(--ink);
}
/* Подпись внизу страницы. */
footer {
  border-top: 1px solid var(--line);
  padding: 26px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
footer .brand {
  font-size: 16px;
}
footer p,
footer > span {
  font-size: 10px;
  color: var(--muted);
}
/* Окно для новой записки. */
dialog {
  width: min(560px, calc(100% - 28px));
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  padding: 32px;
  color: var(--ink);
}
dialog::backdrop {
  background: #38322480;
  backdrop-filter: blur(4px);
}
.close {
  position: absolute;
  right: 15px;
  top: 12px;
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
}
form label {
  display: block;
  font-size: 13px;
  margin-top: 22px;
}
form input,
textarea {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 13px;
  border: 1px solid #dcd3c4;
  border-radius: 7px;
  background: #fffef9;
  font-size: 14px;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
.counter {
  text-align: right;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.form-note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
form .primary {
  width: 100%;
  margin-top: 9px;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.error {
  font-size: 13px;
  color: #a63326;
}
.messages {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.messages h3 {
  font-size: 14px;
  font-weight: 500;
}
.message {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px;
  margin-top: 10px;
}
.message p {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 10px;
}
.message small {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #414c39;
  color: #fff;
  padding: 16px 22px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 5px 30px #0002;
  max-width: 90%;
  z-index: 5;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b89457;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
/* Адаптация для телефонов. */
@media (max-width: 760px) {
  header {
    padding: 20px;
  }
  .brand {
    font-size: 19px;
  }
  .tag {
    font-size: 9px;
    padding: 9px 11px;
    letter-spacing: 1px;
  }
  main {
    padding: 0 20px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 35px;
    gap: 15px;
  }
  .hero-copy {
    text-align: center;
  }
  .hero-copy .eyebrow {
    justify-content: center;
    font-size: 9px;
  }
  h1 {
    font-size: 54px;
  }
  .intro {
    font-size: 13px;
  }
  .illustration {
    height: 350px;
    max-width: 380px;
    width: 100%;
    margin: auto;
  }
  .note {
    top: 5px;
    height: 260px;
    width: 235px;
    left: calc(50% - 117px);
  }
  .note p {
    font-size: 25px;
  }
  .envelope {
    bottom: 32px;
    width: 280px;
    left: calc(50% - 140px);
    height: 155px;
  }
  .envelope > span {
    top: 70px;
    left: 123px;
  }
  .sun {
    font-size: 75px;
  }
  .section-top {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  h2 {
    font-size: 29px;
  }
  .search {
    min-width: 0;
  }
  .people-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .person {
    padding: 15px 12px;
    gap: 10px;
  }
  .avatar {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .person strong {
    font-size: 14px;
  }
  .person small {
    font-size: 10px;
  }
  .person .arrow {
    display: none;
  }
  footer {
    padding: 23px 20px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  footer p {
    width: 100%;
    order: 3;
    margin: 0;
  }
  dialog {
    padding: 27px 21px;
  }
  .desktop {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .person {
    transition: none;
  }
}
/* Записки лежат прямо под именами, как на общей доске. */
.people-grid {
  align-items: start;
}
.person-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.person-card .person {
  border: 0;
  border-radius: 0;
  width: 100%;
  background: transparent;
}
.person-card .person:hover {
  transform: none;
  box-shadow: none;
  background: #f5efe4;
}
.person-notes {
  padding: 0 15px 5px;
}
.person-notes > .muted {
  font-size: 12px;
  margin: 0;
  padding: 13px 9px 17px;
}
.person-notes .message {
  background: #f5eedf;
  border: 0;
  border-radius: 3px 9px 9px 9px;
  margin: 0 0 12px;
  padding: 17px;
  box-shadow: 0 2px 3px #58412606;
}
.person-card:nth-child(3n + 2) .message {
  background: #edf0e6;
}
.person-card:nth-child(3n) .message {
  background: #f1eaf0;
}
.person-notes .message p {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.65;
}
.write-note {
  width: 100%;
  border: 0;
  border-top: 1px dashed var(--line);
  background: transparent;
  color: var(--orange);
  padding: 15px 10px;
  font-size: 12px;
  cursor: pointer;
}
.write-note:hover {
  background: #f5efe4;
}
@media (max-width: 760px) {
  .people-grid {
    grid-template-columns: 1fr;
  }
  .person-card .person {
    padding: 20px;
  }
  .person-notes {
    padding: 0 20px 5px;
  }
  .person-card .person .arrow {
    display: block;
  }
}
