/* Master template styles. Colours + fonts come from site.json via :root vars.
   Logical properties (margin-inline, inset-inline…) are used so dir="rtl" works for Arabic later. */
:root {
  --radius: 2px;
  --radius-btn: 999px;
  --surface: color-mix(in srgb, var(--primary) 7%, var(--bg));
  --line: color-mix(in srgb, var(--text) 12%, var(--bg));
  --muted: color-mix(in srgb, var(--text) 74%, var(--bg));
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 300 1rem/1.7 var(--font-body), system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--font-heading), Georgia, serif; font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 11vw, 5.6rem); }
h2 { font-size: clamp(2.2rem, 7vw, 3.6rem); margin-bottom: .9rem; }
h3 { font-size: 1.65rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(100% - 2.5rem, 1140px); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 13vw, 8.5rem); }
.section-tight { padding-block-end: clamp(3rem, 8vw, 5rem); }
.surface { background: var(--surface); }
.section-head { max-width: 38rem; margin-block-end: clamp(2.5rem, 6vw, 4rem); }
.section-foot { margin-block-start: 3rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.eyebrow { font-size: .72rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--primary); margin-bottom: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; margin: 0; }
.link { font-size: .78rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: .3em; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 50; background: var(--text); color: var(--bg); padding: .6rem 1rem; }
.skip:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 1.75rem;
  border: 1px solid var(--primary); border-radius: var(--radius-btn); background: var(--primary); color: #fff;
  font-size: .76rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background-color .25s, color .25s, border-color .25s, transform .15s;
}
.btn:hover { background: var(--text); border-color: var(--text); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn-ghost:hover { background: var(--text); color: var(--bg); }
.btn-small { min-height: 40px; padding: 0 1.2rem; font-size: .7rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; transition: border-color .3s;
  background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.site-header.scrolled { border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--header-h); }
.logo { font-family: var(--font-heading), Georgia, serif; font-size: 1.7rem; letter-spacing: .03em; text-decoration: none; margin: 0; line-height: 1; }
.logo img { height: 36px; width: auto; }
.nav { display: none; gap: 2.2rem; font-size: .72rem; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; }
.nav a { text-decoration: none; opacity: .8; transition: opacity .2s; }
.nav a:hover { opacity: 1; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: min(calc(100svh - var(--header-h)), 860px); color: #fff; }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(25 18 12 / .72), rgb(25 18 12 / .3) 60%, rgb(25 18 12 / .18)); }
.hero-content { text-shadow: 0 1px 24px rgb(25 18 12 / .25); }
.hero-content { padding-block: 4rem clamp(2.5rem, 7vw, 5rem); }
.hero .eyebrow { color: #fff; opacity: .85; }
.hero h1 { max-width: 11ch; }
.lead { max-width: 34ch; margin-top: 1.25rem; font-size: 1.06rem; opacity: .92; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn-light { background: #fff; border-color: #fff; color: var(--text); }
.btn-light:hover { background: transparent; color: #fff; border-color: #fff; }
.hero .btn-ghost { color: #fff; border-color: rgb(255 255 255 / .7); }
.hero .btn-ghost:hover { background: #fff; color: var(--text); }
.rating-chip { display: inline-block; margin-top: 2rem; font-size: .82rem; letter-spacing: .04em; text-decoration: none; opacity: .9; }
.stars { color: var(--accent); letter-spacing: .12em; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero-content > * { animation: rise 1s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: .08s; }
.hero-content > :nth-child(3) { animation-delay: .16s; }
.hero-content > :nth-child(n+4) { animation-delay: .24s; }

/* Services menu */
.menu { display: grid; gap: 3rem; }
.menu-group h3 { padding-bottom: .8rem; border-bottom: 1px solid var(--text); }
.menu-group ul { list-style: none; margin: 0; padding: 0; }
.menu-group li { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding-block: 1.05rem; border-bottom: 1px solid var(--line); }
.svc-name { font-weight: 400; }
.svc-meta { display: block; margin-top: .15rem; font-size: .82rem; font-weight: 300; color: var(--muted); }
.svc-price { font-family: var(--font-heading), Georgia, serif; font-size: 1.3rem; white-space: nowrap; }
.svc-price small { font-family: var(--font-body), sans-serif; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-inline-end: .4em; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.gallery figure { margin: 0; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius); background: var(--surface); }
.gallery figure:first-child, .gallery figure:last-child:nth-child(even) { grid-column: span 2; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
@media (hover: hover) { .gallery figure:hover img { transform: scale(1.04); } }

/* Reviews */
.rating-badge { display: inline-flex; align-items: center; gap: 1.1rem; margin-bottom: 2.5rem; font-size: .85rem; line-height: 1.5; text-decoration: none; color: var(--muted); }
.rating-badge .score { font-family: var(--font-heading), Georgia, serif; font-size: 4rem; line-height: 1; color: var(--text); }
.review-list {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: -1.25rem; padding-inline: 1.25rem; scroll-padding-inline: 1.25rem; padding-bottom: .5rem; scrollbar-width: none;
}
.review-list::-webkit-scrollbar { display: none; }
.review { scroll-snap-align: start; margin: 0; padding: 2rem 1.75rem; background: var(--bg); border-radius: var(--radius); display: flex; flex-direction: column; }
.review blockquote { margin: 1rem 0 0; font-family: var(--font-heading), Georgia, serif; font-size: 1.4rem; line-height: 1.35; flex: 1; }
.review figcaption { margin-top: 1.5rem; font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* About */
.about { display: grid; gap: 2.75rem; align-items: center; }
.about-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.prose p { color: var(--muted); max-width: 36rem; }

/* Visit */
.visit { display: grid; gap: 3rem; }
.details { margin: 2.25rem 0 0; }
.details dt { font-size: .7rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--primary); }
.details dd { margin: .35rem 0 1.6rem; }
.details a { text-decoration: none; }
.details a:hover { text-decoration: underline; }
.hours { list-style: none; margin: 0; padding: 0; max-width: 22rem; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; }
.map { width: 100%; aspect-ratio: 4 / 5; border: 0; border-radius: var(--radius); background: var(--line); filter: grayscale(.4) contrast(.95); }

/* Footer */
.site-footer { padding-block: 3.5rem; border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; }
.footer-links a { text-decoration: none; }
.site-footer .logo { margin-bottom: .6rem; }

/* Mobile sticky booking bar */
.book-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1.5fr 1fr; gap: .5rem;
  padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.book-bar .btn { min-height: 48px; padding: 0 .75rem; }

@media (max-width: 859px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .header-book { display: none; }
}

@media (min-width: 860px) {
  .nav { display: flex; }
  .hero::after { background: linear-gradient(to right, rgb(25 18 12 / .6), rgb(25 18 12 / .1) 65%), linear-gradient(to top, rgb(25 18 12 / .45), rgb(25 18 12 / 0) 50%); }
  .book-bar { display: none; }
  .menu { grid-template-columns: 1fr 1fr; gap: 4rem 5.5rem; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .gallery figure:last-child:nth-child(even) { grid-column: auto; aspect-ratio: 4 / 5; }
  .gallery figure:first-child { grid-row: span 2; aspect-ratio: auto; }
  .review-list { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .about { grid-template-columns: 1fr 1fr; gap: 6rem; }
  .visit { grid-template-columns: 1fr 1.15fr; gap: 5rem; align-items: center; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
  .copyright { grid-column: 1 / -1; }
}

/* Scroll reveal — only when JS is on, so content never hides without it */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-content > * { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Layout variants */
.layout-spa { --radius: 22px; }
.layout-spa .section { padding-block: clamp(5.5rem, 15vw, 10rem); }
.layout-spa .section-head { text-align: center; margin-inline: auto; }
.layout-spa .section-head + .rating-badge { display: flex; justify-content: center; }

.layout-barber { --radius: 0; --radius-btn: 0; }
.layout-barber h1, .layout-barber h2, .layout-barber h3, .layout-barber .logo { text-transform: uppercase; letter-spacing: .03em; }
.layout-barber .menu-group h3 { font-size: 1.3rem; }
