/* ============================================
   ЗЕРНО — кофейня. Основные стили
   Палитра: тёмно-кофейный, кремовый, карамель
   ============================================ */

:root {
  --coffee-900: #2a1c14;
  --coffee-800: #3a2820;
  --coffee-700: #4d3527;
  --cream: #f5ede2;
  --cream-dark: #ece0cf;
  --accent: #c8843b;
  --accent-dark: #a86b2b;
  --text: #2a1c14;
  --text-muted: #8a7a68;
  --white: #ffffff;
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1200px;
  --shadow-sm: 0 4px 16px rgba(42, 28, 20, 0.08);
  --shadow-md: 0 12px 36px rgba(42, 28, 20, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.muted { color: var(--text-muted); }

/* ============ КНОПКИ ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-lg { padding: 16px 34px; font-size: 1.02rem; }

.btn-accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(200, 132, 59, 0.32);
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-white {
  background: var(--cream);
  color: var(--coffee-900);
}
.btn-white:hover { background: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--white);
}
.btn-outline {
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

/* ============ ШАПКА ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s;
  padding: 18px 0;
}
.site-header.scrolled {
  background: rgba(245, 237, 226, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 20px rgba(42,28,20,0.08);
  padding: 10px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.35s;
}
.scrolled .logo { color: var(--coffee-900); }
.logo-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex-shrink: 0;
}
.logo-icon::after {
  content: '';
  position: absolute;
  inset: 8px 11px;
  background: var(--coffee-900);
  border-radius: 50%;
  transform: rotate(20deg);
  width: 4px; height: 10px;
}

.main-nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
}
.main-nav a {
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  font-size: 0.96rem;
  position: relative;
  transition: color 0.3s;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.main-nav a:hover::after { width: 100%; }
.scrolled .main-nav a { color: var(--coffee-700); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 6px;
}
.burger span {
  width: 26px; height: 2px;
  background: var(--white);
  transition: 0.3s;
  border-radius: 2px;
}
.scrolled .burger span { background: var(--coffee-900); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(42,28,20,0.9) 0%, rgba(42,28,20,0.55) 55%, rgba(42,28,20,0.25) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 100px;
  padding-bottom: 60px;
  max-width: 720px;
}
.hero-tag {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(200,132,59,0.22);
  border: 1px solid rgba(200,132,59,0.4);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 26px;
}
.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  margin-bottom: 24px;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  font-size: 1.2rem;
  max-width: 520px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 38px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.stat strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  color: var(--accent);
  line-height: 1;
}
.stat span {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* ============ БЕГУЩАЯ СТРОКА ============ */
.marquee-strip {
  background: var(--coffee-900);
  padding: 20px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 32px;
  animation: marquee 32s linear infinite;
  align-items: center;
}
.marquee-track span {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--cream);
  font-style: italic;
}
.marquee-track span:nth-child(even) { color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ СЕКЦИИ ============ */
.section {
  padding: 100px 0;
}
.section-dark {
  background: var(--coffee-900);
  color: var(--cream);
}
.section-pattern {
  background:
    radial-gradient(circle at 20% 30%, rgba(200,132,59,0.08), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(200,132,59,0.06), transparent 40%),
    var(--cream-dark);
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-header h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 14px 0 16px;
}
.section-header p { color: var(--text-muted); font-size: 1.08rem; }
.section-dark .section-header p { color: rgba(245,237,226,0.7); }

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============ МЕНЮ / BENTO ============ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.card-menu { display: flex; flex-direction: column; }
.card-menu--lg {
  grid-row: span 2;
  grid-column: span 1;
}
.card-img-wrapper {
  overflow: hidden;
  aspect-ratio: 4/3;
}
.card-menu--lg .card-img-wrapper { aspect-ratio: 3/4; }
.card-img-wrapper img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card-img-wrapper img { transform: scale(1.06); }
.card-body { padding: 22px 24px 26px; flex: 1; }
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(200,132,59,0.12);
  padding: 4px 12px;
  border-radius: 999px;
}
.card-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--coffee-900);
}
.card-body h3 { font-size: 1.4rem; margin-bottom: 8px; }
.card-menu--lg .card-body h3 { font-size: 1.9rem; }
.card-body p { color: var(--text-muted); font-size: 0.96rem; }

/* ============ О НАС ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 16px 0 22px;
}
.about-text > p {
  color: rgba(245,237,226,0.8);
  margin-bottom: 18px;
  font-size: 1.05rem;
}
.about-features {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
}
.feature-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(200,132,59,0.16);
  border: 1px solid rgba(200,132,59,0.3);
  flex-shrink: 0;
  position: relative;
}
.feature-icon::after {
  content: '';
  position: absolute;
  inset: 15px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  transform: rotate(45deg);
}
.feature-item strong { display: block; color: var(--cream); }
.feature-item .muted { color: rgba(245,237,226,0.55); font-size: 0.9rem; }
.about-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/5;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ============ ЗЁРНА ============ */
.beans-grid { grid-template-columns: repeat(3, 1fr); }
.bean-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.bean-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.bean-badge {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
  background: var(--accent);
  color: var(--white);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.bean-img { aspect-ratio: 1/1; overflow: hidden; }
.bean-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.bean-card:hover .bean-img img { transform: scale(1.06); }
.bean-info { padding: 24px; }
.bean-info h3 { font-size: 1.35rem; margin-bottom: 8px; }
.bean-info p { margin-bottom: 16px; }
.bean-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bean-meta span {
  font-size: 0.78rem;
  background: var(--cream);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 500;
}

/* ============ КАЛЬКУЛЯТОР ============ */
.calc-box {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
}
.calc-header { text-align: center; margin-bottom: 34px; }
.calc-header h2 { font-size: 2.2rem; margin: 12px 0 10px; }
.calc-header p { color: var(--text-muted); }
.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(42,28,20,0.08);
}
.calc-row label { font-weight: 600; }
.calc-row select,
.calc-row input {
  padding: 11px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--cream-dark);
  background: var(--cream);
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--text);
  min-width: 220px;
  cursor: pointer;
  transition: border-color 0.25s;
}
.calc-row select:focus,
.calc-row input:focus {
  outline: none;
  border-color: var(--accent);
}
.calc-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
}
.calc-total strong {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--accent);
}
.calc-submit { width: 100%; margin-top: 22px; }

/* ============ КОНТАКТЫ ============ */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.contacts-left h2 {
  font-size: 3rem;
  margin: 12px 0 30px;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-row strong {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.contact-row p { color: rgba(245,237,226,0.85); }
.contact-row a:hover { color: var(--accent); }
.map-placeholder {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-md);
}
.map-placeholder img { width: 100%; height: 100%; object-fit: cover; }

/* ============ ФУТЕР ============ */
.site-footer {
  background: #1d130d;
  color: var(--cream);
  padding: 60px 0 30px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(245,237,226,0.1);
}
.footer-brand .logo { color: var(--cream); margin-bottom: 14px; }
.footer-brand p { max-width: 280px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links strong { margin-bottom: 4px; }
.footer-links a { color: rgba(245,237,226,0.7); transition: color 0.25s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  color: rgba(245,237,226,0.6);
  font-size: 0.9rem;
}
.socials { display: flex; gap: 12px; }
.social-link {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,237,226,0.08);
  font-size: 0.78rem;
  font-weight: 700;
  transition: background 0.25s, transform 0.25s;
}
.social-link:hover { background: var(--accent); color: var(--white); transform: translateY(-3px); }

/* ============ АНИМАЦИИ ПОЯВЛЕНИЯ ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ АДАПТИВ ============ */
@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: 0; right: -100%;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    background: var(--coffee-900);
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    padding: 40px;
    transition: right 0.4s var(--ease);
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
  }
  .main-nav.open { right: 0; }
  .main-nav a { color: var(--cream); font-size: 1.3rem; }
  .scrolled .main-nav a { color: var(--cream); }
  .burger { display: flex; order: 3; }
  .header-inner .btn-accent { display: none; }

  .bento-grid,
  .beans-grid { grid-template-columns: 1fr 1fr; }
  .card-menu--lg { grid-row: span 1; grid-column: span 2; }
  .card-menu--lg .card-img-wrapper { aspect-ratio: 16/9; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { max-height: 420px; }
  .contacts-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .hero-stats { gap: 28px; }
  .stat strong { font-size: 1.9rem; }
  .bento-grid,
  .beans-grid { grid-template-columns: 1fr; }
  .card-menu--lg { grid-column: span 1; }
  .calc-box { padding: 30px 22px; }
  .calc-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .calc-row select,
  .calc-row input { min-width: 0; width: 100%; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 16px; }
  .marquee-track span { font-size: 1.2rem; }
}