/*
Theme Name: BokuBean
Theme URI: https://bokubean.in
Author: BokuBean
Author URI: https://bokubean.in
Description: Premium single-page cafe theme with a retro-vintage Japanese ink-wash aesthetic. Customizer-driven hero, about, gallery, testimonials and contact sections plus a Menu Items custom post type.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bokubean
Tags: cafe, restaurant, one-page, custom-colors, custom-logo, custom-menu, featured-images, responsive, accessibility-ready
*/

/* -------------------------------------------------
   1. Design tokens
------------------------------------------------- */
:root {
  --primary-color: #1f0f0c;   /* espresso */
  --secondary-color: #3a4c58; /* slate teal */
  --accent-color: #c5aaae;    /* dusty rose */
  --mist-color: #899cac;
  --background-color: #fbf3dc; /* vanilla cream */
  --card-color: #fdf8e9;
  --text-color: #1f0f0c;

  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-jp: "Noto Serif JP", serif;

  --radius: 24px;
  --shadow-soft: 0 4px 20px rgba(31, 15, 12, 0.08);
  --shadow-medium: 0 8px 30px rgba(31, 15, 12, 0.12);
  --container: 1280px;
  --section-y: clamp(4rem, 10vw, 8rem);
}

/* -------------------------------------------------
   2. Base
------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary-color); color: var(--background-color);
  padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* -------------------------------------------------
   3. Layout helpers
------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: var(--section-y); position: relative; }
.section--cream { background: var(--background-color); }
.section--espresso { background: var(--primary-color); color: var(--background-color); }
.section--teal { background: var(--secondary-color); color: var(--background-color); }
.section--rose { background: var(--accent-color); color: var(--primary-color); }
.text-center { text-align: center; }

.text-hero { font-size: clamp(3rem, 8vw, 6.5rem); line-height: 0.95; }
.text-h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.02; }
.text-h2 { font-size: clamp(2rem, 4vw, 3rem); }
.text-h3 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; }
.text-body { font-size: clamp(1rem, 1.5vw, 1.125rem); line-height: 1.7; }
.eyebrow {
  font-family: var(--font-jp);
  font-size: .8rem; letter-spacing: .35em; text-transform: uppercase;
  color: var(--secondary-color);
}
.section--espresso .eyebrow, .section--teal .eyebrow { color: var(--accent-color); }

.ink-divider { display: block; width: 14rem; max-width: 60%; height: 1.25rem; color: var(--accent-color); }

.glass {
  background: rgba(251, 243, 220, .7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 170, 174, .3);
}
.glass-dark {
  background: rgba(31, 15, 12, .45);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 170, 174, .25);
}
.paper-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

/* -------------------------------------------------
   4. Buttons
------------------------------------------------- */
.btn {
  display: inline-block; border-radius: 999px; padding: 1rem 2rem;
  font-size: .875rem; font-weight: 600; border: 1px solid transparent;
  transition: transform .3s ease, background-color .3s ease, color .3s ease;
}
.btn:hover { transform: scale(1.05); }
.btn--primary { background: var(--primary-color); color: var(--background-color); box-shadow: var(--shadow-soft); }
.btn--primary:hover { background: var(--secondary-color); color: var(--background-color); }
.btn--outline { border-color: var(--primary-color); color: var(--primary-color); }
.btn--outline:hover { background: var(--primary-color); color: var(--background-color); }
.btn--light { background: var(--background-color); color: var(--primary-color); animation: pulseSoft 2.8s ease-in-out infinite; }
.btn--outline-light { border-color: var(--background-color); color: var(--background-color); }
.btn--outline-light:hover { background: var(--background-color); color: var(--primary-color); }
.btn--sm { padding: .75rem 1.5rem; }

/* -------------------------------------------------
   5. Header / navigation
------------------------------------------------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
  animation: navDrop .6s cubic-bezier(.25,.46,.45,.94) both;
}
.site-header.is-scrolled {
  background: rgba(251, 243, 220, .7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(197,170,174,.3);
  box-shadow: var(--shadow-soft);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .75rem;
}
.site-brand { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.site-brand img { height: 44px; width: auto; object-fit: contain; }
.site-brand .brand-text { font-family: var(--font-display); font-size: 1.5rem; }
.site-brand .brand-jp { font-family: var(--font-jp); font-size: .75rem; color: rgba(31,15,12,.6); }

.primary-nav ul { display: flex; align-items: center; gap: 1.75rem; }
.primary-nav a {
  position: relative; font-size: .875rem; font-weight: 500;
  color: rgba(31,15,12,.8); transition: color .2s ease;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--primary-color); }
.primary-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; height: 2px; width: 0;
  background: var(--accent-color); transform: translateX(-50%); transition: width .3s ease;
}
.primary-nav a:hover::after { width: 100%; }
.nav-cta { margin-left: .5rem; }

.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 999px; border: 1px solid var(--accent-color);
  background: transparent; color: var(--primary-color);
}
.nav-toggle span {
  position: absolute; left: 50%; top: 50%; height: 2px; width: 20px; margin-left: -10px;
  background: currentColor; transition: transform .3s ease;
}
.nav-toggle span:nth-child(1) { transform: translateY(-6px); }
.nav-toggle span:nth-child(2) { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 40; display: none;
  flex-direction: column; justify-content: center; padding: 2rem;
  background: var(--background-color);
}
.mobile-nav.is-open { display: flex; animation: fadeIn .3s ease both; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 1rem; }
.mobile-nav a { font-family: var(--font-display); font-size: 2.25rem; }
.mobile-nav .btn { margin-top: 1.5rem; align-self: flex-start; }
body.nav-open { overflow: hidden; }

@media (max-width: 1023px) {
  .primary-nav, .site-header .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

/* -------------------------------------------------
   6. Hero
------------------------------------------------- */
.hero {
  position: relative; display: flex; align-items: center; overflow: hidden;
  min-height: 92vh; padding-top: 8rem; padding-bottom: 4rem;
  background: var(--background-color);
}
.hero .container {
  display: grid; gap: 3rem; align-items: center; position: relative;
  grid-template-columns: 1.05fr 1fr;
}
.hero-title { margin-top: 1rem; }
.hero-title .word { display: inline-block; margin-right: .25em; animation: riseIn .7s cubic-bezier(.25,.46,.45,.94) both; }
.hero-title .word.accent { color: var(--secondary-color); transform: rotate(-2deg); }
.hero-tagline { font-family: var(--font-display); font-size: 1.25rem; color: var(--secondary-color); margin-top: 1.5rem; }
.hero-desc { margin-top: 1rem; max-width: 32rem; color: rgba(31,15,12,.75); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero-media { position: relative; width: 100%; max-width: 28rem; margin-inline: auto; }
.hero-media .blob {
  position: absolute; inset: -1.5rem; background: rgba(197,170,174,.5);
  transform: rotate(6deg); border-radius: 46% 54% 38% 62% / 56% 42% 58% 44%;
}
.hero-media img { position: relative; aspect-ratio: 1/1; width: 100%; object-fit: cover; border-radius: 32px; box-shadow: var(--shadow-medium); }
.hero-steam { position: absolute; inset-inline: 0; top: -2.5rem; display: flex; justify-content: center; gap: 1rem; pointer-events: none; }
.hero-steam span { width: 8px; height: 64px; border-radius: 999px; background: rgba(31,15,12,.25); filter: blur(3px); animation: steam 4s ease-in-out infinite; }
.hero-steam span:nth-child(2) { animation-delay: 1.1s; }
.hero-steam span:nth-child(3) { animation-delay: 2.2s; }
.hero-price {
  position: absolute; bottom: -1.5rem; left: -1rem; padding: .75rem 1.25rem;
  border-radius: 16px; box-shadow: var(--shadow-soft);
}
.hero-price strong { display: block; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; }
.hero-price span { font-size: .75rem; color: var(--secondary-color); }

.floating-beans { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.floating-beans span {
  position: absolute; border-radius: 999px; background: rgba(31,15,12,.15);
  animation: floaty 6s ease-in-out infinite;
}

/* -------------------------------------------------
   7. Sections & cards
------------------------------------------------- */
.philosophy { text-align: center; overflow: hidden; }
.philosophy .kanji {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-family: var(--font-jp); font-size: 28rem; line-height: 1; opacity: .05; color: var(--background-color);
}
.philosophy .inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.philosophy p.text-body { max-width: 40rem; color: rgba(251,243,220,.75); }

.card-grid { display: grid; gap: 2rem; grid-template-columns: repeat(3, 1fr); margin-top: 3rem; }
.menu-card {
  background: var(--card-color); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-soft); height: 100%; display: flex; flex-direction: column;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease;
}
.menu-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-medium); }
.menu-card .media { overflow: hidden; }
.menu-card img { aspect-ratio: 4/3; width: 100%; object-fit: cover; transition: transform .5s ease; }
.menu-card:hover img { transform: scale(1.08); }
.menu-card .body { padding: 1.5rem; }
.menu-card h3 { margin-top: 1rem; }
.menu-card .desc { margin-top: .5rem; font-size: .875rem; color: var(--secondary-color); }
.menu-card .price { margin-top: 1rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.badge {
  display: inline-block; background: var(--accent-color); color: var(--primary-color);
  border-radius: 999px; padding: .25rem .75rem; font-size: .75rem; font-weight: 600;
}
.menu-filters { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 2rem; }
.menu-filters button {
  border-radius: 999px; border: 1px solid var(--accent-color); background: transparent;
  color: inherit; padding: .5rem 1.1rem; font-size: .8125rem; font-weight: 600;
  transition: background-color .3s ease, color .3s ease;
}
.menu-filters button[aria-pressed="true"] { background: var(--primary-color); color: var(--background-color); border-color: var(--primary-color); }
.menu-card[hidden] { display: none; }

.about-grid { display: grid; gap: 2.5rem; grid-template-columns: .85fr 1.15fr; align-items: center; }
.about-copy p { margin-top: 1.5rem; max-width: 34rem; color: var(--secondary-color); }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow-medium); width: 100%; object-fit: cover; }

.gallery-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(4, 1fr); margin-top: 3rem; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.gallery-grid img { width: 100%; height: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform .5s ease; }
.gallery-grid figure:hover img { transform: scale(1.08); }
.gallery-grid figure:nth-child(1), .gallery-grid figure:nth-child(6) { grid-row: span 2; }
.gallery-grid figure:nth-child(1) img, .gallery-grid figure:nth-child(6) img { aspect-ratio: 3/5; }

.lightbox {
  position: fixed; inset: 0; z-index: 90; display: none; place-items: center;
  background: rgba(31,15,12,.9); padding: 2rem;
}
.lightbox.is-open { display: grid; animation: fadeIn .25s ease both; }
.lightbox img { max-height: 85vh; width: auto; border-radius: 16px; }
.lightbox button {
  position: absolute; top: 1.5rem; right: 1.5rem; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid rgba(251,243,220,.4);
  background: transparent; color: var(--background-color); font-size: 1.25rem;
}

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; margin-top: 3rem; }
.feature { text-align: center; }
.feature svg { width: 36px; height: 36px; margin-inline: auto; }
.feature h3 { margin-top: 1rem; font-size: 1.25rem; }
.feature p { margin-top: .5rem; font-size: .875rem; color: rgba(31,15,12,.7); }

.marquee { overflow: hidden; margin-top: 3rem; }
.marquee-track { display: flex; width: max-content; gap: 1.5rem; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.testimonial { width: 400px; max-width: 82vw; flex-shrink: 0; border-radius: var(--radius); padding: 1.75rem; margin: 0; }
.testimonial .quote-mark { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--accent-color); display: block; }
.testimonial blockquote { margin: .5rem 0 0; color: rgba(251,243,220,.9); }
.testimonial figcaption { margin-top: 1.25rem; }
.testimonial figcaption .name { font-family: var(--font-display); font-size: 1.125rem; }
.testimonial figcaption .handle { font-size: .75rem; color: var(--accent-color); }

.contact-grid { display: grid; gap: 3rem; grid-template-columns: 1fr 1fr; align-items: center; }
.contact-line { display: flex; align-items: flex-start; gap: .75rem; margin-top: 1.5rem; }
.contact-line svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--secondary-color); margin-top: 4px; }
.hours { margin-top: 1rem; font-size: .875rem; color: var(--secondary-color); }
.map-wrap { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-medium); }
.map-wrap iframe { width: 100%; height: 420px; border: 0; filter: grayscale(35%) sepia(25%); }

.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* -------------------------------------------------
   8. Footer
------------------------------------------------- */
.site-footer { background: var(--primary-color); color: var(--background-color); }
.footer-grid { display: grid; gap: 3rem; grid-template-columns: repeat(4, 1fr); padding-block: 4rem; }
.footer-grid h3 { font-size: 1.125rem; }
.footer-grid ul { margin-top: 1rem; display: grid; gap: .5rem; }
.footer-grid a { font-size: .875rem; color: rgba(251,243,220,.7); transition: color .2s ease; }
.footer-grid a:hover { color: var(--accent-color); }
.footer-brand .name { font-family: var(--font-display); font-size: 1.875rem; }
.footer-brand .jp { font-family: var(--font-jp); font-size: .875rem; color: var(--accent-color); margin-top: .25rem; }
.footer-brand p { margin-top: 1rem; max-width: 20rem; font-size: .875rem; color: rgba(251,243,220,.7); }
.socials { display: flex; gap: .75rem; margin-top: 1rem; }
.socials a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid rgba(251,243,220,.25); color: rgba(251,243,220,.8); transition: all .25s ease;
}
.socials a:hover { background: var(--accent-color); color: var(--primary-color); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(251,243,220,.15); }
.footer-bottom .container {
  display: flex; flex-direction: column; gap: .25rem; padding-block: 1.25rem;
  font-size: .75rem; color: rgba(251,243,220,.5);
}

/* -------------------------------------------------
   9. Inner pages / posts
------------------------------------------------- */
.page-shell { padding-top: 9rem; padding-bottom: 4rem; }
.entry-content { max-width: 46rem; margin-inline: auto; }
.entry-content > * + * { margin-top: 1.25rem; }
.entry-content h2, .entry-content h3 { margin-top: 2.5rem; }
.entry-content a { color: var(--secondary-color); text-decoration: underline; }
.entry-title { margin-bottom: 1.5rem; }
.entry-thumb img { border-radius: var(--radius); margin-bottom: 2rem; }
.post-list { display: grid; gap: 2rem; grid-template-columns: repeat(3, 1fr); margin-top: 2.5rem; }
.pagination { margin-top: 3rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--accent-color); }
.pagination .current { background: var(--primary-color); color: var(--background-color); }

/* -------------------------------------------------
   10. Reveal animations
------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s cubic-bezier(.25,.46,.45,.94), transform .6s cubic-bezier(.25,.46,.45,.94); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Keep scroll-reveal content visible inside Elementor's editor iframe. */
.elementor-editor-active .reveal,
.elementor-editor-preview .reveal { opacity: 1 !important; transform: none !important; }

@keyframes steam {
  0% { opacity: 0; transform: translateY(0) scaleX(1); }
  30% { opacity: .55; }
  100% { opacity: 0; transform: translateY(-70px) scaleX(1.5); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(8deg); }
}
@keyframes pulseSoft {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(197,170,174,0); }
  50% { transform: scale(1.04); box-shadow: 0 0 40px rgba(197,170,174,.45); }
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes navDrop { from { transform: translateY(-80px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* -------------------------------------------------
   11. Responsive
------------------------------------------------- */
@media (max-width: 1023px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 22rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .post-list { grid-template-columns: repeat(2, 1fr); }
  .philosophy .kanji { font-size: 16rem; }
}
@media (max-width: 640px) {
  .card-grid, .feature-grid, .footer-grid, .post-list { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid figure:nth-child(1), .gallery-grid figure:nth-child(6) { grid-row: span 1; }
  .gallery-grid figure:nth-child(1) img, .gallery-grid figure:nth-child(6) img { aspect-ratio: 1/1; }
  .mobile-nav a { font-size: 1.875rem; }
  .map-wrap iframe { height: 300px; }
  .hero { min-height: auto; padding-top: 7rem; }
}
@media (min-width: 641px) {
  .footer-bottom .container { flex-direction: row; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Elementor editor: reveal animations must not hide editable content. */
body.elementor-editor-active .reveal,
.elementor-editor-active .reveal {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
