/* ==========================================================================
   COFFEE TABLE PAGE
   Builds on the design tokens defined in style.css (:root variables,
   fonts, card/shadow language). Do not redefine --bg-cream etc. here —
   only add what's new for this page (wood tones + illustration fills).
   ========================================================================== */

:root {
  --wood-highlight: #C99A72;
  --wood-base: #A9784F;
  --wood-dark: #7C5636;
  --wood-shadow: #5E3F27;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------
   1. HERO / INTRO
   -------------------------------------------------------------------- */
.coffee-hero {
  width: 100%;
  max-width: 1140px;
  margin: 1rem auto 2.5rem auto;
  padding: 0 1rem;
}

.coffee-hero-inner {
  text-align: center;
  padding: clamp(2rem, 4vw, 3rem) 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background-color: var(--bg-grid);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 2px solid var(--text-charcoal);
  border-radius: 20px;
  box-shadow: 6px 6px 0px var(--soft-blue);
}

.coffee-hero-inner .hero-title {
  max-width: 640px;
}

.coffee-hero-inner .hero-subtitle {
  max-width: 560px;
}

/* --------------------------------------------------------------------
   2. TABLE FRAME
   -------------------------------------------------------------------- */
.table-frame {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto 4rem auto;
  padding: 0 1rem;
}

.table-wrap {
  position: relative;
  margin: 0 auto 5.5rem auto;
  max-width: 980px;
}

.table-surface {
  position: relative;
  width: 100%;
  aspect-ratio: 2.3 / 1;
  min-height: 220px;
  background-image:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 90px),
    linear-gradient(180deg, var(--wood-highlight) 0%, var(--wood-base) 45%, var(--wood-dark) 100%);
  border: 3px solid var(--text-charcoal);
  border-radius: 18px;
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.18),
    8px 8px 0px var(--dusty-pink);
  overflow: visible;
}

.table-leg {
  position: absolute;
  bottom: -54px;
  width: 20px;
  height: 66px;
  background: linear-gradient(180deg, var(--wood-dark), var(--wood-shadow));
  border: 2px solid var(--text-charcoal);
  border-radius: 3px;
  z-index: -1;
}

.table-leg--left {
  left: 9%;
  transform: rotate(-5deg);
}

.table-leg--right {
  right: 9%;
  transform: rotate(5deg);
}

.table-shadow {
  position: absolute;
  bottom: -66px;
  left: 50%;
  width: 68%;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.22), transparent 72%);
  filter: blur(2px);
  z-index: -2;
}

@media (max-width: 640px) {
  .table-wrap {
    margin-bottom: 4.5rem;
  }

  .table-leg {
    height: 44px;
    bottom: -38px;
  }

  .table-shadow {
    bottom: -46px;
  }
}

/* --------------------------------------------------------------------
   3. HOTSPOTS
   Each object is positioned by its horizontal center (--left) and how
   far its base sits from the front edge of the table (--bottom), then
   sized by --w (percentage of the table's width). The button itself
   only handles position + hover lift; the inner .hotspot-float span
   handles the idle rotate/bob animation, so the two never fight over
   the `transform` property.
   -------------------------------------------------------------------- */
.hotspot {
  position: absolute;
  left: calc(var(--left) - (var(--w) / 2));
  bottom: var(--bottom);
  width: var(--w);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 1;
}

.hotspot:hover,
.hotspot:focus-visible {
  transform: translateY(-8px) scale(1.06);
  z-index: 6;
}

.hotspot.is-active {
  z-index: 4;
}

.hotspot-float {
  display: block;
  transform-origin: bottom center;
  animation: objectFloat 3.6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  filter: drop-shadow(2px 5px 4px rgba(0, 0, 0, 0.28));
  transition: filter 0.2s ease;
}

.hotspot-float svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.hotspot:hover .hotspot-float,
.hotspot:focus-visible .hotspot-float {
  filter: drop-shadow(3px 9px 7px rgba(0, 0, 0, 0.35));
}

.hotspot.is-active .hotspot-float {
  filter: drop-shadow(0 0 9px var(--muted-red)) drop-shadow(2px 5px 4px rgba(0, 0, 0, 0.28));
}

@keyframes objectFloat {
  0%, 100% {
    transform: rotate(var(--rot, 0deg)) translateY(0);
  }
  50% {
    transform: rotate(var(--rot, 0deg)) translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hotspot-float {
    animation: none;
    transform: rotate(var(--rot, 0deg));
  }
}

.hotspot-label {
  position: absolute;
  top: -1.7rem;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text-charcoal);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 7;
}

.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------
   4. ILLUSTRATION FILL / STROKE UTILITIES
   Shared by every hotspot SVG and the default detail-panel icon, so
   every illustration automatically follows the site's mood-board
   palette (style.css :root) plus the wood tones defined above.
   -------------------------------------------------------------------- */
.icon-outline {
  fill: none;
  stroke: var(--text-charcoal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-outline-thin {
  fill: none;
  stroke: var(--text-charcoal);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.45;
}

.icon-line-outline {
  fill: none;
  stroke: var(--text-charcoal);
  stroke-width: 9;
  stroke-linecap: round;
}

.icon-line-blue {
  fill: none;
  stroke: var(--soft-blue);
  stroke-width: 6;
  stroke-linecap: round;
}

.icon-white {
  fill: #ffffff;
  stroke: var(--text-charcoal);
  stroke-width: 3;
}

.icon-cream {
  fill: var(--bg-cream);
  stroke: var(--text-charcoal);
  stroke-width: 3;
}

.icon-wood {
  fill: var(--wood-base);
  stroke: var(--text-charcoal);
  stroke-width: 3;
}

.icon-wood-hole {
  fill: var(--wood-base);
  stroke: var(--text-charcoal);
  stroke-width: 2;
}

.icon-pink {
  fill: var(--dusty-pink);
  stroke: var(--text-charcoal);
  stroke-width: 2.5;
}

.icon-sage {
  fill: var(--sage-green);
  stroke: var(--text-charcoal);
  stroke-width: 2.5;
}

.icon-blue {
  fill: var(--soft-blue);
  stroke: var(--text-charcoal);
  stroke-width: 2.5;
}

.icon-yellow {
  fill: var(--sunshine-yellow);
  stroke: var(--text-charcoal);
  stroke-width: 2.5;
}

.icon-red {
  fill: var(--muted-red);
  stroke: none;
}

.icon-dot {
  fill: var(--text-charcoal);
  stroke: none;
}

/* --------------------------------------------------------------------
   5. HOBBY CHIPS (accessible / mobile-friendly fallback list)
   -------------------------------------------------------------------- */
.hobby-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.hobby-chip {
  --dot: var(--dusty-pink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  background: #fff;
  color: var(--text-charcoal);
  border: 1.5px solid var(--text-charcoal);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.hobby-chip::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot);
  border: 1.3px solid var(--text-charcoal);
  flex-shrink: 0;
}

.hobby-chip:hover,
.hobby-chip:focus-visible {
  background: var(--bg-cream);
  transform: translateY(-2px);
}

.hobby-chip.is-active {
  background: var(--muted-red);
  border-color: var(--text-charcoal);
  color: #fff;
}

/* --------------------------------------------------------------------
   6. DETAIL PANEL
   -------------------------------------------------------------------- */
.detail-panel {
  max-width: 720px;
  margin: 2.5rem auto 0 auto;
}

.detail-card {
  --accent: var(--dusty-pink);
  position: relative;
  background: #ffffff;
  border: 2px solid var(--text-charcoal);
  border-radius: 0 16px 16px 16px;
  box-shadow: 6px 6px 0px var(--accent);
  padding: 1.75rem;
  transition: box-shadow 0.25s ease;
}

.detail-tab {
  position: absolute;
  top: -30px;
  left: -2px;
  background: var(--accent);
  border: 2px solid var(--text-charcoal);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 0.25rem 1rem;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: lowercase;
  transition: background 0.25s ease;
}

.detail-body-wrap {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: opacity 0.18s ease;
}

.detail-card.is-updating .detail-body-wrap {
  opacity: 0;
}

.detail-icon {
  display: block;
  width: clamp(48px, 9vw, 64px);
  flex-shrink: 0;
}

.detail-icon svg {
  width: 100%;
  height: auto;
  display: block;
}

.detail-title {
  font-family: 'Newsreader', serif;
  font-weight: 800;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  color: var(--text-charcoal);
  text-transform: lowercase;
}

.detail-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  margin-top: 0.5rem;
}

.detail-fact {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  color: var(--muted-red);
  margin-top: 0.85rem;
  line-height: 1.3;
}