/* === На Восходе — цветовая палитра кофейни === */
:root {
  --cream: #F1ECE9;
  --cream-dark: #E5DED0;
  --beige-rosy: #E5D3C7;
  --beige-creamy: #DDC8AF;
  --espresso: #8C4C33;
  --coffee: #8C4C33;
  --caramel: #B0714D;
  --gold: #DDC8AF;
  --gold-light: #E5D3C7;
  --text: #5C3326;
  --text-muted: #8C4C33;
  --white: #FFF;
  --shadow: rgba(140, 76, 51, 0.08);
  --shadow-strong: rgba(140, 76, 51, 0.15);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}

/* Grain overlay поверх всей страницы */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =========================================
   PRELOADER
   ========================================= */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--espresso);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.preloader.is-gone {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.preloader-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
}

.preloader-bar {
  width: 160px;
  height: 1px;
  background: rgba(241, 236, 233, 0.2);
  margin: 0 auto;
  overflow: hidden;
}

.preloader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   SCROLL TO TOP
   ========================================= */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--coffee);
  color: var(--cream);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--shadow-strong);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s ease;
  pointer-events: none;
}

.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--caramel);
}

/* =========================================
   HEADER
   ========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  background: rgba(241, 236, 233, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: padding 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.header.is-scrolled {
  padding: 0.6rem 1.5rem;
  box-shadow: 0 2px 20px var(--shadow);
  border-bottom-color: var(--cream-dark);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--coffee);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo-img {
  height: 44px;
  width: auto;
  max-width: 200px;
  display: block;
  pointer-events: none;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color var(--transition);
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--caramel);
  transition: width 0.3s ease;
}

.nav-list a:hover {
  color: var(--caramel);
}

.nav-list a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--coffee);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(241, 236, 233, 0.72) 0%, rgba(229, 222, 208, 0.82) 50%, rgba(229, 211, 199, 0.88) 100%),
    url("images/about-interior.jpg") center / cover no-repeat;
  transform-origin: center top;
  will-change: transform;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L30 60M0 30L60 30' stroke='%238C4C33' stroke-opacity='0.07' stroke-width='0.5' fill='none'/%3E%3C/svg%3E");
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

/* Вертикальный боковой текст */
.hero-side-text {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center center;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--caramel);
  opacity: 0.55;
  z-index: 1;
  white-space: nowrap;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

/* Hero entrance animations */
.hero-animate {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.hero-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--caramel);
  opacity: 0.7;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--caramel);
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 600;
  color: var(--espresso);
  line-height: 1.15;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--coffee);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--espresso);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px var(--shadow-strong);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  z-index: 1;
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  border-right: 1.5px solid var(--caramel);
  border-bottom: 1.5px solid var(--caramel);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(7px); }
}

/* =========================================
   MARQUEE
   ========================================= */
.marquee-strip {
  overflow: hidden;
  background: var(--espresso);
  padding: 0.9rem 0;
  border-top: 1px solid rgba(221, 200, 175, 0.15);
  border-bottom: 1px solid rgba(221, 200, 175, 0.15);
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  padding-right: 0;
  flex-shrink: 0;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =========================================
   SECTION NUMBERS
   ========================================= */
.section-num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 600;
  color: var(--coffee);
  opacity: 0.07;
  line-height: 1;
  margin-bottom: -1.5rem;
  letter-spacing: -0.02em;
  pointer-events: none;
  user-select: none;
}

.section-num--light {
  color: var(--cream);
}

/* =========================================
   SCROLL REVEAL
   ========================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal][data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: 0.22s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: 0.34s; }

/* Section numbers не скрываем через data-reveal — они уже полупрозрачные */
.section-num[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
}

.section-num[data-reveal].is-revealed {
  opacity: 0.07;
  transform: translateY(0);
}

.section-num--light[data-reveal].is-revealed {
  opacity: 0.1;
}

/* =========================================
   SECTIONS
   ========================================= */
.section {
  padding: 5rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--coffee);
  margin-bottom: 2rem;
  text-align: center;
}

.section-title--light {
  color: var(--cream);
}

/* =========================================
   ABOUT
   ========================================= */
.about {
  background: var(--white);
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.about-image {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px var(--shadow);
}

.about-image-frame {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.about-image:hover .about-image-frame {
  transform: scale(1.04);
}

.about-text .section-title {
  text-align: left;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about-text p:last-of-type {
  color: var(--text);
  line-height: 1.7;
}

.about-quote {
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--caramel);
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--espresso);
  line-height: 1.5;
  position: relative;
}

.about-quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 0;
  vertical-align: -0.5rem;
  margin-right: 0.1em;
  color: var(--caramel);
  opacity: 0.5;
}

/* =========================================
   MENU
   ========================================= */
.menu {
  background: var(--coffee);
  color: var(--cream);
}

.menu .section-title--light {
  margin-bottom: 2rem;
}

.menu-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.menu-tab {
  padding: 0.6rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  background: transparent;
  color: var(--gold-light);
  border: 1px solid rgba(221, 200, 175, 0.4);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.menu-tab:hover {
  background: rgba(221, 200, 175, 0.15);
  color: var(--cream);
  border-color: rgba(221, 200, 175, 0.6);
}

.menu-tab.active {
  background: var(--gold);
  color: var(--coffee);
  border-color: var(--gold);
}

.menu-panel {
  display: none;
}

.menu-panel.active {
  display: block;
  animation: slideInMenu 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInMenu {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-list {
  max-width: 560px;
  margin: 0 auto;
}

.menu-category {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(221, 200, 175, 0.25);
}

.menu-category:first-child {
  margin-top: 0;
}

.menu-category small {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--gold-light);
  opacity: 0.8;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.45rem 0 0.45rem 0.5rem;
  color: var(--cream);
  font-size: 0.95rem;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
  position: relative;
}

.menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 60%;
  background: var(--gold);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item .name {
  flex: 1;
  color: var(--gold-light);
  transition: transform 0.25s ease, color 0.25s ease;
}

.menu-item .price {
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.menu-item-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  cursor: pointer;
}

.menu-item-link:hover::before {
  width: 2px;
}

.menu-item-link:hover .name {
  transform: translateX(6px);
  color: var(--cream);
}

.menu-item-link .name {
  color: var(--gold-light);
}

.menu-item-link .price {
  color: var(--gold);
}

/* =========================================
   КАРТОЧКА ТОВАРА
   ========================================= */
.product-detail {
  display: none;
  background: var(--cream);
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.product-detail.is-visible {
  display: block;
  animation: slideInMenu 0.4s ease;
}

.product-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(92, 51, 38, 0.15);
  background: rgba(241, 236, 233, 0.9);
  color: var(--coffee);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1;
  box-shadow: 0 4px 14px var(--shadow);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.product-detail-back::before {
  content: '←';
  font-size: 1rem;
}

.product-detail-back:hover {
  background: var(--beige-creamy);
  color: var(--espresso);
  box-shadow: 0 6px 20px var(--shadow-strong);
  transform: translateY(-1px);
}

.product-detail-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px var(--shadow);
  overflow: hidden;
}

.product-detail-image-wrap {
  position: relative;
  aspect-ratio: 1;
  background: var(--cream-dark);
}

.product-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.product-detail-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  background: var(--beige-creamy);
}

.product-detail-content {
  padding: 1.5rem 1.5rem 1.5rem 0;
}

.product-detail-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--coffee);
  margin-bottom: 0.5rem;
}

.product-detail-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--caramel);
  margin-bottom: 1rem;
}

.product-detail-description {
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.product-detail-composition {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-detail-composition strong {
  color: var(--coffee);
}

@media (max-width: 768px) {
  .product-detail-card {
    grid-template-columns: 1fr;
  }

  .product-detail-content {
    padding: 1.5rem;
  }
}

/* =========================================
   LOCATION
   ========================================= */
.location {
  background: var(--cream-dark);
  text-align: center;
}

.location-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.location-info--block {
  margin-bottom: 1.5rem;
}

.location-address {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--coffee);
  margin-bottom: 0.25rem;
}

.location-city {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hours h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hours p {
  color: var(--text);
}

.location-map-wrap {
  max-width: 1000px;
  margin: 0 auto 1.25rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-strong);
}

.location-iframe {
  display: block;
  border: 0;
}

.location-map-link-wrap {
  margin-top: 0.5rem;
}

.btn-map {
  display: inline-block;
  padding: 0.875rem 1.625rem;
  background: var(--espresso);
  color: var(--cream);
  text-decoration: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-map:hover {
  background: var(--coffee);
  color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-strong);
}

/* =========================================
   CONTACT
   ========================================= */
.contact {
  background: var(--espresso);
  color: var(--cream);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.contact-link {
  color: var(--gold-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  position: relative;
  transition: color var(--transition);
}

.contact-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.contact-link:hover {
  color: var(--gold);
}

.contact-link:hover::after {
  width: 100%;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  padding: 2rem 1.5rem;
  background: var(--coffee);
  color: var(--gold-light);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(221, 200, 175, 0.2);
  padding-top: 1.5rem;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.03em;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--gold-light);
  opacity: 0.6;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--cream);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: -4px 0 24px var(--shadow);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
  }

  .nav-list.is-open {
    transform: translateX(0);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }

  .hero-side-text {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .scroll-top {
    bottom: 1.25rem;
    right: 1.25rem;
  }
}
