/* ==========================================================================
   BUKAL BREW COFFEE — public stylesheet
   --------------------------------------------------------------------------
   Palette taken straight off the seal: roasted bean, bark, crema, honey ring,
   coffee leaf, cherry. Display face is Fraunces (soft, slightly wonky serif)
   against Karla for reading. One piece of motion on the whole site: the bloom
   ring behind the seal in the hero, which is what freshly ground coffee does
   when hot water first hits it.
   ========================================================================== */

:root {
  --bean:    #241610;
  --bean-2:  #34211705;
  --bark:    #4E2D1C;
  --bark-2:  #6B4227;
  --crema:   #F3E7D3;
  --paper:   #FBF6EC;
  --paper-2: #F2E6D2;
  --honey:   #C8912F;
  --honey-2: #E0B45C;
  --leaf:    #3F6B45;
  --cherry:  #B2382C;
  --ink:     #2B1A12;
  --muted:   #7C6753;
  --line:    #E3D4BB;

  --shell:   min(1180px, 92vw);
  --radius:  14px;
  --shadow:  0 18px 40px -28px rgba(36, 22, 16, .55);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: var(--bark); text-decoration-color: rgba(200, 145, 47, .55); text-underline-offset: 3px; }
a:hover { color: var(--cherry); }

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.24rem; }

p { margin: 0 0 1.1em; max-width: 68ch; }

:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell { width: var(--shell); margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.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;
}

/* Several components here set display explicitly, which would otherwise beat
   the browser's own rule for the hidden attribute and leave a "hidden"
   element on screen. This puts hidden back in charge. */
[hidden] { display: none !important; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 700; letter-spacing: .01em;
  padding: .72rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--bark); color: var(--crema); }
.btn-primary:hover { background: var(--bean); color: var(--crema); }

.btn-honey { background: var(--honey); color: var(--bean); }
.btn-honey:hover { background: var(--honey-2); color: var(--bean); }

.btn-ghost { background: transparent; color: var(--bark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--bark); color: var(--bark); background: var(--paper-2); }

.btn-onDark { background: var(--crema); color: var(--bean); }
.btn-onDark:hover { background: var(--honey); }

.btn-quiet {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font: inherit; padding: .2rem .4rem; text-decoration: underline;
  text-decoration-color: rgba(124,103,83,.4);
}
.btn-quiet:hover { color: var(--cherry); }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-sm { padding: .45rem .9rem; font-size: .9rem; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.topbar {
  background: var(--bean);
  color: var(--crema);
  font-size: .84rem;
  letter-spacing: .01em;
}
.topbar .shell {
  display: flex; flex-wrap: wrap; gap: .4rem 1.6rem;
  align-items: center; justify-content: center;
  padding: .5rem 0;
}
.topbar span { color: rgba(243,231,211,.78); }
.topbar b { color: var(--honey-2); font-weight: 600; }

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 246, 236, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead .shell {
  display: flex; align-items: center; gap: 1.2rem;
  padding: .6rem 0;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand img { width: 54px; height: 54px; border-radius: 50%; }
.brand-name {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.16rem;
  line-height: 1.05; color: var(--bean);
}
.brand-sub { font-size: .74rem; color: var(--muted); font-style: italic; }

.nav { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.nav a {
  padding: .5rem .85rem; border-radius: 999px;
  text-decoration: none; color: var(--bark); font-weight: 600; font-size: .97rem;
}
.nav a:hover { background: var(--paper-2); }
.nav a[aria-current="page"] { background: var(--bean); color: var(--crema); }

/* A button inside the nav keeps its own colours: without this, the .nav a rule
   above repaints the label in the same brown as the button's background and
   the text disappears. */
.nav a.btn-primary { color: var(--crema); }
.nav a.btn-primary:hover { color: var(--crema); }
.nav a.btn-honey { color: var(--bean); }

.basket-link { position: relative; }
.basket-count {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--cherry); color: #fff;
  border-radius: 999px; font-size: .72rem; font-weight: 700;
}

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1.5px solid var(--line); border-radius: 10px;
  padding: .45rem .7rem; cursor: pointer; color: var(--bark); font-size: 1.1rem;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem 4vw 1rem; margin: 0;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .6rem; border-radius: 10px; }
}

/* staff-only strip shown on a page that is switched off for customers */
.hidden-strip {
  background: var(--cherry); color: #fff;
  text-align: center; padding: .6rem 1rem; font-size: .9rem; font-weight: 600;
}
.hidden-strip a { color: #fff; }

/* ==========================================================================
   HERO — the one animated moment
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, #3B2417 0%, var(--bean) 55%, #190F0A 100%);
  color: var(--crema);
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
  text-align: center;
}

/* the bloom: three rings expanding out of the seal, like the crust rising
   when water first hits fresh grounds */
.bloom { position: absolute; left: 50%; top: clamp(5rem, 16vw, 9rem); translate: -50% 0; pointer-events: none; }
.bloom i {
  position: absolute; left: 50%; top: 50%;
  width: 260px; height: 260px; margin: -130px 0 0 -130px;
  border: 1px solid rgba(200, 145, 47, .38);
  border-radius: 50%;
  animation: bloom 7s cubic-bezier(.22,.61,.36,1) infinite;
}
.bloom i:nth-child(2) { animation-delay: 2.33s; }
.bloom i:nth-child(3) { animation-delay: 4.66s; }

@keyframes bloom {
  0%   { transform: scale(.55); opacity: 0; }
  18%  { opacity: .85; }
  100% { transform: scale(2.6); opacity: 0; }
}

.seal {
  position: relative; z-index: 2;
  width: clamp(180px, 32vw, 250px); height: auto;
  margin: 0 auto 1.6rem;
  border-radius: 50%;
  filter: drop-shadow(0 22px 46px rgba(0,0,0,.55));
}

.hero h1 { color: var(--crema); position: relative; z-index: 2; }
.hero-tag {
  position: relative; z-index: 2;
  font-family: "Fraunces", Georgia, serif; font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--honey-2);
  margin: 0 0 1.8rem;
}
.hero p.lede {
  position: relative; z-index: 2;
  margin: 0 auto 2rem; max-width: 58ch;
  color: rgba(243,231,211,.82);
}
.hero-actions { position: relative; z-index: 2; display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* the provinces we actually buy from, set as a running line */
.origins {
  background: var(--bark); color: var(--crema);
  overflow: hidden; white-space: nowrap;
  border-block: 1px solid rgba(243,231,211,.16);
}
.origins-track {
  display: inline-flex; gap: 2.4rem; padding: .7rem 0;
  animation: drift 38s linear infinite;
  font-size: .92rem; letter-spacing: .04em;
}
.origins-track span { color: rgba(243,231,211,.8); }
.origins-track span::before { content: "·"; color: var(--honey); margin-right: 2.4rem; }
@keyframes drift { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .bloom i { animation: none; opacity: .3; }
  .origins-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-dark { background: var(--bean); color: var(--crema); }
.section-dark h2 { color: var(--crema); }
.section-dark p { color: rgba(243,231,211,.78); }
.section-paper { background: var(--paper-2); }

.section-head { margin-bottom: 2.2rem; max-width: 62ch; }
.section-head p { color: var(--muted); margin: 0; }
.section-dark .section-head p { color: rgba(243,231,211,.7); }

.rule {
  width: 62px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--honey), var(--cherry));
  margin: 0 0 1.1rem;
}

/* ==========================================================================
   PRODUCT CARDS — shaped like the label on a coffee bag: square shoulders,
   a dashed tear line above the price, the price set as a stamp
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1.4rem;
}

.card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 4px 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.section-paper .card { background: #fff; }

.card-media {
  aspect-ratio: 4 / 3;
  background: var(--paper-2) center/cover no-repeat;
  display: grid; place-items: center;
  border-bottom: 1px solid var(--line);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.is-seal img { width: 58%; height: auto; object-fit: contain; opacity: .55; }

.card-body { padding: 1.05rem 1.15rem 0; flex: 1; }
.card-body h3 { margin: 0 0 .3rem; font-size: 1.14rem; }
.card-body p { font-size: .93rem; color: var(--muted); margin: 0 0 .8rem; }

.origin-line {
  font-family: "Fraunces", Georgia, serif; font-style: italic;
  font-size: .9rem; color: var(--leaf); margin: 0 0 .5rem;
}

/* roast strength as a three-step gauge — it carries information, so it earns
   its place; an empty dot means the roast stops short of that step */
.roast { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--muted); }
.roast b { font-weight: 600; color: var(--bark); }
.roast i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--bark-2); display: inline-block; }
.roast i.on { background: var(--bark-2); }

.card-foot {
  margin-top: auto;
  padding: .85rem 1.15rem 1.1rem;
  border-top: 1.5px dashed var(--line);
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
}
.price {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.22rem; font-weight: 600; color: var(--bean);
}
.price small { font-size: .78rem; color: var(--muted); font-family: "Karla", sans-serif; }
.card-foot .btn { margin-left: auto; }

.sizes { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.15rem .9rem; }
.size-pill {
  border: 1.5px solid var(--line); background: transparent;
  border-radius: 999px; padding: .3rem .7rem;
  font: inherit; font-size: .84rem; color: var(--bark); cursor: pointer;
}
.size-pill[aria-pressed="true"] { background: var(--bean); color: var(--crema); border-color: var(--bean); }

.sold-out {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px;
  background: rgba(178,56,44,.12); color: var(--cherry);
  font-size: .78rem; font-weight: 700;
}

/* ==========================================================================
   MENU FILTER BAR
   ========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters a {
  padding: .45rem .95rem; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--line); color: var(--bark); font-weight: 600; font-size: .93rem;
}
.filters a:hover { border-color: var(--bark); }
.filters a[aria-current="true"] { background: var(--bark); color: var(--crema); border-color: var(--bark); }

/* ==========================================================================
   FORMS
   ========================================================================== */
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-weight: 700; font-size: .93rem; margin-bottom: .32rem; color: var(--bark); }
.field .hint { font-size: .84rem; color: var(--muted); margin-top: .3rem; }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=password], input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .68rem .85rem;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
}
textarea { min-height: 118px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--honey); outline: none; box-shadow: 0 0 0 3px rgba(200,145,47,.2); }

.choice-row { display: flex; gap: .7rem; flex-wrap: wrap; }
.choice {
  flex: 1 1 170px; display: flex; gap: .6rem; align-items: flex-start;
  padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer;
}
.choice input { margin-top: .25rem; accent-color: var(--bark); }
.choice b { display: block; font-size: .97rem; }
.choice span { font-size: .85rem; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--bark); box-shadow: 0 0 0 3px rgba(78,45,28,.1); }

/* ==========================================================================
   BASKET / CHECKOUT
   ========================================================================== */
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

.line-item {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: center;
}
.line-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--paper-2); }
.line-item h3 { margin: 0 0 .15rem; font-size: 1.03rem; }
.line-item .meta { font-size: .87rem; color: var(--muted); }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button {
  background: none; border: 0; width: 34px; height: 34px; cursor: pointer;
  font-size: 1.1rem; color: var(--bark); line-height: 1;
}
.qty button:hover { background: var(--paper-2); }
.qty span { min-width: 34px; text-align: center; font-weight: 700; font-size: .97rem; }

.summary {
  position: sticky; top: 96px;
  background: var(--bean); color: var(--crema);
  border-radius: var(--radius); padding: 1.5rem;
}
.summary h3 { color: var(--crema); margin-bottom: 1rem; }
.summary .row { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; font-size: .95rem; color: rgba(243,231,211,.82); }
.summary .row.total {
  border-top: 1px solid rgba(243,231,211,.2); margin-top: .7rem; padding-top: .9rem;
  font-family: "Fraunces", Georgia, serif; font-size: 1.32rem; color: var(--crema); font-weight: 600;
}
.summary .btn { width: 100%; margin-top: 1.1rem; }
.summary .fineprint { font-size: .82rem; color: rgba(243,231,211,.6); margin: .9rem 0 0; }

/* ==========================================================================
   NOTICES
   ========================================================================== */
.notice {
  padding: .85rem 1.05rem; border-radius: 12px; margin-bottom: 1.2rem;
  border: 1.5px solid var(--line); background: #fff; font-size: .95rem;
}
.notice-ok    { border-color: rgba(63,107,69,.4);  background: rgba(63,107,69,.08);  color: #2C4F31; }
.notice-error { border-color: rgba(178,56,44,.4);  background: rgba(178,56,44,.08);  color: #8A2A21; }
.notice-info  { border-color: rgba(200,145,47,.45); background: rgba(200,145,47,.1); color: #6E4E13; }

.empty {
  text-align: center; padding: 3.5rem 1rem;
  border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--paper);
}
.empty h3 { margin-bottom: .4rem; }
.empty p { margin: 0 auto 1.3rem; color: var(--muted); }

/* toast used by the add-to-basket button */
.toast {
  position: fixed; left: 50%; bottom: 26px; translate: -50% 0; z-index: 200;
  background: var(--bean); color: var(--crema);
  padding: .8rem 1.2rem; border-radius: 999px; font-size: .93rem; font-weight: 600;
  box-shadow: 0 16px 34px -18px rgba(0,0,0,.7);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, translate .2s ease;
}
.toast.show { opacity: 1; translate: -50% -8px; }

/* ==========================================================================
   STORY PAGE
   ========================================================================== */
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.6rem; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.pull {
  font-family: "Fraunces", Georgia, serif; font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.35; color: var(--bark); border-left: 3px solid var(--honey);
  padding-left: 1.2rem; margin: 2rem 0;
}

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.2rem; }
.fact { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.fact b { display: block; font-family: "Fraunces", Georgia, serif; font-size: 1.7rem; color: var(--bean); }
.fact span { font-size: .9rem; color: var(--muted); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--bean); color: rgba(243,231,211,.78); padding: 3.2rem 0 1.6rem; }
.footer h4 { color: var(--crema); font-size: 1rem; margin-bottom: .7rem; }
.footer a { color: rgba(243,231,211,.78); text-decoration: none; }
.footer a:hover { color: var(--honey-2); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: .18rem 0; font-size: .95rem; }
.footer-logo { display: flex; gap: .8rem; align-items: center; margin-bottom: .8rem; }
.footer-logo img { width: 60px; height: 60px; border-radius: 50%; }
.footer-bottom {
  margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(243,231,211,.16);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem;
}

/* ==========================================================================
   UNAVAILABLE PAGE
   ========================================================================== */
.unavailable {
  min-height: 100vh; display: grid; place-items: center; text-align: center;
  background: radial-gradient(110% 80% at 50% 0%, #3B2417 0%, var(--bean) 60%, #170E09 100%);
  color: var(--crema); padding: 2rem;
}
.unavailable img { width: 148px; margin: 0 auto 1.6rem; border-radius: 50%; }
.unavailable h1 { color: var(--crema); font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
.unavailable p { color: rgba(243,231,211,.76); margin: 0 auto 1.8rem; max-width: 48ch; }
