/* ============================================================
   GEMMA — кофе оптом от обжарщика. Посадочная страница.
   Бренд: чёрный #0B0B0C · оранжевый Pantone 021C #FE5000 · белый
   Шрифт: Geometria Medium (без засечек) — единый для всего
   ============================================================ */

@font-face {
  font-family: 'Geometria';
  src: url('../fonts/geometria-medium.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #0B0B0C;
  --ink: #1A1A1A;
  --ink-2: #4A4A4A;
  --white: #FFFFFF;
  --bg-light: #F5F5F5;
  --orange: #FE5000;
  --orange-dark: #D94400;
  --line: rgba(11, 11, 12, 0.08);
  --line-dark: rgba(255, 255, 255, 0.16);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card:
    0 1px 2px rgba(11, 11, 12, 0.05),
    0 8px 24px rgba(11, 11, 12, 0.07);
  --shadow-card-hover:
    0 2px 4px rgba(11, 11, 12, 0.06),
    0 14px 36px rgba(11, 11, 12, 0.12);
  --font: 'Geometria', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --container: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { line-height: 1.18; margin: 0 0 0.6em; text-wrap: balance; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
.container--narrow { max-width: 860px; }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--dark { background: var(--black); color: var(--white); }
.section--light { background: var(--bg-light); }
.section--dark .section__lead { color: rgba(255, 255, 255, 0.78); }

.section__title { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.4rem); letter-spacing: -0.01em; }
.section__lead {
  max-width: 640px;
  color: var(--ink-2);
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.15rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section--dark .section__lead { color: rgba(255,255,255,.78); }
.section__eyebrow {
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0 0 0.9rem;
}
.section__cta { margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.link-more { font-weight: 500; white-space: nowrap; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.12s, box-shadow 0.2s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.96); }
.btn--primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(254, 80, 0, 0.28);
}
.btn--primary:hover { background: var(--orange-dark); box-shadow: 0 10px 26px rgba(254, 80, 0, 0.36); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.45); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn--sm { min-height: 40px; padding: 0.55rem 1.1rem; font-size: 0.925rem; box-shadow: none; }
.btn--lg { min-height: 56px; padding: 1rem 2rem; font-size: 1.075rem; }

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  transition: box-shadow 0.25s;
}
.header.scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(11,11,12,0.07); }
.header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
}
.header__logo img { width: 138px; height: auto; }
.header__nav { display: contents; }
.nav-list { display: flex; gap: 1.4rem; }
.nav-list a {
  color: var(--ink);
  font-size: 0.95rem;
  padding: 0.4rem 0;
}
.nav-list a:hover { color: var(--orange); text-decoration: none; }
.header__nav-phone { display: none; }
.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}
.header__phone { font-weight: 500; color: var(--ink); white-space: nowrap; }
.header__phone:hover { color: var(--orange); text-decoration: none; }

/* Бургер (только мобильный) */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Первый экран ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: min(88vh, 780px);
  padding-block: clamp(4rem, 9vw, 7rem);
  overflow: hidden;
  color: var(--white);
}
.hero__bg, .hero__overlay { position: absolute; inset: 0; z-index: -1; }
.hero__bg {
  width: 100%; height: 100%;
  object-fit: cover;
  outline: 1px solid rgba(255,255,255,0.1);
  outline-offset: -1px;
}
.hero__overlay {
  background:
    linear-gradient(106deg, rgba(11,11,12,0.94) 0%, rgba(11,11,12,0.82) 42%, rgba(11,11,12,0.45) 100%),
    radial-gradient(90% 120% at 15% 100%, rgba(254,80,0,0.22), transparent 55%);
}
.hero__inner { max-width: 820px; }
.hero__eyebrow {
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  margin-bottom: 1.2rem;
}
.hero__title {
  font-size: clamp(2.1rem, 1.3rem + 4.4vw, 3.9rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.1rem;
}
.hero__lead {
  max-width: 620px;
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.25rem);
  color: rgba(255,255,255,0.86);
  margin-bottom: 2rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.4rem; }
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}
.hero__trust li { display: flex; align-items: center; gap: 0.55rem; }
.hero__trust li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
}

/* ---------- Цифры ---------- */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.stat {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.2rem;
  background: rgba(255,255,255,0.03);
}
.stat dd {
  margin: 0;
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat dt { font-size: 0.9rem; color: rgba(255,255,255,0.72); }

/* ---------- Карточки и сетки ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.section--light .card { background: var(--white); }
.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--ink-2); font-size: 0.97rem; }

.card--quote { display: flex; flex-direction: column; }
.card--quote blockquote {
  margin: 0 0 1rem;
  font-size: 0.99rem;
}
.card--quote blockquote::before { content: "«"; color: var(--orange); font-size: 2rem; line-height: 0; margin-right: 2px; }
.card--quote figcaption { margin-top: auto; color: var(--ink-2); font-size: 0.88rem; }
.card--quote figcaption b { color: var(--ink); font-weight: 500; }

.card--post h3 { font-size: 1.06rem; }
.card--post h3 a { color: var(--ink); }
.card--post h3 a:hover { color: var(--orange); text-decoration: none; }
.card--post p { font-size: 0.92rem; }
.card__meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.tag {
  background: rgba(254, 80, 0, 0.1);
  color: var(--orange-dark);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ---------- Ассортимент ---------- */
.assortment__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.assortment__photo {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.assortment__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid rgba(0,0,0,0.1);
  outline-offset: -1px;
  transition: transform 0.4s;
}
.assortment__photo:hover img { transform: scale(1.04); }
.assortment__grid .card { display: flex; flex-direction: column; justify-content: center; }
.assortment__note { margin-top: 1.4rem; font-size: 0.85rem; color: var(--ink-2); }

/* ---------- СТМ ---------- */
.stm__inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.stm__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stm__photos figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
}
.stm__photos figure:first-child { margin-top: 2.5rem; }
.stm__photos img {
  width: 100%; height: 100%;
  object-fit: cover;
  outline: 1px solid rgba(255,255,255,0.1);
  outline-offset: -1px;
}
.stm__for { color: rgba(255,255,255,0.72); margin: 1.6rem 0; }

/* ---------- Шаги ---------- */
.steps-list { counter-reset: step; display: grid; gap: 0; }
.steps-list li {
  counter-increment: step;
  position: relative;
  padding: 1.15rem 0 1.15rem 3.9rem;
  border-bottom: 1px solid var(--line);
}
.section--dark .steps-list li { border-color: var(--line-dark); }
.steps-list li:last-child { border-bottom: 0; }
.steps-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem; height: 2.6rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--orange);
  color: var(--orange);
  border-radius: 50%;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.steps-list b { display: block; font-weight: 500; font-size: 1.05rem; margin-bottom: 0.15rem; }
.steps-list span { color: var(--ink-2); font-size: 0.94rem; }
.section--dark .steps-list span { color: rgba(255,255,255,0.68); }
.steps-list--stm { margin: 2rem 0 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.8rem; }
.faq__item {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.faq__item[open] { box-shadow: var(--shadow-card-hover); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 1rem 1.3rem;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: 1.02rem;
  border-radius: var(--radius-md);
  transition: color 0.2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--orange-dark); }
.faq__item summary::after {
  content: "";
  width: 12px; height: 12px;
  flex: none;
  margin-right: 3px;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(45deg);
  transition: transform 0.25s;
}
.faq__item[open] summary::after { transform: rotate(225deg); }
.faq__body { padding: 0 1.3rem 1.2rem; color: var(--ink-2); }
.faq__body p { margin: 0; }

/* ---------- Форма ---------- */
.lead-form .section__lead { margin-left: auto; margin-right: auto; }
.form { display: grid; gap: 1.1rem; text-align: left; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form__field { display: grid; gap: 0.45rem; }
.form__field label { font-size: 0.9rem; color: rgba(255,255,255,0.8); }
.form__field input, .form__field select {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--white);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background-color 0.2s;
}
.form__field select { appearance: none; background-image: linear-gradient(45deg, transparent 49%, rgba(255,255,255,0.7) 50%), linear-gradient(135deg, rgba(255,255,255,0.7) 50%, transparent 51%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.form__field select option { color: var(--ink); background: var(--white); }
.form__field input::placeholder { color: rgba(255,255,255,0.38); }
.form__field input:focus, .form__field select:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(255,255,255,0.1);
}
.form__field input[aria-invalid="true"] { border-color: #FF6B4A; background: rgba(254,80,0,0.12); }
.form__consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.66);
  cursor: pointer;
}
.form__consent input {
  width: 1.25rem; height: 1.25rem;
  flex: none;
  margin: 0.15rem 0 0;
  accent-color: var(--orange);
}
.form__consent a { color: rgba(255,255,255,0.85); text-decoration: underline; }
.form__submit { margin-top: 0.4rem; }
.form__hint { font-size: 0.85rem; color: rgba(255,255,255,0.55); text-align: center; }
.form-success {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  background: rgba(255,255,255,0.04);
}
.form-success__title { color: var(--orange); font-size: 1.3rem; margin-bottom: 0.6rem; }
.form-success__again {
  background: none; border: 0; padding: 0;
  font-family: inherit; font-size: inherit;
  color: var(--orange); text-decoration: underline; cursor: pointer;
}

/* ---------- Контакты ---------- */
.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.contacts__list { display: grid; gap: 1.15rem; }
.contacts__list dt { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin-bottom: 0.2rem; }
.contacts__list dd { margin: 0; font-size: 1.05rem; }
.contacts__list a { color: var(--ink); font-weight: 500; }
.contacts__list a:hover { color: var(--orange); text-decoration: none; }
.contacts__shop {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.contacts__requisites { margin-top: 1.2rem; font-size: 0.85rem; color: var(--ink-2); }
.contacts__map {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  outline: 1px solid rgba(0,0,0,0.1);
  outline-offset: -1px;
}
.contacts__map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }

/* ---------- Подвал ---------- */
.footer { background: var(--black); color: rgba(255,255,255,0.72); padding-top: clamp(2.5rem, 5vw, 4rem); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer__brand img { width: 138px; margin-bottom: 1rem; }
.footer__brand p { font-size: 0.9rem; max-width: 260px; }
.footer__nav ul { display: grid; gap: 0.6rem; font-size: 0.95rem; }
.footer__nav a { color: rgba(255,255,255,0.72); }
.footer__nav a:hover { color: var(--white); text-decoration: none; }
.footer__contacts { display: grid; gap: 0.4rem; font-size: 0.95rem; justify-items: start; }
.footer__phone { color: var(--white); font-size: 1.15rem; font-weight: 500; }
.footer__phone:hover { color: var(--orange); text-decoration: none; }
.footer__contacts a:not(.footer__phone) { color: rgba(255,255,255,0.72); }
.footer__bottom { border-top: 1px solid var(--line-dark); padding-block: 1.3rem; font-size: 0.82rem; }
.footer__bottom p { margin: 0; }

/* ---------- Cookie ---------- */
[hidden] { display: none !important; }
.cookie {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 720px;
  margin-inline: auto;
  padding: 1.1rem 1.3rem;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(11,11,12,0.35);
}
.cookie p { margin: 0; font-size: 0.88rem; line-height: 1.5; }
.cookie .btn { flex: none; }

/* ---------- Мобильная CTA ---------- */
.mobile-cta {
  display: none;
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 80;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  background: var(--orange);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(254, 80, 0, 0.45);
}
.mobile-cta:hover { text-decoration: none; background: var(--orange-dark); }
.mobile-cta:active { transform: scale(0.96); }
body:target { } /* no-op */

/* ---------- Появление при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0, 0, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover { transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ============================ АДАПТИВ ============================ */
@media (max-width: 1020px) {
  .assortment__grid { grid-template-columns: repeat(2, 1fr); }
  .stm__inner { grid-template-columns: 1fr; }
  .stm__photos { max-width: 560px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .header__nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 6rem 2rem 3rem;
    background: var(--white);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .header__nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-list { flex-direction: column; gap: 0.4rem; }
  .nav-list a { display: block; padding: 0.85rem 0; font-size: 1.25rem; }
  .header__nav-phone { display: block; font-size: 1.25rem; font-weight: 500; color: var(--ink); }
  .header__actions { gap: 0.75rem; }
  .header__actions .btn { display: none; }
  .header__phone { display: none; }
  .burger { display: flex; }
  .contacts__grid { grid-template-columns: 1fr; }
  .contacts__map iframe { min-height: 320px; }
}

@media (max-width: 640px) {
  .assortment__grid { grid-template-columns: 1fr; }
  .assortment__photo { max-height: 340px; }
  .assortment__photo img { max-height: 340px; }
  .form__row { grid-template-columns: 1fr; }
  .stm__photos { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .stm__photos figure:first-child { margin-top: 1.2rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .cookie { flex-direction: column; align-items: flex-start; gap: 0.9rem; right: auto; }
  .mobile-cta { display: flex; }
  .cookie { bottom: 5rem; }
  body.has-mobile-cta { padding-bottom: 0; }
  /* когда видна форма/cookie — прячем плавающую кнопку, чтобы не мешала */
  .mobile-cta.is-hidden { display: none; }
}
