/* Copper Fern Coffee — demo Tier 1 static site (Wall & Web) */

:root {
  --cream: #f6efe3;
  --paper: #fffbf2;
  --espresso: #241a12;
  --roast: #5c4630;
  --copper: #b05e1e;
  --copper-dark: #8f4b16;
  --fern: #46573c;
  --line: #e4d8c2;
  --display: "Fraunces", Georgia, serif;
  --body: "Karla", -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--espresso);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--copper);
}

a:hover {
  color: var(--copper-dark);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  letter-spacing: -0.01em;
}

h1 em {
  font-style: italic;
  color: var(--copper);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section-alt {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.75rem;
}

.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;
  top: -3rem;
  left: 1rem;
  background: var(--espresso);
  color: var(--cream);
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--cream);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid var(--espresso);
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-solid {
  background: var(--espresso);
  color: var(--cream);
}

.btn-solid:hover {
  background: var(--copper);
  border-color: var(--copper);
  color: var(--cream);
}

.btn-ghost {
  color: var(--espresso);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--espresso);
  color: var(--cream);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

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

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--espresso);
  text-decoration: none;
}

.wordmark-icon {
  width: 2rem;
  height: 2rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a:not(.btn) {
  color: var(--espresso);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-menu a:not(.btn):hover {
  color: var(--copper);
}

.nav-cta {
  padding: 0.5rem 1.15rem;
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.6rem;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--espresso);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bar {
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -7px;
}

.nav-toggle-bar::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: rotate(-90deg) translateX(-7px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  opacity: 0;
}

/* ---------- Hero ---------- */

.hero {
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 2rem;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.lede {
  font-size: 1.15rem;
  color: var(--roast);
  max-width: 34rem;
  margin-top: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-hours {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fern);
}

.hero-hours .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fern);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.cup-art {
  display: block;
  width: min(360px, 80vw);
  margin-inline: auto;
}

.steam path {
  animation: steam 3.6s ease-in-out infinite;
}

.steam-2 {
  animation-delay: 0.6s;
}

.steam-3 {
  animation-delay: 1.2s;
}

@keyframes steam {
  0%, 100% { opacity: 0.15; transform: translateY(4px); }
  50% { opacity: 0.55; transform: translateY(-4px); }
}

/* ---------- Ticker ---------- */

.ticker {
  background: var(--espresso);
  color: var(--cream);
  overflow: hidden;
  padding-block: 0.65rem;
}

.ticker-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: ticker 28s linear infinite;
}

.tick-dot {
  color: var(--copper);
  font-size: 0.6rem;
  align-self: center;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- About ---------- */

.about-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.fern-art {
  display: block;
  width: min(300px, 70vw);
  margin-inline: auto;
}

.about-copy p {
  color: var(--roast);
  max-width: 38rem;
}

.about-copy h2 {
  margin-bottom: 1rem;
}

.stats {
  display: flex;
  gap: 2.5rem;
  margin: 1.75rem 0 0;
}

.stats dt {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--copper);
}

.stats dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--roast);
}

/* ---------- Menu ---------- */

.tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tab {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--espresso);
  background: transparent;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tab:hover {
  border-color: var(--copper);
}

.tab[aria-selected="true"] {
  background: var(--espresso);
  border-color: var(--espresso);
  color: var(--cream);
}

.menu-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 620px;
}

.menu-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px dashed var(--line);
}

.menu-list .item {
  font-weight: 700;
}

.menu-list .item small {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--roast);
}

.menu-list .price {
  font-family: var(--display);
  font-weight: 600;
  color: var(--copper);
  white-space: nowrap;
}

.menu-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--roast);
  margin-top: 2rem;
}

/* ---------- Quote ---------- */

.quote blockquote {
  margin: 0 auto;
  max-width: 44rem;
  text-align: center;
}

.quote blockquote p {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-style: italic;
  line-height: 1.4;
}

.quote cite {
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--roast);
}

/* ---------- Visit ---------- */

.visit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.visit-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem;
}

.visit-card h3 {
  margin-bottom: 1rem;
}

.hours {
  margin: 0;
}

.hours div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.3rem;
}

.hours dt {
  font-weight: 700;
}

.hours dd {
  margin: 0;
  color: var(--roast);
}

address {
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.tel {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
}

.fine {
  font-size: 0.85rem;
  color: var(--roast);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--espresso);
  color: var(--cream);
  padding-block: 2.5rem;
}

.site-footer a {
  color: var(--cream);
  text-decoration-color: var(--copper);
}

.site-footer a:hover {
  color: var(--copper);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
}

.footer-wordmark {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.site-footer .fine {
  color: color-mix(in srgb, var(--cream) 70%, transparent);
  margin: 0;
}

.footer-credit {
  max-width: 26rem;
  text-align: right;
}

/* ---------- Reveal on scroll ---------- */

/* Fail-visible: elements are visible by default; JS adds .reveal-hidden to
   below-fold elements only once the IntersectionObserver is confirmed live. */
.reveal {
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-hidden {
  opacity: 0;
  transform: translateY(18px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .steam path,
  .ticker-track,
  .hero-hours .dot {
    animation: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .lede {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-hours {
    justify-content: center;
  }

  .hero-art {
    order: -1;
  }

  .cup-art {
    width: min(240px, 60vw);
  }

  .about-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-copy p {
    margin-inline: auto;
  }

  .stats {
    justify-content: center;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-credit {
    text-align: left;
  }
}

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

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu li {
    padding-block: 0.5rem;
  }

  .nav-cta {
    text-align: center;
    margin-top: 0.5rem;
  }
}
