/* ============================================
   Ivaldi landing prototype — styles
   Палитра, шрифты и плотности — из landing-brief.md (раздел 3)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Палитра */
  --bg-base:        #F5F0E6;
  --bg-card:        #ECE5D7;
  --bg-deep:        #3D2F22;  /* мягкий walnut — для больших тёмных блоков, вместо near-black */
  --text-main:      #1E1812;
  --text-muted:     #6B5F4F;
  --accent:         #B0855B;
  --accent-deep:    #8E6840;  /* для hover/границ на аккентном фоне */
  --action:         #C44A3A;
  --action-hover:   #A93C2D;
  --border:         rgba(30, 24, 18, 0.12);

  /* Типографика */
  --font-head: 'Onest', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Шкала */
  --h1: clamp(36px, 5vw, 56px);
  --h2: clamp(28px, 3.4vw, 40px);
  --h3: clamp(20px, 2vw, 24px);
  --body: 18px;
  --caption: 14px;
  --mono: 16px;

  /* Сетка */
  --max-w: 1280px;
  --text-w: 720px;
  --gutter: 24px;
  --block-pad-y: clamp(28px, 4vw, 56px);   /* 56px * 2 = 112px между блоками — в коридоре брифа 96-128 */
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--text-main);
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }

p { max-width: var(--text-w); }

ul { list-style: none; }

/* ============ Layout ============ */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--block-pad-y);
}

.section-narrow {
  max-width: var(--text-w);
  margin-inline: auto;
}

.section-header {
  margin-bottom: 32px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}

.lead {
  font-size: 20px;
  color: var(--text-muted);
  max-width: var(--text-w);
}

.muted { color: var(--text-muted); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--mono);
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 240, 230, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  gap: 24px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
  flex-shrink: 0;
}

.brand .dot {
  color: var(--accent);
}

.brand-tagline {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
  padding-left: 18px;
  border-left: 1px solid var(--border);
  max-width: 38ch;
}

@media (max-width: 1100px) {
  .brand-tagline { display: none; }
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a {
  font-size: 15px;
  color: var(--text-muted);
}

.nav a:hover { color: var(--text-main); }

@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--action);
  color: #fff;
}
.btn-primary:hover { background: var(--action-hover); }

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border-color: var(--text-main);
}
.btn-secondary:hover {
  background: var(--text-main);
  color: var(--bg-base);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-main); }

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  background-color: #2a2218;
  background-image: url('https://loremflickr.com/1920/1200/home,office,desk,workspace,minimalist?lock=24');
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 16, 10, 0.05) 0%,
    rgba(20, 16, 10, 0.55) 70%,
    rgba(20, 16, 10, 0.85) 100%
  );
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  padding-bottom: 56px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.18;
  letter-spacing: -0.018em;
  font-weight: 600;
  max-width: 26ch;
  margin-bottom: 22px;
}

.hero .sub {
  color: rgba(255,255,255,0.88);
  font-size: 17px;
  line-height: 1.5;
  max-width: 56ch;
  margin-bottom: 26px;
}

.hero-bullets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  max-width: 720px;
  margin-bottom: 28px;
}

.hero-bullets li {
  font-size: 14px;
  color: rgba(255,255,255,0.92);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

@media (max-width: 600px) {
  .hero-bullets { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}

/* ============ Section: «Что внутри» — 3 карточки ============ */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 960px) {
  .cards-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.card.with-image {
  padding: 0;
  overflow: hidden;
}

.card .card-img {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: #B0855B;  /* fallback — тёплый бук, если фото не подгрузилось */
}

.card .card-body {
  padding: 24px 28px 28px;
}

.card h3 {
  margin-bottom: 16px;
}

.card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card ul li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  color: var(--text-main);
}

.card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 1.5px;
  background: var(--accent);
}

.card-highlight {
  background: var(--accent);
  color: var(--bg-base);
}

.card-highlight h3,
.card-highlight ul li {
  color: var(--bg-base);
}

.card-highlight ul li::before { background: var(--bg-base); }

.card-highlight .badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--action);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 18px;
}

/* ============ Section: Конфигуратор-strip ============ */
.configurator-strip {
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 18px;
  padding: 56px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  border-left: 5px solid var(--accent);
}

@media (max-width: 900px) {
  .configurator-strip { grid-template-columns: 1fr; padding: 36px; }
}

.configurator-strip h2 {
  color: var(--text-main);
}

.configurator-strip .sub {
  color: var(--text-muted);
  margin: 16px 0 28px;
}

.config-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-main);
}

.config-list li::before { background: var(--accent); }

.config-preview {
  aspect-ratio: 4 / 3;
  background: #B0855B url('https://loremflickr.com/1000/750/workspace,desk,wood?lock=46') center/cover;
  border-radius: 12px;
}

/* ============ Section: Двухколонник + чеклист (для конфигуратор-стрипа) ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

.two-col h3 {
  margin-bottom: 20px;
  font-size: 22px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 16px;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  line-height: 1.5;
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 3px;
}

/* ============ Section: «Узнаёшь себя?» — таблица ============ */
.recognize-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 14px;
  overflow: hidden;
}

.recognize-table th {
  text-align: left;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 18px;
  color: var(--text-main);
  padding: 22px 28px;
  background: rgba(176, 133, 91, 0.18);
  border-bottom: 1px solid rgba(30, 24, 18, 0.12);
  width: 50%;
}

.recognize-table td {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(30, 24, 18, 0.08);
  border-right: 1px solid rgba(30, 24, 18, 0.08);
  vertical-align: top;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-main);
}

.recognize-table th + th,
.recognize-table td + td { border-right: none; }

.recognize-table tr:last-child td { border-bottom: none; }

@media (max-width: 700px) {
  .recognize-table,
  .recognize-table thead,
  .recognize-table tbody,
  .recognize-table tr,
  .recognize-table th,
  .recognize-table td {
    display: block;
    width: auto;
  }
  .recognize-table { padding: 8px; }
  .recognize-table thead { display: none; }
  .recognize-table tr {
    padding: 18px;
    border-bottom: 1px solid rgba(30, 24, 18, 0.1);
  }
  .recognize-table tr:last-child { border-bottom: none; }
  .recognize-table td {
    padding: 4px 0;
    border: none;
    position: relative;
    padding-left: 0;
  }
  .recognize-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 13px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
  }
  .recognize-table td:first-child::before { content: 'Если ты:'; }
  .recognize-table td:last-child::before { content: 'Что сейчас:'; margin-top: 12px; }
}

/* ============ Section: «Что ты получишь» — 5 карточек обещаний (3+2) ============ */
.promises {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .promises { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .promises { grid-template-columns: 1fr; }
}

.promise {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}

.promise .icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.promise h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.promise p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.55;
}

.promise .stat {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-top: auto;
  padding-top: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============ Section: Процесс — таймлайн с соединительной линией ============ */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  position: relative;
  padding-top: 4px;
}

/* Соединительная линия между кружками — рисуется до первого и после последнего, потом обрезается линиями-крышками */
.timeline::before {
  content: '';
  position: absolute;
  top: 30px;  /* центр кружков (56/2 + 2 padding) */
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--accent);
  opacity: 0.35;
  z-index: 0;
}

.step {
  background: transparent;
  border-radius: 0;
  padding: 0;
  position: relative;
  z-index: 1;
  text-align: center;
}

.step .num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  position: relative;
  z-index: 2;
}

.step h3 {
  font-size: 16px;
  margin-bottom: 10px;
  line-height: 1.3;
  text-align: center;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: center;
  padding-inline: 4px;
}

@media (max-width: 1000px) {
  .timeline { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .timeline::before { display: none; }
}

@media (max-width: 600px) {
  .timeline {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 0;
  }
  .timeline::before {
    display: block;
    top: 30px;
    bottom: 30px;
    left: 27px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .step {
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: 20px;
    text-align: left;
    align-items: start;
  }
  .step .num { margin: 0; }
  .step h3, .step p {
    text-align: left;
    padding: 0;
    grid-column: 2;
  }
  .step h3 { margin-top: 4px; }
}

/* ============ Section: Timeframes ============ */
.timeframes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .timeframes { grid-template-columns: 1fr; }
}

.timeframe {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 32px;
}

.timeframe .when {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.timeframe h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

.timeframe ul li {
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 15px;
  position: relative;
  color: var(--text-main);
}

.timeframe ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 1.5px;
  background: var(--accent);
}

/* ============ Section: FAQ accordion ============ */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion details {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 22px 24px;
  cursor: pointer;
}

.accordion summary {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

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

.accordion summary::after {
  content: '+';
  font-family: var(--font-head);
  font-size: 24px;
  color: var(--accent);
  font-weight: 400;
  line-height: 1;
  transition: transform .15s ease;
}

.accordion details[open] summary::after {
  transform: rotate(45deg);
}

.accordion .body {
  margin-top: 16px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============ Section: Сравнение — 6 карточек ============ */
.compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .compare { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .compare { grid-template-columns: 1fr; }
}

.compare-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.compare-card h3 {
  font-size: 18px;
  margin-bottom: 22px;
  line-height: 1.3;
}

.compare-card .row {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 0;
}

.compare-card .row b {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  opacity: 0.8;
}

.compare-card .row.mine {
  margin-top: 18px;
  padding: 18px 18px 16px;
  background: rgba(176, 133, 91, 0.14);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
  margin-inline: -8px 0;
}

.compare-card .row.mine b {
  color: var(--accent);
  font-weight: 700;
  opacity: 1;
}

.compare-card.is-main {
  background: var(--bg-card);
  color: var(--text-main);
  border-left: 5px solid var(--action);
  padding-left: 24px;
}

.compare-card.is-main h3 { color: var(--text-main); }

.compare-card.is-main .row { color: var(--text-muted); }

.compare-card.is-main .row b { color: var(--text-muted); }

.compare-card.is-main .row.mine {
  background: rgba(176, 133, 91, 0.14);
  border-left-color: var(--accent);
  color: var(--text-main);
}

.compare-card.is-main .row.mine b {
  color: var(--accent);
}

/* ============ Section: Founder ============ */
.founder {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .founder { grid-template-columns: 1fr; }
}

.founder-photo {
  aspect-ratio: 4 / 5;
  background: var(--bg-card);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  padding: 24px;
  line-height: 1.5;
}

.founder-text p {
  margin-bottom: 16px;
  max-width: 56ch;
}

.founder-text .signature {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 24px;
}

/* ============ Final CTA ============ */
.final-cta {
  background: rgba(176, 133, 91, 0.16);
  color: var(--text-main);
  text-align: center;
  padding: 72px 24px;
  border-radius: 18px;
  border-top: 4px solid var(--accent);
}

.final-cta h2 {
  color: var(--text-main);
  max-width: 18ch;
  margin: 0 auto 32px;
}

.final-cta .btn-row {
  justify-content: center;
}

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 64px;
  margin-top: 64px;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer .inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer .links {
  display: flex;
  gap: 18px;
}

.site-footer a:hover { color: var(--text-main); }

/* ============ Section spacers between sections inside container ============ */
.bg-card-wrap {
  background: transparent;
}

/* Make hero edge-to-edge and others contained */
