/* Café Spéire — dark roast specialty coffee */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650;9..144,700&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --espresso: #140c08;
  --roast: #2a170f;
  --bean: #4a2a18;
  --mocha: #6b3d24;
  --crema: #c9a66b;
  --foam: #f3ebe0;
  --milk: #e8d9c4;
  --steam: #a89078;
  --ink: #1c120c;
  --muted: #7a6554;
  --line: rgba(201, 166, 107, 0.28);
  --glass: rgba(20, 12, 8, 0.72);
  --radius: 2px;
  --max: 1120px;
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--foam);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mocha); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--bean); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.15;
  color: var(--roast);
  margin: 0 0 0.6em;
}
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

/* —— Header —— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header.scrolled,
.site-header.solid {
  background: rgba(243, 235, 224, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.scrolled .logo,
.site-header.solid .logo,
.site-header.scrolled .nav-list a,
.site-header.solid .nav-list a {
  color: var(--roast);
}
.site-header.scrolled .nav-toggle span,
.site-header.solid .nav-toggle span { background: var(--roast); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--foam);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 0.15rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--foam);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-list a {
  color: rgba(243, 235, 224, 0.88);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-list a:hover,
.nav-list a.active { color: var(--crema); }
.nav-list a.nav-cta {
  padding: 0.45rem 1rem;
  border: 1px solid currentColor;
  border-radius: var(--radius);
}
.site-header.scrolled .nav-list a.active,
.site-header.solid .nav-list a.active { color: var(--mocha); }
.site-header.scrolled .nav-list a.nav-cta,
.site-header.solid .nav-list a.nav-cta {
  background: var(--roast);
  color: var(--foam);
  border-color: var(--roast);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  color: var(--foam);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroZoom 18s var(--ease) forwards;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(20, 12, 8, 0.45) 0%, rgba(20, 12, 8, 0.15) 35%, rgba(20, 12, 8, 0.78) 100%),
    radial-gradient(ellipse at 30% 70%, rgba(74, 42, 24, 0.35), transparent 55%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 0 5.5rem;
  max-width: 36rem;
  animation: riseIn 1s var(--ease) 0.15s both;
}
.hero-brand {
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 700;
  color: var(--foam);
  margin: 0 0 0.35em;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
}
.hero-lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 300;
  color: rgba(243, 235, 224, 0.9);
  margin: 0 0 1.75rem;
  max-width: 28rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.page-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  color: var(--foam);
  overflow: hidden;
}
.page-hero .hero-media { position: absolute; inset: 0; }
.page-hero .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 12, 8, 0.4), rgba(20, 12, 8, 0.82));
  z-index: 1;
}
.page-hero .hero-content {
  z-index: 2;
  padding: 0 0 3.5rem;
  animation: riseIn 0.8s var(--ease) both;
}
.page-hero .hero-brand {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--crema);
  color: var(--espresso);
  border-color: var(--crema);
}
.btn-primary:hover { background: var(--milk); color: var(--espresso); }
.btn-ghost {
  background: transparent;
  color: var(--foam);
  border-color: rgba(243, 235, 224, 0.45);
}
.btn-ghost:hover { border-color: var(--foam); color: var(--foam); }
.btn-dark {
  background: var(--roast);
  color: var(--foam);
  border-color: var(--roast);
}
.btn-dark:hover { background: var(--bean); color: var(--foam); }
.btn-outline {
  background: transparent;
  color: var(--roast);
  border-color: var(--roast);
}
.btn-outline:hover { background: var(--roast); color: var(--foam); }

/* —— Sections —— */
.section { padding: 5.5rem 0; }
.section-tight { padding: 4rem 0; }
.section-dark {
  background: var(--roast);
  color: var(--milk);
}
.section-dark h2,
.section-dark h3 { color: var(--foam); }
.section-dark .section-text,
.section-dark p { color: rgba(232, 217, 196, 0.85); }
.section-warm {
  background:
    linear-gradient(165deg, #ebe0d0 0%, var(--foam) 45%, #e5d6c2 100%);
}
.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mocha);
  margin: 0 0 0.75rem;
}
.section-dark .section-label { color: var(--crema); }
.section-title {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  margin-bottom: 0.5em;
}
.section-text {
  color: var(--muted);
  max-width: 36rem;
  font-weight: 300;
}
.section-head { margin-bottom: 2.75rem; max-width: 40rem; }

/* —— Split —— */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.split-visual {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
}
.split-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.split:hover .split-visual img { transform: scale(1.04); }
.split-copy .section-title { margin-top: 0; }

/* —— Feature strip (Dolly-style pillars) —— */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pillar {
  padding: 2.25rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--line);
}
.pillar:last-child { border-right: 0; }
.pillar h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4em;
}
.pillar p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  font-weight: 300;
}

/* —— Dual panels —— */
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.dual-panel {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  color: var(--foam);
}
.dual-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.dual-panel:hover img { transform: scale(1.05); }
.dual-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(20, 12, 8, 0.88));
  z-index: 1;
}
.dual-body {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 2.5rem;
}
.dual-body h3 {
  color: var(--foam);
  font-size: 1.75rem;
  margin-bottom: 0.4em;
}
.dual-body p {
  color: rgba(243, 235, 224, 0.85);
  max-width: 28rem;
  font-weight: 300;
  margin-bottom: 1.25rem;
}

/* —— Story / about blocks —— */
.story-stack { display: grid; gap: 4rem; }
.story-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}
.story-block.flip { grid-template-columns: 1.1fr 0.9fr; }
.story-block.flip .story-media { order: 2; }
.story-media {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 5 / 4;
}
.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— Shop / products —— */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.product-img {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1.15rem;
  background: var(--roast);
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.product:hover .product-img img { transform: scale(1.06); }
.product-meta {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mocha);
  margin: 0 0 0.35rem;
}
.product h3 { font-size: 1.25rem; margin-bottom: 0.35em; }
.product p { font-size: 0.95rem; color: var(--muted); font-weight: 300; }
.product-price {
  font-family: var(--font-display);
  color: var(--bean);
  font-size: 1.05rem;
  margin-top: 0.75rem;
}

/* —— Events list —— */
.event-list { display: grid; gap: 0; }
.event-row {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.event-date {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--mocha);
  letter-spacing: 0.04em;
}
.event-row h3 { font-size: 1.2rem; margin: 0 0 0.25em; }
.event-row p { margin: 0; font-size: 0.92rem; color: var(--muted); font-weight: 300; }

/* —— Quote —— */
.quote-band {
  padding: 4.5rem 0;
  background: var(--espresso);
  color: var(--foam);
  text-align: center;
}
.quote-band blockquote {
  margin: 0 auto;
  max-width: 40rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
  line-height: 1.4;
  font-style: italic;
}
.quote-band cite {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crema);
  opacity: 0.9;
}

/* —— Contact —— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
}
.contact-details dt {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mocha);
  margin: 1.25rem 0 0.35rem;
}
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin: 0; }
.contact-details a { color: var(--roast); text-decoration: none; }
.contact-details a:hover { color: var(--mocha); }

.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(74, 42, 24, 0.22);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--mocha);
}
.form-group textarea { min-height: 140px; resize: vertical; }
#form-status {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(107, 61, 36, 0.1);
  color: var(--bean);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
#form-status.show { display: block; }

/* —— Legal —— */
.legal-page { padding: calc(var(--header-h) + 3rem) 0 5rem; }
.legal-page h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.35em;
}
.legal-page .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}
.legal-page h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
}
.legal-page p,
.legal-page li {
  color: var(--muted);
  font-weight: 300;
  max-width: 42rem;
}
.legal-page ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1em;
}
.legal-page li { margin-bottom: 0.4em; }

/* —— Footer —— */
.site-footer {
  background: var(--espresso);
  color: rgba(232, 217, 196, 0.75);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--foam);
  margin-bottom: 0.75rem;
}
.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--crema);
  margin-bottom: 1rem;
}
.footer-grid a {
  color: rgba(232, 217, 196, 0.75);
  text-decoration: none;
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}
.footer-grid a:hover { color: var(--foam); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(201, 166, 107, 0.2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--crema); text-decoration: none; margin-left: 1rem; }
.footer-bottom a:first-child { margin-left: 0; }

/* —— Cookie banner —— */
.cookie-banner {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 200;
  max-width: 420px;
  background: var(--espresso);
  color: var(--foam);
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--ease), opacity 0.45s;
}
.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-banner p {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(243, 235, 224, 0.85);
  margin: 0 0 1rem;
}
.cookie-banner a { color: var(--crema); }
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cookie-actions .btn {
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
}
.cookie-settings {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 166, 107, 0.25);
}
.cookie-settings.open { display: block; }
.cookie-settings label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
}
.cookie-settings input:disabled { opacity: 0.6; }

/* —— Motion —— */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .split,
  .split.reverse,
  .story-block,
  .story-block.flip,
  .contact-grid {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .story-block.flip .story-media { order: 0; }
  .split-visual,
  .story-media { aspect-ratio: 16 / 10; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar:nth-child(2) { border-right: 0; }
  .pillar:nth-child(1),
  .pillar:nth-child(2) { border-bottom: 1px solid var(--line); }
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dual-grid { grid-template-columns: 1fr; }
  .event-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--espresso);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
  }
  .main-nav.open {
    opacity: 1;
    visibility: visible;
  }
  .nav-list {
    flex-direction: column;
    gap: 1.75rem;
    text-align: center;
  }
  .nav-list a {
    color: var(--foam);
    font-size: 1.35rem;
    font-family: var(--font-display);
  }
  .site-header.scrolled .nav-list a,
  .site-header.solid .nav-list a { color: var(--foam); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .shop-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .pillar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .pillar:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-content { padding-bottom: 4rem; }
}
