/* =============================================
   COMMONGROUNDS COFFEE HOUSE — STYLESHEET
   ============================================= */

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

:root {
  --white:    #f5f3f0;   /* warm white — main background */
  --light:    #e4e1dc;   /* light panels */
  --black:    #0f0e0d;   /* near-black — dark sections */
  --ink:      #1e1c1a;   /* body text */
  --mid:      #6b6660;   /* secondary text, borders */
  --rust:     #4e7c5f;   /* sole accent color */
  --charcoal: #0b0a09;   /* footer */

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-hand:    'Caveat', cursive;

  --max-w: 1140px;
  --section-pad: 5rem 1.5rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--ink);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
}

/* ── GRAIN TEXTURE ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; }

a { color: var(--rust); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--rust);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid var(--rust);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.btn:hover { background: transparent; color: var(--rust); text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--black); }

/* ── HEADER / NAV ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--black);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
}
.logo-mark { color: var(--rust); font-size: 0.6rem; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-header nav { display: flex; gap: 2rem; }
.site-header nav a {
  color: rgba(245,243,240,0.7);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.site-header nav a:hover { color: var(--white); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  background-color: var(--black);
  background-image:
    linear-gradient(rgba(15,14,13,0.68), rgba(15,14,13,0.80)),
    url('images/slide_1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--white));
}

.hero-content {
  text-align: center;
  z-index: 1;
  max-width: 640px;
}

.hero-eyebrow {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: rgba(245,243,240,0.6);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: clamp(4rem, 12vw, 9rem);
  color: var(--white);
  line-height: 0.95;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--rust);
}

.hero-sub {
  color: rgba(245,243,240,0.55);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

/* stamp */
.hero-stamp {
  position: absolute;
  right: clamp(1.5rem, 6vw, 5rem);
  top: 50%;
  transform: translateY(-50%) rotate(12deg);
  width: clamp(90px, 14vw, 140px);
  opacity: 0.45;
  z-index: 1;
}
.stamp-svg { width: 100%; height: auto; }
.stamp-text {
  font-family: var(--font-body);
  font-size: 12px;
  fill: var(--white);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.stamp-center {
  font-family: var(--font-display);
  font-size: 28px;
  fill: var(--white);
  font-weight: 900;
}

/* ── SECTIONS (shared) ── */
.section { padding: var(--section-pad); max-width: var(--max-w); margin: 0 auto; }

.section-label {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--mid);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--black);
  margin-bottom: 2.5rem;
}

/* ── MENU ── */
.menu-section { padding-top: 4rem; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.menu-category h3 {
  font-size: 1.15rem;
  color: var(--ink);
  border-bottom: 2px solid var(--light);
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.04em;
}

.menu-list { list-style: none; }
.menu-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px dotted rgba(30,28,26,0.18);
  font-size: 0.95rem;
}
.menu-list li span:last-child {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--rust);
  white-space: nowrap;
  margin-left: 1rem;
}

.menu-note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--mid);
  font-style: italic;
  line-height: 1.5;
}

/* ── DIVIDER ── */
.divider-art {
  text-align: center;
  color: var(--rust);
  font-size: 0.5rem;
  letter-spacing: 1.5rem;
  padding: 1rem 0;
  opacity: 0.4;
}

/* ── ABOUT ── */
.about-section {
  background-color: var(--black);
  max-width: 100%;
  padding: 5rem 1.5rem;
}

.about-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-section .section-label { color: var(--rust); opacity: 0.8; }
.about-section .section-title { color: var(--white); margin-bottom: 1.5rem; }

.about-text p {
  color: rgba(245,243,240,0.65);
  margin-bottom: 1.2rem;
  font-size: 0.98rem;
}

.about-sig {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: rgba(245,243,240,0.6) !important;
  margin-top: 0.5rem;
}

.about-card {
  border: 2px solid rgba(78,124,95,0.35);
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.about-card::before {
  content: '"';
  position: absolute;
  top: -1.5rem;
  left: 1.5rem;
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--rust);
  line-height: 1;
  opacity: 0.45;
}
.about-card-quote {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-style: italic;
  color: var(--white);
  line-height: 1.3;
}
.about-card-quote em { color: var(--rust); }

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.about-tags span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(245,243,240,0.18);
  color: rgba(245,243,240,0.5);
}

/* ── GALLERY ── */
.gallery-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 4px;
  background: var(--black);
}

.gallery-item {
  display: block;
  overflow: hidden;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: grayscale(20%);
}
.gallery-item:hover img {
  transform: scale(1.04);
  filter: grayscale(0%);
}

.gallery-wide  { grid-column: span 1; }
.gallery-tall  { grid-column: 2; grid-row: span 2; }

@media (max-width: 600px) {
  .gallery-section {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 200px);
  }
  .gallery-wide { grid-column: span 2; }
  .gallery-tall { grid-column: span 1; grid-row: span 1; }
}

/* ── VISIT ── */
.visit-section { padding-bottom: 5rem; }

.visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.visit-card {
  background: var(--light);
  border: 1px solid rgba(30,28,26,0.1);
  padding: 2rem;
}

.visit-card h3 {
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(30,28,26,0.1);
}

.hours-table { border-collapse: collapse; width: 100%; margin-bottom: 0.75rem; }
.hours-table td { padding: 0.35rem 0; font-size: 0.95rem; }
.hours-table td:last-child { text-align: right; font-weight: 500; color: var(--ink); }
.hours-note { font-size: 0.78rem; color: var(--mid); font-style: italic; }

address { font-style: normal; margin-bottom: 0.75rem; font-size: 0.98rem; }

.visit-card p { font-size: 0.9rem; margin-bottom: 0.75rem; }
.visit-card a { color: var(--ink); font-weight: 500; }
.visit-card a:hover { color: var(--rust); }

.visit-card .btn-outline {
  color: var(--rust);
  border-color: var(--rust);
  margin-top: 0.5rem;
  font-size: 0.8rem;
  padding: 0.55rem 1.4rem;
}
.visit-card .btn-outline:hover { background: var(--rust); color: var(--white); }

/* ── FOOTER ── */
.site-footer {
  background: var(--charcoal);
  color: rgba(245,243,240,0.4);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.85rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.site-footer p { margin-bottom: 0.25rem; }
.footer-copy { margin-top: 1rem; font-size: 0.75rem; opacity: 0.4; }
.site-footer a { color: rgba(245,243,240,0.5); }
.site-footer a:hover { color: var(--rust); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .about-inner { grid-template-columns: 1fr; gap: 2.5rem; }

  .site-header nav { display: none; }
  .site-header nav.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 56px; left: 0; right: 0;
    background: var(--black);
    padding: 1rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-toggle { display: block; }

  .hero-stamp { display: none; }
}

@media (max-width: 480px) {
  .menu-grid, .visit-grid { grid-template-columns: 1fr; }
}

/* ── MENU TABS ── */
.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--light);
  padding-bottom: 0;
}

.menu-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.menu-tab:hover { color: var(--ink); }
.menu-tab.active { color: var(--rust); border-bottom-color: var(--rust); }

.menu-panel { display: none; }
.menu-panel.active { display: block; }

/* ── MENU SUB-ELEMENTS ── */
.menu-subhead {
  font-size: 0.85rem;
  color: var(--mid);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(30,28,26,0.1);
}

.menu-sizes {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--mid);
  vertical-align: middle;
  margin-left: 0.4rem;
}

.menu-badge {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--ink);
  padding: 0.15rem 0.55rem;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.menu-list-simple li {
  padding: 0.4rem 0;
  border-bottom: 1px dotted rgba(30,28,26,0.12);
  font-size: 0.95rem;
}
.menu-list-simple li em { color: var(--mid); font-size: 0.85rem; }

.menu-tea-note {
  font-size: 0.9rem;
  color: var(--mid);
  margin-bottom: 2rem;
  font-style: italic;
}
.menu-tea-note strong { color: var(--ink); font-style: normal; }

/* ── CUSTOM MUG CURSOR ── */
.has-custom-cursor,
.has-custom-cursor * { cursor: none !important; }

.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  will-change: transform;
}

.cursor-mug {
  display: block;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}
.custom-cursor.hovering .cursor-mug {
  transform: rotate(-22deg) scale(1.2);
}
.custom-cursor.clicking .cursor-mug {
  transform: rotate(-35deg) scale(0.9);
}

/* ── CLICK RIPPLE ── */
.click-ripple {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--rust);
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%) scale(1);
  animation: ripple-out 0.6s ease-out forwards;
}
@keyframes ripple-out {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(5);   opacity: 0; }
}

/* ── HERO STAMP FLOAT ── */
@keyframes stamp-float {
  0%, 100% { transform: translateY(-50%) rotate(12deg); }
  50%       { transform: translateY(calc(-50% - 10px)) rotate(12deg); }
}
.hero-stamp { animation: stamp-float 5s ease-in-out infinite; }

/* ── SCROLL REVEALS ── */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal="up"]    { transform: translateY(32px); }
[data-reveal="left"]  { transform: translateX(-28px); }
[data-reveal="scale"] { transform: scale(0.93); }
[data-reveal].visible { opacity: 1; transform: none; }
