@font-face { font-family: 'Joman'; src: url('fonts/Joman-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Joman'; src: url('fonts/Joman-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cairo'; src: url('fonts/Cairo.ttf') format('truetype'); font-weight: 200 1000; font-display: swap; }

/* ---------- Brand tokens (coffee palette) ---------- */
:root {
  --teal: #1B4E6B;
  --teal-dark: #0C2A38;
  --espresso: #2B170B;
  --gold: #C89D65;
  --gold-light: #F3D9A4;
  --cream: #F5EFE0;
  --muted: rgba(245, 239, 224, .75);
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .35);

  /* Bootstrap 5 variables, mapped to the brand */
  --bs-body-font-family: 'Joman', 'Cairo', system-ui, sans-serif;
  --bs-body-bg: var(--espresso);
  --bs-body-color: var(--cream);
  --bs-body-line-height: 1.85;
  --bs-link-color: var(--gold);
  --bs-link-hover-color: var(--gold-light);
  --bs-border-color: rgba(200, 157, 101, .3);
  --bs-secondary-color: var(--muted);
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; font-weight: 500; }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 800; line-height: 1.25; }
a { text-decoration: none; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }

/* ---------- Brand helpers ---------- */
.text-gold { color: var(--gold) !important; }
.text-teal { color: var(--teal) !important; }
.text-muted-gold { color: var(--muted) !important; }
.text-muted-dark { color: rgba(43, 23, 11, .75) !important; }
.fw-black { font-weight: 900; }
.eyebrow { color: var(--gold); font-weight: 700; font-size: .95rem; margin-bottom: .4em; }
.eyebrow-dark { color: var(--teal); }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 900; margin-bottom: .5em; }
.code { font-size: .85rem; opacity: .85; direction: ltr; text-align: right; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Buttons (gold family, built on Bootstrap's button variables) ---------- */
.btn { font-weight: 800; border-width: 2px; border-radius: 999px; transition: transform .2s, background-color .2s, color .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  --bs-btn-color: var(--espresso); --bs-btn-bg: var(--gold); --bs-btn-border-color: var(--gold);
  --bs-btn-hover-color: var(--espresso); --bs-btn-hover-bg: var(--gold-light); --bs-btn-hover-border-color: var(--gold-light);
  --bs-btn-active-color: var(--espresso); --bs-btn-active-bg: var(--gold-light); --bs-btn-active-border-color: var(--gold-light);
  --bs-btn-focus-shadow-rgb: 243, 217, 164;
}
.btn-outline-gold {
  --bs-btn-color: var(--gold); --bs-btn-bg: transparent; --bs-btn-border-color: var(--gold);
  --bs-btn-hover-color: var(--espresso); --bs-btn-hover-bg: var(--gold); --bs-btn-hover-border-color: var(--gold);
  --bs-btn-active-color: var(--espresso); --bs-btn-active-bg: var(--gold); --bs-btn-active-border-color: var(--gold);
  --bs-btn-focus-shadow-rgb: 200, 157, 101;
}
.btn-sm { min-height: 42px; padding: 8px 18px; font-size: .92rem; }

/* ---------- Navbar ---------- */
.bj-nav {
  background: rgba(12, 42, 56, .6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(200, 157, 101, .2);
  padding-block: .5rem;
}
.bj-nav .container { gap: .5rem; }
.bj-brand-logo { height: 42px; width: auto; background: var(--cream); border-radius: 10px; padding: 3px 7px; }
.bj-brand-text { font-weight: 900; font-size: 1.15rem; color: var(--cream); }
.bj-nav .nav-link { color: var(--muted); font-weight: 600; }
.bj-nav .nav-link:hover, .bj-nav .nav-link:focus { color: var(--gold); }
.bj-toggler { border-color: rgba(200, 157, 101, .6); padding: .35rem .5rem; }
.bj-toggler:focus { box-shadow: 0 0 0 .2rem rgba(200, 157, 101, .35); }
.bj-count { background-color: var(--gold) !important; color: var(--espresso); font-weight: 800; margin-inline-start: 4px; }
.bj-nav .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
  .bj-nav { padding-block: .4rem; }
  .bj-nav .btn-sm { padding: 8px 12px; font-size: .85rem; min-height: 40px; }
  .bj-nav .container { padding-inline: 12px; }
}
@media (max-width: 991.98px) {
  .bj-nav .navbar-collapse { background: rgba(12, 42, 56, .97); padding-inline: 0; }
}

/* ---------- The experience (scroll-driven 3D) ---------- */
.experience { position: relative; height: 760vh; background: var(--teal-dark); }
.stage {
  position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden;
  background:
    radial-gradient(60% 70% at 70% 40%, rgba(27, 78, 107, .9), transparent 70%),
    linear-gradient(180deg, #0C2A38 0%, #0a1f2a 60%, #2B170B 100%);
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* chapters: text laid over the 3D scene, shown by scroll progress */
.chapter {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 clamp(20px, 7vw, 110px);
  pointer-events: none; opacity: 0;
}
.chapter-text { max-width: min(520px, 90vw); text-shadow: 0 6px 30px rgba(0, 0, 0, .55); }
.display { font-size: clamp(2.8rem, 6.4vw, 5.6rem); font-weight: 900; line-height: 1.1; margin: .1em 0 .2em; }
.chapter-title { font-size: clamp(2rem, 3.8vw, 3.2rem); font-weight: 900; line-height: 1.2; margin: .1em 0 .3em; }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--muted); }
.chapter.final { justify-content: center; align-items: flex-end; padding-bottom: 9vh; text-align: center; }
.chapter.final .chapter-text { max-width: 720px; }
.final-title { font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 900; line-height: 1; margin: 0 0 .2em; }

.scroll-cue { position: absolute; bottom: 26px; inset-inline-start: clamp(20px, 7vw, 110px); color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 10px; }
.scroll-cue span { width: 22px; height: 36px; border: 2px solid var(--gold); border-radius: 12px; position: relative; }
.scroll-cue span::after { content: ''; position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; margin-left: -2px; background: var(--gold); border-radius: 2px; animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* no WebGL: the chapters are shown one after another */
.no-webgl .experience { height: auto; }
.no-webgl .stage { position: relative; height: auto; min-height: 100vh; padding: 120px 0 60px; }
.no-webgl #scene, .no-webgl .scroll-cue { display: none; }
.no-webgl .chapter { position: relative; opacity: 1 !important; padding: 40px clamp(20px, 7vw, 110px); }
.no-webgl .chapter-text { transform: none !important; }

/* phones and tablets: the text sits at the bottom centre, over the scene, on a soft dark fade */
@media (max-width: 991.98px) {
  .stage::after {
    content: ''; position: absolute; inset: auto 0 0 0; height: 58%; z-index: 1; pointer-events: none;
    background: linear-gradient(0deg, rgba(12, 42, 56, .94) 0%, rgba(12, 42, 56, .7) 45%, rgba(12, 42, 56, 0) 100%);
  }
  .chapter, .scroll-cue { z-index: 2; }
  .chapter { justify-content: center; align-items: flex-end; padding-bottom: 12vh; text-align: center; }
  .chapter-text { max-width: 92vw; }
  .chapter.final { padding-bottom: 14vh; }
  .scroll-cue { display: none; }
}
@media (max-width: 575.98px) {
  .display { font-size: clamp(2.2rem, 11vw, 3rem); }
  .chapter-title { font-size: clamp(1.6rem, 7vw, 2.1rem); }
  .lead { font-size: 1rem; }
  .final-title { font-size: clamp(2.6rem, 14vw, 3.6rem); }
}

/* ---------- Section backgrounds ---------- */
.bj-section { padding: clamp(70px, 10vw, 130px) 0; position: relative; }
.bj-cream { background: var(--cream); color: var(--espresso); }
.bj-cream .section-title, .bj-cream .text-teal { color: var(--teal); }
.bj-cream .eyebrow { color: var(--teal); }
.bj-teal { background: var(--teal-dark); }
.bj-dusk { background: linear-gradient(160deg, var(--espresso), var(--teal-dark)); }
/* Arabic geometric star lattice (heritage motif), very faint */
.bj-pattern {
  background-color: var(--teal-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M40 0 L52 28 L80 40 L52 52 L40 80 L28 52 L0 40 L28 28 Z' fill='none' stroke='%23C89D65' stroke-opacity='0.13' stroke-width='1'/%3E%3Ccircle cx='40' cy='40' r='6' fill='none' stroke='%23C89D65' stroke-opacity='0.13'/%3E%3C/svg%3E");
  background-size: 80px 80px;
}

/* ---------- Name cards (cream) ---------- */
.card-cream {
  background: #fff; color: var(--espresso); border-radius: var(--radius); padding: 26px; height: 100%;
  box-shadow: 0 14px 40px rgba(43, 23, 11, .12); border-top: 5px solid var(--gold);
}
.card-cream p { color: var(--espresso); }
.card-mark { display: block; font-size: 2.4rem; font-weight: 900; color: var(--teal); margin-bottom: 6px; }

/* ---------- Colour swatches ---------- */
.swatch { background: var(--c); color: var(--t); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.swatch .chip { height: 120px; border-radius: 12px; background: var(--c); border: 2px solid rgba(255, 255, 255, .2); margin-bottom: 14px; }
.swatch h3 { font-size: 1.3rem; }
.swatch p:last-child { margin: 0; font-size: .95rem; }
.swatch .code { display: block; margin-bottom: .6em; }

/* ---------- Font specimen ---------- */
.specimen { background: rgba(245, 239, 224, .06); border: 1px solid rgba(200, 157, 101, .35); border-radius: var(--radius); padding: 40px 32px; text-align: center; }
.sample-big { font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 900; color: var(--gold); margin: 0; line-height: 1.2; }
.sample-mid { font-size: 1.5rem; font-weight: 600; margin: 10px 0; }
.sample-small { font-size: .95rem; color: var(--muted); margin: 0; direction: ltr; letter-spacing: .04em; }

/* ---------- Logo ---------- */
.logo-stage { background: var(--teal-dark); border-radius: 26px; padding: 56px 40px; display: grid; place-items: center; box-shadow: var(--shadow); }
.logo-stage img { width: min(320px, 70%); height: auto; }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.facts li { padding: 14px 18px; background: #fff; border-radius: 14px; border-inline-start: 4px solid var(--gold); color: var(--espresso); }
.facts strong { color: var(--teal); }

/* ---------- Shop: products with tasting notes ---------- */
.product {
  background: rgba(245, 239, 224, .06);
  border: 1px solid rgba(200, 157, 101, .35);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.product:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.product .roast { color: var(--gold); font-weight: 700; font-size: .9rem; margin: 0; }
.product h3 { font-size: 1.4rem; margin: 0; }
.notes { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.notes li { background: rgba(200, 157, 101, .15); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.intensity { margin: 4px 0 0; font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(245, 239, 224, .2); display: inline-block; }
.dot.on { background: var(--gold); }
.product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; flex-wrap: wrap; }
.price { font-weight: 800; color: var(--gold-light); font-size: 1.1rem; }

/* ---------- Cart (Bootstrap offcanvas) ---------- */
.bj-offcanvas { background: var(--teal-dark); color: var(--cream); width: min(400px, 90vw); box-shadow: -20px 0 60px rgba(0, 0, 0, .5); }
.bj-offcanvas .offcanvas-header { border-bottom: 1px solid rgba(200, 157, 101, .2); }
.cart-lines { display: grid; gap: 12px; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(200, 157, 101, .2); }
.cart-qty { display: inline-flex; align-items: center; gap: 8px; }
.cart-qty .btn { width: 32px; height: 32px; padding: 0; min-height: 0; border-radius: 50%; }
.cart-sum { font-weight: 700; color: var(--gold-light); white-space: nowrap; }

/* ---------- Pearl ornament between sections ---------- */
.pearl-divider { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); padding: 10px 0; }
.pearl-divider::before, .pearl-divider::after { content: ''; height: 1px; width: min(180px, 20vw); background: linear-gradient(90deg, transparent, var(--gold)); }
.pearl-divider::after { background: linear-gradient(270deg, transparent, var(--gold)); }
.pearl-divider span { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--gold) 60%); }

/* ---------- Manager login (Bootstrap modal) ---------- */
.bj-modal { background: var(--teal-dark); color: var(--cream); border: 0; border-radius: 22px; box-shadow: var(--shadow); }
.bj-modal .modal-header, .bj-modal .modal-footer { border-color: rgba(200, 157, 101, .2); }
.bj-modal .modal-title { color: var(--gold); }
.bj-modal .form-label { color: var(--gold-light); font-weight: 700; }
.bj-input {
  min-height: 48px; border-radius: 12px;
  border: 1px solid rgba(200, 157, 101, .5); background-color: rgba(245, 239, 224, .08); color: var(--cream);
}
.bj-input:focus { background-color: rgba(245, 239, 224, .12); color: var(--cream); border-color: var(--gold-light); box-shadow: 0 0 0 .2rem rgba(243, 217, 164, .25); }

/* ---------- Footer ---------- */
.bj-footer { background: var(--espresso); padding: 50px 0 60px; }
.bj-footer-logo { height: 64px; width: auto; margin: 0 auto; background: var(--cream); border-radius: 12px; padding: 4px 10px; }
.bj-footer a { color: var(--gold); text-decoration: underline; }

/* ---------- Mobile polish ---------- */
@media (max-width: 575.98px) {
  .bj-section { padding: 64px 0; }
  .product { padding: 20px; }
  .card-cream { padding: 20px; }
  .specimen { padding: 28px 18px; }
  .logo-stage { padding: 36px 20px; }
  .swatch .chip { height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
