/* ============================================
   CJM Coffee House — static HTML site styles
   Colors: #f8f5f0 #dccdb8 #355e3b #4d6b50
   ============================================ */

:root {
  --cream: #f8f5f0;
  --beige: #dccdb8;
  --forest: #355e3b;
  --olive: #4d6b50;
  --bg: var(--cream);
  --text: #1e2a1f;
  --muted: #4a5a4c;
  --card: #fffcfa;
  --border: rgba(53, 94, 59, 0.15);
  --shadow: 0 10px 40px rgba(20, 32, 24, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --header-h: 72px;
  --font: Calibri, Candara, "Segoe UI", system-ui, sans-serif;
}

html.dark {
  --bg: #121a14;
  --text: #f2efe9;
  --muted: #b8c4b9;
  --card: #1a241c;
  --border: rgba(220, 205, 184, 0.18);
  --shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.35s ease, color 0.35s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

html.dark a {
  color: #9ec4a4;
}

code {
  font-size: 0.85em;
  background: rgba(53, 94, 59, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--forest);
  color: var(--cream);
  z-index: 1000;
  border-radius: 8px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--forest);
  color: var(--cream);
  font-size: 0.85rem;
}

.logo-text {
  font-size: 0.95rem;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.site-nav a:hover {
  background: color-mix(in srgb, var(--beige) 45%, transparent);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 1024px) {
  .site-nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .hide-mobile {
    display: inline-flex !important;
  }
}

.site-header.nav-open .site-nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  padding: 0.75rem 1rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

@media (min-width: 1024px) {
  .site-header.nav-open .site-nav {
    position: static;
    flex-direction: row;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--small {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.btn--primary {
  background: var(--forest);
  color: var(--cream);
  box-shadow: 0 6px 20px rgba(53, 94, 59, 0.25);
}

.btn--primary:hover {
  background: var(--olive);
  box-shadow: 0 10px 28px rgba(53, 94, 59, 0.3);
  transform: translateY(-1px);
}

.btn--cream {
  background: var(--cream);
  color: var(--forest);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.btn--cream:hover {
  background: var(--beige);
  transform: translateY(-1px);
}

.btn--outline-light {
  background: transparent;
  color: var(--cream);
  border-color: color-mix(in srgb, var(--cream) 55%, transparent);
}

.btn--outline-light:hover {
  background: rgba(248, 245, 240, 0.12);
}

.btn--secondary {
  background: var(--olive);
  color: var(--cream);
}

.btn--secondary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--forest);
  border-color: var(--border);
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html.dark .btn-icon {
  color: var(--text);
}

.theme-icon--moon {
  display: none;
}

html.dark .theme-icon--sun {
  display: none;
}

html.dark .theme-icon--moon {
  display: inline;
}

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: var(--cream);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1497935586351-b67a49e012bf?w=1920&q=80");
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--forest) 88%, transparent),
    color-mix(in srgb, var(--forest) 72%, transparent),
    color-mix(in srgb, var(--olive) 82%, transparent)
  );
}

.hero-content {
  position: relative;
  padding: 5rem 0 4rem;
  max-width: 640px;
}

.hero-kicker {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--beige) 92%, white);
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero-lead {
  font-size: 1.1rem;
  color: rgba(248, 245, 240, 0.92);
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: rgba(248, 245, 240, 0.72);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section--alt {
  background: color-mix(in srgb, var(--forest) 5%, var(--bg));
  border-block: 1px solid var(--border);
}

.section--cream {
  background: color-mix(in srgb, var(--cream) 55%, var(--bg));
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--forest);
  margin: 0 0 0.35rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.section-intro,
.section-text {
  color: var(--muted);
  margin: 0;
}

.section-text {
  font-size: 1.05rem;
}

.grid-2 {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 18px rgba(20, 32, 24, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card--lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--forest) 28%, var(--border));
}

.card-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.card-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.card-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--forest) 12%, transparent);
  color: var(--forest);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 520px) {
  .pill-list {
    grid-template-columns: 1fr 1fr;
  }
}

.pill-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--card);
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 520px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select,
.newsletter input {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.newsletter input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--forest) 45%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--forest) 18%, transparent);
}

.field--inline label {
  margin-bottom: 0.25rem;
}

.field-error {
  display: block;
  min-height: 1.1em;
  font-size: 0.78rem;
  color: #b42318;
  margin-top: 0.25rem;
}

html.dark .field-error {
  color: #ffb4a9;
}

.form-status {
  min-height: 1.25em;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.catalog-toolbar,
.blog-toolbar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .catalog-toolbar {
    grid-template-columns: 2fr 1fr 1fr;
    align-items: end;
  }
  .blog-toolbar {
    grid-template-columns: 2fr 1fr;
    align-items: end;
  }
}

/* Bean / product / blog cards */
.grid-cards,
.grid-products,
.grid-blog {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid-cards,
  .grid-products,
  .grid-blog {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-products,
  .grid-blog {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bean-card .thumb,
.product-card .thumb,
.blog-card .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--muted) 12%, var(--card));
}

.product-card .thumb {
  aspect-ratio: 1;
}

.blog-card .thumb {
  aspect-ratio: 16 / 10;
}

.bean-card img,
.product-card img,
.blog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.bean-card:hover img,
.product-card:hover img,
.blog-card:hover img {
  transform: scale(1.05);
}

.bean-card,
.product-card,
.blog-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.bean-inner,
.product-inner,
.blog-inner {
  padding: 1rem 0 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.5rem;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--forest) 10%, transparent);
  color: var(--forest);
  border: 1px solid var(--border);
}

.badge--outline {
  background: transparent;
}

.price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--forest);
  margin: 0.5rem 0 0;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.product-actions .btn {
  flex: 1;
  font-size: 0.88rem;
}

/* Contact */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
  border-bottom: 0;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Timeline */
.timeline-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .timeline-layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.timeline {
  position: relative;
  padding-left: 1.75rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 1px;
  background: var(--border);
}

.tl-item {
  position: relative;
  border: 0;
  width: 100%;
  text-align: left;
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: 0 2px 10px rgba(20, 32, 24, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -1.2rem;
  top: 1.15rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--forest);
}

.tl-item.is-active {
  transform: scale(1.02);
  border-color: color-mix(in srgb, var(--forest) 35%, var(--border));
  box-shadow: var(--shadow);
}

.tl-item.is-active::before {
  background: var(--forest);
}

.tl-year {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
}

.tl-title {
  font-weight: 700;
  margin: 0.25rem 0;
}

.tl-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.timeline-spotlight {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

/* Map & marketplace */
.map-wrap {
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-wrap iframe {
  width: 100%;
  height: 260px;
  border: 0;
}

.grid-mp {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 520px) {
  .grid-mp {
    grid-template-columns: 1fr 1fr;
  }
}

.mp-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mp-card .btn {
  width: 100%;
}

.mp-url {
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  background: color-mix(in srgb, var(--card) 92%, var(--bg));
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.logo--footer .logo-text {
  font-size: 1.05rem;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 36ch;
}

.footer-heading {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  color: var(--text);
}

.newsletter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter input {
  flex: 1 1 200px;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* WhatsApp float */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wa-float:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
}

/* Loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--forest);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.empty-hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

dialog {
  padding: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(15, 22, 18, 0.45);
}
