/* =========================================================
   ESPRSO — DEMO SITE

   The palette is taken from the shop's Instagram: a near-black
   charcoal ground, the warm taupe of the story highlights, the
   stone of the shop wall, and one accent — the gold-brown of
   espresso crema. The type follows the wordmark on the sign and
   the bag: a light, wide serif, with Arabic set in a calligraphic
   hand beside it.
========================================================= */

:root {
  /* grounds */
  --ink: #0e0f10;
  --ink-soft: #141517;
  --char: #1b1c1e;
  --line: #2a2b2d;
  --line-soft: #1f2022;

  /* the shop */
  --taupe: #5a5049;       /* the logo disc */
  --taupe-deep: #3b352f;
  --logo-ink: #342b24;    /* the logo lettering */
  --stone: #d6cdc2;
  --cream: #efe8de;
  --muted: #a39b91;
  --dim: #77706a;

  /* crema — the one accent. Type on it is ink, never white. */
  --crema: #c9a06f;
  --crema-hi: #ddb887;

  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --arabic: 'Aref Ruqaa', 'Geeza Pro', 'Noto Naskh Arabic', serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 1200px;
  --radius: 4px;
  --tap: 44px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

[hidden] { display: none !important; }

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

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

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
p a { color: var(--crema); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--crema); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--crema); color: var(--ink); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--crema); color: var(--ink); padding: 0.6rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------- type */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--stone); }
.display--md { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.05; }

.lede { color: var(--muted); font-size: 1.05rem; max-width: 46ch; margin-top: 1.25rem; }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap);
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn--accent { background: var(--crema); color: var(--ink); }
.btn--accent:hover { background: var(--crema-hi); }
.btn--ghost { border-color: var(--taupe); color: var(--cream); }
.btn--ghost:hover { border-color: var(--stone); }

/* ---------------------------------------------------------- logo */
/* The shop's own mark: dark lettering on a taupe disc, cut from Instagram. */
.brand { display: inline-flex; border-radius: 50%; }
/* Dark lettering on taupe goes muddy when small, so the mark never drops below 52px. */
.brand__logo { width: 64px; height: 64px; border-radius: 50%; }
.brand--lg .brand__logo { width: 112px; height: 112px; }
@media (max-width: 820px) { .header .brand__logo { width: 52px; height: 52px; } }

/* ---------------------------------------------------------- header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 15, 16, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.header.is-scrolled { background: rgba(14, 15, 16, 0.92); border-bottom-color: var(--line-soft); }
.header__bar { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
@media (max-width: 820px) { .header__bar { min-height: 72px; } }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) {
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  transition: color 0.2s;
}
.nav a:not(.btn):hover { color: var(--cream); }

.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: grid; place-content: center; gap: 6px;
    width: var(--tap); height: var(--tap);
    background: none; border: 0; padding: 0; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--cream); transition: transform 0.3s var(--ease); }
  .nav-toggle[aria-expanded='true'] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle[aria-expanded='true'] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--ink); border-bottom: 1px solid var(--line);
  }
  .nav a:not(.btn) { padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.85rem; }
  .nav__cta { margin-top: 1.2rem; }
  /* Closed by default only once JS is running, so the links stay usable without it. */
  .js .nav:not(.is-open) { display: none; }
}

/* ---------------------------------------------------------- hero */
.hero { padding-block: clamp(1.5rem, 5vw, 4.5rem) clamp(3rem, 7vw, 6rem); }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.15fr 0.85fr; } }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Category rings, after the Instagram highlights. */
.cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 0.5rem;
  margin-top: 2rem;
  max-width: 34rem;
}
@media (min-width: 560px) { .cats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.cat { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; text-align: center; }
.cat__ring {
  display: grid; place-items: center;
  width: clamp(64px, 17vw, 76px); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--taupe);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--taupe-deep);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.cat__ring svg {
  width: 58%; height: 58%;
  fill: none; stroke: var(--logo-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.cat:hover .cat__ring { background: #6b6056; box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--crema); }
.cat__name { font-size: 0.72rem; font-weight: 500; line-height: 1.25; color: var(--cream); }

.hero__media { position: relative; }
.hero__media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius);
}
.rating {
  position: absolute; left: 1rem; bottom: 1rem;
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: rgba(14, 15, 16, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.75rem;
}
.rating__score { font-weight: 600; }
.rating__stars { color: var(--crema); letter-spacing: 0.05em; }
.rating__count { color: var(--muted); }

/* ---------------------------------------------------------- sections */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); border-top: 1px solid var(--line-soft); }
.section__head { margin-bottom: 2.25rem; }

/* featured */
.featured__grid { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (min-width: 900px) { .featured__grid { grid-template-columns: 0.9fr 1.1fr; } }
.featured__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.featured__copy > p { color: var(--muted); max-width: 52ch; margin-block: 1.25rem 1.75rem; }

.notes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.notes span {
  padding: 0.3rem 0.8rem; border: 1px solid var(--taupe); border-radius: 999px;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone);
}

.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 2rem; border-top: 1px solid var(--line); }
.specs div { padding: 1rem 0.75rem 0 0; }
.specs dt { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.specs dd { font-family: var(--serif); font-size: 1.35rem; margin-top: 0.2rem; }
.specs .ar { font-family: var(--arabic); font-size: 1.2rem; }

/* menu */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 2.25rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  min-height: var(--tap); padding: 0.6rem 1.2rem;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font: 500 0.78rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tab:hover { color: var(--cream); border-color: var(--taupe); }
.tab[aria-selected='true'] { background: var(--cream); border-color: var(--cream); color: var(--ink); }

.menu__grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (min-width: 900px) { .menu__grid { grid-template-columns: 0.9fr 1.1fr; } }
.menu__media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }

.items li { padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.items li:first-child { padding-top: 0; }
.items h3 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.2; }
.items p { color: var(--muted); font-size: 0.92rem; margin-top: 0.2rem; max-width: 52ch; }
.menu__note { font-size: 0.78rem; color: var(--dim); margin-block: 1.25rem 1.5rem; }

/* story */
.story__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
@media (min-width: 900px) { .story__grid { grid-template-columns: 1fr 1fr; } }
.story__copy p:not(.eyebrow) { color: var(--muted); margin-top: 1.25rem; max-width: 52ch; }
.story__media { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; align-items: end; }
.story__media img { width: 100%; object-fit: cover; border-radius: var(--radius); }
.story__media figure:first-child img { aspect-ratio: 4 / 5; }
.story__media figure:last-child { margin-bottom: -2.5rem; }
.story__media figure:last-child img { aspect-ratio: 3 / 4; }

.mission {
  display: grid; gap: 2rem;
  margin-top: clamp(4.5rem, 9vw, 7rem); padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 720px) { .mission { grid-template-columns: repeat(3, 1fr); } }
.mission h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.mission p { color: var(--muted); font-size: 0.93rem; margin-top: 0.4rem; }

/* gallery */
.gallery { padding-bottom: clamp(3rem, 6vw, 5rem); }
.gallery__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 26vw, 340px);
  gap: 0.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-inline: var(--gutter); scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: start; border-radius: var(--radius); }
.gallery__follow {
  display: block; width: fit-content; margin: 1.5rem auto 0;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--taupe); padding-bottom: 0.2rem;
}
.gallery__follow:hover { color: var(--cream); border-color: var(--crema); }

/* visit */
.visit__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
@media (min-width: 900px) { .visit__grid { grid-template-columns: 1.1fr 0.9fr; } }

.info { margin-top: 2rem; border-top: 1px solid var(--line); }
.info div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.info dt { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); padding-top: 0.2rem; }
.info dd a { color: var(--crema); }
.tbc { display: block; font-size: 0.72rem; color: var(--dim); margin-top: 0.15rem; }
.visit__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.visit__card { position: relative; }
.visit__card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.visit__stats {
  position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.75rem;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: rgba(14, 15, 16, 0.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.visit__stats div { padding: 0.9rem 0.75rem; text-align: center; }
.visit__stats div + div { border-left: 1px solid var(--line); }
.visit__stats b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1rem, 2.2vw, 1.4rem); line-height: 1.1; white-space: nowrap; }
.visit__stats span { font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* cta */
.cta { padding-block: clamp(4.5rem, 10vw, 8rem); background: var(--stone); color: var(--ink); }
.cta__inner { text-align: center; }
.cta__inner .display { margin-inline: auto; max-width: 18ch; }
.cta__inner p { color: #544b43; margin: 1.25rem auto 2rem; max-width: 46ch; }
.cta .btn--accent { background: var(--ink); color: var(--cream); }
.cta .btn--accent:hover { background: #2a2520; }

/* ---------------------------------------------------------- footer */
.footer { padding-top: clamp(3.5rem, 7vw, 5rem); border-top: 1px solid var(--line-soft); }
.footer__grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer__brand p { margin-top: 1rem; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.footer__nav { display: flex; flex-direction: column; gap: 0.7rem; }
.footer__nav a { color: var(--muted); font-size: 0.9rem; width: fit-content; }
.footer__nav a:hover { color: var(--cream); }
.footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: 3.5rem; padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.78rem; color: var(--dim);
}
.footer__base a:hover { color: var(--cream); }

/* ---------------------------------------------------------- motion */
/* Hidden only once JS has confirmed it can reveal them again. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
