/*
  Resto Bistro — Premium Animation Layer
  Loads after tooplate-barista.css (cascade priority)
  Colors: untouched (--primary-color: #BC6C25, --secondary-color: #DDA15E)
*/

/* ===================================================
   1. GEIST FONT — headings
   =================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Geist', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(72px, 9vw, 110px) !important;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.0;
}

h2 {
  font-size: clamp(48px, 5vw, 68px) !important;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h3 {
  font-size: clamp(28px, 3.5vw, 42px) !important;
  font-weight: 700;
}

h4 {
  font-size: clamp(22px, 2.8vw, 34px) !important;
  font-weight: 700;
}

.navbar-brand {
  font-family: 'Geist', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

/* ===================================================
   2. SCROLL REVEAL BASE CLASSES
   Applied by JS via IntersectionObserver
   =================================================== */
.rb-reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.rb-reveal-left {
  opacity: 0;
  transform: translateX(-42px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.rb-reveal-right {
  opacity: 0;
  transform: translateX(42px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.rb-reveal.rb-visible,
.rb-reveal-left.rb-visible,
.rb-reveal-right.rb-visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays for child groups */
.rb-delay-1 { transition-delay: 0.05s !important; }
.rb-delay-2 { transition-delay: 0.14s !important; }
.rb-delay-3 { transition-delay: 0.23s !important; }
.rb-delay-4 { transition-delay: 0.32s !important; }
.rb-delay-5 { transition-delay: 0.41s !important; }
.rb-delay-6 { transition-delay: 0.50s !important; }

/* ===================================================
   3. HERO ENTRANCE ANIMATIONS
   =================================================== */
.hero-section .small-text {
  animation: rb-fade-down 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.hero-section h1 {
  animation: rb-fade-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.hero-section p.text-white {
  animation: rb-fade-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

.hero-section .col-lg-6 .btn:first-of-type {
  animation: rb-fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.75s both;
}

.hero-section .col-lg-6 .btn:last-of-type {
  animation: rb-fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.88s both;
}

@keyframes rb-fade-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes rb-fade-down {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   4. BUTTON PREMIUM EFFECTS
   =================================================== */
.custom-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              color 0.3s ease !important;
}

/* shimmer ripple layer */
.custom-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
  pointer-events: none;
  border-radius: inherit;
}

.custom-btn:hover::before {
  transform: translateX(100%);
}

.custom-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(188, 108, 37, 0.4);
}

.custom-btn:active {
  transform: translateY(-1px) scale(0.975);
  box-shadow: 0 4px 12px rgba(188, 108, 37, 0.3);
}

.custom-border-btn:hover {
  box-shadow: 0 10px 26px rgba(255, 255, 255, 0.12);
}

/* ===================================================
   5. NAVBAR — animated underline on links
   =================================================== */
.navbar-nav .nav-link {
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  border-radius: 2px;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 55%;
}

/* ===================================================
   6. TEAM CARDS — smoother zoom + lift + shadow
   =================================================== */
.team-block-wrap {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.team-block-wrap:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35) !important;
}

.team-block-image {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.team-block-wrap:hover .team-block-image {
  transform: scale(1.1) !important;
}

/* gradient intensifies on hover */
.team-block-info {
  transition: background-image 0.4s ease;
}

.team-block-wrap:hover .team-block-info {
  background-image: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.2),
    rgba(188, 108, 37, 0.95)) !important;
}

/* ===================================================
   7. MENU BLOCKS — slide-right + left accent + glow
   =================================================== */
.menu-block {
  border-left: 3px solid transparent;
  padding: 10px 0 10px 0;
  border-radius: 8px;
  transition: border-left-color 0.3s ease,
              background 0.3s ease,
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-block:hover {
  border-left-color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.055);
  transform: translateX(7px);
}

.menu-block h6 {
  transition: color 0.25s ease;
}

.menu-block:hover h6 {
  color: var(--secondary-color) !important;
}

/* Price highlight on hover */
.menu-block > div > strong:last-child {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

.menu-block:hover > div > strong:last-child {
  transform: scale(1.12);
  color: #ffffff !important;
}

/* ===================================================
   8. REVIEW CARDS — lift + shadow
   =================================================== */
.timeline-content {
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.42s ease !important;
}

.timeline-content:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25) !important;
}

/* Star pop on review hover */
.reviews-group i {
  display: inline-block;
  transition: transform 0.2s ease;
}

.reviews-block:hover .reviews-group i:nth-child(1) { animation: rb-star-pop 0.35s 0.00s cubic-bezier(0.22,1,0.36,1) both; }
.reviews-block:hover .reviews-group i:nth-child(2) { animation: rb-star-pop 0.35s 0.06s cubic-bezier(0.22,1,0.36,1) both; }
.reviews-block:hover .reviews-group i:nth-child(3) { animation: rb-star-pop 0.35s 0.12s cubic-bezier(0.22,1,0.36,1) both; }
.reviews-block:hover .reviews-group i:nth-child(4) { animation: rb-star-pop 0.35s 0.18s cubic-bezier(0.22,1,0.36,1) both; }
.reviews-block:hover .reviews-group i:nth-child(5) { animation: rb-star-pop 0.35s 0.24s cubic-bezier(0.22,1,0.36,1) both; }

@keyframes rb-star-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* ===================================================
   9. SECTION H2 ACCENT UNDERLINE
   =================================================== */
.about-section h2::after,
.barista-section h2::after,
.reviews-section h2::after,
.contact-section h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  margin: 14px auto 0;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-section:hover h2::after,
.barista-section:hover h2::after,
.reviews-section:hover h2::after,
.contact-section:hover h2::after {
  width: 80px;
}

/* ===================================================
   10. BADGE — subtle breathe pulse
   =================================================== */
.badge {
  animation: rb-badge-breathe 3.5s ease-in-out infinite;
}

@keyframes rb-badge-breathe {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(188,108,37,0); }
  50%       { opacity: 0.85; box-shadow: 0 0 0 4px rgba(188,108,37,0.2); }
}

/* ===================================================
   11. FORM INPUTS — lift on focus
   =================================================== */
.custom-form .form-control {
  transition: background 0.3s ease,
              border-color 0.3s ease,
              transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease !important;
}

.custom-form .form-control:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(188, 108, 37, 0.25) !important;
}

/* ===================================================
   12. SOCIAL ICON LINKS — bounce on hover
   =================================================== */
.social-icon-link {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.3s ease !important;
}

.social-icon-link:hover {
  transform: translateY(-4px) scale(1.15) !important;
}

/* ===================================================
   13. BACK-TO-TOP BUTTON
   =================================================== */
.back-top-icon {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.back-top-icon:hover {
  transform: translateY(-5px) !important;
}

/* ===================================================
   14. ABOUT SECTION VIDEO — parallax handled via JS
       just set will-change for GPU compositing
   =================================================== */
.about-section .ratio {
  will-change: transform;
  transition: none;
}

/* ===================================================
   15. MENU SECTION — subtle diagonal gradient shimmer
   =================================================== */
.menu-section {
  position: relative;
}

.menu-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    140deg,
    rgba(188, 108, 37, 0.12) 0%,
    transparent 45%,
    rgba(221, 161, 94, 0.08) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.menu-section > .container {
  position: relative;
  z-index: 1;
}

/* ===================================================
   16. FOOTER DEVELOPER CREDIT
   =================================================== */
.footer-bottom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
}

.footer-dev-credit {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  font-weight: 300;
}

.footer-dev-name {
  font-family: 'Geist', 'Plus Jakarta Sans', sans-serif;
  font-style: normal;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  position: relative;
  display: inline-block;
  /* subtle glow so it pops on the dark footer */
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
  transition: letter-spacing 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              text-shadow 0.35s ease;
}

/* animated underline sweep */
.footer-dev-name::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--secondary-color), #ffffff);
  border-radius: 1px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-dev-name:hover {
  color: #ffffff;
  letter-spacing: 0.26em;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.7),
               0 0 8px rgba(221, 161, 94, 0.5);
  text-decoration: none;
}

.footer-dev-name:hover::after {
  width: 100%;
}

@media screen and (max-width: 575px) {
  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ===================================================
   PREFERS-REDUCED-MOTION — hard disable
   =================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .rb-reveal,
  .rb-reveal-left,
  .rb-reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ===================================================
   FLEXBOX / TEXT-WRAP FIX FOR HERO H1
   .hero-section is d-flex; the flex-item chain can
   expand to accommodate h1's min-content width.
   min-width:0 + overflow:hidden collapses that chain;
   word-break ensures wrapping even with wider fallback fonts.
   =================================================== */
.hero-section > .container,
.hero-section .row > [class*="col-"] {
  min-width: 0;
  overflow: hidden;
}

.hero-section h1 {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ===================================================
   MOBILE ADJUSTMENTS
   =================================================== */
@media screen and (max-width: 767px) {
  .menu-block:hover {
    transform: translateX(4px);
  }
}

/* Mobile: Geist Bold is wider than Plus Jakarta Sans.
   Cap hero h1 so "Resto Bistro" wraps to two clean lines.
   Other h1s on mobile inherit this too — all safe at 52px. */
@media screen and (max-width: 575px) {
  h1 {
    font-size: 52px !important;
    letter-spacing: -0.01em;
    word-break: normal;
    overflow-wrap: anywhere;
  }
}
