/* Nobilis Brevia — стиль «паризький салон» */

:root {
  --cream: #F6EEE2;
  --cream-2: #F1E9DE;
  --paper: #FBF3E6;
  --butter: #FBEFDD;
  --yellow: #F6E2A9;
  --ink: #161E39;
  --sky: #B9CDE2;
  --sky-2: #C9DAEC;
  --olive: #55561F;
  --wine: #5A0F2E;
  --gold: #C9A66B;
  --light: #FFF2D5;
  --footer: #251C15;

  --ink-soft: rgba(22, 30, 57, .8);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', 'Segoe UI', sans-serif;
  --script: 'Italianno', cursive;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
}

img { max-width: 100%; }
a { color: var(--ink); }
a:hover { color: var(--wine); }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }

/* ---------- Спільні елементи ---------- */

.heading {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(50px, 5.4vw, 74px);
  line-height: 1.05;
}

.label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 40px;
  border: 0;
  border-radius: 999px;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--sky-2); color: var(--ink); }
.btn--large { min-height: 54px; padding: 0 44px; font-size: 14px; }
.btn--dark { background: var(--ink); color: var(--light); }
.btn--dark:hover { background: var(--wine); color: var(--light); }
.btn--muted, .btn--muted:hover {
  background: #E6DED2;
  color: rgba(22, 30, 57, .66);
  cursor: default;
}

/* Картуш: подвійна золота лінія */
.cartouche {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--gold);
  border-radius: 28px;
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--gold);
}

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

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 780px;
  background: var(--footer);
  color: var(--light);
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: sepia(.15) saturate(.9) brightness(.62);
}

.hero__bar {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 4%;
  font-size: 13px;
  letter-spacing: .14em;
}

.menu { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.menu a { padding: 10px 0; color: var(--light); text-decoration: none; }
.menu a:hover { color: var(--yellow); }

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 242, 213, .6);
  border-radius: 50%;
  background: rgba(22, 30, 57, .55);
  color: var(--light);
  cursor: pointer;
}
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform .2s ease, background-color .2s ease;
}
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { background: currentColor; transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { background: currentColor; transform: translateY(-6px) rotate(-45deg); }

.hero__center {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 20px 6% 90px;
  text-align: center;
}

.logo {
  font-family: var(--script);
  font-size: clamp(96px, 11vw, 168px);
  font-weight: 400;
  line-height: .8;
  color: var(--light);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
}

.hero__lead {
  max-width: 440px;
  padding: 18px 30px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.35;
}

.hero__side {
  position: absolute;
  bottom: 70px;
  max-width: 230px;
  font-size: 15px;
  line-height: 1.45;
}
.hero__side--left { left: 4%; }
.hero__side--right { right: 4%; text-align: right; }

/* Маркіза */
.awning-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -26px;
  z-index: 2;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .18));
  pointer-events: none;
}
.awning {
  height: 52px;
  background: repeating-linear-gradient(90deg, var(--cream) 0 26px, var(--sky) 26px 52px);
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% 26px no-repeat,
    radial-gradient(circle 26px at 26px 26px, #000 97%, #0000 100%) 0 0 / 52px 52px repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% 26px no-repeat,
    radial-gradient(circle 26px at 26px 26px, #000 97%, #0000 100%) 0 0 / 52px 52px repeat-x;
}

/* ---------- Про нас ---------- */

.about {
  max-width: 860px;
  margin: 0 auto;
  padding: 126px 24px 90px;
  text-align: center;
}
.about .heading { margin-top: 16px; }
.about__text {
  max-width: 640px;
  margin: 24px auto 0;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.45;
}
.about__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 28px;
  margin-top: 44px;
}
.about__tags li {
  padding: 10px 26px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
}
.about__note {
  margin-top: 40px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- Книжки ---------- */

.books {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 5% 110px;
  text-align: center;
}
.books__status {
  display: table;
  margin: 26px auto 64px;
  padding: 12px 32px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.3;
}
.books__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 64px 80px;
}

.book {
  flex: 0 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.taped { position: relative; margin-bottom: 14px; }
.taped--left { transform: rotate(-3deg); }
.taped--right { transform: rotate(2.5deg); }
.taped img {
  display: block;
  width: 300px;
  border: 10px solid #fff;
  box-shadow: 0 18px 36px rgba(37, 28, 21, .22);
}
.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 86px;
  height: 26px;
  margin-left: -43px;
  background: rgba(246, 238, 226, .75);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.taped--left .tape { transform: rotate(4deg); }
.taped--right .tape { transform: rotate(-5deg); }

.book__title {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.1;
}
.book__meta {
  font-size: 15px;
  letter-spacing: .12em;
  line-height: 1.5;
  color: rgba(22, 30, 57, .75);
}
.book__note {
  max-width: 380px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.35;
}
.book__format { font-size: 14px; color: var(--ink-soft); }
.book__price {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  line-height: 1.1;
}
.book__consent {
  max-width: 320px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* Редакторська правка: 15 → 16 */
.fix { position: relative; display: inline-block; margin: 16px .18em 0 .1em; }
.fix del { position: relative; text-decoration: none; }
.fix del::after {
  content: '';
  position: absolute;
  left: -3px;
  right: -3px;
  top: 50%;
  height: 2px;
  background: var(--wine);
  transform: rotate(-6deg);
}
.fix ins {
  position: absolute;
  left: 50%;
  bottom: 72%;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1;
  color: var(--wine);
  text-decoration: none;
  transform: translateX(-50%) rotate(-8deg);
}

.books__soon {
  max-width: 560px;
  margin: 56px auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------- Для кого ми ---------- */

.who {
  position: relative;
  padding: 110px 5% 120px;
  background: var(--ink);
  overflow: hidden;
}
.who__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: sepia(.2) brightness(.5);
}
.who__inner { position: relative; max-width: 1200px; margin: 0 auto; }
.who .heading { margin-bottom: 64px; text-align: center; color: var(--light); }

.stamps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px;
}

.stamp {
  --bg: var(--butter);
  --fg: var(--ink);
  --line: rgba(22, 30, 57, .18);
  position: relative;
  flex: 0 1 340px;
  min-width: 0;
  min-height: 230px;
  color: var(--fg);
  transform: rotate(var(--tilt, 0deg));
}
.stamp--olive { --bg: var(--olive); --fg: var(--light); --line: rgba(255, 242, 213, .3); }
.stamp--sky { --bg: var(--sky-2); }
.stamp--wine { --bg: var(--wine); --fg: var(--light); --line: rgba(255, 242, 213, .3); }
.stamp--yellow { --bg: var(--yellow); }

.perf {
  position: absolute;
  inset: 0;
  background: var(--bg);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 5px, #000 5.6px) -8px -8px / 16px 16px;
  mask: radial-gradient(circle at 50% 50%, transparent 5px, #000 5.6px) -8px -8px / 16px 16px;
}
.stamp__inner {
  position: absolute;
  inset: 9px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
}
.stamp__body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 42px 34px;
  text-align: center;
}
.stamp__title {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.05;
}

/* ---------- Голос автора ---------- */

.voice {
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 5%;
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
  align-items: center;
}
.voice__text, .voice__photos { flex: 1 1 440px; min-width: 0; }
.voice__text { display: flex; flex-direction: column; gap: 26px; }
.voice__quote {
  margin: 0;
  padding: 32px 36px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.4;
}
.voice__source {
  font-size: 14px;
  letter-spacing: .14em;
  color: var(--ink-soft);
}

.polaroids {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
}
.polaroid {
  padding: 9px 9px 12px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(37, 28, 21, .18);
  transform: rotate(var(--tilt, 0deg));
}
.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: sepia(.2);
}
.polaroid figcaption {
  padding-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
}

/* ---------- Резиденції ---------- */

.residency { padding: 110px 5%; background: var(--cream-2); }
.residency__inner { max-width: 1200px; margin: 0 auto; }
.residency__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 48px;
}
.residency__head p { max-width: 360px; color: var(--ink-soft); }

.residency__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.place {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--butter);
  box-shadow: 0 10px 24px rgba(37, 28, 21, .08);
}
.place__top {
  position: relative;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--olive);
}
.place__top--wine { background: var(--wine); }
.place__top img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(.25) brightness(.55);
}
.place__name {
  position: relative;
  padding: 0 12px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 44px;
  line-height: 1.05;
  text-align: center;
  color: var(--light);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 2px 14px rgba(0, 0, 0, .5);
}
.place__credit {
  padding: 6px 12px 0;
  font-size: 12px;
  text-align: center;
  color: rgba(22, 30, 57, .72);
}
.place__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 26px 30px;
  text-align: center;
}
.place__country { font-size: 15px; letter-spacing: .08em; }
.place__date { font-family: var(--serif); font-size: 34px; line-height: 1.15; }
.place__body .btn {
  min-height: 48px;
  margin-top: auto;
  padding: 0 30px;
  letter-spacing: .14em;
}

/* ---------- Маєте рукопис? ---------- */

.manuscript {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 110px 6%;
  text-align: center;
}
.manuscript p {
  max-width: 560px;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
}

/* ---------- Футер ---------- */

.footer {
  padding: 56px 6% 36px;
  background: var(--footer);
  color: var(--cream);
}
.footer a { color: inherit; }
.footer a:hover { color: var(--yellow); }
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px 64px;
}
.footer__brand { display: flex; flex-direction: column; gap: 10px; }
.footer__logo {
  font-family: var(--script);
  font-size: 58px;
  line-height: .9;
  color: var(--light);
  text-decoration: none;
}
.footer__contacts { font-size: 14px; color: rgba(246, 238, 226, .85); }
.footer__legal {
  flex: 0 1 560px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(246, 238, 226, .78);
}
.footer__legal p + p { margin-top: 12px; }
.footer__legal strong { font-weight: 500; color: var(--cream); }

/* ---------- Юридичні сторінки ---------- */

.doc {
  max-width: 768px;
  margin: 0 auto;
  padding: 48px 24px 88px;
  font-size: 16px;
  line-height: 1.6;
}
.doc__back {
  display: inline-block;
  margin-bottom: 36px;
  font-size: 14px;
  letter-spacing: .04em;
}
.doc h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1.1;
  margin-bottom: 26px;
}
.doc h2 {
  margin: 36px 0 10px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
}
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; list-style: disc; }
.doc li { margin-bottom: 6px; }
.doc strong { font-weight: 500; }

/* ---------- Планшети ---------- */

@media (max-width: 1000px) {
  .voice__text, .voice__photos { flex-basis: 100%; }
  .polaroids { width: 100%; max-width: 560px; margin: 0 auto; }
}

/* ---------- Мобільна версія ---------- */

@media (max-width: 760px) {
  .hero__bar { justify-content: flex-end; padding: 16px; }
  .hero__kicker, .hero__side { display: none; }

  .burger { display: inline-flex; }

  .menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 14px 22px;
    border-radius: 18px;
    background: rgba(22, 30, 57, .96);
  }
  .menu.is-open { display: flex; }
  .menu a { min-height: 48px; display: flex; align-items: center; }

  .hero__center { padding: 20px 16px 76px; }
  .hero__lead { padding: 16px 22px; font-size: 20px; }

  .about { padding: 100px 16px 56px; }
  .about__text { font-size: 22px; }

  .books { padding: 44px 16px 80px; }
  .book, .stamp { flex-basis: 100%; }
  .books__status { margin-bottom: 52px; }

  .who { padding: 80px 16px 88px; }
  .who .heading { margin-bottom: 44px; }
  .stamps { gap: 26px; }

  .voice { padding: 80px 16px; gap: 44px; }
  .voice__quote { padding: 24px 26px; font-size: 23px; }

  .polaroids { gap: 16px 10px; }
  .polaroid { padding: 5px 5px 8px; }
  .polaroid figcaption { padding-top: 5px; font-size: 16px; }

  .residency { padding: 80px 16px; }
  .residency__list { grid-template-columns: minmax(0, 1fr); }

  .manuscript { padding: 80px 16px; }

  .footer { padding: 48px 16px 32px; }
}

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