/* =========================================================
   Empire Coffee & Tea Co. — Stylesheet
   Old-school NY general-store aesthetic. Stamped-label motif.
   ========================================================= */

:root {
  /* Palette */
  --espresso: #1C1410;
  --bean-brown: #3A2A1E;
  --empire-gold: #C89B4C;
  --empire-gold-bright: #E0B968;
  --kraft-cream: #F3E9D2;
  --warm-paper: #EFE6D8;
  --brick-red: #8B1E1E;
  --brick-red-bright: #A62A2A;
  --cream-text: #F3E9D2;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max-width: 1180px;

  --shadow-card: 0 6px 24px rgba(28, 20, 16, 0.12);
  --shadow-lift: 0 14px 32px rgba(28, 20, 16, 0.22);

  --radius-sm: 4px;
  --radius-md: 10px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--kraft-cream);
  color: var(--espresso);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  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: -999px;
  top: 0;
  background: var(--espresso);
  color: var(--cream-text);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--espresso);
  line-height: 1.1;
  margin: 0 0 0.6em;
}

h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }

p { margin: 0 0 1.1em; }
address { font-style: normal; }

/* ---------- Stamp / label motif (signature element) ---------- */
.stamp {
  display: inline-block;
  background: var(--espresso);
  color: var(--cream-text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45em 0.9em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--empire-gold);
  box-shadow: inset 0 0 0 1px rgba(200, 155, 76, 0.25);
}

.eyebrow.stamp {
  margin-bottom: 1rem;
}

.stamp-badge {
  margin-bottom: 1.25rem;
  background: rgba(28, 20, 16, 0.82);
  backdrop-filter: blur(2px);
}

.stamp-footer {
  font-size: 0.75rem;
  margin-bottom: 0.9rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--brick-red);
  color: var(--cream-text);
  border-color: var(--brick-red);
}
.btn-primary:hover { background: var(--brick-red-bright); box-shadow: var(--shadow-lift); }

.btn-ghost {
  background: transparent;
  color: var(--cream-text);
  border-color: rgba(243, 233, 210, 0.65);
}
.btn-ghost:hover { background: rgba(243, 233, 210, 0.12); border-color: var(--cream-text); }

.btn-call {
  background: var(--empire-gold);
  color: var(--espresso);
  border-color: var(--empire-gold);
  padding: 0.6em 1.2em;
  font-size: 0.88rem;
}
.btn-call:hover { background: var(--empire-gold-bright); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--espresso);
  border-bottom: 3px solid var(--empire-gold);
}

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

.brand-logo {
  height: 44px;
  width: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 2px solid var(--empire-gold);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 40px;
  cursor: pointer;
  padding: 0 8px;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--cream-text);
  border-radius: 2px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.primary-nav a:not(.btn) {
  color: var(--cream-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35em 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.primary-nav a:not(.btn):hover {
  border-color: var(--empire-gold);
  color: var(--empire-gold-bright);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--espresso);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,20,16,0.55) 0%, rgba(28,20,16,0.55) 30%, rgba(28,20,16,0.88) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 6rem;
  padding-bottom: 6rem;
  max-width: 760px;
}

.hero-title {
  color: var(--cream-text);
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  font-weight: 900;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

.hero-tagline {
  color: var(--kraft-cream);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 42ch;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* =========================================================
   SECTIONS — general
   ========================================================= */
.section {
  padding: 5.5rem 0;
}

.section-lede {
  font-size: 1.1rem;
  max-width: 60ch;
  color: var(--bean-brown);
}

.section-note {
  font-size: 0.95rem;
  color: var(--bean-brown);
  border-left: 3px solid var(--empire-gold);
  padding-left: 1rem;
  margin-top: 2rem;
  max-width: 60ch;
}

.section-story { background: var(--warm-paper); }
.section-coffee { background: var(--kraft-cream); }
.section-tea { background: var(--warm-paper); }
.section-gifts { background: var(--kraft-cream); }
.section-brewing {
  background: var(--espresso);
  color: var(--kraft-cream);
}
.section-brewing h2, .section-brewing h3 { color: var(--cream-text); }
.section-brewing .section-lede { color: rgba(243, 233, 210, 0.82); }
.section-visit { background: var(--warm-paper); }

/* ---------- reveal-on-scroll ----------
   Content is ALWAYS fully visible and readable — this base rule never hides
   anything, in any state (no JS, JS disabled, mid-animation, or a screenshot
   tool capturing an awkward frame). The optional `.is-visible` state (added
   once by JS the first time an element scrolls into view) only layers on a
   quick, subtle rise from 92% opacity — never full transparency — so there
   is no window in which real content reads as missing or broken. */
.reveal {
  opacity: 1;
  transform: none;
}
.reveal:not(.is-visible) {
  animation: reveal-rise 0.01s;
}
.reveal.is-visible {
  animation: reveal-rise 0.5s ease both;
}
@keyframes reveal-rise {
  from { opacity: 0.92; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   STORY
   ========================================================= */
.story-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.story-copy p { color: var(--bean-brown); }
.story-copy strong { color: var(--espresso); }

.story-photo img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}

.story-photo figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--bean-brown);
  margin-top: 0.75rem;
}

/* =========================================================
   TAGS (coffee / tea category chips)
   ========================================================= */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.tag-grid-tight { margin-top: 1.5rem; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--espresso);
  color: var(--cream-text);
  padding: 0.6em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--empire-gold);
}

/* =========================================================
   TEA
   ========================================================= */
.tea-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}

.tea-photo img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}

.tea-copy .section-lede { color: var(--bean-brown); }
.tea-copy .section-note { color: var(--bean-brown); }

/* =========================================================
   GIFT BASKETS
   ========================================================= */
.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.gift-card {
  margin: 0;
  background: var(--warm-paper);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gift-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.gift-lightbox-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

.gift-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.gift-card figcaption {
  padding: 1.25rem 1.4rem 1.5rem;
}

.gift-card figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.gift-card figcaption span {
  font-size: 0.88rem;
  color: var(--bean-brown);
}

/* =========================================================
   BREWING GUIDE
   ========================================================= */
.brewing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.brewing-card {
  background: rgba(243, 233, 210, 0.06);
  border: 1px solid rgba(200, 155, 76, 0.35);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.brewing-card p {
  color: rgba(243, 233, 210, 0.85);
  font-size: 0.95rem;
}

.brewing-card strong { color: var(--empire-gold-bright); }

.grind-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.grind-table td {
  padding: 0.65em 0.4em;
  border-bottom: 1px solid rgba(200, 155, 76, 0.25);
  color: rgba(243, 233, 210, 0.9);
}

.grind-table td:last-child {
  text-align: right;
  color: var(--empire-gold-bright);
  font-weight: 700;
  white-space: nowrap;
}

/* =========================================================
   VISIT
   ========================================================= */
.visit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.visit-card {
  background: var(--kraft-cream);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.visit-card address {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.visit-card p {
  color: var(--bean-brown);
  font-size: 0.95rem;
}

.visit-phone, .visit-email {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--brick-red);
  text-decoration: none;
  font-weight: 700;
  margin-top: 0.4rem;
}
.visit-phone:hover, .visit-email:hover { text-decoration: underline; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--espresso);
  color: var(--kraft-cream);
  padding: 3.5rem 0 2.5rem;
  border-top: 3px solid var(--empire-gold);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.footer-brand p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: rgba(243, 233, 210, 0.8);
}

.footer-brand a {
  color: var(--empire-gold-bright);
  text-decoration: none;
}
.footer-brand a:hover { text-decoration: underline; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a {
  color: rgba(243, 233, 210, 0.85);
  text-decoration: none;
  font-size: 0.88rem;
}
.footer-nav a:hover { color: var(--empire-gold-bright); }

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(243, 233, 210, 0.55);
  margin: 0;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }

.lightbox figure {
  margin: 0;
  max-width: min(900px, 92vw);
}

.lightbox img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox figcaption {
  color: var(--kraft-cream);
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: 2px solid var(--empire-gold);
  color: var(--cream-text);
  font-size: 1.75rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(243, 233, 210, 0.1); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .story-grid, .tea-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .tea-photo { order: -1; max-width: 340px; }
  .visit-grid { grid-template-columns: 1fr; }
  .brewing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  /* Without JS, the toggle button can't do anything — so the nav stays
     open and reachable by default. JS collapses it into the hamburger
     drawer only once it's confirmed it can also open it again. */
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--espresso);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 3px solid var(--empire-gold);
    max-height: 480px;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .js .primary-nav { max-height: 0; }
  .primary-nav.is-open { max-height: 480px; }

  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.5rem 0.5rem;
  }
  .primary-nav ul li { border-bottom: 1px solid rgba(200,155,76,0.2); }
  .primary-nav ul li a { display: block; padding: 0.9em 0; }

  .primary-nav .btn-call {
    margin: 1rem 1.5rem 1.5rem;
    text-align: center;
  }

  .gift-grid { grid-template-columns: 1fr; }

  .hero { min-height: 92vh; }
  .hero-inner { padding-top: 5rem; padding-bottom: 4rem; }

  .section { padding: 3.5rem 0; }
}
