/* Mobile-first: базові стилі — телефон; @media нижче — планшет і десктоп. */
:root {
  --coffee: #3b2417;
  --coffee-2: #5a3824;
  --cream: #f7f1ea;
  --cream-2: #efe5d9;
  --accent: #b05c18;
  --accent-2: #934c12;
  --text: #2a1d15;
  --muted: #7a6a5e;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(59, 36, 23, .12);
  --header-h: 60px;
  --icon: var(--accent); /* колір іконок на світлих картках */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
/* лінійні іконки Lucide зі спрайта assets/icons.svg; розмір — від font-size обгортки */
.i {
  width: 1em; height: 1em; flex: none; display: block;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; text-wrap: balance; } /* balance — без «висячих» слів у заголовках */
h1 { font-size: 1.9rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 18px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border: 2px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--white);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, transform .1s;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: default; }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: var(--white); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
.btn--full { width: 100%; }
.link { color: var(--accent-2); font-weight: 600; }

/* ---------- шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(59, 36, 23, .97); color: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { font-size: 1.05rem; text-decoration: none; white-space: nowrap; }
.logo b { color: #e3a05c; } /* світла карамель — акцент на темній шапці не читається */
.logo__cup { font-size: 1.2rem; display: inline-flex; vertical-align: -.2em; margin-right: 2px; }
.header__right { display: flex; align-items: center; gap: 10px; }
.header__cta { display: none; }

.lang { display: flex; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; }
.lang__btn {
  min-width: 40px; min-height: 34px; padding: 0 8px;
  border: 0; background: transparent; color: rgba(255,255,255,.75);
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.lang__btn.is-active { background: var(--accent); color: var(--white); }

.burger {
  width: 44px; height: 44px; padding: 10px;
  border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
}
.burger span { display: block; height: 2px; background: var(--white); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.nav {
  position: fixed; top: var(--header-h); left: 0; right: 0;
  display: flex; flex-direction: column;
  background: var(--coffee); padding: 8px 18px 18px;
  transform: translateY(-120%); transition: transform .25s;
  box-shadow: 0 10px 20px rgba(0,0,0,.2);
}
.nav.is-open { transform: translateY(0); }
.nav a { padding: 14px 4px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 1.05rem; }
.nav a:last-child { border-bottom: 0; }

/* ---------- перший екран ---------- */
.hero {
  background: radial-gradient(circle at 80% 20%, var(--coffee-2), var(--coffee) 60%);
  color: var(--white);
  padding: 40px 0 44px;
}
.hero__inner { display: grid; gap: 28px; }
.hero__sub { font-size: 1.05rem; color: rgba(255,255,255,.85); }
.hero__actions { display: flex; flex-direction: column; gap: 12px; }
.hero__adv { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hero__adv li {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 12px 14px;
}
.ico {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; font-size: 1.25rem;
  border-radius: 50%; background: rgba(255,255,255,.1);
}

/* ---------- секції ---------- */
.section { padding: 48px 0; }
.section--alt { background: var(--cream); }
.section--dark { background: var(--coffee); color: var(--white); }
.section__sub { color: var(--muted); margin-top: -.3em; }
.section--dark .section__sub { color: rgba(255,255,255,.75); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: none; }
.step {
  position: relative; padding: 18px 18px 14px 70px;
  background: var(--cream); border-radius: var(--radius);
}
.step__n {
  position: absolute; left: 16px; top: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--white); font-weight: 700;
}
.step p { color: var(--muted); margin: 0; }

.cards { display: grid; gap: 14px; }
.card { background: var(--card-bg, var(--white)); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); overflow: hidden; }
/* фото типу закладу — на всю ширину картки; іконка «напливає» на його нижній край */
.card__img { display: block; margin: -20px -20px 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--cream-2); }
.card__img img, .coffee__banner img, .service__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card__img + .card__ico { position: relative; margin-top: -24px; box-shadow: 0 0 0 4px var(--card-bg, var(--white)); }
.card__ico {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px; font-size: 1.5rem;
  border-radius: 12px; background: var(--cream); color: var(--icon);
}
.card p { color: var(--muted); margin: 0; }

.machines { display: grid; gap: 14px; }
.machine {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--cream); border-radius: var(--radius); padding: 18px;
}
.machine__ico { font-size: 2rem; color: var(--icon); }
.machine__name { font-weight: 700; font-size: 1.1rem; }
/* мітки моделі — головні властивості акцентом */
.machine__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.tag {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px;
  border-radius: 999px; font-size: .8rem; font-weight: 700; line-height: 1.2;
  background: var(--accent); color: var(--white);
}
.machine__price { color: var(--accent-2); font-weight: 600; font-size: .9rem; margin-top: auto; }
.machine .btn { margin-top: 8px; }

/* широкий банер із зернами над списком */
.coffee__banner { display: block; aspect-ratio: 21 / 9; margin: 0 0 20px; border-radius: var(--radius); overflow: hidden; background: var(--cream-2); }
.goods { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goods li {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  font-size: .95rem;
}
.goods li span:first-child { font-size: 1.5rem; color: var(--icon); }
.note { color: var(--muted); }

/* ---------- акції та новини (картки .card, будує render.js) ---------- */
.promo { display: flex; flex-direction: column; border-top: 4px solid var(--accent); }
.promo .promo__until {
  display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px;
  color: var(--accent-2); font-size: .9rem; font-weight: 600;
}
.promo .btn { align-self: flex-start; margin-top: 12px; }
.news__date { display: block; margin-bottom: 6px; color: var(--accent-2); font-size: .85rem; font-weight: 600; }
.news__more { margin-top: 20px; }

.service { display: grid; gap: 18px; }
.service__photo { display: block; aspect-ratio: 4 / 5; margin-top: 18px; border-radius: var(--radius); overflow: hidden; background: var(--cream-2); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding: 12px 14px 12px 44px; background: var(--cream); border-radius: var(--radius); }
.checks li::before {
  content: "✓"; position: absolute; left: 14px; top: 11px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--white); font-size: .8rem; font-weight: 700;
  display: grid; place-items: center;
}

.faq { display: grid; gap: 10px; }
.faq details { background: var(--white); border-radius: var(--radius); padding: 0 16px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; padding: 16px 24px 16px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 1.4rem; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 14px; margin: 0; }

/* ---------- вакансії ---------- */
.jobs { display: grid; gap: 14px; margin-bottom: 24px; }
.job { background: var(--cream); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.job__list { margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.job__list li { margin-bottom: 4px; }
.job .btn { align-self: flex-start; margin-top: auto; }
.form--jobs { max-width: 560px; margin: 0 auto; }
.form--jobs h3 { margin: 0; }

/* ---------- контакти і форми ---------- */
.contact { display: grid; gap: 28px; }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 1.05rem; }
.contact__list li { display: flex; gap: 10px; align-items: center; }
.contact__list li > span:first-child { font-size: 1.2rem; opacity: .8; }
.contact__list a { text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.4); }

.form {
  display: grid; gap: 14px;
  background: var(--white); color: var(--text);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.form--light { padding: 0; box-shadow: none; }
.form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--coffee-2); }
.form input, .form select, .form textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid #d9cbbd; border-radius: 10px; background: var(--white);
  font: inherit; font-size: 16px; /* 16px — щоб iOS не збільшував сторінку при фокусі */
  color: var(--text);
}
.form textarea { resize: vertical; min-height: 90px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form .is-invalid { border-color: #c0392b; outline-color: #c0392b; }
.form__msg { margin: 0; min-height: 1.4em; font-size: .95rem; }
.form__msg.is-ok { color: #2e7d32; }
.form__msg.is-err { color: #c0392b; }
.form__model {
  display: flex; align-items: center; gap: 8px;
  background: var(--cream); border-radius: 10px; padding: 10px 12px; font-size: .95rem;
}
.form__model-x { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--cream-2); cursor: pointer; font-size: 1.1rem; }
/* спосіб зв'язку — радіокнопки у вигляді «пігулок» */
.form__how { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.form__how legend { padding: 0; margin-bottom: 6px; font-size: .9rem; font-weight: 600; color: var(--coffee-2); }
.form .chip { display: block; position: relative; font-weight: 600; cursor: pointer; }
.form .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border: 1px solid #d9cbbd; border-radius: 999px; background: var(--white); color: var(--text);
  transition: background .15s, border-color .15s, color .15s;
}
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form__consent { margin: -4px 0 0; font-size: .8rem; line-height: 1.4; color: var(--muted); }
.form__consent a { color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- підвал ---------- */
.footer { background: #24150d; border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.7); padding: 20px 0 96px; font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.footer a { text-decoration: none; }

/* ---------- сторінка політики конфіденційності ---------- */
.legal { max-width: 760px; }
.legal h1 { font-size: 1.9rem; }
.legal h2 { font-size: 1.15rem; margin-top: 1.6em; }
.legal__date { color: var(--muted); font-size: .9rem; }

/* ---------- кнопка зворотного зв'язку ---------- */
.fab {
  position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 18px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--white);
  font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.fab:hover { background: var(--accent-2); }
.fab { transition: opacity .2s, transform .2s; }
.fab.is-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.fab__ico { font-size: 1.3rem; }

/* ---------- модальне вікно ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20, 12, 8, .6); }
.modal__box {
  position: relative; width: 100%; max-height: 92vh; overflow-y: auto;
  background: var(--white); border-radius: 18px 18px 0 0;
  padding: 24px 18px calc(18px + env(safe-area-inset-bottom));
  animation: slide-up .25s ease-out;
}
.modal__x {
  position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--cream); font-size: 1.4rem; cursor: pointer;
}
.modal__box h2 { padding-right: 44px; } /* не заходить під хрестик */
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
body.no-scroll { overflow: hidden; }

/* ========== планшет ========== */
@media (min-width: 640px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.9rem; }
  .hero__actions { flex-direction: row; }
  .hero__adv { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .machines { grid-template-columns: 1fr 1fr; }
  .goods { grid-template-columns: repeat(3, 1fr); }
  .jobs { grid-template-columns: 1fr 1fr; }
  .modal { align-items: center; padding: 20px; }
  .modal__box { max-width: 520px; border-radius: 18px; padding: 28px; }
}

/* ========== десктоп ========== */
@media (min-width: 1000px) {
  :root { --header-h: 70px; }
  h1 { font-size: 3rem; }
  .burger { display: none; }
  .header__cta { display: inline-flex; }
  .nav {
    position: static; flex-direction: row; gap: 4px;
    background: none; padding: 0; transform: none; box-shadow: none;
  }
  .nav a { border: 0; padding: 8px 7px; font-size: .9rem; white-space: nowrap; color: rgba(255,255,255,.85); }
  .header__cta { white-space: nowrap; }
  .nav a:hover { color: var(--white); }
  .hero { padding: 80px 0; }
  .hero__inner { grid-template-columns: 1.3fr 1fr; align-items: center; gap: 48px; }
  .hero__adv { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { padding: 70px 20px 20px; }
  .step__n { top: 18px; left: 20px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .machines { grid-template-columns: repeat(4, 1fr); }
  .goods { grid-template-columns: repeat(6, 1fr); }
  .goods li { flex-direction: column; text-align: center; }
  /* список — по центру висоти фото, щоб колонки не «перекошувало» */
  .service { grid-template-columns: 1fr 1fr; align-items: center; }
  .service__photo { aspect-ratio: 5 / 4; }
  .coffee__banner { aspect-ratio: 3 / 1; }
  .contact { grid-template-columns: 1fr 1.1fr; align-items: start; gap: 48px; }
  .form { padding: 28px; }
  .footer { padding-bottom: 20px; }
}

/* вузький десктоп: меню в один рядок не вміщує ще й кнопку — вона є на першому екрані */
@media (min-width: 1000px) and (max-width: 1199px) {
  .header__cta { display: none; }
}
