/* ARISE Coffee — about, menu, gallery, contact, footer */

/* ---------- ABOUT ---------- */
.about{
  position:relative;
  background: var(--ivory);
  color: var(--navy-deep);
  padding: clamp(90px, 14vh, 160px) 6vw;
  overflow:hidden;
}

.about-watermark{
  position:absolute;
  right: -8vw;
  top: 50%;
  transform: translateY(-50%);
  width: min(52vw, 620px);
  height:auto;
  opacity: 0.05;
  pointer-events:none;
}

.about-inner{
  position:relative;
  z-index:1;
  max-width: 1180px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 110px);
  align-items:start;
}

.eyebrow--dark{ color: var(--navy-soft); margin-bottom: 26px; }

.about-lead{
  font-family: var(--display);
  font-weight: 450;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.18;
}

.about-text{
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.8;
  color: var(--navy-deep);
  max-width: 48ch;
  margin-bottom: 1.5em;
}

.about-tags{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 0.6em;
}
.about-tags li{
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--navy-deep);
  border: 1px solid rgba(15,43,65,0.22);
  padding: 9px 16px;
  border-radius: 999px;
}

[data-reveal]{
  opacity:0;
  transform: translateY(26px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2,.6,.2,1);
}
[data-reveal].in-view{ opacity:1; transform:translateY(0); }
.about-body[data-reveal]{ transition-delay: .15s; }

@media (max-width: 780px){
  .about-inner{ grid-template-columns: 1fr; }
  .about-watermark{ opacity:0.04; }
}

@media (max-width: 560px){
  .nav-links{ gap:13px; font-size: 0.6rem; letter-spacing: 0.08em; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .mark-reveal{ clip-path: inset(0 0 0 0); }
  .horizon{ display:none; }
  /* Movement goes, the fade stays. What causes discomfort is the motion, not
     the change in opacity - and without the fade every block would snap into
     place. !important is needed to outrank the blanket rule above; the
     attribute selector already outranks its * on specificity. */
  [data-reveal], .g-tile[data-reveal]{
    transform: none !important;
    transition: opacity .5s ease !important;
  }

  /* Same idea for the hero intro text: it uses a keyframe animation rather
     than a transition, so the blanket rule above crushes its duration too and
     it just snaps into view. Swap to an opacity-only keyframe and restore the
     duration; each element's own animation-delay is untouched, so the reveal
     order is unchanged. */
  .eyebrow, .subline, .philosophy{ animation-name: fadeInOnly !important; animation-duration: .4s !important; }
  .scroll-cue{ animation-name: fadeInOnly !important; animation-duration: .35s !important; }
}

@keyframes fadeInOnly{ from{ opacity:0; } to{ opacity:1; } }
/* ---------- MENU ---------- */
.menu{
  position:relative;
  background: var(--navy-black);
  color: var(--ivory);
  padding: clamp(90px, 14vh, 160px) 6vw;
}

.menu-head{
  text-align:center;
  max-width: 640px;
  margin: 0 auto clamp(50px, 8vh, 90px);
}

.menu-lead{
  font-family: var(--display);
  font-weight: 450;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.2;
  margin-top: 18px;
}

.menu-grid{
  max-width: 1180px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items:start;
}

.menu-cat-label{
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 20px;
}

.menu-cat ul{
  list-style:none;
}
.menu-cat li{
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 350;
  padding: 14px 0;
  border-top: 1px solid rgba(199,214,222,0.15);
}
.menu-cat li:last-child{ border-bottom: 1px solid rgba(199,214,222,0.15); }

.menu-cat.featured{
  border: 1px solid rgba(199,214,222,0.28);
  padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(199,214,222,0.06), transparent 70%);
}
.menu-cat.featured .menu-cat li{ border-color: rgba(199,214,222,0.2); }
.menu-kicker{
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--frost);
  margin-bottom: 10px;
}
.menu-story{
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--steel);
  margin-top: 22px;
}

@media (max-width: 860px){
  .menu-grid{ grid-template-columns: 1fr; gap: 36px; }
  .menu-cat.featured{ order:-1; }
}

/* ---------- MENU ITEM DETAIL ---------- */
/* Each drink name is a button; its blurb lives in the same <li>, always in the
   DOM, just collapsed to zero height. height:auto can't be transitioned, and
   a guessed max-height either clips a long blurb or drags a short one out for
   far longer than its own content needs - grid-template-rows 0fr -> 1fr
   sidesteps both, since the row's own content sets the height being
   interpolated. Toggles are independent per item: this is three short lists,
   not one long accordion, so opening one has no reason to close another. */
.menu-item-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  width:100%;
  border:0;
  background:none;
  padding:0;
  font: inherit;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 350;
  color: inherit;
  text-align:left;
  cursor:pointer;
}
.menu-item-toggle:focus-visible{ outline: 2px solid var(--frost); outline-offset: 4px; }

.menu-item-icon{
  flex: 0 0 auto;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--steel);
  border-bottom: 1.5px solid var(--steel);
  transform: rotate(45deg);
  transition: transform .3s ease;
}
.menu-item.is-open .menu-item-icon{ transform: rotate(225deg); }

.menu-item-detail{
  display:grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s cubic-bezier(.2,.7,.3,1);
}
.menu-item.is-open .menu-item-detail{ grid-template-rows: 1fr; }

.menu-item-detail-inner{
  overflow:hidden;
  min-height:0;
}
.menu-item-detail p{
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--steel);
  padding: 4px 0 16px;
  max-width: 42ch;
}

/* ---------- GALLERY ---------- */
.gallery{
  background: var(--ivory);
  color: var(--navy-deep);
  /* No horizontal padding: the rail below runs the full width of the screen.
     The 6vw gutter the rest of the page uses moves onto the heading instead. */
  padding: clamp(90px, 14vh, 160px) 0;
}

.gallery-head{
  max-width: 640px;
  margin: 0 auto clamp(50px, 8vh, 80px);
  padding: 0 6vw;
  text-align:center;
}
.gallery-lead{
  font-family: var(--display);
  font-weight: 450;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.2;
  margin-top: 18px;
}

.gallery-rail-wrap{
  position:relative;   /* the arrows hang off this */
}

.gallery-rail{
  /* The mosaic of the old grid, laid out along the scroll instead of down the
     page. Built from blocks (below) rather than by grid auto-placement, so no
     arrangement of photos can leave the browser an empty cell to fill. */
  --unit: clamp(150px, 15vw, 240px);   /* width of one mosaic column */
  --gap: 10px;

  display:flex;
  gap: var(--gap);
  /* The band needs a height of its own: blocks stretch to it and the photos
     inside them divide it. Without it the flex:1 on a photo has nothing to
     resolve against and the block collapses. */
  height: clamp(270px, 27vw, 410px);
  overflow-x:auto;
  /* Without this, a sideways flick that runs past the end of the rail is handed
     to the browser, which reads it as a back gesture and leaves the page. */
  overscroll-behavior-x: contain;
  /* proximity, not mandatory: mandatory fights fast flicks and pulls the rail
     back under the finger, which is exactly what reads as a janky carousel. */
  scroll-snap-type: x proximity;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.gallery-rail::-webkit-scrollbar{ display:none; }

/* One column of the mosaic. A block is always full - either one photo over the
   whole height, or two splitting it - and that is the whole reason the band
   cannot end up with a gap. There are no cells here for a browser to leave
   empty; each block sizes its own contents. js/main.js decides how many photos
   go in each and which ones are wide. */
.rail-block{
  flex: 0 0 auto;
  width: var(--unit);
  display:flex;
  flex-direction:column;
  gap: var(--gap);
  scroll-snap-align: start;
  scroll-margin-inline: 10px;   /* tabbing to a photo must not jam it against the edge */
}
/* Two columns wide, plus the gap they would have had between them. */
.rail-block--wide{ width: calc(var(--unit) * 2 + var(--gap)); }

.rail-block > .g-tile{
  flex: 1;
  min-height: 0;   /* a flex item will not shrink below its content without
                      this, and two photos would stop splitting the height */
}

.g-tile{
  position:relative;
  overflow:hidden;
  background: var(--navy-deep);
}
.g-tile img{
  width:100%; height:100%;
  object-fit:cover;
  display:block;
  transform: scale(1.02);
  transition: transform .7s cubic-bezier(.2,.6,.2,1);
}
.g-tile:hover img{ transform: scale(1.09); }

.g-tile::after{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(180deg, transparent 55%, rgba(8,23,34,0.75) 100%);
  opacity:0;
  transition: opacity .4s ease;
}
.g-tile:hover::after{ opacity:1; }

.g-cap{
  position:absolute;
  left:16px; bottom:14px;
  z-index:2;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory);
  opacity:0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.g-tile:hover .g-cap{ opacity:1; transform:translateY(0); }

/* :hover never fires on a touch screen, so the caption would otherwise stay
   invisible on every phone - the one place captions matter most, since there
   is no cursor to reveal them by accident. Shown plainly instead of on tap:
   a tap here opens the lightbox, it should not first "waste" a touch on text. */
@media (hover: none){
  .g-cap{ opacity:1; transform:none; }
  .g-tile::after{ opacity:1; }
}

/* A gallery photo slides into place once it enters view. It comes in from the
   right because that is the direction the rail travels - the same reveal the
   rest of the page does on the way down, turned on its side.
   The transition is declared explicitly rather than inherited from the generic
   [data-reveal] rule above, so the timing of the gallery can be tuned on its own.
   The slide is the part that gets dropped under prefers-reduced-motion further
   up; the fade stays, so the photos still arrive softly instead of snapping. */
.g-tile[data-reveal]{
  opacity:0;
  transform: translateX(34px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1);
}
.g-tile[data-reveal].in-view{
  opacity:1;
  transform: none;
}

/* ---------- GALLERY RAIL ARROWS ---------- */
/* For mouse users, who have no way to scroll sideways. JS unhides them only
   when the rail actually overflows. */
.rail-arrow{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  z-index:3;
  width:46px; height:46px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(15,43,65,0.16);
  border-radius:50%;
  background: rgba(249,250,245,0.92);
  backdrop-filter: blur(4px);
  color: var(--navy-deep);
  cursor:pointer;
  transition: background .3s ease, border-color .3s ease, opacity .3s ease;
}
.rail-arrow--prev{ left: clamp(10px, 2vw, 22px); }
.rail-arrow--next{ right: clamp(10px, 2vw, 22px); }
.rail-arrow:hover{ background: var(--ivory); border-color: rgba(15,43,65,0.4); }
.rail-arrow:focus-visible{ outline: 2px solid var(--navy-deep); outline-offset: 3px; }
.rail-arrow[hidden]{ display:none; }
/* at either end of the rail: still there, just visibly spent */
.rail-arrow:disabled{ opacity:0.28; cursor:default; }
.rail-arrow:disabled:hover{ background: rgba(249,250,245,0.92); border-color: rgba(15,43,65,0.16); }

/* Touch devices swipe the rail directly; arrows would just cover a photo. */
@media (hover: none){
  .rail-arrow{ display:none; }
}

@media (max-width: 780px){
  /* Sized so two columns fit and the next one clearly peeks out. That peek is
     the whole hint that the rail scrolls - no extra indicator needed. */
  .gallery-rail{
    /* 44vw left only ~12vw of slack for the third column to peek through -
       thin enough that rounding and scrollbar-gutter could erase it
       entirely on some phones, leaving a flush edge with no scroll hint. */
    --unit: 38vw;
    height: 84vw;
  }
  /* A double-width block here would be nearly the whole screen, which reads as
     one photo at a time rather than a mosaic. Photo sizes still vary, just
     within one column width: some blocks hold a single full-height photo,
     others two stacked. */
  .rail-block--wide{ width: var(--unit); }
}

/* ---------- GALLERY LIGHTBOX ---------- */
/* Each tile is a <button> so a photo can also be opened from the keyboard.
   Everything here just strips the browser's button chrome back to the plain
   tile look; the sizing and hover rules above stay as they were. */
button.g-tile{
  -webkit-appearance:none;
  appearance:none;
  border:0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
}
button.g-tile:focus-visible{ outline: 2px solid var(--navy-deep); outline-offset: 3px; }

.lightbox{
  position:fixed; inset:0;
  z-index:100;              /* over the nav (50) and the progress bar (60) */
  display:flex;
  align-items:center;
  justify-content:center;
  /* Верхний отступ держит полосу под кнопку закрытия: 46px кнопки плюс её
     отступ сверху и небольшой зазор. Без этого высокое вертикальное фото
     упирается в кнопку и перекрывает её — заметнее всего на телефоне. */
  padding: clamp(72px, 11vh, 104px) clamp(16px, 5vw, 64px) clamp(28px, 6vh, 64px);
  background: rgba(8,23,34,0.93);
  backdrop-filter: blur(6px);
  cursor: zoom-out;         /* the whole backdrop is the way back to the page */
  opacity:0;
  transition: opacity .28s ease;
}
.lightbox[hidden]{ display:none; }
.lightbox.is-open{ opacity:1; }
/* while it fades out it must not swallow clicks meant for the page behind */
.lightbox:not(.is-open){ pointer-events:none; }

.lb-frame{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  max-width:100%;
  max-height:100%;
  cursor:default;
  transform: scale(.985) translateY(10px);
  transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.lightbox.is-open .lb-frame{ transform:none; }

.lb-img{
  display:block;
  max-width:100%;
  max-height:100%;
  min-height:0;             /* lets the photo shrink instead of pushing the caption out */
  object-fit:contain;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
}

.lb-cap{
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--frost);
  text-align:center;
}

.lb-close{
  position:absolute;
  top: clamp(14px, 3vw, 30px);
  right: clamp(14px, 3vw, 30px);
  z-index:2;                /* .lb-frame позиционирован и идёт ниже в разметке —
                               без этого фото рисуется поверх кнопки */
  width:46px; height:46px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(199,214,222,0.3);
  border-radius:50%;
  background: rgba(8,23,34,0.6);
  backdrop-filter: blur(4px);
  color: var(--ivory);
  cursor:pointer;
  transition: background .3s ease, border-color .3s ease;
}
.lb-close:hover{ background: rgba(63,84,99,0.72); border-color: rgba(199,214,222,0.55); }
.lb-close:focus-visible{ outline: 2px solid var(--frost); outline-offset: 3px; }

/* Hold the page still behind the photo. The gutter reserved in base.css keeps
   this from shifting the layout when the scrollbar goes away. */
body.lb-lock{ overflow:hidden; }

/* ---------- CONTACT ---------- */
.contact{
  background: var(--navy-black);
  color: var(--ivory);
  padding: clamp(90px, 14vh, 160px) 6vw clamp(60px, 8vh, 100px);
}

.contact-head{
  max-width: 640px;
  margin: 0 auto clamp(50px, 8vh, 90px);
  text-align:center;
}
.contact-lead{
  font-family: var(--display);
  font-weight: 450;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.2;
  margin-top: 18px;
}

.contact-grid{
  max-width: 1100px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
}

.loc-card{
  border: 1px solid rgba(199,214,222,0.2);
  padding: clamp(28px, 3.2vw, 40px);
}

.loc-label{
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--frost);
  margin-bottom: 18px;
}

.loc-city{
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  font-weight: 450;
  margin-bottom: 14px;
}

.loc-address{
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--steel);
  margin-bottom: 22px;
}

.loc-links{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin-bottom: 22px;
}
.loc-links a{
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ivory);
  width: fit-content;
  border-bottom: 1px solid rgba(199,214,222,0.35);
  padding-bottom: 2px;
  transition: border-color .3s ease, opacity .3s ease;
}
.loc-links a:hover{ border-color: var(--ivory); }

.loc-map{
  width:100%;
  height: clamp(240px, 34vh, 380px);
  border:0;
  filter: grayscale(0.55) invert(0.9) contrast(0.95);
  display:block;
}

.loc-soon{
  display:inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--frost);
  border: 1px solid rgba(199,214,222,0.35);
  padding: 7px 14px;
  border-radius: 999px;
}

.loc-teaser{
  font-family: var(--display);
  font-style: italic;
  font-size: 1rem;
  color: var(--frost);
  margin-top: 22px;
  line-height: 1.6;
}

@media (max-width: 780px){
  .contact-grid{ grid-template-columns: 1fr; }
}

/* ---------- FOOTER ---------- */
.site-footer{
  background: var(--navy-black);
  color: var(--steel);
  padding: 30px 6vw 40px;
  border-top: 1px solid rgba(199,214,222,0.12);
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 16px;
}
.site-footer .nav-mark{ font-size: 0.9rem; color: var(--ivory); }
.footer-links{
  display:flex;
  gap: 24px;
  list-style:none;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-links a{ color: var(--steel); transition: color .3s ease; }
.footer-links a:hover{ color: var(--ivory); }
.footer-copy{
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: rgba(143,164,179,0.6);
}
