/* Кофейня «Аромат» — лендинг. 8px grid, 1 акцент, тёмная тема, CLS<0.1 */

:root {
  /* Палитра: тёплая бумага + эспрессо-чернильный + 1 акцент */
  --bg: #F7F2E9;
  --surface: #FFFDF8;
  --ink: #241B12;
  --ink-soft: #5C5142;
  --line: #E4DACA;
  --accent: #B4501E;          /* только CTA и ссылки */
  --accent-ink: #FFF8F0;
  --accent-hover: #9A4318;
  --error: #B3261E;
  --success: #2E6B3F;

  /* Типографика: display serif + system body */
  --font-display: "Georgia", "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing tokens, 8px grid */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 48px;
  --s-7: 64px;
  --s-8: 96px;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 2px 8px rgba(36, 27, 18, .08);
  --shadow-lift: 0 12px 32px rgba(36, 27, 18, .14);
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120C;
    --surface: #211A12;
    --ink: #F2EAD9;
    --ink-soft: #B8AC97;
    --line: #3A3022;
    --accent: #E0703A;
    --accent-ink: #1C120A;
    --accent-hover: #F0834D;
    --error: #F2A09B;
    --success: #8FCB9E;
    --shadow: 0 2px 8px rgba(0, 0, 0, .4);
    --shadow-lift: 0 12px 32px rgba(0, 0, 0, .5);
  }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-3);
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5.5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--s-3); }

a { color: var(--accent); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--s-3);
}

section { padding: var(--s-7) 0; }

/* Фокус виден (WCAG) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  font: 600 1.05rem/1 var(--font-body);
  padding: 16px 32px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  min-height: 48px; /* touch target */
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
}

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-primary:active { transform: translateY(0) scale(.98); }

.btn-lg { font-size: 1.15rem; padding: 20px 40px; }
.btn-block { width: 100%; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding-top: var(--s-2);
  padding-bottom: var(--s-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink);
  text-decoration: none;
}

.brand-mark { color: var(--accent); flex: none; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.site-nav {
  display: flex;
  gap: var(--s-4);
  margin-left: auto;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  padding: var(--s-2) 0;
}

.site-nav a:hover { color: var(--accent); }

.header-cta { padding: 12px 24px; font-size: .95rem; }

/* ---------- Hero ---------- */
.hero { padding: var(--s-7) 0 var(--s-6); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: var(--s-6);
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: var(--s-4);
}

.trust-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  padding: 0;
  margin: var(--s-4) 0 0;
  font-size: .9rem;
  color: var(--ink-soft);
}

.trust-chips li { display: flex; align-items: center; gap: var(--s-2); }
.trust-chips li::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* Hero-изображение */
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: min(100%, 420px); height: auto; border-radius: var(--radius-lg); }

/* ---------- Bento «Почему мы» ---------- */
.bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--s-3);
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  transition: transform .25s ease, box-shadow .25s ease;
}

.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.bento-big { grid-row: span 2; padding: var(--s-5); }
.bento-big h3 { font-size: 1.5rem; }

.icon {
  width: 40px; height: 40px;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

.bento-card p { color: var(--ink-soft); margin: 0; }

/* ---------- Каталог ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: var(--accent);
}

.card-img { margin-bottom: var(--s-3); border-radius: var(--radius); overflow: hidden; }
.card-img img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

.card h3 { font-size: 1.1rem; margin-bottom: var(--s-1); }
.card-note { font-size: .88rem; color: var(--ink-soft); margin-bottom: var(--s-3); }

.price { font-weight: 700; margin: 0; }

.section-cta { text-align: center; margin-top: var(--s-5); }

/* ---------- О кофейне ---------- */
.about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: var(--s-6);
  align-items: center;
}

.about-art img { width: 100%; height: auto; border-radius: var(--radius-lg); }

.review {
  border-left: 3px solid var(--accent);
  padding-left: var(--s-3);
  color: var(--ink-soft);
  font-style: italic;
  margin: var(--s-4) 0 0;
}
.review footer { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); font-style: normal; }
.review footer img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.review cite { font-size: .9rem; color: var(--ink); }

/* ---------- Отзывы ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
}
.review-card img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin-bottom: var(--s-2); }
.review-card blockquote { margin: 0 0 var(--s-2); font-style: italic; color: var(--ink-soft); font-size: .95rem; }
.review-card cite { font-style: normal; font-weight: 600; font-size: .9rem; }

/* ---------- Форма ---------- */
.order { background: var(--surface); border-block: 1px solid var(--line); }

.order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: start;
}

.order-form {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  box-shadow: var(--shadow);
}

.field { margin-bottom: var(--s-3); }

.field label {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: var(--s-1);
}

.field input,
.field select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 48px;
  transition: border-color .15s ease;
}

.field input:focus,
.field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

.field.invalid input,
.field.invalid select { border-color: var(--error); }

.field-error {
  color: var(--error);
  font-size: .85rem;
  margin: var(--s-1) 0 0;
}

.microcopy {
  font-size: .8rem;
  color: var(--ink-soft);
  text-align: center;
  margin: var(--s-3) 0 0;
}

.form-success {
  margin-top: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
  font-weight: 600;
  text-align: center;
}


/* ---------- Футер ---------- */
.site-footer {
  padding: var(--s-6) 0 calc(var(--s-6) + 72px); /* запас под мобильный CTA */
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: var(--s-4);
  align-items: start;
}

.footer-brand { font-size: 1.5rem; margin-bottom: var(--s-1); }
.footer-note { color: var(--ink-soft); font-size: .9rem; }

.footer-contacts { font-style: normal; color: var(--ink-soft); font-size: .95rem; }
.footer-contacts p { margin-bottom: var(--s-3); }
.footer-contacts strong { color: var(--ink); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }

.footer-nav { display: flex; flex-direction: column; gap: var(--s-2); justify-self: end; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.footer-nav a:hover { color: var(--accent); }

.footer-bottom { margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- Мобильный CTA (зона большого пальца) ---------- */
.mobile-cta {
  position: fixed;
  left: var(--s-3);
  right: var(--s-3);
  bottom: var(--s-3);
  z-index: 30;
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
  text-decoration: none;
  font: 700 1.05rem/1 var(--font-body);
  padding: 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
}

/* ---------- Плавающая кнопка «наверх» ---------- */
.scroll-top {
  position: fixed; right: var(--s-3); bottom: var(--s-3); z-index: 40;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 50%; box-shadow: var(--shadow-lift); text-decoration: none;
  transition: transform .2s ease, opacity .3s ease;
}
.scroll-top:hover { transform: translateY(-3px); color: var(--accent); }
.scroll-top[hidden] { display: none; }

/* ---------- Reveal-анимация при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .steam { animation: none; }
  .btn, .card, .bento-card { transition: none; }
}

/* ---------- Планшет ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero-art { order: -1; }
  .hero-art img { width: min(70%, 300px); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-big { grid-row: auto; }
  .about-grid, .order-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .scroll-top { bottom: 88px; } /* над мобильным CTA */
}

/* ---------- Телефон ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  section { padding: var(--s-6) 0; }
  .cards { grid-template-columns: 1fr; }
  .header-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { justify-self: start; flex-direction: row; gap: var(--s-4); }
  .btn-lg { width: 100%; text-align: center; }
  .reviews-grid { grid-template-columns: 1fr; }
}


/* ---------- Мобильное меню ---------- */
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; margin-left: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); cursor: pointer; place-content: center; gap: 4px; }
.menu-toggle span { display: block; width: 19px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .22s ease, opacity .18s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { display: none; }

@media (max-width: 900px) {
  .menu-toggle { display: grid; }
  .mobile-menu { position: absolute; top: 100%; right: 0; left: 0; display: grid; gap: 0; padding: var(--s-2) max(var(--s-3), calc((100% - var(--max-w)) / 2)); border-bottom: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow-lift); }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu a { min-height: 48px; display: flex; align-items: center; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 1rem; text-decoration: none; }
  .mobile-menu a:last-child { border-bottom: 0; }
  .mobile-menu a:hover { color: var(--accent); }
  .mobile-menu__cta { justify-content: center; margin-top: var(--s-2); padding: 12px var(--s-3) !important; border: 0 !important; background: var(--accent); color: var(--bg) !important; font-weight: 700; }
  .mobile-menu__cta:hover { background: var(--accent-hover); color: var(--bg) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle span { transition: none; }
}
