/* ============================================================
   AL-KORBA COFFEE — بن الكوربة
   Design tokens
   ============================================================ */
:root {
  /* Colour — sampled directly from Al-Korba's own printed menu design */
  --wood: #2b1b12; /* mahogany millwork / ceiling */
  --espresso: #1b120c; /* deepest ground, near-black */
  --olive: #53582f; /* Al-Korba menu background green (sampled) */
  --olive-deep: #3d4123;
  --brass: #c6a15b; /* antique brass / logo gold */
  --brass-bright: #efe7c4; /* Al-Korba menu cream-gold text (sampled) */
  --tile-cream: #f1e7d2; /* paper / menu card */
  --tile-cream-2: #e7d9bc;
  --tile-rust: #b85c43; /* muted terracotta, floor-tile accent */
  --ink: #241a12;

  /* Type */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Jost", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --radius: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--tile-cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 600;
  color: var(--wood);
}
p {
  margin: 0 0 1em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tile-rust);
  display: inline-block;
  margin-bottom: 0.9rem;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 6vw;
}

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- Tile-motif signature element ---------------------
   Recreated from the cement floor tiles photographed in the shop:
   an interlocking four-point star / diamond lattice, rendered as
   a repeating inline SVG pattern. Used as section dividers and
   a quiet background watermark.                                */
.tile-divider {
  width: 100%;
  height: 34px;
  background-repeat: repeat-x;
  background-size: 34px 34px;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34'>\
<g fill='none' stroke='%23C6A15B' stroke-width='1.1' opacity='0.55'>\
<path d='M17 2 L32 17 L17 32 L2 17 Z'/>\
<path d='M17 9 L25 17 L17 25 L9 17 Z'/>\
</g></svg>");
}
.tile-divider.on-dark {
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34'>\
<g fill='none' stroke='%23E4C583' stroke-width='1.1' opacity='0.4'>\
<path d='M17 2 L32 17 L17 32 L2 17 Z'/>\
<path d='M17 9 L25 17 L17 25 L9 17 Z'/>\
</g></svg>");
}

.tile-watermark {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-size: 68px 68px;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='68' height='68'>\
<g fill='none' stroke='%23E4C583' stroke-width='1' opacity='0.06'>\
<path d='M34 4 L64 34 L34 64 L4 34 Z'/>\
<path d='M34 18 L50 34 L34 50 L18 34 Z'/>\
</g></svg>");
  pointer-events: none;
}

/* ---------------------------- Nav ---------------------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 6vw;
  transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}
.site-nav.scrolled {
  background: rgba(27, 18, 12, 0.94);
  padding: 0.85rem 6vw;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  color: var(--brass-bright);
  letter-spacing: 0.04em;
}
.brand-mark img {
  height: 38px;
  width: auto;
  display: block;
}
.brand-mark-full img {
  height: 96px;
}
.brand-mark .word {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-mark .en {
  font-size: 1.35rem;
  font-weight: 700;
}
.brand-mark .ar {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.85;
}

.nav-links {
  display: flex;
  gap: 2.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tile-cream);
  opacity: 0.85;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: opacity 0.25s, border-color 0.25s;
}
.nav-links a:hover {
  opacity: 1;
  border-color: var(--brass);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--brass);
  color: var(--brass-bright);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
}

/* ---------------------------- Hero ---------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(
      180deg,
      rgba(27, 18, 12, 0.35) 0%,
      rgba(27, 18, 12, 0.55) 55%,
      rgba(27, 18, 12, 0.94) 100%
    ),
    url("../assets/hero-alex-loaction.png") center 30% / cover no-repeat;
}
.hero-inner {
  position: relative;
  width: 100%;
  padding: 0 6vw 5rem;
  color: var(--tile-cream);
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass-bright);
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: riseIn 0.9s ease 0.2s forwards;
}
.hero h1 {
  color: var(--tile-cream);
  font-size: clamp(2.8rem, 8vw, 6.4rem);
  line-height: 0.96;
  max-width: 14ch;
  opacity: 0;
  animation: riseIn 1s ease 0.4s forwards;
}
.hero h1 em {
  color: var(--brass-bright);
  font-style: normal;
}
.hero-tagline-ar {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brass-bright);
  margin-top: 0.6rem;
  direction: rtl;
  opacity: 0;
  animation: riseIn 1s ease 0.6s forwards;
}
.hero-rule {
  width: 0;
  height: 2px;
  background: var(--brass);
  margin: 1.8rem 0;
  animation: drawLine 1.1s ease 0.9s forwards;
}
@keyframes drawLine {
  to {
    width: 120px;
  }
}
.hero-sub {
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--tile-cream);
  opacity: 0;
  animation: riseIn 1s ease 1s forwards;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  opacity: 0;
  animation: riseIn 1s ease 1.15s forwards;
}
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease,
    border-color 0.25s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--brass);
  color: var(--espresso);
}
.btn-primary:hover {
  background: var(--brass-bright);
}
.btn-ghost {
  border-color: var(--brass);
  color: var(--tile-cream);
}
.btn-ghost:hover {
  background: rgba(198, 161, 91, 0.12);
}
.btn-dark {
  background: var(--wood);
  color: var(--tile-cream);
}
.btn-dark:hover {
  background: var(--espresso);
}

/* ------------------------- Reveal-on-scroll --------------------
   Gated behind .js (added synchronously in <head>) so content is
   fully visible by default if JavaScript fails to run.            */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.is-visible > *:nth-child(1) {
  transition-delay: 0.05s;
}
.reveal-stagger.is-visible > *:nth-child(2) {
  transition-delay: 0.15s;
}
.reveal-stagger.is-visible > *:nth-child(3) {
  transition-delay: 0.25s;
}
.reveal-stagger.is-visible > *:nth-child(4) {
  transition-delay: 0.35s;
}
.reveal-stagger.is-visible > *:nth-child(5) {
  transition-delay: 0.45s;
}
.reveal-stagger.is-visible > *:nth-child(6) {
  transition-delay: 0.55s;
}
.reveal-stagger.is-visible > *:nth-child(7) {
  transition-delay: 0.65s;
}

/* ---------------------------- About ---------------------------- */
.about {
  background: var(--tile-cream);
  padding: 6.5rem 0 5rem;
}
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4.5rem;
  align-items: center;
}
.about-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(27, 18, 12, 0.4);
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 10px solid var(--tile-cream);
  outline: 1px solid var(--brass);
  outline-offset: -11px;
  pointer-events: none;
}
.about h2 {
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  margin-bottom: 1.1rem;
}
.about p {
  max-width: 52ch;
  color: #4a3c2c;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.4rem;
}
.about-stats div {
  border-top: 2px solid var(--brass);
  padding-top: 0.7rem;
}
.about-stats .num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--wood);
  display: block;
}
.about-stats .lbl {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tile-rust);
}

/* ---------------------------- Roast band ---------------------------- */
.roast-band {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
      180deg,
      rgba(27, 18, 12, 0.72),
      rgba(27, 18, 12, 0.86)
    ),
    url("/assets/coffee-beans-view.png") center/cover no-repeat;
  padding: 5rem 6vw;
  color: var(--tile-cream);
  overflow: hidden;
}
.roast-band .tile-watermark {
  opacity: 0.7;
}
.roast-band-inner {
  position: relative;
  max-width: 640px;
}
.roast-band h3 {
  color: var(--tile-cream);
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-style: italic;
}
.roast-band p {
  color: var(--tile-cream-2);
  margin-top: 1rem;
}

/* ---------------------------- Menu ---------------------------- */
.menu {
  background: var(--wood);
  padding: 6.5rem 0 6rem;
  position: relative;
}
.menu .container {
  position: relative;
  z-index: 1;
}
.menu-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}
.menu-head h2 {
  color: var(--tile-cream);
  font-size: clamp(2.1rem, 3.6vw, 3rem);
}
.menu-head p {
  color: var(--tile-cream-2);
}

.menu-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  margin-bottom: 2.6rem;
}
.switch-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  padding: 0.3rem;
  gap: 0.2rem;
}
.switch-btn {
  background: transparent;
  border: none;
  color: var(--tile-cream-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s;
}
.switch-btn.active {
  background: var(--brass);
  color: var(--espresso);
}
.menu-note-top {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--tile-cream-2);
  opacity: 0.65;
  text-align: center;
}

.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 3rem;
}
.menu-tab {
  background: transparent;
  border: 1px solid rgba(198, 161, 91, 0.4);
  color: var(--tile-cream-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.menu-tab:hover {
  border-color: var(--brass);
}
.menu-tab.active {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--espresso);
}

.menu-panel {
  display: none;
}
.menu-panel.active {
  display: block;
  animation: panelIn 0.5s ease;
}
@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(198, 161, 91, 0.3);
  padding-bottom: 1.2rem;
}
.menu-panel-head h3 {
  color: var(--brass-bright);
  font-size: 1.9rem;
  font-style: italic;
}
.menu-panel-head .ar {
  font-family: var(--font-display);
  color: var(--tile-cream-2);
  font-size: 1.2rem;
  direction: rtl;
}
.menu-panel-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--tile-cream-2);
  opacity: 0.75;
  margin-bottom: 1.4rem;
}

.price-col-labels {
  display: flex;
  justify-content: flex-end;
  gap: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tile-rust);
  margin-bottom: 0.6rem;
  opacity: 0.85;
}
.price-col-labels span {
  min-width: 64px;
  text-align: right;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.menu-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px dashed rgba(198, 161, 91, 0.25);
  color: var(--tile-cream);
}
.menu-list li:last-child {
  border-bottom: none;
}
.item-name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  max-width: 52ch;
}
.item-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(198, 161, 91, 0.35);
  transform: translateY(-4px);
  min-width: 16px;
}
.item-prices {
  display: flex;
  gap: 1.2rem;
}
.item-prices span {
  font-family: var(--font-mono);
  color: var(--brass-bright);
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: 64px;
  text-align: right;
}

.menu-footnote {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--tile-cream-2);
  opacity: 0.75;
  border-top: 1px dashed rgba(198, 161, 91, 0.25);
  padding-top: 1rem;
}

.menu-photo-strip {
  margin-top: 2.6rem;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/6;
}
.menu-photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-note {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--tile-cream-2);
  opacity: 0.7;
}

/* ---------------------------- Locations ---------------------------- */
.locations {
  background: var(--tile-cream);
  padding: 6.5rem 0;
}
.locations-head {
  max-width: 640px;
  margin-bottom: 3rem;
}
.locations-head h2 {
  font-size: clamp(2.1rem, 3.6vw, 3rem);
}

.loc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}
.loc-cards {
  display: grid;
  gap: 1.6rem;
}
.loc-card {
  background: #fff;
  border: 1px solid var(--tile-cream-2);
  border-left: 4px solid var(--brass);
  padding: 1.8rem 2rem;
  border-radius: var(--radius);
}
.loc-card.heritage {
  border-left-color: var(--olive);
}
.loc-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}
.loc-card .tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tile-rust);
  display: block;
  margin-bottom: 0.6rem;
}
.loc-card p {
  color: #4a3c2c;
  margin-bottom: 0.3rem;
}
.loc-card a.phone {
  font-family: var(--font-mono);
  color: var(--wood);
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
}

.map-embed {
  border: 1px solid var(--tile-cream-2);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 420px;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  filter: sepia(0.15) saturate(0.85);
}

/* ---------------------------- Footer ---------------------------- */
footer {
  position: relative;
  background: var(--espresso);
  color: var(--tile-cream-2);
  padding: 4.5rem 0 2rem;
  overflow: hidden;
}
.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(198, 161, 91, 0.2);
}
.footer-brand .brand-mark {
  margin-bottom: 1rem;
}
.footer-brand p {
  max-width: 34ch;
  color: var(--tile-cream-2);
  font-size: 0.92rem;
}
.footer-col h4 {
  color: var(--brass-bright);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.footer-col a {
  text-decoration: none;
  color: var(--tile-cream-2);
  font-size: 0.92rem;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--brass-bright);
}
.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: rgba(241, 231, 210, 0.55);
}

/* ---------------------------- Responsive ---------------------------- */
@media (max-width: 920px) {
  .about-grid,
  .loc-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: 0 0 0 30%;
    top: 0;
    background: rgba(27, 18, 12, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 99;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 1rem;
  }
  .nav-toggle {
    display: block;
  }
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .menu-panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}
