/* ==========================================================================
   Basalt Coffee Roasters — design tokens
   Bold poster / neo-café direction: oversized rounded type, warm paper +
   gold, pill navigation, marquee ticker, rotating stamp badge.
   ========================================================================== */

:root {
  --paper:      #F7EFDF;  /* primary background */
  --tan:        #EFE3C8;  /* raised surface / cards */
  --ink:        #1C1108;  /* primary text, dark sections */
  --muted:      #6B5E4A;  /* secondary text */
  --gold-deep:  #8A5E12;  /* accent text/links */
  --gold:       #E8A93A;  /* bold decorative fill — not for small text */
  --line:       rgba(28, 17, 8, 0.14);
  --line-strong:rgba(28, 17, 8, 0.28);

  --font-display: "Fredoka", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  --fs-hero: clamp(3rem, 8vw + 1rem, 7.5rem);
  --fs-h2: clamp(2rem, 3vw + 1rem, 3.2rem);
  --fs-h3: 1.3rem;
  --fs-body: 1.0625rem;
  --fs-mono: 0.85rem;

  --wrap: 1240px;
  --gutter: 1.25rem;
  --radius: 20px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) { :root { --gutter: 2rem; } }

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  position: relative;
  margin: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(28, 17, 8, 0.055) 1px, transparent 0) 0 0 / 22px 22px,
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Slow-drifting warm glow — a living background, not a static wash */
body::before {
  content: "";
  position: fixed;
  top: -18vw;
  left: -12vw;
  width: 62vw;
  height: 62vw;
  min-width: 480px;
  min-height: 480px;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(232, 169, 58, 0.24), transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: glow-drift 24s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(7vw, 9vh) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

.site-header, main, .marquee, .site-footer, .scroll-progress { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, dl, p, figure { margin: 0; }

.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;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 100; border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
  font-family: var(--font-mono); font-size: 0.85rem;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.75rem;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }

/* ==========================================================================
   Buttons — rounded, playful hover
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  min-height: 44px;
}
.btn:hover { transform: rotate(-1.5deg) scale(1.03); }
.btn:active { transform: rotate(0) scale(0.98); }
.btn-small { padding: 0.6rem 1.2rem; min-height: 38px; font-size: 0.85rem; }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--gold-deep); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ==========================================================================
   Header — pill navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.site-header.is-scrolled { background: rgba(247, 239, 223, 0.92); border-bottom: 1px solid var(--line); }

.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 1rem; gap: 1rem; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: var(--ink);
}
.wordmark span {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 0.3rem;
}

.primary-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.35rem;
}
.primary-nav a {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-display);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.primary-nav a:hover { background: var(--tan); }
.primary-nav a.is-active { background: var(--ink); color: var(--paper); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px;
  background: transparent; border: 1.5px solid var(--line-strong); border-radius: 999px;
  cursor: pointer; padding: 0;
}
.nav-toggle span {
  display: block; height: 2px; margin-inline: 12px; background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1024px) {
  .primary-nav { display: flex; }
  .nav-toggle { display: none; }
}

@media (max-width: 1023px) {
  .primary-nav {
    display: flex;
    position: fixed; inset: 0; top: 74px;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    border-radius: 0;
    border: none;
    padding: 1.5rem var(--gutter);
    font-size: 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  .primary-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0s;
  }
  .primary-nav a { border-bottom: 1px solid var(--line); padding-block: 1rem; border-radius: 0; }
  .primary-nav a.is-active { background: none; color: var(--gold-deep); }
}

/* ==========================================================================
   Marquee ticker — signature device
   ========================================================================== */

.marquee {
  background: var(--gold);
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  padding-block: 0.6rem;
  border-block: 2px solid var(--ink);
}
.marquee__track {
  display: inline-flex;
  animation: marquee 22s linear infinite;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-inline: 1.5rem;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { position: relative; padding-block: 2.5rem 3rem; overflow: hidden; }

.hero-watermark {
  position: absolute;
  top: -0.06em;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 13vw, 10rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(28, 17, 8, 0.08);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
@media (max-width: 1023px) {
  /* Below this width hero-copy and the watermark are too close vertically
     (single-column layout, or a cramped two-column transition) — the real
     headline wins over the decorative watermark. */
  .hero-watermark { display: none; }
}

.hero-split { position: relative; z-index: 1; display: grid; gap: 2.25rem; align-items: center; }
@media (min-width: 900px) { .hero-split { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; } }

.hero-copy { text-align: center; }
@media (min-width: 900px) { .hero-copy { text-align: left; } }

.hero-title {
  font-size: clamp(2.75rem, 5.4vw + 1rem, 5.6rem);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.hero-title span { display: block; }
.hero-title span:nth-child(2) { color: var(--gold-deep); }

.hero-photo-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--ink);
  aspect-ratio: 4 / 5;
}
@media (min-width: 900px) { .hero-photo-wrap { aspect-ratio: 3 / 4; } }
.hero-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }

.hero-sub { color: var(--muted); max-width: 40ch; margin: 1.25rem auto 0; }
@media (min-width: 900px) { .hero-sub { margin-inline: 0; } }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.75rem; }
@media (min-width: 900px) { .hero-actions { justify-content: flex-start; } }

/* ==========================================================================
   Page hero — smaller header band used on interior pages
   ========================================================================== */

.page-hero { padding-block: 3.25rem 2.5rem; border-bottom: 2px dashed var(--line-strong); }
.page-hero .eyebrow { margin-bottom: 0.75rem; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  max-width: 22ch;
}
.page-hero p { color: var(--muted); max-width: 54ch; margin-top: 1rem; font-size: 1.05rem; }

/* ==========================================================================
   Now roasting — pulsing status strip, home page only
   ========================================================================== */

.now-roasting { background: var(--ink); color: var(--paper); padding-block: 1rem; }
.now-roasting__inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.now-roasting__dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold);
  animation: roast-pulse 2.2s ease-out infinite;
}
@keyframes roast-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 169, 58, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(232, 169, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 169, 58, 0); }
}
.now-roasting p { font-size: 0.92rem; margin: 0; flex: 1; min-width: 220px; }
.now-roasting__link {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold);
  border-bottom: 1px solid var(--gold); flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) { .now-roasting__dot { animation: none; } }

/* ==========================================================================
   Photo frames — real photography
   ========================================================================== */

.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 2px solid var(--ink);
  background: var(--tan);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.photo-frame:hover img { transform: scale(1.05); }

/* ==========================================================================
   Sections (generic)
   ========================================================================== */

.section { padding-block: 4.5rem; background: var(--paper); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink .eyebrow { color: var(--gold); }
.section--ink .section-sub { color: rgba(247, 239, 223, 0.65); }
.section--tan { background: var(--tan); }

.section-head { max-width: 50ch; margin-bottom: 2.75rem; }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: 0.75rem; }
.section-sub { color: var(--muted); }

/* ==========================================================================
   Teaser grid — home page links out to interior pages
   ========================================================================== */

.teaser-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .teaser-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .teaser-grid { grid-template-columns: repeat(4, 1fr); } }

.teaser-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.teaser-card:hover { transform: translateY(-4px) rotate(-0.5deg); }
.teaser-card__photo { aspect-ratio: 4 / 3; border-bottom: 2px solid var(--ink); overflow: hidden; }
.teaser-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.teaser-card:hover .teaser-card__photo img { transform: scale(1.06); }
.teaser-card__body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.teaser-card__body h3 { font-size: 1.15rem; }
.teaser-card__body p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.teaser-card__link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.teaser-card__link svg { width: 12px; height: 12px; transition: transform 0.25s var(--ease); }
.teaser-card:hover .teaser-card__link svg { transform: translateX(3px); }

/* ==========================================================================
   Menu — bento-style bold cards
   ========================================================================== */

.menu-groups { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .menu-groups { grid-template-columns: 1.3fr 1fr; gap: 2rem; } }

.menu-group__title {
  font-size: var(--fs-h3);
  margin-bottom: 1.25rem;
}

.menu-group__photo { aspect-ratio: 16 / 9; margin-bottom: 1.5rem; }

.bean-list { display: grid; gap: 1rem; }
.bean-row {
  background: var(--tan);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  transition: transform 0.25s var(--ease);
}
.bean-row:hover { transform: translateY(-3px) rotate(-0.4deg); }
.bean-row__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.bean-name { font-family: var(--font-display); font-weight: 600; }
.bean-name small { color: var(--muted); font-weight: 400; font-family: var(--font-body); }
.bean-price {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  background: var(--gold);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  flex-shrink: 0;
}
.bean-meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--gold-deep); margin-top: 0.5rem; text-transform: uppercase; letter-spacing: 0.04em; }
.bean-notes { font-size: 0.92rem; margin-top: 0.3rem; color: var(--muted); }

.drink-list { display: grid; gap: 0; }
.drink-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 2px dashed var(--line-strong);
}
.drink-name { font-family: var(--font-display); font-weight: 500; }
.drink-name small { color: var(--muted); font-weight: 400; font-family: var(--font-body); }
.drink-price { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--gold-deep); flex-shrink: 0; }

.menu-note {
  margin-top: 1.75rem;
  padding: 1.25rem;
  background: var(--tan);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--muted);
}
.menu-note a { color: var(--gold-deep); border-bottom: 1px solid var(--gold-deep); }

/* ==========================================================================
   Gallery — bento asymmetric grid
   ========================================================================== */

.bento-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .bento-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 220px); gap: 1.5rem; }
  .bento-grid .photo-frame:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .bento-grid .photo-frame:nth-child(2) { grid-column: span 1; grid-row: span 1; }
  .bento-grid .photo-frame:nth-child(3) { grid-column: span 1; grid-row: span 1; }
}
.bento-grid .photo-frame { aspect-ratio: 4 / 3; }
@media (min-width: 768px) { .bento-grid .photo-frame { aspect-ratio: auto; } }

/* ==========================================================================
   Story — rotating stamp badge
   ========================================================================== */

.story-grid { display: grid; gap: 2.5rem; align-items: center; position: relative; }
@media (min-width: 768px) { .story-grid { grid-template-columns: 420px 1fr; gap: 3.5rem; } }
.photo-frame--story { aspect-ratio: 4 / 3; }

.story-copy p { color: rgba(247, 239, 223, 0.75); max-width: 52ch; margin-bottom: 1rem; }
.story-copy p:last-child { margin-bottom: 0; }

.stamp {
  position: absolute;
  top: -1.5rem;
  right: 1rem;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px dashed var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 18s linear infinite;
  will-change: transform;
}
.stamp svg { width: 100%; height: 100%; }
.stamp text {
  font-family: var(--font-mono);
  font-size: 6.3px;
  letter-spacing: 0.15em;
  fill: var(--gold);
  text-transform: uppercase;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }

/* ==========================================================================
   Visit
   ========================================================================== */

.visit-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .visit-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; } }

.visit-details { display: grid; gap: 1.5rem; }
.visit-details dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.visit-details dd { margin: 0; font-family: var(--font-display); font-weight: 500; }
.visit-details a { border-bottom: 1px solid var(--gold-deep); color: var(--gold-deep); }

.hours-table {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.visit-card {
  background: var(--tan);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.visit-card__pin {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  margin-inline: auto; margin-bottom: 1rem;
}
.visit-card p { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--ink); color: rgba(247, 239, 223, 0.65); padding-top: 3.5rem; }
.footer-inner { display: grid; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(247, 239, 223, 0.14); }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1.2fr 1fr 1fr; } }

.wordmark--footer { color: var(--paper); }
.wordmark--footer span { color: var(--gold); }
.footer-brand p { margin-top: 0.75rem; font-size: 0.9rem; }

.footer-nav { display: flex; flex-direction: column; gap: 0.75rem; font-family: var(--font-display); font-weight: 500; }
.footer-nav a:hover { color: var(--gold); }

.footer-contact { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.85rem; }
.footer-contact a:hover { color: var(--gold); }

.footer-bottom { padding-block: 1.5rem; font-size: 0.78rem; font-family: var(--font-mono); }

/* ==========================================================================
   Scroll reveal + progress
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition-delay: 0s; }
}

.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--gold-deep);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 60;
}
@media (prefers-reduced-motion: reduce) { .scroll-progress { display: none; } }
