/* ============================================================
   «Антон & Диана · Бали, Июнь 2027»
   Дизайн-система: светлый минимал-люкс (quiet luxury, editorial)
   Общие стили для index.html, forum.html, admin.html
   ============================================================ */

:root {
  /* Палитра — приглушённая, природная */
  --paper:      #f7f3ec;   /* основной кремовый фон */
  --paper-2:    #efe8dc;   /* фон для чередования секций */
  --card:       #fffdf9;   /* карточки */
  --ink:        #262019;   /* тёплый угольный текст */
  --ink-soft:   #6f6558;   /* второстепенный текст */
  --forest:     #3c4a3e;   /* глубокая приглушённая зелень — основной акцент */
  --forest-2:   #566b57;
  --clay:       #a86a4c;   /* приглушённая терракота — редкий акцент */
  --clay-text:  #8f552f;   /* тёмный оттенок терракоты для мелкого текста (контраст AA) */
  --line:       #e2d9c9;   /* тонкие разделители */
  --line-soft:  #ece4d5;

  --shadow:     0 30px 60px -34px rgba(60, 45, 30, .28);
  --shadow-sm:  0 14px 30px -20px rgba(60, 45, 30, .22);

  --radius:     10px;
  --radius-sm:  8px;
  --maxw:       1180px;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Jost", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Фон для затемняемых фото-секций. Замена фото: assets/README.md */
  --hero-photo: url("assets/couple.jpg");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: 17px;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  margin: 0 0 .45em;
  letter-spacing: .005em;
  text-wrap: balance;
}

/* Заметная рамка фокуса для клавиатурной навигации (доступность) */
:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 3px;
}

/* крупная, тонкая, editorial-шкала */
h1 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 500; }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }

p { margin: 0 0 1em; }

a { color: var(--forest); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--clay); }

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

.wrap { width: min(100% - 44px, var(--maxw)); margin-inline: auto; }

/* надзаголовок */
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .34em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--clay-text);
  margin-bottom: 1.4rem;
}

.lead {
  font-size: clamp(1.06rem, 1.7vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 62ch;
  font-weight: 400;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 16px 34px;
  border: 1px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--forest);
  color: #f7f3ec;
}
.btn-primary:hover { background: var(--ink); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--forest); color: var(--forest); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* на тёмном фоне */
.on-photo .btn-primary { background: #fff; color: var(--ink); }
.on-photo .btn-primary:hover { background: var(--paper); }

/* ---------- Секции ---------- */
section { padding: clamp(70px, 11vw, 140px) 0; position: relative; }
.bg-2 { background: var(--paper-2); }

.section-head { max-width: 680px; margin: 0 auto clamp(40px, 6vw, 68px); text-align: center; }
.section-head .lead { margin-inline: auto; }

.divider { width: 54px; height: 1px; background: var(--clay); margin: 0 auto 1.4rem; opacity: .6; }

/* ---------- HERO (editorial split) ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 7vw, 96px);
  background: var(--paper);
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .38em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--clay-text);
  margin-bottom: 2rem;
}
.hero h1 { margin-bottom: .25em; }
.hero h1 .amp { font-style: italic; color: var(--clay); font-weight: 500; }
.hero__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  color: var(--ink-soft);
  margin-bottom: 2rem;
}
.hero__meta {
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2.6rem;
  display: flex; align-items: center; gap: 14px;
}
.hero__meta::before, .hero__meta::after { content: ""; height: 1px; width: 28px; background: var(--line); }
.hero__photo {
  background: linear-gradient(0deg, rgba(38,32,25,.06), rgba(38,32,25,.06)), var(--hero-photo) center/cover no-repeat;
  min-height: 46vh;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__photo { order: -1; min-height: 56svh; }
  .hero__text { padding: clamp(36px, 9vw, 60px) 26px; text-align: left; }
  .hero__meta { justify-content: flex-start; }
}

/* ---------- Фото-блоки ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.feature-row.reverse .feature-row__media { order: 2; }
.feature-row__media img {
  width: 100%; height: 100%; max-height: 560px; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 780px) {
  .feature-row { grid-template-columns: 1fr; gap: 28px; }
  .feature-row.reverse .feature-row__media { order: 0; }
}

/* три колонки «как всё будет» */
.trio { display: grid; gap: clamp(28px, 4vw, 56px); }
@media (min-width: 760px) { .trio { grid-template-columns: repeat(3, 1fr); } }
.pill {
  text-align: center;
}
.pill__num {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--clay);
  line-height: 1;
  margin-bottom: .5rem;
  font-weight: 500;
}
.pill h3 { margin-bottom: .4rem; }
.pill p { color: var(--ink-soft); margin: 0; }

/* ---------- Галерея ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery img { width: 100%; height: 300px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: 240px; }
}

/* ---------- Обратный отсчёт ---------- */
.countdown { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.cd-cell { text-align: center; min-width: 84px; }
.cd-num { font-family: var(--serif); font-size: clamp(2.4rem, 5.5vw, 3.6rem); color: var(--ink); line-height: 1; font-weight: 500; }
.cd-lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .2em; color: var(--ink-soft); margin-top: 10px; }
.cd-sep { font-family: var(--serif); font-size: 2.4rem; color: var(--line); align-self: flex-start; }

/* ---------- Форма ---------- */
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow);
}
.form { display: grid; gap: 24px; }
.field { display: grid; gap: 9px; }
.field > label { font-weight: 600; font-size: .92rem; letter-spacing: .01em; }
.field .req { color: var(--clay); }
.hint { font-size: .82rem; color: var(--ink-soft); }

input[type="text"], input[type="number"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(60,74,62,.1);
}
textarea { resize: vertical; min-height: 92px; }

.radio-group { display: grid; gap: 12px; }
@media (min-width: 620px) { .radio-group.cols { grid-template-columns: repeat(3, 1fr); } }
.radio-opt {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  font-size: .96rem;
}
.radio-opt:hover { border-color: var(--forest-2); }
.radio-opt input { position: absolute; opacity: 0; }
.radio-opt .dot {
  width: 19px; height: 19px; border-radius: 50%;
  border: 1.5px solid var(--line); flex: 0 0 auto;
  display: grid; place-items: center; transition: border-color .15s ease;
}
.radio-opt .dot::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--forest); transform: scale(0); transition: transform .15s ease;
}
.radio-opt input:checked ~ .dot { border-color: var(--forest); }
.radio-opt input:checked ~ .dot::after { transform: scale(1); }
.radio-opt:has(input:checked) { border-color: var(--forest); background: rgba(60,74,62,.04); }
.radio-opt:has(input:checked) span:last-child { color: var(--forest); font-weight: 600; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-msg { padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 500; font-size: .95rem; }
.form-msg.ok  { background: rgba(60,74,62,.1);   color: var(--forest); }
.form-msg.err { background: rgba(168,106,76,.12); color: var(--clay); }

/* Экран благодарности */
.thanks { text-align: center; padding: 16px; }
.thanks__mark {
  width: 72px; height: 72px; margin: 0 auto 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--forest);
  display: grid; place-items: center;
}
.thanks__mark svg { width: 34px; height: 34px; }

/* ---------- Появление при скролле ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Футер ---------- */
.footer {
  background: var(--forest);
  color: #e8e3d7;
  text-align: center;
  padding: clamp(60px, 9vw, 96px) 20px 48px;
}
.footer h3 { color: #fff; font-style: italic; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.footer p { margin: .3em 0; }
.footer a { color: #e8e3d7; text-decoration: underline; text-underline-offset: 3px; }
.footer a:hover { color: #fff; }
.footer__meta { opacity: .7; font-size: .84rem; margin-top: 22px; letter-spacing: .04em; }

/* ---------- Верхнее меню ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 44px);
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.topbar.solid { background: rgba(247,243,236,.9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); padding-block: 12px; }
.topbar__logo { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); letter-spacing: .04em; }
.topbar__links { display: flex; gap: 4px; align-items: center; }
.topbar__links a { color: var(--ink); font-size: .88rem; font-weight: 600; letter-spacing: .03em; padding: 9px 16px; border-radius: 100px; }
.topbar__links a:hover { color: var(--forest); background: rgba(60,74,62,.06); }
.topbar__links a.cta { background: var(--forest); color: #f7f3ec; }
.topbar__links a.cta:hover { background: var(--ink); color: #fff; }
@media (max-width: 560px) { .topbar__links a.hide-sm { display: none; } }

/* ============================================================
   ФОРУМ
   ============================================================ */
.page-hero {
  background: var(--paper-2);
  text-align: center;
  padding: clamp(120px, 16vw, 180px) 20px clamp(50px, 8vw, 80px);
  border-bottom: 1px solid var(--line);
}
.page-hero .lead { margin-inline: auto; }

.topic-list { display: grid; gap: 14px; }
.topic {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  text-align: left; width: 100%; font: inherit; color: inherit;
}
.topic:hover { border-color: var(--forest-2); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.topic__title { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); }
.topic__meta { font-size: .84rem; color: var(--ink-soft); margin-top: 4px; }
.topic__count { flex: 0 0 auto; text-align: center; color: var(--forest); font-weight: 700; font-size: 1.1rem; }
.topic__count small { display: block; font-weight: 500; font-size: .66rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .12em; }

.post {
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.post__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.post__author { font-weight: 700; color: var(--forest); }
.post__time { font-size: .78rem; color: var(--ink-soft); }
.post__body { white-space: pre-wrap; word-break: break-word; }

.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 26px; font-weight: 600; }
.empty { text-align: center; color: var(--ink-soft); padding: 44px 20px; }
.loading { text-align: center; color: var(--ink-soft); padding: 32px; }

/* ============================================================
   АДМИНКА
   ============================================================ */
.admin-body { background: var(--paper); padding: 40px 20px; }
.stat-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 26px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; }
.stat__num { font-family: var(--serif); font-size: 2.8rem; color: var(--forest); line-height: 1; font-weight: 500; }
.stat__lbl { font-size: .8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .1em; margin-top: 10px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { background: var(--paper-2); font-weight: 700; color: var(--forest); position: sticky; top: 0; }
tr:last-child td { border-bottom: none; }
td.wrap-cell { white-space: normal; min-width: 200px; }

.badge { display: inline-block; padding: 3px 11px; border-radius: 100px; font-size: .78rem; font-weight: 700; }
.badge.yes   { background: rgba(60,74,62,.14);  color: var(--forest); }
.badge.maybe { background: rgba(168,106,76,.16); color: var(--clay); }
.badge.no    { background: rgba(110,101,88,.16); color: var(--ink-soft); }

.admin-section { margin-top: 48px; }
.del-btn { background: none; border: 1px solid var(--line); color: var(--clay); border-radius: 8px; padding: 6px 13px; cursor: pointer; font-size: .82rem; font-weight: 600; }
.del-btn:hover { background: rgba(168,106,76,.08); border-color: var(--clay); }

.login-card { max-width: 420px; margin: 10vh auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px,5vw,44px); box-shadow: var(--shadow); }
