/* Coffee BOOM — one-page site */
:root {
  --cream: #FDF8F3;
  --cream-2: #F5EEE5;
  --ink: #1A1816;
  --ink-2: #3C3B34;
  --night: #1F1E1A;
  --muted: #6E665D;
  --line: rgba(26, 24, 22, .14);
  --line-light: rgba(253, 248, 243, .16);
  --accent: #9C6B3F;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
  --pad: 20px;
  --radius: 8px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body.is-locked { overflow: hidden; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: 72px; scroll-margin-top: calc(var(--header-h) - 1px); }
.section--tint { background: var(--cream-2); }
.h2 { font: 600 clamp(36px, 8vw, 56px)/1.05 var(--serif); }
.section-title { margin-bottom: 32px; }
.lead { font-size: 17px; margin-top: 20px; max-width: 600px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 6px;
  font: 500 15px/1.2 var(--sans); text-align: center;
  transition: background-color .2s, color .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 20px; height: 20px; }
.btn--dark { background: var(--ink); color: var(--cream); }
.btn--dark:hover { background: #000; }
.btn--light { background: var(--cream); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--ghost-light { border: 1px solid rgba(253, 248, 243, .6); color: var(--cream); }
.btn--ghost-light:hover { border-color: var(--cream); background: rgba(253, 248, 243, .08); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .7; cursor: progress; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow .icon { width: 18px; height: 18px; }

/* Header */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  color: var(--cream);
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.header__inner { height: 100%; display: flex; align-items: center; gap: 16px; }
.header__logo { position: relative; width: 50px; height: 44px; flex: none; }
.header__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .3s; }
.header__logo .logo-dark { opacity: 0; }
.header__nav { display: none; }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header .btn--order { border: 1px solid currentColor; }
.burger { width: 44px; height: 44px; display: grid; place-items: center; }
.burger .icon { width: 26px; height: 26px; }
.header.is-solid { background: var(--cream); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.header.is-solid .logo-dark { opacity: 1; }
.header.is-solid .logo-light { opacity: 0; }
.header.is-solid .btn--order { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* Mobile nav */
.mnav {
  position: fixed; inset: 0; z-index: 60; background: var(--cream); color: var(--ink);
  display: flex; flex-direction: column; padding: 0 var(--pad) 32px;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s;
  overflow-y: auto;
}
.mnav.is-open { opacity: 1; visibility: visible; transition: opacity .25s; }
.mnav__top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; flex: none; }
.mnav__top img { width: 50px; height: 44px; object-fit: contain; }
.mnav__links { display: flex; flex-direction: column; margin-top: 16px; }
.mnav__links a { font: 600 32px/1.2 var(--serif); padding: 10px 0; border-bottom: 1px solid var(--line); }
.mnav__contacts { margin-top: auto; padding-top: 28px; display: grid; gap: 14px; font-size: 15px; }
.mnav__contacts a { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.mnav__contacts span { color: var(--muted); font-size: 13px; display: block; font-weight: 400; }

/* Hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end; color: var(--cream); overflow: hidden; background: var(--night);
}
.hero__media { position: absolute; inset: 0 0 auto; height: 74%; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 30%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 18, 16, .5) 0%, rgba(20, 18, 16, 0) 20%),
    linear-gradient(0deg, var(--night) 30%, rgba(31, 30, 26, .8) 50%, rgba(31, 30, 26, 0) 74%);
}
.hero__content { position: relative; z-index: 1; padding-top: calc(var(--header-h) + 40px); padding-bottom: 36px; }
.hero__title { font: 600 clamp(46px, 12.4vw, 100px)/1 var(--serif); max-width: 760px; }
.hero__text { margin-top: 18px; font-size: 16px; line-height: 1.6; color: rgba(253, 248, 243, .85); max-width: 520px; }
.hero__ctas { display: grid; gap: 12px; margin-top: 28px; }
.hero__ctas form, .hero__ctas form .btn { width: 100%; }

/* About */
.about__grid { display: grid; gap: 40px; }
.about__body p + p { margin-top: 16px; }
.about__body .lead { margin-bottom: 20px; }
.about__body p:not(.lead) { color: #3f3a35; max-width: 600px; }
.about__media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.about__media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.about__media img:first-child { object-position: 30% 50%; }
.about__media img:last-child { object-position: 72% 50%; margin-top: 48px; }

/* Menu */
.menu__bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 28px; }
.tab { padding: 10px 0 12px; font-weight: 500; font-size: 16px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.menu__hint { font-size: 13px; color: var(--muted); padding-bottom: 12px; }
.menu__panel[hidden] { display: none; }
.menu__panel + .menu__panel { margin-top: 24px; }
.pages {
  list-style: none; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 8px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 64%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad);
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.pages::-webkit-scrollbar { display: none; }
.pages li { scroll-snap-align: start; }
.page-thumb { display: block; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; transition: border-color .2s; }
.page-thumb:hover { border-color: var(--ink); }
.page-thumb img { width: 100%; aspect-ratio: 1317 / 1790; object-fit: cover; }
.menu__note { margin-top: 20px; font-size: 13px; color: var(--muted); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: #12110F; color: var(--cream);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity .25s; }
.lightbox__bar { display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 10px 0 var(--pad); flex: none; }
.lightbox__title { font-size: 14px; font-weight: 500; }
.lightbox__btn { width: 44px; height: 44px; border-radius: 6px; display: grid; place-items: center; transition: background-color .2s; }
.lightbox__btn:hover { background: rgba(253, 248, 243, .12); }
.lightbox__btn .icon { width: 24px; height: 24px; }
.lightbox__spacer { margin-left: auto; }
.lightbox__stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y; display: flex; align-items: center; justify-content: center; }
.lightbox__img {
  max-width: calc(100% - 24px); max-height: calc(100% - 12px); width: auto; height: auto; object-fit: contain;
  cursor: zoom-in; user-select: none; -webkit-user-drag: none; transition: transform .25s, opacity .2s;
}
.lightbox__stage.is-zoomed { overflow: auto; touch-action: auto; display: block; }
.lightbox__stage.is-zoomed .lightbox__img { max-width: none; max-height: none; width: 220%; margin: 0 auto; cursor: zoom-out; }
.lightbox__nav { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 10px 0 calc(14px + env(safe-area-inset-bottom)); flex: none; }
.lightbox__nav .lightbox__btn { border: 1px solid rgba(253, 248, 243, .25); width: 52px; height: 52px; }
.lightbox__dots { font-size: 13px; color: rgba(253, 248, 243, .6); min-width: 70px; text-align: center; }

/* Promo */
.promo__grid { display: grid; gap: 44px; }
.promo-card picture img, .promo-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.promo-card h3 { font: 600 28px/1.15 var(--serif); margin-top: 20px; }
.promo-card p { font-size: 15px; color: var(--muted); margin-top: 8px; }
.promo-card .link-arrow { margin-top: 14px; }

/* Loyalty */
.loyalty { background: var(--night); color: var(--cream); }
.loyalty .lead { color: rgba(253, 248, 243, .78); }
.loyalty__top { display: grid; gap: 28px; grid-template-areas: "intro" "card" "cta"; }
.loyalty__intro { grid-area: intro; }
.loyalty__cta { grid-area: cta; }
.loyalty__cta form .btn { width: 100%; }
.loyalty__wallets { margin-top: 12px; font-size: 14px; color: rgba(253, 248, 243, .65); }
.loyalty__details { display: grid; gap: 40px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line-light); }
.loyalty__subtitle { font: 600 26px/1.2 var(--serif); margin-bottom: 14px; }
.rules { list-style: none; margin: 0; padding: 0; }
.rules li { padding: 12px 0; border-bottom: 1px solid var(--line-light); font-size: 15px; color: rgba(253, 248, 243, .78); }
.rules li:first-child { border-top: 1px solid var(--line-light); }
.rules strong { color: var(--cream); font-weight: 600; }
.levels { width: 100%; border-collapse: collapse; font-size: 15px; }
.levels th { text-align: left; font-size: 12px; font-weight: 500; letter-spacing: .04em; color: rgba(253, 248, 243, .55); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line-light); }
.levels td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line-light); color: rgba(253, 248, 243, .78); vertical-align: top; }
.levels td:first-child { color: var(--cream); font-weight: 500; }
.levels td:nth-child(2) { color: var(--cream); white-space: nowrap; }
.loyalty__foot { display: grid; gap: 18px; margin-top: 40px; font-size: 15px; color: rgba(253, 248, 243, .7); }
.loyalty__foot p a { color: var(--cream); border-bottom: 1px solid rgba(253, 248, 243, .4); }
.loyalty__foot p a:hover { border-color: var(--cream); }
.loyalty__foot .link-arrow { color: var(--cream); justify-self: start; }

/* Loyalty card mock: physical plastic card, ISO ID-1 proportions (85.6 × 54 mm) */
.pcard-wrap { grid-area: card; position: relative; width: min(360px, 86%); aspect-ratio: 85.6 / 54; justify-self: center; margin: 28px 0 8px; container-type: inline-size; }
.pcard { position: absolute; inset: 0; border-radius: 3.7% / 5.9%; }
.pcard--back { transform: translate(6%, -11%) rotate(6deg); background: #4A4540; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 28px -14px rgba(0, 0, 0, .8); overflow: hidden; }
.pcard__stripe { position: absolute; left: 0; right: 0; top: 12%; height: 19%; background: #0F0E0D; }
.pcard__site { position: absolute; right: 6%; bottom: 8%; font-size: 3.4cqi; letter-spacing: .04em; color: rgba(245, 239, 230, .45); }
.pcard--front {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto auto;
  padding: 6.5% 7%; color: #1D1C1A;
  background: linear-gradient(125deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, 0) 38%), #F6EEE3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(0, 0, 0, .1), 0 2px 3px rgba(0, 0, 0, .35), 0 22px 36px -16px rgba(0, 0, 0, .85);
}
.pcard__logo { width: 21cqi; height: auto; }
.pcard__label { justify-self: end; font-size: 3.6cqi; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(29, 28, 26, .6); }
/* emboss: light edge below, dark edge above, like raised plastic */
.pcard__num { grid-column: 1; grid-row: 3; font-size: 8.4cqi; font-weight: 500; letter-spacing: .14em; color: #3A3632; text-shadow: 0 1px 0 rgba(255, 255, 255, .85), 0 -1px 0 rgba(0, 0, 0, .18); }
.pcard__level { grid-column: 1; grid-row: 4; margin-top: 1.5cqi; font-size: 3.6cqi; letter-spacing: .06em; color: rgba(29, 28, 26, .65); }
.pcard__qr { grid-column: 2; grid-row: 3 / span 2; align-self: end; width: 19cqi; height: 19cqi; mix-blend-mode: multiply; }

/* Delivery */
.delivery__grid { display: grid; gap: 12px; }
.dcard { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--radius); background: var(--cream); border: 1px solid var(--line); transition: border-color .2s; }
.dcard:hover { border-color: var(--ink); }
.dcard__logo { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.dcard h3 { font: 600 16px/1.3 var(--sans); }
.dcard p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.dcard > .icon { margin-left: auto; width: 22px; height: 22px; color: var(--muted); }

/* Contacts */
.contacts__grid { display: grid; gap: 16px; }
.branch { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.branch h3 { font: 600 32px/1.1 var(--serif); margin-bottom: 6px; }
.branch p a { border-bottom: 1px solid var(--line); }
.branch p a:hover { border-color: var(--ink); }
.branch__hours { color: var(--muted); }
.branch__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.branch__actions .btn { min-height: 48px; padding: 0 14px; }
.contacts__tg { margin-top: 28px; font-size: 16px; }
.contacts__tg a { font-weight: 500; border-bottom: 1px solid var(--ink); }

/* Footer */
.footer { background: var(--night); color: rgba(253, 248, 243, .7); padding: 56px 0 calc(32px + env(safe-area-inset-bottom)); font-size: 14px; }
.footer__grid { display: grid; gap: 32px; }
.footer__brand img { width: 74px; height: auto; }
.footer__brand p { margin-top: 16px; font: 500 22px/1.3 var(--serif); color: var(--cream); }
.footer h4 { margin: 0 0 12px; font-size: 13px; color: rgba(253, 248, 243, .5); font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a:hover { color: var(--cream); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(253, 248, 243, .1); font-size: 12px; color: rgba(253, 248, 243, .5); }
.footer__bottom a { border-bottom: 1px solid rgba(253, 248, 243, .25); }

/* ≥ 600px */
@media (min-width: 600px) {
  :root { --pad: 32px; }
  .hero__ctas { grid-template-columns: auto auto; justify-content: start; }
  .hero__ctas form, .hero__ctas form .btn { width: auto; }
  .pages { grid-auto-columns: 38%; }
  .promo__grid { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .delivery__grid { grid-template-columns: repeat(3, 1fr); }
  .contacts__grid { grid-template-columns: 1fr 1fr; }
  .loyalty__cta form .btn { width: auto; }
  .about__media { max-width: 600px; }
}

/* ≥ 960px */
@media (min-width: 960px) {
  :root { --header-h: 76px; }
  .section { padding-block: 112px; }
  .section-title { margin-bottom: 44px; }
  .header__logo { width: 60px; height: 52px; }
  .header__nav { display: flex; gap: 32px; margin-left: 48px; font-size: 14px; font-weight: 500; }
  .header__nav a { padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color .2s; }
  .header__nav a:hover { border-color: currentColor; }
  .burger { display: none; }
  .btn--sm { min-height: 42px; padding: 0 20px; }

  .hero { align-items: center; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(20, 18, 16, .5) 0%, rgba(20, 18, 16, 0) 20%),
      linear-gradient(90deg, rgba(20, 18, 16, .92) 0%, rgba(20, 18, 16, .8) 40%, rgba(20, 18, 16, .2) 72%);
  }
  .hero__media { inset: 0; height: auto; }
  .hero__media img { object-position: 50% 50%; }
  .hero__content { padding-block: calc(var(--header-h) + 40px) 60px; }
  .hero__text { font-size: 18px; }

  .about__grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

  .pages { margin: 0; padding: 0; overflow: visible; grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: auto; gap: 16px; }

  .promo__grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .promo-card picture img, .promo-card > img { aspect-ratio: 4 / 5; }

  .loyalty__top { grid-template-columns: 1.1fr .9fr; grid-template-areas: "intro card" "cta card"; column-gap: 80px; row-gap: 32px; align-items: center; }
  .loyalty__intro { align-self: end; }
  .loyalty__cta { align-self: start; }
  .pcard-wrap { width: 380px; margin: 40px 0 0; }
  .loyalty__details { grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 80px; }
  .loyalty__foot { grid-template-columns: 1fr auto; align-items: center; gap: 40px; }

  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .lightbox__stage .lightbox__img { max-width: min(900px, calc(100% - 160px)); }
  .lightbox__stage.is-zoomed .lightbox__img { width: min(1400px, 100%); max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Cormorant defaults to old-style figures; the `font` shorthand resets features, so set them last */
.h2, .hero__title, .promo-card h3, .loyalty__subtitle,
.branch h3, .mnav__links a, .footer__brand p { font-feature-settings: "lnum" 1; }
