/*
 * Сайт-візитка malvio.com.ua. Кольори знака — бренд «Сад» (як у
 * `frontend-crm/src/shell/brand.tsx`): Хвоя, Мальва, Пилок, Стебло.
 * Тло — «Роса», блідо-зелене, щоб рожеве Мальви не читалось як «помилка».
 */
:root {
  --pine: #1e3b2c;
  --mallow: #f59cc2;
  --mallow-ink: #a3245d;
  --pollen: #ffd66b;
  --stem: #a6d8b0;
  --dew: #f2f6f1;
  --paper: #ffffff;
  --ink: #1e3b2c;
  --muted: #4f6658;
  --line: #d5e2d7;
  --chat: #e7efe8;
  --bubble-me: #1e3b2c;
  --bubble-me-ink: #ffffff;
  --focus: #a3245d;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --dew: #10211a;
    --paper: #172c22;
    --ink: #e9f2eb;
    --muted: #a7bcae;
    --line: #2b4537;
    --chat: #1d3529;
    --mallow-ink: #f59cc2;
    --bubble-me: #a6d8b0;
    --bubble-me-ink: #10211a;
    --focus: #f59cc2;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--dew);
  color: var(--ink);
  font: 400 17px/1.6 'Onest', system-ui, sans-serif;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  background: var(--paper);
  padding: 8px 12px;
  z-index: 10;
}

/* Шапка */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.lockup svg {
  width: 34px;
  height: 34px;
  flex: none;
}
.word {
  font: 600 30px/1 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 0.01em;
}
.word .i {
  position: relative;
  display: inline-block;
}
.word .i svg {
  position: absolute;
  left: 50%;
  top: 0.02em;
  width: 0.34em;
  height: 0.34em;
  transform: translateX(-50%);
}
.login {
  font-weight: 500;
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}
.login:hover {
  border-color: var(--ink);
}

/* Перший екран */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 72px;
}
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 18px;
}
.eyebrow b {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pollen);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pollen) 35%, transparent);
  margin-right: 8px;
  vertical-align: 1px;
}
h1,
h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 {
  font-size: clamp(46px, 7vw, 84px);
  line-height: 0.98;
}
h1 em {
  font-style: italic;
  color: var(--mallow-ink);
}
.lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
  margin: 24px 0 32px;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--pine);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 16px 26px;
  border-radius: 999px;
}
@media (prefers-color-scheme: dark) {
  .cta {
    background: var(--mallow);
    color: #10211a;
  }
}
.cta:hover {
  filter: brightness(1.12);
}
.cta-note {
  display: block;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

/* Підпис сторінки: чат бота, що сам кладе запис у день салону */
.stage {
  position: relative;
  min-height: 470px;
}
.phone {
  width: min(290px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 16px;
  box-shadow: 0 30px 60px -30px rgb(30 59 44 / 0.35);
}
.phone-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.phone-head svg {
  width: 30px;
  height: 30px;
}
.phone-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  font-size: 14px;
  line-height: 1.4;
}
.msg {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 16px;
  background: var(--chat);
  border-bottom-left-radius: 6px;
}
.msg.me {
  align-self: flex-end;
  background: var(--bubble-me);
  color: var(--bubble-me-ink);
  border-radius: 16px 16px 6px 16px;
}
.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.slots span {
  text-align: center;
  padding: 7px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
.slots .picked {
  border-color: var(--mallow-ink);
  background: color-mix(in srgb, var(--mallow) 28%, transparent);
  font-weight: 600;
}
.day {
  /* Картка дня лише торкається телефона кутом: відповідь бота «Готово ✓»
     мусить лишатись видно (на 1280 перша версія її накривала). */
  position: absolute;
  right: 0;
  bottom: -28px;
  width: min(220px, 48%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  font-size: 13px;
  box-shadow: 0 24px 50px -28px rgb(30 59 44 / 0.4);
}
.day h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-top: 1px dashed var(--line);
  font-variant-numeric: tabular-nums;
}
.row time {
  color: var(--muted);
}
.visit {
  border-radius: 8px;
  padding: 5px 8px;
  background: color-mix(in srgb, var(--stem) 45%, transparent);
}
.visit.new {
  background: color-mix(in srgb, var(--mallow) 40%, transparent);
  outline: 2px solid var(--mallow);
}
.visit small {
  display: block;
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(6px);
    animation: in 0.45s ease-out forwards;
  }
  .d1 { animation-delay: 0.3s; }
  .d2 { animation-delay: 1s; }
  .d3 { animation-delay: 1.7s; }
  .d4 { animation-delay: 2.4s; }
  .d5 { animation-delay: 3.1s; }
  .slots .picked {
    animation: pick 0.3s ease-out 2.2s both;
  }
  .visit.new {
    animation: land 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) 3.4s both;
  }
  @keyframes in {
    to { opacity: 1; transform: none; }
  }
  @keyframes pick {
    from { background: transparent; border-color: var(--line); font-weight: 400; }
  }
  @keyframes land {
    from { opacity: 0; transform: translateX(-40px) scale(0.9); }
    to { opacity: 1; transform: none; }
  }
}

/* Розділи */
section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
h2 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.05;
  max-width: 16em;
}
.section-lede {
  color: var(--muted);
  max-width: 38em;
  margin: 14px 0 40px;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.features div {
  background: var(--paper);
  padding: 26px;
}
.features h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}
.features p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 32px;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 14px;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  /* Не Cormorant: його старостильна «1» читається як римська «I». */
  font: 600 17px/1 'Onest', system-ui, sans-serif;
  font-variant-numeric: lining-nums;
  background: var(--paper);
  border: 1px solid var(--line);
}
.steps b {
  font-weight: 600;
}
.steps span {
  color: var(--muted);
  font-size: 15px;
}
.early {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background: var(--pine);
  color: #eef5ef;
  border-radius: 28px;
  padding: 44px;
}
.early h2 {
  color: #fff;
}
.early p {
  color: #c6d9cb;
  margin: 12px 0 0;
  max-width: 34em;
}
.early .cta {
  background: var(--mallow);
  color: #10211a;
}

/* Підвал */
footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

/* Сторінки документів */
.doc {
  max-width: 720px;
  padding: 24px 0 80px;
}
.doc h1 {
  font-size: clamp(40px, 6vw, 60px);
  margin-bottom: 8px;
}
.doc .updated {
  color: var(--muted);
  margin: 0 0 36px;
}
.doc h2 {
  font-size: 30px;
  margin: 40px 0 8px;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0;
}
.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-top: 1px solid var(--line);
}
.doc th {
  font-weight: 600;
}
.doc .table-scroll {
  overflow-x: auto;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 16px;
  }
  .features,
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .early {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  .features,
  .steps {
    grid-template-columns: 1fr;
  }
  .stage {
    min-height: 0;
  }
  .day {
    position: static;
    width: 100%;
    margin-top: 14px;
  }
  .phone {
    width: 100%;
  }
  section {
    padding: 56px 0;
  }
}
