/* ===== VARIABLES =====
   Направление: «редакционная тишина» — тёплые бумажные тона, резкий терракотовый акцент,
   не шаблонная пара шрифтов (см. frontend-design SKILL). */
:root {
  --color-bg: #f7f4ef;
  --color-bg-warm: #efe9e0;
  --color-bg-accent: #e4dcd2;
  --color-text: #342f2b;
  --color-text-soft: #645a52;
  --color-heading: #252019;
  --color-primary: #6e5e52;
  --color-primary-hover: #53463c;
  --color-secondary: #9e8b7c;
  --color-accent: #a06352;
  --color-border: #d4cac0;
  --color-card-bg: #fffcf8;
  --color-quote-bg: #ebe4da;
  --color-final-bg: #2e2824;
  --color-final-text: #f5f0e8;
  --font-heading: 'Newsreader', 'Georgia', serif;
  --font-body: 'Commissioner', system-ui, sans-serif;
  --max-width: 940px;
  --max-width-narrow: 700px;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(37, 32, 25, 0.05), 0 6px 20px rgba(37, 32, 25, 0.04);
  --shadow-md: 0 10px 32px rgba(37, 32, 25, 0.08), 0 2px 8px rgba(37, 32, 25, 0.05);
  --shadow-lg: 0 24px 56px rgba(37, 32, 25, 0.12);
  --ring-focus: 0 0 0 3px rgba(160, 99, 82, 0.35);
  --transition-snappy: 0.22s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-soft: 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  --ease-reveal: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(160, 99, 82, 0.2);
  color: var(--color-heading);
}

/* Появление секций при скролле (без JS страница остаётся читаемой) */
.reveal {
  --reveal-order: 0;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.75s var(--ease-reveal),
    transform 0.75s var(--ease-reveal);
  transition-delay: calc(var(--reveal-order) * 0.07s);
}

html.reveal-js .reveal:not(.is-visible):not(.reveal--instant) {
  opacity: 0;
  transform: translateY(1.35rem);
}

.reveal.is-visible,
.reveal.reveal--instant {
  opacity: 1;
  transform: none;
}

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: 80px 0;
}

.section--light {
  background: var(--color-bg);
}

.section--warm {
  background: var(--color-bg-warm);
}

/* ===== TYPOGRAPHY ===== */
h1, h2 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 500;
  line-height: 1.28;
  font-feature-settings: "kern" 1, "liga" 1;
}

h1 {
  font-size: clamp(28px, 4.5vw, 48px);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 28px;
  text-wrap: balance;
  letter-spacing: -0.02em;
}

/* Hero: эффект печатающегося текста */
.hero-type {
  display: block;
  min-height: 1.35em;
}

.hero-type__fallback {
  display: block;
}

.hero-type.hero-type--animating .hero-type__fallback,
.hero-type__fallback[hidden] {
  display: none;
}

.hero-type__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.hero-type__cursor {
  margin-left: 0.2em;
  display: inline-block;
  color: var(--color-secondary);
  font-weight: 400;
  animation: heroTypeBlink 0.55s ease-in-out infinite alternate;
}

.hero-type--static-only .hero-type__fallback {
  display: block;
}

.hero-type--static-only .hero-type__live {
  display: none !important;
}

@keyframes heroTypeBlink {
  from { opacity: 1; }
  to { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-type__cursor {
    animation: none;
    opacity: 1;
  }
}

h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  margin-bottom: 28px;
  letter-spacing: -0.018em;
}

/* Редакционная отметка под заголовками секций */
.section:not(.section--final) > .container > h2 {
  position: relative;
  padding-bottom: 4px;
}

.section:not(.section--final) > .container > h2::after {
  content: '';
  display: block;
  width: min(3.5rem, 18vw);
  height: 3px;
  margin-top: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
  opacity: 0.88;
}

.section--about .about-text > h2::after {
  content: '';
  display: block;
  width: min(3.5rem, 18vw);
  height: 3px;
  margin-top: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
  opacity: 0.88;
}

@media (max-width: 768px) {
  .section--about .about-text {
    text-align: center;
  }

  .section--about .about-text > h2::after {
    margin-left: auto;
    margin-right: auto;
  }
}

.section-intro {
  font-size: 17px;
  color: var(--color-text-soft);
  max-width: 680px;
  margin-bottom: 16px;
}

.section-footer {
  margin-top: 28px;
  font-style: italic;
  color: var(--color-text-soft);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(118deg, transparent 35%, rgba(160, 99, 82, 0.045) 48%, transparent 62%),
    linear-gradient(168deg, #f2ebe3 0%, var(--color-bg-warm) 38%, var(--color-bg) 100%);
  padding: clamp(4.5rem, 12vw, 6.5rem) 0 clamp(4rem, 8vw, 5.5rem);
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -25% -35% 35% -35%;
  background:
    radial-gradient(ellipse 78% 58% at 48% 0%, rgba(228, 220, 210, 0.9) 0%, transparent 56%),
    radial-gradient(ellipse 46% 42% at 92% 32%, rgba(245, 240, 232, 0.85) 0%, transparent 52%),
    radial-gradient(ellipse 42% 38% at 8% 52%, rgba(252, 249, 244, 0.92) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  transform: translateX(2px);
}

@media (min-width: 900px) {
  .hero__inner {
    transform: translateX(8px);
  }
}

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-soft);
  max-width: 620px;
  margin: 0 auto 16px;
  line-height: 1.7;
}

.hero-note {
  font-size: 16px;
  color: var(--color-secondary);
  margin-bottom: 36px;
  font-style: italic;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-tags {
  display: flex;
  gap: 10px;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
}

.hero-tags li {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(217, 208, 197, 0.65);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 15px 34px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform var(--transition-snappy), box-shadow var(--transition-snappy), background-color var(--transition-snappy), border-color var(--transition-snappy), color var(--transition-snappy);
  border: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.btn-primary {
  background: linear-gradient(180deg, #877666 0%, var(--color-primary) 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(61, 54, 50, 0.12), 0 8px 24px rgba(123, 107, 93, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--color-primary-hover) 0%, #53493f 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(61, 54, 50, 0.14), 0 14px 36px rgba(123, 107, 93, 0.28);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.45);
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ===== CHECK LIST ===== */
.check-list {
  list-style: none;
  max-width: 680px;
  margin-top: 8px;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--color-text);
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
}

/* ===== GENTLE QUOTE ===== */
.gentle-quote {
  margin-top: 36px;
  padding: 28px 36px;
  background: linear-gradient(135deg, var(--color-quote-bg) 0%, rgba(235, 228, 218, 0.75) 100%);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(17px, 2.2vw, 19px);
  color: var(--color-text-soft);
  line-height: 1.62;
  border: 1px solid rgba(212, 202, 192, 0.65);
  border-left: 4px solid var(--color-accent);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ===== ABOUT ===== */
.section--about {
  background: var(--color-bg-warm);
  padding: 80px 0;
}

.about-content {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.about-photo {
  flex-shrink: 0;
}

.photo-placeholder {
  width: 200px;
  height: 260px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--color-bg-accent) 0%, #ddd4c8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 36px;
  color: var(--color-secondary);
  font-weight: 500;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.about-text h2 {
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--color-text-soft);
  max-width: 580px;
}

.about-text p strong {
  color: var(--color-heading);
  font-weight: 600;
}

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 12px;
}

.card {
  background: linear-gradient(180deg, var(--color-card-bg) 0%, #f7f3ee 100%);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(212, 202, 192, 0.75);
  border-left: 3px solid rgba(160, 99, 82, 0.35);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-soft), transform var(--transition-soft), border-color var(--transition-soft);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-left-color: rgba(160, 99, 82, 0.55);
  border-color: rgba(158, 139, 124, 0.5);
}

.card-question {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  color: var(--color-heading);
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-answer {
  font-size: 15px;
  color: var(--color-text-soft);
  line-height: 1.6;
}

/* ===== CTA BLOCK ===== */
.cta-block {
  text-align: center;
  margin-top: 40px;
  padding: 40px 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(250, 248, 245, 0.5) 100%);
  border: 1px solid rgba(217, 208, 197, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.cta-note {
  font-size: 14px;
  color: var(--color-secondary);
  margin-top: 12px;
  font-style: italic;
}

/* ===== REVIEWS ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.review {
  background: linear-gradient(165deg, #ffffff 0%, #f9f7f4 100%);
  border-radius: var(--radius);
  padding: 32px 32px 32px 28px;
  border: 1px solid rgba(217, 208, 197, 0.85);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-soft), transform var(--transition-soft);
}

.review::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-secondary) 55%, var(--color-primary) 100%);
  border-radius: var(--radius) 0 0 var(--radius);
  opacity: 0.88;
}

.review::after {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 72px;
  color: rgba(232, 224, 212, 0.55);
  position: absolute;
  top: 4px;
  right: 18px;
  line-height: 1;
  pointer-events: none;
}

.review:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.review p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-soft);
  position: relative;
  z-index: 1;
  padding-right: 8px;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid rgba(217, 208, 197, 0.65);
  padding: 4px 0;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-snappy);
}

.faq-item:first-child {
  border-top: 1px solid rgba(217, 208, 197, 0.65);
}

.faq-item[open],
.faq-item:hover {
  background: rgba(255, 255, 255, 0.45);
}

.faq-item summary {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 500;
  color: var(--color-heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  line-height: 1.5;
  padding: 20px 16px 20px 12px;
  border-radius: var(--radius-sm);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 22px;
  color: var(--color-secondary);
  transition: transform 0.3s ease;
  width: 24px;
  text-align: center;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: 0 12px 20px 12px;
  padding-top: 0;
  color: var(--color-text-soft);
  font-size: 16px;
  line-height: 1.7;
  max-width: 620px;
}

/* ===== FINAL SECTION ===== */
.section--final {
  position: relative;
  background: linear-gradient(165deg, #4a403c 0%, var(--color-final-bg) 45%, #322c28 100%);
  padding: 88px 0;
  text-align: center;
  overflow: hidden;
}

.section--final::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% -20%, rgba(243, 239, 232, 0.08) 0%, transparent 55%);
  pointer-events: none;
}

.section--final .container {
  position: relative;
  z-index: 1;
}

.section--final h2 {
  color: var(--color-final-text);
  margin-bottom: 32px;
  font-size: clamp(22px, 3vw, 30px);
  text-wrap: balance;
}

.final-text p {
  color: rgba(243, 239, 232, 0.7);
  font-size: 17px;
  margin-bottom: 6px;
}

.final-accent {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 18px;
  color: var(--color-final-text);
  margin: 28px 0 36px;
}

.section--final .btn-primary {
  background: linear-gradient(180deg, #faf8f5 0%, var(--color-final-text) 100%);
  color: var(--color-final-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.section--final .btn-primary:hover {
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.section--final .btn-secondary {
  background: rgba(243, 239, 232, 0.06);
  color: var(--color-final-text);
  border-color: rgba(243, 239, 232, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.section--final .btn-secondary:hover {
  border-color: var(--color-final-text);
  background: rgba(243, 239, 232, 0.12);
}

.section--final .cta-note {
  color: rgba(243, 239, 232, 0.5);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-final-bg);
  border-top: 1px solid rgba(243, 239, 232, 0.1);
  padding: 24px 0;
  text-align: center;
}

.footer p {
  font-size: 14px;
  color: rgba(243, 239, 232, 0.4);
  letter-spacing: 0.02em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 72px 0 56px;
    min-height: auto;
  }

  h1 {
    margin-bottom: 20px;
  }

  h2 {
    margin-bottom: 20px;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-text p {
    max-width: 100%;
  }

  .photo-placeholder {
    width: 160px;
    height: 210px;
    font-size: 28px;
  }

  .cards-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .hero-tags {
    gap: 8px;
  }

  .cta-block {
    padding: 32px 20px;
  }

  .gentle-quote {
    padding: 20px 24px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 44px 0;
  }

  .card {
    padding: 22px;
  }

  .review {
    padding: 24px 20px 24px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .card,
  .review {
    transition: none;
  }

  .btn-primary:hover,
  .btn-secondary:hover,
  .card:hover,
  .review:hover {
    transform: none;
  }
}
