/* Крепче — кофейня, пересборка v3 по ревью 04.11. Эталон: drip (kofeyni/dripcoffe.md).
   Грамматика: белый editorial, чёрный набор, акцент #99EEFF дозированно (60/30/10),
   радиусы 4px медиа / 100px пилюли, тени и ритм 0.4s из профиля §8–9.
   Сетка: контейнер 1440 из профиля (С1), 12 колонок, mobile-first 390/768/1024/1440.
   Шкала кеглей: 78 / 48 / 32 / 20 / 16 / 13 (соотношения ≥1.2). */

/* ---------- шрифты (пара из МАТЧИНГ_ЭТАЛОНЫ: drip → Inter 700 + Source Sans 3) ---------- */
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-700-cyrillic.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-700-latin.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-400-cyrillic.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-500-cyrillic.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-500-latin.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-700-cyrillic.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3-700-latin.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- токены (из профиля drip) ---------- */
:root {
  --bg: #FFFFFF;
  --ink: #0A0A0A;
  --muted: #6D6D6D;
  --faint: #B0B0B0;
  --line: rgba(10, 10, 10, 0.14);
  --panel: #F6F6F6;
  --accent: #99EEFF;
  --container: 1440px;      /* max-width из профиля §5 (С1: максимум из профиля) */
  --header-h: 64px;
  --r-media: 4px;           /* радиус языка: медиа наследует (С6) */
  --r-pill: 100px;
  --shadow-card: rgba(0, 0, 0, 0.17) 0px 0.602187px 1.56569px -1.5px,
                 rgba(0, 0, 0, 0.14) 0px 2.28853px 5.95019px -3px,
                 rgba(0, 0, 0, 0.02) 0px 10px 26px -4.5px;
  --shadow-line: 0px 0px 0px 1px inset #0A0A0A;
  --font-display: "Inter", "Source Sans 3", system-ui, sans-serif;
  --font-text: "Source Sans 3", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.44, 0, 0.56, 1);   /* ритм hover из профиля §9 */
  /* шкала кеглей: 6 ступеней, соотношения 1.63 / 1.5 / 1.6 / 1.25 / 1.23 */
  --fs-display: clamp(36px, 5.1vw, 76px);
  --fs-h2: clamp(32px, 3.4vw, 48px);
  --fs-h3: clamp(24px, 2.4vw, 32px);
  --fs-lead: 20px;
  --fs-body: 16px;
  --fs-cap: 13px;
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.5;
  font-synthesis: none;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  hyphens: none;
}

h1 { font-size: var(--fs-display); line-height: 1.0; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: 0; }
h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

section { padding-block: 64px; }
.container-sec h2 { margin-bottom: 32px; }

.section-note {
  font-size: var(--fs-body);
  font-weight: 500;
  margin-top: 24px;
  max-width: 720px;
}

.text-link {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 700;
  transition: color 0.4s var(--ease);
}
.text-link:hover { color: var(--muted); }

/* ---------- кнопки: primary = акцент, контраст с чернилами высокий ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  background: var(--accent);
  color: var(--ink);
  padding: 16px 32px;
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: color 0.4s var(--ease), background-color 0.4s var(--ease);
}
.btn:hover { background: var(--ink); color: #FFFFFF; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- шапка (sticky, Н6) ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo svg { display: block; height: 36px; width: auto; }
.nav {
  display: none;
  gap: 24px;
  margin-left: auto;
}
.nav a {
  font-size: var(--fs-cap);
  font-weight: 500;
  text-decoration: none;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 0.4s var(--ease), text-decoration-color 0.4s var(--ease);
}
.nav a:hover { text-decoration-color: var(--accent); }

/* бургер (Н4, 0 JS) */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  cursor: pointer;
}
.burger span { display: block; height: 2px; background: var(--ink); }
.nav-panel {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
  padding: 16px 24px 32px;
  flex-direction: column;
  gap: 16px;
}
.nav-panel a {
  display: block;
  font-size: var(--fs-lead);
  font-weight: 500;
  text-decoration: none;
  padding: 8px 0;
}
.nav-panel__phone { font-weight: 700; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; }
.nav-toggle:checked ~ .nav-panel { display: flex; }

/* ---------- хиро: фото-фон затемнённый (С2, приём эталона) ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: calc(100svh - var(--header-h));
  padding-block: 64px;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
}
.hero__inner { position: relative; z-index: 1; color: #FFFFFF; }
.hero__sub {
  font-size: var(--fs-lead);
  line-height: 1.4;
  max-width: 640px;
  margin-top: 24px;
}
.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
}
.hero__phone {
  font-size: var(--fs-body);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.4s var(--ease);
}
.hero__phone:hover { color: var(--accent); }

/* ---------- строка доверия ---------- */
.trust { padding-block: 32px; border-bottom: 1px solid var(--ink); }
.trust__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 24px;
}
.trust__item b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.trust__item span {
  display: block;
  font-size: var(--fs-cap);
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- меню: липкий стек категорий (приём эталона drip) ---------- */
.menu-cat { position: relative; }
.menu-cat__title {
  position: sticky;
  top: var(--header-h);
  z-index: 5;
  background: var(--bg);
  border-top: 1px solid var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 16px 0 12px;
}
.menu-items { padding: 8px 0 24px; }
.dish { padding: 12px 0; }
.dish__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.dish__name { font-weight: 700; }
.dish__desc {
  display: block;
  font-size: var(--fs-cap);
  color: var(--muted);
  margin-top: 4px;
  max-width: 480px;
}
.dish__dots {
  flex: 1;
  border-bottom: 1px dotted var(--faint);
  transform: translateY(-4px);
  min-width: 24px;
}
.dish__price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dish__price--big {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.2;
}
.menu__note {
  font-size: var(--fs-cap);
  color: var(--muted);
  border-top: 1px solid var(--ink);
  padding-top: 16px;
}

/* ---------- про зерно: split 7/5, фото строго по колонке (С7) ---------- */
.beans__grid { display: grid; gap: 32px; }
.beans__text p { max-width: 620px; }
.beans__text h2 { margin-bottom: 24px; }
.beans__text p + p { margin-top: 16px; }
.beans__fact {
  font-size: var(--fs-lead);
  line-height: 1.4;
  font-weight: 500;
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  margin-top: 24px;
  max-width: 620px;
}
.beans__photo img {
  border-radius: var(--r-media);
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- карточные сетки (впервые / процесс / отзывы) ---------- */
.cards-3 {
  display: grid;
  gap: 24px;
}
.card {
  border-radius: var(--r-media);
  box-shadow: var(--shadow-line);
  padding: 24px;
}
.card h3 { font-size: var(--fs-lead); line-height: 1.2; }
.card p { margin-top: 12px; color: var(--muted); }

/* ---------- зерно и капсулы домой: прайс-строки на панели ---------- */
.home { background: var(--panel); }
.price-rows .dish { border-top: 1px solid var(--line); }
.price-rows .dish:first-child { border-top: 1px solid var(--ink); }

/* ---------- свой стакан: акцентная полоса по сетке ---------- */
.cup { background: var(--accent); padding-block: 64px; }
.cup__inner {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px 48px;
}
.cup h2 { color: var(--ink); }
.cup p { font-size: var(--fs-lead); line-height: 1.4; max-width: 560px; }

/* ---------- преимущества: список строками, без фото (С8) ---------- */
.pros__list { max-width: 800px; }
.pros__list li {
  font-size: var(--fs-lead);
  line-height: 1.4;
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.pros__list li:first-child { border-top: 1px solid var(--ink); }

/* ---------- баннер: полноширинное фото с оверлеем (приём эталона) ---------- */
.banner {
  position: relative;
  height: clamp(320px, 56vh, 560px);
  padding-block: 0;
  overflow: hidden;
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
}
.banner__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
}
.banner__inner p {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: 1.1;
  font-weight: 700;
  color: #FFFFFF;
  max-width: 720px;
}

/* ---------- отзывы ---------- */
.reviews { background: var(--panel); }
.review {
  background: var(--bg);
  border-radius: var(--r-media);
  box-shadow: var(--shadow-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.review blockquote { flex: 1; }
.review cite {
  display: block;
  font-style: normal;
  font-size: var(--fs-cap);
  color: var(--muted);
  margin-top: 24px;
}

/* ---------- FAQ: лево + полная ширина сетки (С5) ---------- */
.faq__item { border-top: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--ink); }
.faq__item summary {
  font-weight: 700;
  font-size: var(--fs-body);
  padding: 20px 32px 20px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 20px;
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 400;
  transition: transform 0.4s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p {
  color: var(--muted);
  padding: 0 0 20px;
  max-width: 720px;
}

/* ---------- форма: split 5/7, фото по колонке (С7) ---------- */
.order__grid { display: grid; gap: 32px; }
.order__lead { font-size: var(--fs-lead); line-height: 1.4; margin-top: 24px; }
.order__photo { margin-top: 32px; }
.order__photo img {
  border-radius: var(--r-media);
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.form { border-top: 1px solid var(--ink); padding-top: 24px; }
.form__row { display: grid; gap: 0 24px; }
.field { margin-bottom: 24px; }
.field label {
  display: block;
  font-size: var(--fs-cap);
  font-weight: 500;
  margin-bottom: 8px;
}
.field__opt { color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 0 12px;
  border-radius: 0;
}
.field textarea { resize: vertical; }
.field input::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.form .btn { margin-top: 8px; }
.form__footnote { font-size: var(--fs-cap); color: var(--muted); margin-top: 16px; }

/* ---------- контакты ---------- */
.contacts__grid { display: grid; gap: 32px 24px; }
.contacts__item { border-top: 1px solid var(--ink); padding-top: 16px; }
.contacts__item h3 {
  font-family: var(--font-display);
  font-size: var(--fs-cap);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.contacts__item p + p { margin-top: 8px; }
.contacts__note { font-size: var(--fs-cap); color: var(--muted); }

/* ---------- футер: гигантский обрезанный вордмарк (приём эталона) ---------- */
.footer {
  background: var(--ink);
  color: #FFFFFF;
  padding-top: 64px;
  overflow: hidden;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  font-size: var(--fs-cap);
  padding-bottom: 16px;
}
.footer__row a { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.footer__addr {
  font-family: var(--font-display);
  font-size: var(--fs-cap);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding-bottom: 48px;
}
.footer__giant {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(80px, 20vw, 300px);
  line-height: 0.78;
  text-align: center;
  letter-spacing: -0.01em;
  height: 0.62em;
  overflow: hidden;
  user-select: none;
  color: var(--accent);
}
.footer__legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 32px;
  font-size: var(--fs-cap);
  color: var(--muted);
  padding-block: 24px;
}
.footer__legal a { color: #FFFFFF; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.footer__legal a:hover { color: var(--accent); }

/* ---------- адаптив: 640 / 768 / 1024 (mobile-first, СР-26) ---------- */
@media (min-width: 640px) {
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .contacts__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .container { padding-inline: 24px; }
  .nav { display: flex; }
  .burger, .nav-panel { display: none; }
  .menu-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }
  .trust__grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

@media (min-width: 1024px) {
  .container { padding-inline: 32px; }
  section { padding-block: 96px; }
  .beans__grid {
    grid-template-columns: 7fr 5fr;
    gap: 48px;
    align-items: center;
  }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .order__grid {
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    align-items: start;
  }
  .contacts__grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (max-width: 767px) {
  /* Н3: сначала смысл — текст, CTA, потом фото */
  .hero {
    flex-direction: column-reverse;
    justify-content: flex-end;
    min-height: 0;
    padding-block: 0 32px;
  }
  .hero__media { position: relative; height: min(32svh, 280px); margin-top: 24px; }
  .hero__media::after { display: none; }
  .hero__inner { color: var(--ink); }
  .hero__phone { border-bottom-color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav a, .hero__phone, .text-link, .faq__item summary::after { transition: none; }
}
