/* A-ENERGY food trade — стилі v3 */

/* Montserrat — корпоративна гарнітура A-ENERGY (OFL, локальні файли, латиниця + кирилиця) */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/montserrat-400.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/montserrat-500.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/montserrat-600.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/montserrat-700.woff") format("woff"); }

:root {
  --bg: #f8f5ee;
  --surface: #ffffff;
  --tint: #f0ebdf;
  --green-950: #12332a;
  --green-900: #173f30;
  --green-800: #1d4d3b;
  --green-700: #245c46;
  --green-100: #e3ece6;
  --gold: #b8913f;
  --gold-text: #7f5f1f;
  --gold-soft: #f1e6cc;
  --text: #1c2420;
  --muted: #4f5a54;
  --line: #e2dccd;
  --danger: #a3281f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23, 63, 48, .06), 0 10px 28px rgba(23, 63, 48, .08);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: var(--font);
  --header-h: 64px;
  --bar-h: 64px;
  --section-y: 48px;
}
@media (min-width: 960px) {
  :root { --header-h: 72px; --section-y: 88px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--green-900); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .55em; color: var(--green-900); }
h1, h2 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(1.75rem, 1.1rem + 2.9vw, 3.1rem); line-height: 1.12; text-wrap: balance; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.2rem); text-wrap: balance; }
.h2-sm { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); }
h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
@media (max-width: 380px) { .container { width: calc(100% - 28px); } }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--green-900); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
  margin: 0 0 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-text);
}
.eyebrow-light { color: var(--gold-soft); }
.muted { color: var(--muted); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 22px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--green-800); color: #fff; }
.btn-primary:hover { background: var(--green-950); color: #fff; }
.btn-outline { background: transparent; color: var(--green-900); border-color: var(--green-800); }
.btn-outline:hover { background: var(--green-100); color: var(--green-900); }
.btn-gold { background: var(--gold-soft); color: var(--green-950); border-color: var(--gold-soft); }
.btn-gold:hover { background: #fff; border-color: #fff; color: var(--green-950); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(241, 230, 204, .7); }
.btn-outline-light:hover { background: rgba(241, 230, 204, .12); color: #fff; }
.btn-sm { min-height: 42px; padding: 8px 18px; font-size: .95rem; white-space: nowrap; }
.btn-lg { min-height: 56px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .75; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.section-dark .btn-row .btn, .hero .btn-row .btn { flex: 1 1 auto; }
@media (min-width: 600px) { .hero .btn-row .btn { flex: 0 0 auto; } }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 245, 238, .95);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; margin-right: auto; flex: none; }
.logo img { height: 44px; width: auto; }
@media (min-width: 960px) { .logo img { height: 52px; } }
@media (max-width: 380px) { .logo img { height: 40px; } }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav ul { display: flex; gap: 22px; }
.site-nav ul a { color: var(--text); text-decoration: none; font-weight: 500; padding: 6px 0; }
.site-nav ul a:hover { color: var(--green-700); text-decoration: underline; }
.header-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--green-900); white-space: nowrap; }
.header-phone .icon { width: 18px; height: 18px; }

.nav-toggle {
  display: none; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 14px;
  background: transparent; color: var(--green-900);
  border: 1.5px solid var(--line); border-radius: 999px;
  font: inherit; font-weight: 600; cursor: pointer;
}

@media (max-width: 1179px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 8px;
    padding: 8px 20px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px rgba(23, 63, 48, .1);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .header-phone { padding: 12px 4px; }
}
@media (min-width: 1180px) and (max-width: 1260px) {
  .site-nav, .site-nav ul { gap: 16px; }
}

/* Зображення: спільна подача */
.media { margin: 0; }
.media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  filter: saturate(.9);
}

/* Головний екран */
.hero { padding: 28px 0 var(--section-y); }
.hero-grid { display: grid; gap: 22px; grid-template-areas: "copy" "adv" "media"; }
.hero-copy { grid-area: copy; }
.hero-media { grid-area: media; }
.advantages { grid-area: adv; }
.hero h1 { margin-bottom: .45em; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 34em; margin-bottom: 22px; }

.advantages {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--green-900); color: #fff;
  border-radius: var(--radius); overflow: hidden;
}
.advantages li {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 6px; text-align: center;
  font-weight: 600; font-size: .88rem; line-height: 1.25;
}
.advantages li + li { border-left: 1px solid rgba(241, 230, 204, .2); }
.advantages .icon { width: 26px; height: 26px; color: var(--gold-soft); }

@media (min-width: 600px) {
  .advantages li { flex-direction: row; gap: 12px; padding: 18px 16px; font-size: 1rem; }
  .advantages .icon { width: 30px; height: 30px; }
}
@media (min-width: 960px) {
  .hero { padding-top: 56px; }
  .hero-grid {
    grid-template-columns: 1fr 1.05fr; column-gap: 56px; row-gap: 40px;
    grid-template-areas: "copy media" "adv adv";
    align-items: center;
  }
  .lead { font-size: 1.18rem; }
}

/* Розділи */
.section { padding: var(--section-y) 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--green-900); color: #e6eee9; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 46em; margin-bottom: 28px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }

/* Продукція */
.product-grid { display: grid; gap: 28px; }
.product-intro p:not(.eyebrow) { color: var(--muted); }
.specs { display: grid; gap: 12px; }
.specs li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.specs h3 { margin: 0 0 2px; }
.specs p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.spec-icon {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--gold-soft); color: var(--green-900);
}
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 14px 0 0; padding: 14px 16px;
  background: var(--green-100); color: var(--green-950);
  border-left: 4px solid var(--green-700); border-radius: var(--radius-sm);
  font-size: .95rem; line-height: 1.5;
}
.notice .icon { color: var(--green-700); margin-top: 1px; }
.specs { grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 599px) {
  .specs li { flex-direction: column; gap: 10px; padding: 14px 12px; }
  .specs h3 { font-size: 1rem; }
  .specs p { font-size: .88rem; }
  .spec-icon { width: 40px; height: 40px; }
}
@media (min-width: 960px) {
  .product-grid { grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
  .product-intro { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* Доставка */
.delivery-grid { display: grid; gap: 24px; grid-template-areas: "copy" "media" "terms"; }
.delivery-copy { grid-area: copy; }
.delivery-media { grid-area: media; }
.delivery-terms { grid-area: terms; }
.delivery-copy p:not(.eyebrow) { color: var(--muted); }

.chain {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 10px; margin-top: 20px;
}
.chain li { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--green-900); font-size: .95rem; }
.chain-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--green-800);
}
.chain-icon .icon { width: 22px; height: 22px; }
.chain-arrow { color: var(--gold); }
.chain-arrow .icon { width: 18px; height: 18px; }
@media (max-width: 599px) {
  .chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 6px; }
  .chain li:not(.chain-arrow) { flex-direction: column; text-align: center; gap: 6px; font-size: .85rem; line-height: 1.25; }
  .chain-arrow { padding-top: 11px; }
}

.delivery-terms {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.delivery-terms h3 { margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tags li {
  padding: 6px 12px; border-radius: 999px;
  background: var(--tint); color: var(--green-950);
  font-size: .92rem; font-weight: 500; line-height: 1.3;
}
.delivery-terms .muted { font-size: .95rem; margin-bottom: 18px; }
@media (max-width: 599px) {
  .delivery-terms .btn { width: 100%; }
}
@media (min-width: 960px) {
  .delivery-grid {
    grid-template-columns: 1fr 1fr; column-gap: 56px; row-gap: 32px;
    grid-template-areas: "copy media" "terms terms";
    align-items: center;
  }
  .delivery-terms {
    display: grid; grid-template-columns: 1fr auto; gap: 8px 40px; align-items: center;
    padding: 26px 30px;
  }
  .delivery-terms h3, .delivery-terms .tags, .delivery-terms .muted { grid-column: 1; }
  .delivery-terms .btn { grid-column: 2; grid-row: 1 / span 3; }
  .delivery-terms .tags { margin-bottom: 6px; }
  .delivery-terms .muted { margin-bottom: 0; }
}

/* Покупці */
.buyers { display: grid; }
.buyers li {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-weight: 500; line-height: 1.4;
}
.buyers li:first-child { border-top: 1px solid var(--line); }
.buyers .icon {
  width: 42px; height: 42px; padding: 9px; border-radius: 12px;
  background: var(--green-100); color: var(--green-800);
}
@media (min-width: 640px) {
  .buyers { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .buyers li:nth-child(2) { border-top: 1px solid var(--line); }
}
@media (min-width: 1024px) {
  .buyers { grid-template-columns: repeat(3, 1fr); }
  .buyers li:nth-child(3) { border-top: 1px solid var(--line); }
}

/* Кроки */
.steps { display: grid; gap: 12px; counter-reset: step; }
.steps li {
  position: relative; padding: 18px 18px 18px 70px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.steps h3 { margin: 0 0 2px; display: flex; align-items: baseline; gap: 8px; }
.step-num { color: var(--gold-text); font-family: var(--font-head); }
.step-num::after { content: "."; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.step-icon {
  position: absolute; left: 16px; top: 18px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold-soft); color: var(--green-900);
}
.step-icon .icon { width: 22px; height: 22px; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 22px 20px; }
  .step-icon { position: static; margin-bottom: 14px; }
}

/* FAQ */
.faq { margin-top: 40px; display: grid; gap: 16px; }
.faq h2 { margin: 0 0 .4em; }
.faq-head p { color: var(--muted); margin: 0; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 8px;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 14px 50px 14px 18px; position: relative;
  font-weight: 600; color: var(--green-900); border-radius: var(--radius-sm);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--gold-text); border-bottom: 2px solid var(--gold-text);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }
@media (min-width: 960px) {
  .faq { margin-top: 64px; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
}

/* Контакти і форма */
.contact-grid { display: grid; gap: 28px; }
.contacts p:not(.eyebrow) { color: #d5e1da; }
.contact-list { display: grid; gap: 10px; margin: 18px 0 22px; font-size: 1.1rem; }
.contact-list li { display: flex; align-items: center; gap: 12px; }
.contact-list .icon { color: var(--gold-soft); }
.contact-list a { font-weight: 600; color: #fff; word-break: break-word; }
.contact-list a:hover { color: var(--gold-soft); }
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
  .contacts { position: sticky; top: calc(var(--header-h) + 32px); padding-top: 12px; }
}

.form-card {
  background: var(--surface); color: var(--text);
  border-radius: var(--radius); padding: 24px 18px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .22);
  border-top: 5px solid var(--gold);
}
.form-card:focus { outline: none; }
.section-dark .form-card h2, .section-dark .form-card h3 { color: var(--green-900); }
.form-card h2 { margin-bottom: .3em; }
.form-intro { color: var(--muted); }
@media (min-width: 600px) { .form-card { padding: 34px; } }

.request-form { margin-top: 18px; }
.field-grid { display: grid; gap: 0 16px; }
@media (min-width: 600px) {
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
}
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--green-950); font-size: .97rem; }
.req { color: var(--danger); }
.opt { font-weight: 400; color: var(--muted); font-size: .88rem; }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--text);
  background: #fbfaf6; border: 1.5px solid #948a73; border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.field input::placeholder, .field textarea::placeholder { color: #636b64; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: #6f6753; }
.field input:focus, .field textarea:focus {
  outline: none; background: #fff;
  border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(36, 92, 70, .22);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); background: #fff8f7; }
.field-hint { font-size: .86rem; color: var(--muted); margin: 5px 0 0; }
.field-error { font-size: .9rem; color: var(--danger); margin: 5px 0 0; font-weight: 600; }
.field-error:empty { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .86rem; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }

.form-status {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm);
  display: flex; gap: 10px; align-items: flex-start; line-height: 1.5;
}
.form-status:focus { outline: none; }
.form-status[hidden] { display: none; }
.form-status.is-error { background: #fbeceb; color: #6d1a14; border: 1px solid #efc2bd; }
.form-status .icon { margin-top: 2px; }
.form-status a { color: inherit; font-weight: 700; }
.form-status p { margin: 0; }

.form-success { text-align: center; padding: 24px 6px 6px; }
.form-success:focus { outline: none; }
.form-success .icon { width: 56px; height: 56px; color: var(--green-700); margin: 0 auto 12px; display: block; }
.form-success p { color: var(--muted); }

/* Підвал */
.site-footer { background: var(--green-950); color: #cfdcd4; padding: 36px 0; }
.footer-inner { display: grid; gap: 18px; }
.footer-inner p { margin: 0 0 4px; }
.footer-logo { height: 64px; width: auto; margin-bottom: 12px; }
.footer-contacts { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--gold-soft); }
.footer-copy { font-size: .9rem; opacity: .85; }
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .footer-contacts { flex-direction: column; align-items: flex-end; }
  .footer-copy { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); }
}

/* Нижня панель на мобільних */
.mobile-bar { display: none; }
@media (max-width: 767px) {
  body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); }
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(248, 245, 238, .97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(23, 63, 48, .1);
    transition: transform .25s ease, visibility .25s;
  }
  .mobile-bar.is-hidden { transform: translateY(110%); visibility: hidden; }
  .mobile-bar-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; border-radius: 999px;
    font-weight: 700; font-size: .98rem; text-decoration: none;
  }
  .mobile-bar-btn .icon { width: 20px; height: 20px; }
  .mobile-bar-call { color: var(--green-900); border: 2px solid var(--green-800); background: transparent; }
  .mobile-bar-request { color: #fff; background: var(--green-800); }
}

@media (max-width: 380px) {
  body { font-size: 15.5px; }
  .mobile-bar { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .mobile-bar-btn { font-size: .9rem; gap: 6px; }
  .advantages li { font-size: .82rem; }
  .btn { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
