/* Kwaris Coffee Roasters — demo 3 */
:root {
  --terracotta: #C4633F;
  --burnt-clay: #9A4A2E;
  --cream: #FAF1E4;
  --sand: #F0E2CE;
  --espresso: #3B2A20;
  --olive: #6B7A45;
  --radius-card: 16px;
  --motion: 250ms;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--espresso);
  background-color: var(--cream);
  /* subtle grain 2% */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
}
/* grain (inline data URI above can't self-reference feTurbulence result reliably; keep faint solid fallback) */

h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 600; line-height: 1.15; }
.caveat { font-family: 'Caveat', cursive; font-weight: 600; }

/* ---------- shared ---------- */
.section { padding: 72px 20px; }
.section-sand { background: var(--sand); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
h2 { font-size: clamp(30px, 5vw, 42px); }
.eyebrow {
  font-size: 14px; text-transform: uppercase; letter-spacing: .15em;
  color: var(--olive); font-weight: 700; margin-bottom: 12px;
}
.eyebrow-light { color: #D8C9A8; }
.terracotta { color: var(--terracotta); font-style: italic; }
.terracotta-light { color: #E39A76; font-style: italic; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 17px;
  padding: 13px 30px; border-radius: 999px; border: 2px solid var(--terracotta);
  text-decoration: none; cursor: pointer; transition: transform var(--motion), background-color var(--motion), color var(--motion), border-color var(--motion);
}
.btn-solid { background: var(--terracotta); color: var(--cream); }
.btn-outline { background: transparent; color: var(--terracotta); }
.btn:hover { background: var(--burnt-clay); border-color: var(--burnt-clay); color: var(--cream); transform: scale(.97); }
.btn-outline:hover { color: var(--cream); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--olive); outline-offset: 2px;
}
.btn-wide { width: 100%; }

.squiggle { position: relative; color: var(--terracotta); font-style: italic; }
.squiggle-svg { position: absolute; left: 0; bottom: -6px; width: 100%; height: 12px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(250,241,228,.92); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(107,122,69,.25); }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.logo { font-family: 'Fraunces', serif; font-weight: 600; font-size: 28px; color: var(--espresso); text-decoration: none; position: relative; }
.logo-i { color: var(--terracotta); }
.logo-note { position: absolute; left: 0; bottom: -14px; font-family: 'Nunito', sans-serif; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--olive); white-space: nowrap; }
.nav-menu { display: flex; gap: 26px; list-style: none; }
.nav-menu a { text-decoration: none; color: var(--espresso); font-weight: 700; font-size: 16px; }
.nav-menu a:hover { color: var(--terracotta); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--espresso); margin: 5px 0; border-radius: 2px; transition: var(--motion); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { max-width: 1100px; margin: 0 auto; padding: 80px 20px 100px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; position: relative; overflow: visible; }
.hero h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.13; }
.hero-sub { font-size: 19px; max-width: 40ch; margin: 18px 0 28px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hw { display: inline-block; opacity: 0; transform: translateY(24px) rotate(-2deg); }
.hw.shown { animation: heroIn 500ms ease-out forwards; }
@keyframes heroIn { to { opacity: 1; transform: translateY(0) rotate(0); } }
.steam { position: absolute; right: 42%; top: 30px; width: 40px; opacity: .5; }
.steam-path { stroke-dasharray: 140; animation: steamDraw 4s ease-in-out infinite; }
@keyframes steamDraw {
  0% { stroke-dashoffset: 140; transform: translateX(0); }
  45% { stroke-dashoffset: 0; transform: translateX(2px); }
  100% { stroke-dashoffset: -140; transform: translateX(0); }
}

.hero-visual { position: relative; min-height: 420px; }
.blob-bg { position: absolute; inset: 6% -4% 2% 6%; background: var(--terracotta); border-radius: 58% 42% 55% 45% / 55% 48% 52% 45%; opacity: .9; }
.photo-placeholder { display: flex; align-items: center; justify-content: center; color: var(--espresso); font-weight: 700; font-size: 15px; text-align: center; padding: 16px;
  background: repeating-linear-gradient(135deg, #EAD9BF 0 14px, #E3CFAF 14px 28px);
  border: 2px dashed var(--burnt-clay); }
.photo-hero { position: absolute; inset: 10% 0 6% 10%; border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%; }
img.photo-hero { width: 100%; height: 100%; object-fit: cover; border: 6px solid var(--terracotta); }
.blob-mask img.photo-hero { min-height: 380px; border: 0; }
.float { position: absolute; width: 44px; height: 44px; opacity: .16; animation: floaty 7s ease-in-out infinite alternate; }
.float-bean { top: -8px; left: 4%; }
.float-orange { bottom: -6px; right: 0; animation-delay: 2s; }
@keyframes floaty { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-12px) rotate(8deg); } }

/* ---------- story ---------- */
.story-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.blob-mask { border-radius: 55% 45% 52% 48% / 48% 55% 45% 52%; overflow: hidden; }
.blob-mask .photo-placeholder { min-height: 380px; border: 0; }
.story-text p { margin-bottom: 16px; max-width: 55ch; }
.story-text h2 { margin-bottom: 20px; }
.signature { font-family: 'Caveat', cursive; font-size: 26px; color: var(--terracotta); }

/* ---------- menu ---------- */
.tabs { display: inline-flex; position: relative; background: var(--cream); border-radius: 999px; padding: 5px; margin-top: 18px; }
.tab-pill { position: relative; z-index: 1; background: none; border: 0; font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 16px; color: var(--espresso); padding: 10px 30px; border-radius: 999px; cursor: pointer; transition: color var(--motion); }
.tab-pill.active { color: var(--cream); }
.tab-slider { position: absolute; top: 5px; bottom: 5px; left: 5px; background: var(--terracotta); border-radius: 999px; transition: transform 250ms ease, width 250ms ease; }
.vibe-strip { font-family: 'Caveat', cursive; font-size: 20px; color: var(--olive); margin-top: 14px; }
.menu-panel { display: none; max-width: 900px; margin: 0 auto; }
.menu-panel.active { display: block; animation: fadeIn 250ms ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.menu-card { background: var(--cream); border-radius: var(--radius-card); padding: 20px 22px; box-shadow: 0 2px 0 rgba(59,42,32,.06); transition: transform var(--motion); }
.menu-card:hover { transform: translateY(-3px); }
.menu-card h3 { font-size: 20px; font-family: 'Nunito', sans-serif; font-weight: 700; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.annot { font-family: 'Caveat', cursive; font-size: 18px; color: var(--terracotta); white-space: nowrap; }
.dots { display: flex; align-items: center; margin: 2px 0 6px; }
.leader { flex: 1; border-bottom: 2px dotted rgba(59,42,32,.3); margin: 0 8px 4px; }
.price { font-weight: 700; }
.desc { font-size: 15.5px; opacity: .85; }
.size-pills { display: flex; gap: 6px; margin-top: 8px; }
.size-pills span { font-size: 12px; font-weight: 700; color: var(--espresso); background: var(--sand); border-radius: 999px; padding: 2px 10px; }
.pop { opacity: 0; transform: scale(.92); }
.pop.shown { animation: popIn 350ms cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes popIn { to { opacity: 1; transform: scale(1); } }

/* ---------- beans ---------- */
.roast-pour { max-width: 260px; margin: 0 auto 40px; }
.cup-outline, .cup-handle { stroke: var(--espresso); }
#pourFill { transition: none; }
.caveat-svg { font-family: 'Caveat', cursive; font-size: 30px; fill: var(--terracotta); text-anchor: middle; }
.beans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1000px; margin: 0 auto; }
.bean-card { background: var(--sand); border-radius: var(--radius-card); padding: 22px; text-align: center; transition: transform 250ms, box-shadow 250ms; }
.bean-card:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(59,42,32,.12); }
.bag { width: 120px; height: 140px; margin: 0 auto 16px; border-radius: 10px 10px 14px 14px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--cream);
  background: linear-gradient(160deg, #E8B48A 0 55%, #D9955F 55% 100%); border: 2px dashed var(--burnt-clay); transition: transform 250ms; }
.bag-mid { background: linear-gradient(160deg, #D9955F 0 55%, #B96E42 55% 100%); }
.bag-dark { background: linear-gradient(160deg, #6E4A33 0 55%, #4E3425 55% 100%); }
.bean-card:hover .bag { transform: rotate(3deg); }
.roast-label { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: var(--burnt-clay); font-weight: 700; margin-bottom: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 18px; transition: filter 250ms; }
.bean-card:hover .tags { filter: brightness(1.15) saturate(1.2); }
.tag { font-size: 13px; font-weight: 700; background: var(--olive); color: var(--cream); border-radius: 999px; padding: 3px 12px; }

/* ---------- reviews ---------- */
.reviews { background: var(--cream); }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1000px; margin: 0 auto; }
.review-card { background: var(--sand); border-radius: var(--radius-card); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--terracotta); color: var(--cream); display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 24px; }
.stars { color: var(--olive); letter-spacing: 2px; }
.review-card p { font-size: 16px; }
.review-card cite { font-style: normal; font-size: 22px; color: var(--terracotta); }

/* ---------- visit ---------- */
.visit { background: var(--espresso); color: var(--cream); }
.visit-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.visit-list { list-style: none; margin: 18px 0 24px; display: grid; gap: 12px; }
.pup-note { display: flex; align-items: center; gap: 8px; }
.paw { width: 22px; height: 22px; fill: var(--terracotta); flex: none; }
.map-placeholder { min-height: 200px; border-radius: var(--radius-card); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--cream);
  background: repeating-linear-gradient(45deg, #4A382B 0 16px, #45341F 16px 32px); border: 2px dashed #E39A76; }
.cta-card { background: var(--cream); color: var(--espresso); border-radius: 20px; padding: 30px; }
.cta-card h3 { font-size: 26px; margin-bottom: 18px; }
.wa-icon { width: 20px; height: 20px; }
.order-form { margin-top: 18px; display: grid; gap: 12px; }
.order-form label { font-weight: 700; font-size: 14px; display: grid; gap: 4px; }
.order-form input { font-family: 'Nunito', sans-serif; font-size: 16px; padding: 11px 14px; border-radius: 10px; border: 2px solid rgba(59,42,32,.2); background: #fff; color: var(--espresso); }
.order-form input:focus-visible { outline: 3px solid var(--olive); outline-offset: 1px; }
.form-success { font-weight: 700; color: var(--olive); }

/* ---------- footer ---------- */
.footer { background: var(--burnt-clay); color: var(--cream); text-align: center; padding: 40px 20px 30px; }
.footer-logo { font-family: 'Fraunces', serif; font-size: 30px; }
.footer-tag { opacity: .9; }
.footer-credit { font-size: 13px; opacity: .65; margin-top: 16px; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 450ms ease-out, transform 450ms ease-out; }
.reveal.shown { opacity: 1; transform: none; }

/* ---------- mobile ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu { position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); flex-direction: column; gap: 0; border-bottom: 1px solid rgba(107,122,69,.25); max-height: 0; overflow: hidden; transition: max-height 300ms ease; }
  .nav-menu.open { max-height: 320px; }
  .nav-menu li { border-top: 1px solid rgba(107,122,69,.15); }
  .nav-menu a { display: block; padding: 14px 20px; }

  .hero { grid-template-columns: 1fr; padding: 48px 20px 64px; gap: 32px; }
  .hero h1 { font-size: 38px; }
  .hero-visual { min-height: 300px; order: 2; }
  .photo-hero { position: relative; inset: auto; min-height: 280px; border-radius: 32px; }
  .blob-bg { inset: -3% -2% -6% 8%; }
  .float-orange { display: none; }
  .steam { display: none; }

  .story-grid { grid-template-columns: 1fr; gap: 32px; }
  .blob-mask { border-radius: 32px; }

  .tabs { display: flex; width: 100%; overflow-x: auto; }
  .tab-pill { padding: 10px 22px; }
  .menu-grid { grid-template-columns: 1fr; }

  .beans-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }

  .visit-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-card { position: sticky; bottom: 12px; box-shadow: 0 -4px 24px rgba(0,0,0,.25); }
}
@media (max-width: 480px) {
  .float { opacity: .06; }
}