/* Общие стили сайта: лендинг, оплата, служебные страницы */

:root {
  --bg: #fbf7f4;
  --surface: #ffffff;
  --surface-soft: #f5ece6;
  --text: #2b2320;
  --muted: #7a6c66;
  --accent: #b5647a;
  --accent-dark: #974f63;
  --accent-soft: #f3dfe4;
  --border: #eadfd8;
  --error: #b42318;
  --ok: #1f7a4d;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(80, 45, 35, 0.07);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* Атрибут hidden должен скрывать элемент, даже если ему задан display */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 17px;
}

a { color: var(--accent-dark); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
h3 { font-size: 1.2rem; }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* --- кнопки */

button, .button {
  display: inline-block;
  padding: 14px 26px;
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
button:hover, .button:hover { background: var(--accent-dark); }
button:disabled { background: #c9b3ba; cursor: wait; }
.button-ghost { background: transparent; color: var(--accent-dark); border: 1.5px solid var(--accent); }
.button-ghost:hover { background: var(--accent-soft); }
.button-small { padding: 9px 18px; font-size: 0.95rem; }

/* --- раскладка лендинга */

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
section { padding: 64px 0; }
section.alt { background: var(--surface-soft); }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 247, 244, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.logo { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
@media (min-width: 480px) { .logo { font-size: 1.25rem; } }
.logo span { color: var(--accent); }

.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; gap: 36px; align-items: center; grid-template-columns: 1fr; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 0.9rem; font-weight: 600; margin-bottom: 18px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 26px; }
.hero-price { font-size: 1.05rem; }
.hero-price strong { font-size: 1.4rem; }
.hero-visual {
  aspect-ratio: 4 / 5; max-width: 420px; width: 100%; justify-self: center;
  border-radius: 200px 200px var(--radius) var(--radius);
  background: linear-gradient(160deg, #f1d5dc 0%, #e9c3b4 55%, #d8a99a 100%);
  display: flex; align-items: flex-end; justify-content: center; padding: 24px;
  color: #fff; font-family: var(--serif); font-size: 1.1rem; text-align: center;
  box-shadow: var(--shadow);
}
.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; padding: 0; list-style: none; color: var(--muted); }
.facts li::before { content: "✦ "; color: var(--accent); }

.cards { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 28px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card .icon { font-size: 1.8rem; margin-bottom: 8px; }

.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checklist li { padding-left: 32px; position: relative; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: 0.8rem; font-weight: 700; display: grid; place-items: center;
}

details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin-top: 12px;
}
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details > *:not(summary) { margin: 12px 0 0; color: var(--muted); }
.module-tag { color: var(--accent); font-weight: 700; margin-right: 6px; }

.author { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; }
.author-photo {
  width: 220px; height: 220px; border-radius: 50%; justify-self: center;
  background: linear-gradient(135deg, #e9c3b4, #b5647a); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-size: 1rem; text-align: center; padding: 20px;
}

.price-box { text-align: center; max-width: 560px; margin: 0 auto; }
.price-box .price { font-family: var(--serif); font-size: 3rem; margin: 10px 0; }
.price-box .checklist { text-align: left; margin: 24px auto; max-width: 400px; }

/* --- форма */

form.order-form { display: grid; gap: 16px; margin-top: 8px; }
.order-section .card { max-width: 520px; margin: 0 auto; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input:not([type]), select, textarea {
  padding: 13px 14px; font: inherit; font-weight: 400;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label.consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 0.9rem; color: var(--muted); }
label.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.error { color: var(--error); font-weight: 400; font-size: 0.88rem; min-height: 1em; }

/* --- подвал и cookie */

.site-footer { padding: 36px 0 90px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.site-footer .container { display: grid; gap: 8px; }

.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20;
  max-width: 720px; margin: 0 auto;
  background: var(--text); color: #fff; border-radius: var(--radius);
  padding: 14px 18px; display: flex; gap: 14px; align-items: center; justify-content: space-between;
  font-size: 0.9rem; box-shadow: var(--shadow);
}
.cookie-bar a { color: #f3dfe4; }
.cookie-bar button { padding: 8px 18px; flex-shrink: 0; }

/* --- служебные страницы (оплата, спасибо, политика) */

.page { padding: 32px 16px; }
.page .card { max-width: 560px; margin: 0 auto; }
.page h1 { font-size: 1.8rem; }
.badge { display: inline-block; padding: 4px 10px; background: #fff4d6; color: #7a5200; border-radius: 6px; font-size: 0.85rem; margin-bottom: 12px; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.doc { max-width: 760px; margin: 0 auto; }
.doc h2 { font-size: 1.3rem; margin-top: 1.6em; }

/* --- планшет и компьютер */

@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards.two { grid-template-columns: repeat(2, 1fr); }
  .author { grid-template-columns: 240px 1fr; }
  section { padding: 84px 0; }
}
