/* ============================================================
   Аяга кофе — demo site styles
   Palette: cream ground, milk surfaces, roast accent, espresso ink
   ============================================================ */

:root {
  --cream: #f1e9dd;
  --milk: #faf6f0;
  --foam: #e6d8c5;
  --caramel: #c69c74;
  --roast: #7a4a2e;
  --roast-deep: #5e3621;
  --espresso: #2a1b14;
  --ink: #3a2a21;
  --muted: #7d6a5c;

  --font-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --font-body: 'Manrope', 'Segoe UI', Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--roast); outline-offset: 4px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--roast);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--caramel); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; color: var(--espresso); text-wrap: balance; }
h2 { font-size: clamp(38px, 5vw, 60px); letter-spacing: -0.01em; }
h3 { font-size: 28px; }
.lead { font-size: clamp(17px, 1.4vw, 19px); max-width: 52ch; color: var(--muted); }
em.accent { font-style: italic; font-weight: 500; color: var(--roast); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: 0.01em;
  background: var(--roast); color: var(--milk);
  box-shadow: 0 10px 24px rgba(122, 74, 46, 0.28);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s;
}
.btn:hover { background: var(--roast-deep); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(122, 74, 46, 0.32); }
.btn svg { width: 18px; height: 18px; }
.btn--light { background: var(--milk); color: var(--espresso); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }
.btn--light:hover { background: #fff; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--espresso); border-bottom: 1px solid var(--caramel); padding-bottom: 2px; transition: gap 0.3s var(--ease); }
.link-arrow:hover { gap: 14px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}
.nav.is-scrolled {
  padding-block: 12px;
  background: rgba(241, 233, 221, 0.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(42, 27, 20, 0.08);
}
.brand { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); color: var(--espresso); }
.brand strong { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.brand span { font-size: 13px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--roast); }
.nav-links { display: flex; align-items: center; gap: 34px; font-size: 15px; font-weight: 500; }
.nav-links a { position: relative; padding-block: 4px; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--roast); transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links .btn { padding: 12px 22px; font-size: 14px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; place-items: center; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--espresso); margin: 3px auto; transition: transform 0.3s var(--ease), opacity 0.3s; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 920px);
  padding: calc(96px + 4vh) var(--gutter) 60px;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px;
  perspective: 1400px;
  overflow: hidden;
  isolation: isolate;
}
.hero-glow {
  position: absolute; z-index: -1; pointer-events: none;
  width: 70vmax; height: 70vmax; right: -18vmax; top: -12vmax;
  background: radial-gradient(closest-side, rgba(198, 156, 116, 0.55), rgba(198, 156, 116, 0) 70%);
}
.hero > * { min-width: 0; }
.hero-copy { position: relative; z-index: 3; max-width: 640px; }
.hero-copy .eyebrow { margin-bottom: 26px; }
.hero h1 { font-size: clamp(50px, 7.2vw, 104px); font-weight: 500; line-height: 0.98; letter-spacing: -0.02em; margin-bottom: 26px; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--roast); }
.hero .lead { margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.hero-note { margin-top: 44px; display: flex; gap: 14px; align-items: center; font-size: 14px; color: var(--muted); }
.hero-note strong { color: var(--espresso); font-weight: 600; }

.stage { position: relative; z-index: 2; height: min(62vh, 600px); display: grid; place-items: center; transform-style: preserve-3d; }
.glass-scroll, .glass-tilt, .glass-float { transform-style: preserve-3d; will-change: transform; }
.glass-scroll { position: relative; }
.glass-float { animation: floatY 6.5s ease-in-out infinite; }
.glass-img {
  height: min(60vh, 580px); width: auto;
  filter: drop-shadow(0 38px 44px rgba(42, 27, 20, 0.28));
}
.glass-shadow {
  position: absolute; left: 50%; bottom: -34px; width: 62%; height: 44px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(42, 27, 20, 0.35), rgba(42, 27, 20, 0) 75%);
  animation: shadowPulse 6.5s ease-in-out infinite;
}
.steam { position: absolute; left: 50%; top: -6%; width: 120px; height: 140px; transform: translateX(-50%); pointer-events: none; z-index: 3; }
.steam span {
  position: absolute; bottom: 0; left: 50%; width: 34px; height: 90px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 70%);
  filter: blur(9px); opacity: 0;
  animation: steamRise 4.2s ease-out infinite;
}
.steam span:nth-child(1) { margin-left: -36px; animation-delay: 0s; }
.steam span:nth-child(2) { margin-left: -14px; animation-delay: 1.4s; }
.steam span:nth-child(3) { margin-left: 10px; animation-delay: 2.7s; }

.hero-card {
  position: absolute; right: 0; bottom: 6%; z-index: 4;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px 14px 14px; border-radius: 18px;
  background: rgba(250, 246, 240, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(42, 27, 20, 0.16);
  font-size: 14px; color: var(--muted);
}
.hero-card img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.hero-card b { display: block; font-weight: 600; color: var(--espresso); }
.hero-card .price { font-weight: 700; color: var(--roast); font-variant-numeric: tabular-nums; }
.hero-card small { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* beans */
.bean { position: absolute; z-index: var(--z, 3); width: var(--size, 40px); left: var(--x); top: var(--y); transform-style: preserve-3d; pointer-events: none; will-change: transform; }
.bean-shift { display: block; transform-style: preserve-3d; }
.bean-img { width: 100%; height: auto; transform: rotate(var(--rot, 0deg)); filter: blur(var(--blur, 0px)) drop-shadow(0 12px 14px rgba(42, 27, 20, 0.25)); animation: bob var(--dur, 7s) ease-in-out infinite; animation-delay: var(--delay, 0s); }

.scroll-hint { position: absolute; left: var(--gutter); bottom: 28px; display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.scroll-hint i { display: block; width: 1px; height: 40px; background: linear-gradient(var(--roast), transparent); animation: hint 2.2s ease-in-out infinite; }

@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes shadowPulse { 0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 1; } 50% { transform: translateX(-50%) scaleX(0.86); opacity: 0.7; } }
@keyframes steamRise { 0% { transform: translateY(0) scaleX(1); opacity: 0; } 20% { opacity: 0.55; } 100% { transform: translateY(-150px) scaleX(1.6); opacity: 0; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(80px, 10vw, 140px); position: relative; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .eyebrow { margin-bottom: 4px; }
.section-head p { max-width: 56ch; color: var(--muted); }

/* story */
.story .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.story .wrap > * { min-width: 0; }
.story-photos { position: relative; perspective: 1200px; padding-bottom: 18%; }
.story-photo-main { width: 82%; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 70px rgba(42, 27, 20, 0.22); transform-style: preserve-3d; }
.story-photo-main img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.story-photo-small { position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 50px rgba(42, 27, 20, 0.25); border: 6px solid var(--cream); }
.story-photo-small img { width: 100%; height: 100%; object-fit: cover; }
.story-copy .eyebrow { margin-bottom: 22px; }
.story-copy h2 { margin-bottom: 26px; }
.story-copy p { color: var(--muted); margin-bottom: 18px; max-width: 52ch; }
.facts { margin-top: 40px; border-top: 1px solid var(--foam); }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--foam); align-items: baseline; }
.facts dt { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--espresso); font-style: italic; }
.facts dd { color: var(--ink); }

/* menu */
.menu { background: var(--milk); }
.menu .section-head { grid-template-columns: 1fr auto; align-items: end; }
.menu .section-head > :not(.menu-note) { grid-column: 1; }
.menu-note { font-size: 14px; color: var(--muted); text-align: right; grid-column: 2; grid-row: 1 / span 3; align-self: end; }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; perspective: 1200px; }
.menu-card {
  position: relative; display: grid; gap: 14px; padding: 14px 14px 22px;
  background: var(--cream); border-radius: 20px;
  transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 1px 0 rgba(42, 27, 20, 0.05);
  transition: box-shadow 0.4s var(--ease);
}
.menu-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.5), transparent 60%); transition: opacity 0.4s; }
.menu-card:hover { box-shadow: 0 30px 50px rgba(42, 27, 20, 0.18); }
.menu-card:hover::after { opacity: 1; }
.menu-card figure { aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.menu-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.menu-card:hover img { transform: scale(1.06); }
.menu-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-inline: 4px; }
.menu-card h3 { font-size: 26px; }
.menu-card .price { font-weight: 700; color: var(--roast); font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu-card p { font-size: 14px; color: var(--muted); padding-inline: 4px; }
.tag { position: absolute; top: 24px; left: 24px; z-index: 2; padding: 6px 12px; border-radius: 999px; background: var(--espresso); color: var(--milk); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(150px, 20vw, 250px); gap: 18px; }
.gallery-item { border-radius: 18px; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.g1 { grid-column: 1 / 8; grid-row: 1 / 2; }
.g2 { grid-column: 8 / 13; grid-row: 1 / 3; }
.g3 { grid-column: 1 / 5; grid-row: 2 / 3; }
.g4 { grid-column: 5 / 8; grid-row: 2 / 3; }
.gallery .section-head { grid-template-columns: 1fr auto; align-items: end; }
.gallery .section-head > :not(.handle) { grid-column: 1; }
.gallery .handle { font-weight: 600; color: var(--roast); grid-column: 2; grid-row: 1 / span 2; align-self: end; justify-self: end; }

/* visit */
.visit { background: var(--espresso); color: var(--foam); overflow: hidden; }
.visit .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.visit .wrap > * { min-width: 0; }
.visit .eyebrow { color: var(--caramel); }
.visit .eyebrow::before { background: var(--caramel); }
.visit h2 { color: var(--milk); margin: 22px 0 26px; }
.visit address { font-style: normal; font-size: 19px; line-height: 1.6; color: var(--foam); margin-bottom: 10px; }
.visit .phone { font-family: var(--font-display); font-size: 34px; color: var(--milk); margin-bottom: 30px; font-variant-numeric: tabular-nums; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hours { background: rgba(250, 246, 240, 0.05); border: 1px solid rgba(250, 246, 240, 0.12); border-radius: var(--radius); padding: 30px; }
.hours h3 { color: var(--milk); font-size: 26px; margin-bottom: 18px; }
.hours dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(250, 246, 240, 0.12); font-variant-numeric: tabular-nums; }
.hours dt { color: var(--foam); }
.hours dd { color: var(--milk); font-weight: 600; }
.hours .note { margin-top: 18px; font-size: 14px; color: var(--caramel); }
.visit-bean { position: absolute; right: -40px; bottom: -60px; width: 260px; opacity: 0.35; filter: blur(1px); pointer-events: none; }

/* footer */
.footer { padding: 48px var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--foam); }
.footer .brand strong { font-size: 26px; }
.footer nav { display: flex; gap: 22px; }
.footer nav a:hover { color: var(--espresso); }
.footer .credit a { color: var(--roast); font-weight: 600; }

/* ---------- motion helpers ---------- */
.has-motion .glass-img { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glass-float, .glass-shadow, .steam span, .bean-img, .scroll-hint i { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 0; z-index: 40; flex-direction: column; justify-content: center; gap: 28px;
    background: var(--cream); font-size: 22px; font-family: var(--font-display); font-weight: 600;
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  }
  .nav-links .btn { font-family: var(--font-body); font-size: 15px; margin-top: 8px; }
  body.menu-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  body.menu-open { overflow: hidden; }
  .nav-toggle { display: grid; position: relative; z-index: 45; }
  body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  .hero { grid-template-columns: 1fr; padding-top: 110px; padding-bottom: 80px; gap: 40px; min-height: 0; }
  .hero h1 { font-size: clamp(46px, 12vw, 72px); }
  .stage { height: 52vh; max-height: 480px; }
  .glass-img { height: 50vh; max-height: 460px; }
  .hero-card { right: 0; bottom: -10px; }
  .bean--desk { display: none; }
  .scroll-hint { display: none; }

  .story .wrap { grid-template-columns: 1fr; }
  .story-photos { max-width: 480px; }
  .visit .wrap { grid-template-columns: 1fr; }
  .gallery-grid { grid-auto-rows: clamp(140px, 26vw, 220px); }
  .g1 { grid-column: 1 / 13; }
  .g2 { grid-column: 1 / 7; grid-row: 2 / 3; }
  .g3 { grid-column: 7 / 13; grid-row: 2 / 3; }
  .g4 { grid-column: 1 / 13; grid-row: 3 / 4; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .menu .section-head, .gallery .section-head { grid-template-columns: 1fr; }
  .menu-note, .gallery .handle { grid-column: 1; grid-row: auto; justify-self: start; text-align: left; }
  .menu-grid { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .hero-card { position: static; margin: 18px auto 0; width: fit-content; }
  .hero-actions { gap: 18px; }
  .footer { flex-direction: column; align-items: flex-start; }
}
