/* Crane Speciality Café
   Washi paper, sumi ink, one red sun. Red #b02818 is sampled from the logo.

   Type: Cormorant Garamond (display, with true italics) + Instrument Sans
   (text); Arabic: Amiri (display) + IBM Plex Sans Arabic (text).

   Spacing is deliberately compact (owner feedback 4 Oct): sections breathe,
   they do not float.

   RTL: logical properties only -- check.mjs fails the build on any physical
   left/right -- so the Arabic pages mirror with no overrides. */

:root {
  --paper: #f6f2ec;
  --paper-2: #efe8de;
  --card: #fbf9f5;
  --ink: #1b1815;
  --ink-2: #4a433c;
  --muted: #7a7067;
  --line: #e2d9cc;
  --red: #b02818;
  --red-ink: #8e1f12;
  --blush: #e2a296;
  --night: #171412;

  --serif: 'Cormorant Garamond', 'Amiri', Georgia, serif;
  --sans: 'Instrument Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 3.5vw, 36px);
  --section: clamp(44px, 5.5vw, 80px);
  --radius: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 2px rgba(27, 24, 21, .05), 0 12px 32px -12px rgba(27, 24, 21, .18);
}

html[lang='ar'] {
  --serif: 'Amiri', 'Cormorant Garamond', serif;
  --sans: 'IBM Plex Sans Arabic', 'Instrument Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html[lang='ar'] body { font-size: 17px; line-height: 1.8; }

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 .9em; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

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

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[dir='rtl'] .btn .i:last-child, [dir='rtl'] .link-arrow .i { transform: scaleX(-1); }

/* ------------------------------------------------------------ type */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 6.2vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.02em;
}
.display .line { display: block; }
.display .accent { font-style: italic; font-weight: 400; color: var(--red); }
html[lang='ar'] .display { font-weight: 700; line-height: 1.35; letter-spacing: 0; font-size: clamp(2.3rem, 5vw, 4.2rem); }
html[lang='ar'] .display .accent { font-style: normal; }

.display-sm {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 4.4vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -.015em;
}
html[lang='ar'] .display-sm { font-weight: 700; line-height: 1.4; letter-spacing: 0; font-size: clamp(2rem, 3.8vw, 3.2rem); }

.h2 {
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin-bottom: .45em;
}
.h3 { font-family: var(--serif); font-weight: 550; font-size: 1.6rem; line-height: 1.15; margin-bottom: .5em; }
html[lang='ar'] .h2, html[lang='ar'] .h3 { font-weight: 700; letter-spacing: 0; line-height: 1.45; }
html[lang='ar'] .h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }

.lede { font-size: clamp(1.02rem, 1.3vw, 1.14rem); color: var(--ink-2); max-width: 34em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: .9em;
}
html[lang='ar'] .eyebrow { letter-spacing: 0; font-size: .88rem; }
.sun-dot { width: .62em; height: .62em; border-radius: 50%; background: var(--red); flex: none; }

/* ------------------------------------------------------------ buttons */

.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: 0 1.4em;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 600 .9rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: color .35s var(--ease), border-color .35s var(--ease);
}
/* The fill rises from below on hover, like coffee in a cup. */
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--red); transform: translateY(101%); transition: transform .45s var(--ease);
}
.btn:hover::before { transform: none; }
.btn:hover { border-color: var(--red); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-sm { min-height: 40px; padding: 0 1.05em; font-size: .84rem; }
.btn .i { transition: transform .3s var(--ease); }
.btn:hover .i:last-child { transform: translateX(3px); }
[dir='rtl'] .btn:hover .i:last-child { transform: scaleX(-1) translateX(3px); }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 600; text-decoration: none; padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1.5px;
  transition: background-size .4s var(--ease), color .25s;
}
[dir='rtl'] .link-arrow { background-position: 100% 100%; }
.link-arrow:hover { color: var(--red); background-size: 30% 1.5px; }

/* ------------------------------------------------------------ header */

/* Frosted background on ::before, NOT on the header: backdrop-filter on
   the header would trap the fixed mobile nav inside its 68px box. */
.site-header { position: sticky; top: 0; z-index: 50; transition: transform .45s var(--ease); }
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(246, 242, 236, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.scrolled .site-header::before { border-bottom-color: var(--line); }
.header-hidden .site-header { transform: translateY(-100%); }
.nav-open .site-header { transform: none; }

.header-in { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { flex: none; display: block; }
.brand img { width: auto; height: 38px; }

.nav { display: flex; align-items: center; gap: 26px; margin-inline-start: auto; }
.nav ul { display: flex; gap: 24px; margin: 0; padding: 0; list-style: none; }
.nav a { text-decoration: none; font-weight: 500; font-size: .92rem; position: relative; padding-block: 6px; }
.nav ul a::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 1.5px;
  background: var(--red); transform: scaleX(0); transform-origin: var(--origin, left);
  transition: transform .3s var(--ease);
}
[dir='rtl'] .nav ul a::after { --origin: right; }
.nav ul a:hover::after, .nav ul a[aria-current='page']::after { transform: scaleX(1); }
.lang { font-weight: 600 !important; color: var(--red); }

.menu-btn { display: none; }

@media (max-width: 1180px) {
  .header-cta { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px; margin-inline-start: auto;
    min-height: 42px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 999px;
    background: transparent; color: var(--ink); font: 600 .88rem var(--sans); cursor: pointer;
  }
  .bars, .bars::before, .bars::after { display: block; width: 16px; height: 1.6px; background: currentColor; position: relative; transition: transform .3s var(--ease), background .3s; }
  .bars::before, .bars::after { content: ''; position: absolute; inset-inline-start: 0; }
  .bars::before { top: -5px; } .bars::after { top: 5px; }
  .menu-btn[aria-expanded='true'] .bars { background: transparent; }
  .menu-btn[aria-expanded='true'] .bars::before { transform: translateY(5px) rotate(45deg); }
  .menu-btn[aria-expanded='true'] .bars::after { transform: translateY(-5px) rotate(-45deg); }

  .nav {
    position: fixed; inset: 68px 0 0 0; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); padding: 20px var(--gutter) 36px;
    visibility: hidden; opacity: 0; clip-path: inset(0 0 100% 0);
    transition: opacity .3s var(--ease), clip-path .5s var(--ease), visibility 0s .5s;
    overflow-y: auto;
  }
  .nav-open .nav { visibility: visible; opacity: 1; clip-path: inset(0 0 0 0); transition-delay: 0s; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; font-family: var(--serif); font-size: 2rem; padding-block: 10px; border-bottom: 1px solid var(--line); }
  .nav ul a::after { display: none; }
  .nav ul a[aria-current='page'] { color: var(--red); }
  .lang { margin-top: 20px; font-size: 1.05rem; }
  .nav-open { overflow: hidden; }
}

/* ------------------------------------------------------------ hero */

.hero { position: relative; padding-block: clamp(20px, 3.5vw, 44px) clamp(28px, 4vw, 52px); }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero-copy .lede { margin-block: 1.1em 1.6em; }

.hero-media { position: relative; justify-self: center; width: min(100%, 380px); }
.arch {
  position: relative; overflow: hidden;
  border-radius: 999px 999px var(--radius) var(--radius);
  aspect-ratio: 9 / 16; max-height: 72vh; margin-inline: auto;
  background: var(--paper-2); box-shadow: var(--shadow);
}
.arch-media { width: 100%; height: 100%; object-fit: cover; }

.sun { position: absolute; border-radius: 50%; background: var(--red); z-index: -1; }
.sun-hero { width: 62%; aspect-ratio: 1; inset-inline-end: -18%; top: 6%; }
.hero-chip {
  position: absolute; inset-inline-start: -16%; bottom: 9%;
  width: 40%; border-radius: 12px; overflow: hidden;
  border: 5px solid var(--card); box-shadow: var(--shadow);
  rotate: -4deg;
}
[dir='rtl'] .hero-chip { rotate: 4deg; }

.scroll-cue { display: none; }

@media (max-width: 820px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-media { width: min(72%, 320px); margin-top: 4px; }
  .arch { max-height: none; }
}

/* ------------------------------------------------------------ ribbon */

.ribbon { border-block: 1px solid var(--line); overflow: hidden; background: var(--card); }
.ribbon-track {
  display: flex; align-items: center; gap: 26px; width: max-content;
  padding-block: 13px; font-family: var(--serif); font-size: 1.45rem; font-style: italic; color: var(--ink-2);
  animation: ribbon 60s linear infinite;
}
html[lang='ar'] .ribbon-track { font-style: normal; font-size: 1.25rem; }
.ribbon-track .sun-dot { width: 7px; height: 7px; }
@keyframes ribbon { to { transform: translateX(-25%); } }
[dir='rtl'] .ribbon-track { animation-name: ribbon-rtl; }
@keyframes ribbon-rtl { to { transform: translateX(25%); } }
@media (prefers-reduced-motion: reduce) { .ribbon-track { animation: none; } }

/* ------------------------------------------------------------ sections */

.section { padding-block: var(--section); }
.section-tight { padding-top: 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head .h2 { margin-bottom: 0; }
.section-head .muted { margin: 0; }

/* intro + collage */
.intro-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.intro-copy p { color: var(--ink-2); }
.collage { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.collage figure { overflow: hidden; border-radius: var(--radius); }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage .c1 { grid-column: 1 / 13; aspect-ratio: 16 / 9; }
.collage .c2 { grid-column: 1 / 6; aspect-ratio: 4 / 5; margin-top: -18%; margin-inline-start: -6%; border: 5px solid var(--paper); }
.collage .c3 { grid-column: 6 / 13; aspect-ratio: 3 / 2; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } .collage .c2 { margin-inline-start: 0; } }

/* gallery strip: native scroll container (touch, trackpad and arrow keys
   work without script). On wide screens the motion layer pins the section
   and drives the track sideways with the page scroll instead. */
.strip {
  --strip-pad: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-inline: var(--strip-pad); scroll-padding-inline: var(--strip-pad);
  padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.strip-track { display: flex; gap: 14px; width: max-content; }
.strip-item { flex: 0 0 clamp(210px, 21vw, 290px); scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; }
.strip-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .9s var(--ease); }
.strip-item:hover img { transform: scale(1.05); }

/* symbol (dark) */
.symbol { background: var(--night); color: var(--paper); overflow: hidden; }
.symbol .eyebrow { color: #cfc6ba; }
.symbol-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.symbol-media { position: relative; width: min(100%, 330px); justify-self: center; isolation: isolate; }
.arch-dark { box-shadow: none; }
.sun-symbol { width: 120%; aspect-ratio: 1; inset-inline-start: -10%; top: 12%; z-index: -1; }
.symbol-copy { position: relative; }
.symbol-copy p { color: #d8d0c5; max-width: 32em; font-size: 1.06rem; }
.symbol-copy .display-sm { margin-bottom: .4em; }
.symbol-words span { display: inline-block; }
.symbol-words span:nth-child(2) { color: var(--blush); font-style: italic; }
html[lang='ar'] .symbol-words span:nth-child(2) { font-style: normal; }
.symbol .link-arrow { color: var(--paper); }
.symbol .link-arrow:hover { color: var(--blush); }
.crane-line { width: 120px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; color: var(--blush); margin-bottom: 14px; display: block; }
[dir='rtl'] .crane-line { transform: scaleX(-1); }
@media (max-width: 820px) { .symbol-grid { grid-template-columns: 1fr; } .symbol-media { width: min(66%, 280px); } }

/* branches */
.branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .branches { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .branches { grid-template-columns: 1fr; } }
.branch {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .4s var(--ease), border-color .4s;
  transform-style: preserve-3d;
}
.branch:hover { box-shadow: var(--shadow); border-color: #d7cbbb; }
.branch-photo { aspect-ratio: 16 / 10; overflow: hidden; }
.branch-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.branch:hover .branch-photo img { transform: scale(1.05); }
.branch-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.branch-area { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: .3em; }
html[lang='ar'] .branch-area { letter-spacing: 0; font-size: .85rem; }
.branch h3 { font-family: var(--serif); font-size: 1.75rem; font-weight: 500; margin-bottom: .45em; line-height: 1.1; }
html[lang='ar'] .branch h3 { font-weight: 700; font-size: 1.45rem; }
.branch-line { display: flex; gap: .6em; align-items: flex-start; color: var(--ink-2); font-size: .92rem; margin-bottom: .4em; }
.branch-line .i { margin-top: .2em; color: var(--muted); }
.branch-line a { text-decoration: none; }
.branch-line a:hover { color: var(--red); }
.branch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; }

.more-note { display: flex; gap: .6em; align-items: center; color: var(--muted); margin-top: 24px; }
.more-note a { color: var(--ink); font-weight: 600; }

/* events band */
.events-band { background: var(--paper-2); }
.events-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.events-photo { border-radius: var(--radius); overflow: hidden; }
.events-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.events-copy p { color: var(--ink-2); margin-bottom: 1.3em; }
@media (max-width: 820px) { .events-grid { grid-template-columns: 1fr; } }

/* instagram */
.insta-in { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.insta-in p { margin: 0; }
.insta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.insta-tile { border-radius: 12px; overflow: hidden; display: block; }
.insta-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .9s var(--ease), filter .4s; }
.insta-tile:hover img { transform: scale(1.06); filter: saturate(1.1); }
@media (max-width: 700px) { .insta-grid { grid-template-columns: repeat(2, 1fr); } }

/* ------------------------------------------------------------ inner pages */

.page-hero { padding-block: clamp(28px, 4.5vw, 64px) clamp(20px, 3vw, 40px); }
.page-hero-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.page-hero-in:has(> :only-child) { grid-template-columns: 1fr; }
.page-hero-copy .lede { margin-top: 1em; }
.page-hero-photo { position: relative; isolation: isolate; }
.page-hero-photo .ph { overflow: hidden; box-shadow: var(--shadow); }
.page-hero-photo .ph img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-photo .ph-tall { border-radius: 999px 999px var(--radius) var(--radius); aspect-ratio: 4 / 5; max-height: 560px; margin-inline: auto; }
.page-hero-photo .ph-wide { border-radius: var(--radius); aspect-ratio: 16 / 11; }
.sun-page { width: 30%; aspect-ratio: 1; inset-inline-end: -5%; top: -7%; }
@media (max-width: 820px) { .page-hero-in { grid-template-columns: 1fr; } }

.story-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.story-copy p { font-family: var(--serif); font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.4; font-weight: 450; }
html[lang='ar'] .story-copy p { font-weight: 400; line-height: 1.9; font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
.since { display: grid; justify-items: start; gap: 2px; padding: 26px; border-radius: var(--radius); background: var(--red); color: var(--paper); }
.since-label { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
html[lang='ar'] .since-label { letter-spacing: 0; font-size: .95rem; }
.since-year { font-family: 'Cormorant Garamond', serif; font-size: clamp(3.8rem, 7vw, 5.6rem); line-height: 1; font-weight: 400; font-variant-numeric: lining-nums tabular-nums; }
.since-text { opacity: .9; }
@media (max-width: 820px) { .story-grid { grid-template-columns: 1fr; } }

.values-sec { background: var(--night); color: var(--paper); }
.values { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.values li { padding: 22px 26px; border-inline-start: 1px solid rgba(246, 242, 236, .16); }
.values li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.values h3 { font-family: var(--serif); font-size: 2.4rem; font-weight: 400; margin-bottom: .2em; }
html[lang='ar'] .values h3 { font-weight: 700; font-size: 1.9rem; }
.values p { color: #cfc6ba; margin: 0; }
.value-n { display: block; color: var(--red); font-weight: 700; font-size: .8rem; letter-spacing: .1em; margin-bottom: 12px; }
.values-sec .value-n { color: var(--blush); }
@media (max-width: 760px) {
  .values { grid-template-columns: 1fr; }
  .values li { border-inline-start: 0; border-top: 1px solid rgba(246, 242, 236, .16); padding-inline: 0; }
  .values li:first-child { border-top: 0; }
}

.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vm { padding: clamp(22px, 3vw, 36px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.vm p { color: var(--ink-2); margin: 0; }
@media (max-width: 760px) { .vm-grid { grid-template-columns: 1fr; } }

.spaces { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
.spaces figure { border-radius: var(--radius); overflow: hidden; }
.spaces img { width: 100%; height: 100%; object-fit: cover; }
.spaces .s1 { aspect-ratio: 3 / 2; }
.spaces .s2, .spaces .s3 { aspect-ratio: 4 / 5; }
.spaces .s4 { aspect-ratio: 16 / 9; }
@media (min-width: 761px) {
  .spaces { grid-template-columns: 2fr 1fr 1fr; }
  .spaces .s1, .spaces .s2, .spaces .s3 { aspect-ratio: auto; height: 360px; }
  .spaces .s4 { grid-column: 1 / 4; aspect-ratio: 21 / 8; }
}

.services { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.service { padding: clamp(22px, 3vw, 36px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.service ul { margin: 0; padding: 0; list-style: none; }
.service li { position: relative; padding-inline-start: 1.5em; margin-bottom: .7em; color: var(--ink-2); }
.service li::before { content: ''; position: absolute; inset-inline-start: 0; top: .6em; width: .5em; height: .5em; border-radius: 50%; background: var(--red); }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } }

.events-strip { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.events-strip figure { border-radius: var(--radius); overflow: hidden; height: 380px; }
.events-strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .events-strip { grid-template-columns: 1fr 1fr; } .events-strip figure { height: 240px; } .events-strip figure:first-child { grid-column: 1 / 3; } }

.cta-band-in {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--night); color: var(--paper); border-radius: calc(var(--radius) * 1.5);
  padding: clamp(36px, 5vw, 64px); text-align: center;
}
.cta-band-in p { color: #d8d0c5; max-width: 32em; margin-inline: auto; margin-bottom: 1.6em; }
.sun-cta { width: clamp(160px, 24vw, 300px); aspect-ratio: 1; inset-inline-end: -6%; top: -34%; z-index: -1; }

/* contact */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; align-items: start; }
.contact-cards { display: grid; gap: 10px; }
.contact-card {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
  padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
  transition: border-color .25s, transform .35s var(--ease);
}
.contact-card:hover { border-color: var(--red); transform: translateY(-2px); }
.contact-card .i { grid-row: 1 / 3; width: 24px; height: 24px; color: var(--red); }
.cc-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
html[lang='ar'] .cc-label { letter-spacing: 0; font-size: .88rem; }
.cc-value { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; overflow-wrap: anywhere; }
[dir='rtl'] .cc-value[dir='ltr'] { text-align: end; }

.contact-form { padding: clamp(20px, 3vw, 36px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .88rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 400 1rem/1.5 var(--sans); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(176, 40, 24, .08); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.form-error { color: var(--red-ink); font-weight: 600; margin: 0; }
.contact-form .small { margin: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.not-found { text-align: center; padding-block: clamp(64px, 10vw, 140px); position: relative; }
.not-found .wrap { display: grid; justify-items: center; gap: 16px; position: relative; isolation: isolate; }
.not-found .crane-line { color: var(--red); width: 140px; }
.sun-404 { width: clamp(140px, 22vw, 240px); aspect-ratio: 1; top: -30%; inset-inline-start: 50%; translate: -50% 0; opacity: .12; z-index: -1; }
[dir='rtl'] .sun-404 { translate: 50% 0; }

/* ------------------------------------------------------------ footer */

.site-footer { position: relative; background: var(--night); color: #d8d0c5; padding-top: clamp(36px, 4.5vw, 56px); overflow: hidden; font-size: .95rem; }
.footer-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr 1.5fr 1.1fr; gap: 24px 32px; padding-bottom: clamp(28px, 3.5vw, 44px); }
.footer-brand img { height: 36px; width: auto; margin-bottom: 12px; }
.footer-brand p { max-width: 24em; color: #a99f93; margin: 0; }
.site-footer h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 600; color: var(--paper); margin-bottom: 10px; }
html[lang='ar'] .site-footer h2 { letter-spacing: 0; font-size: .92rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
/* Nine page links: two short columns instead of one tall one. */
.footer-nav ul { grid-template-columns: repeat(2, max-content); column-gap: 28px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--blush); }
/* Wordmark sits BEHIND the columns, centred, so it adds no height.
   Latin on purpose in both languages: it is the brand mark, like the logo. */
.footer-word { position: absolute; z-index: 0; inset-inline: 0; text-align: center; bottom: 52px; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(5rem, 15vw, 13rem); line-height: .8; color: rgba(246, 242, 236, .05); user-select: none; pointer-events: none; white-space: nowrap; }
.footer-word span { display: inline-block; }
.footer-base { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-block: 14px; border-top: 1px solid rgba(246, 242, 236, .12); font-size: .8rem; color: #8d8378; position: relative; z-index: 1; }
.footer-base p { margin: 0; }
/* Keep the credit clear of the floating WhatsApp/Instagram buttons. */
@media (max-width: 1320px) { .footer-base { padding-inline-end: 84px; } }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / 3; } .footer-nav { grid-row: span 2; } }
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px 20px; }
  .footer-brand, .footer-nav { grid-column: 1 / 3; grid-row: auto; }
  .footer-nav { order: 3; } /* Visit + Say hello share a row above it */
  .footer-say a { overflow-wrap: anywhere; }
  .footer-word { display: none; } /* would sit on the copyright text */
}

.progress, .cursor, .intro { display: none; }

/* ------------------------------------------------------------ forms + careers */

.form-body { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
/* honeypot: invisible to people (and screen readers), filled in by bots */
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.contact-form { position: relative; }
.contact-form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.contact-form .check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; padding: 0; }
.contact-form .file input { padding: 9px; background: var(--card); }
.form-done { display: grid; gap: 6px; justify-items: start; padding-block: 18px; }
.form-done .sun-dot { width: 36px; height: 36px; margin-bottom: 6px; }
.form-done p { color: var(--ink-2); margin: 0; }
.apply-form { max-width: 820px; margin-inline: auto; }

.values-light li { border-inline-start-color: var(--line); }
.values-light p { color: var(--ink-2); }
.values-light h3 { font-size: 2rem; }

.jobs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 8px; }
@media (max-width: 760px) { .jobs { grid-template-columns: 1fr; } }
.job { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; }
.job h3 { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; line-height: 1.1; }
html[lang='ar'] .job h3 { font-weight: 700; font-size: 1.5rem; }
.job p { color: var(--ink-2); margin: 0; }
.job-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--red); font-weight: 600; }
.job-meta span { display: inline-flex; gap: 6px; align-items: center; }
.job .link-arrow { justify-self: start; margin-top: 6px; }
/* [hidden] must win over the display rules above */
.form-done[hidden], .form-body[hidden] { display: none; }

/* ------------------------------------------------------------ 21 Oct client round */

/* Vision / Mission: H1 type (display-sm), in capitals (Latin only) */
.vm-title { margin-bottom: .45em; text-transform: uppercase; letter-spacing: .02em; }
html[lang='ar'] .vm-title { letter-spacing: 0; }

/* Japanese philosophy: a vertical 折り鶴 mark beside the text */
.philosophy { background: var(--paper-2); overflow: hidden; }
.philosophy-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 6vw, 96px); align-items: center; }
.philosophy-mark {
  writing-mode: vertical-rl; font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif;
  font-size: clamp(3.4rem, 8vw, 7rem); line-height: 1; letter-spacing: .12em; color: var(--red); margin: 0; opacity: .9;
}
.philosophy-copy { max-width: 40em; }
.philosophy-copy p { color: var(--ink-2); }
.philosophy .crane-line { color: var(--red); }
@media (max-width: 640px) {
  .philosophy-grid { grid-template-columns: 1fr; }
  .philosophy-mark { writing-mode: horizontal-tb; font-size: 2.6rem; }
}

/* founder's message */
.founder-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.founder-grid.no-photo { grid-template-columns: 1fr; max-width: 900px; }
.founder-photo .ph { overflow: hidden; box-shadow: var(--shadow); }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }
.founder-photo .ph-tall { border-radius: 999px 999px var(--radius) var(--radius); aspect-ratio: 4 / 5; }
.founder-copy { margin: 0; }
.founder blockquote { margin: 0; padding-inline-start: 22px; border-inline-start: 2px solid var(--red); }
.founder blockquote p { font-family: var(--serif); font-size: clamp(1.25rem, 1.8vw, 1.55rem); line-height: 1.45; }
html[lang='ar'] .founder blockquote p { line-height: 1.9; font-size: clamp(1.1rem, 1.6vw, 1.35rem); }
.founder figcaption { display: grid; margin-top: 14px; padding-inline-start: 24px; }
.founder figcaption span { color: var(--muted); font-size: .9rem; }
@media (max-width: 820px) { .founder-grid { grid-template-columns: 1fr; } .founder-photo { width: min(70%, 320px); } }

/* Liwa story */
.liwa { background: var(--night); color: var(--paper); }
.liwa .eyebrow { color: #cfc6ba; }
.liwa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.liwa-copy p { color: #d8d0c5; }
.liwa .link-arrow { color: var(--paper); margin-top: 6px; }
.liwa .link-arrow:hover { color: var(--blush); }
.liwa-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.liwa-points li { padding: 20px 22px; border: 1px solid rgba(246, 242, 236, .16); border-radius: var(--radius); }
.liwa-points h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; margin-bottom: .2em; }
html[lang='ar'] .liwa-points h3 { font-weight: 700; font-size: 1.35rem; }
.liwa-points p { margin: 0; color: #cfc6ba; }
.liwa .value-n { color: var(--blush); margin-bottom: 8px; }
@media (max-width: 820px) { .liwa-grid { grid-template-columns: 1fr; } }

/* enquiry form on Locations + Events */
.enquire { background: var(--paper-2); }
.enquire-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.enquire-copy { position: sticky; top: 100px; }
.enquire-copy p { color: var(--ink-2); max-width: 30em; }
@media (max-width: 860px) { .enquire-grid { grid-template-columns: 1fr; } .enquire-copy { position: static; } }

/* products (coffee beans + accessories) */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .products { grid-template-columns: 1fr; } }
.product { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .4s var(--ease); }
.product:hover { box-shadow: var(--shadow); }
.product-photo { aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.product-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.product:hover .product-photo img { transform: scale(1.05); }
.product-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product h3 { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; line-height: 1.1; margin-bottom: .35em; }
html[lang='ar'] .product h3 { font-weight: 700; font-size: 1.4rem; }
.product-desc { color: var(--ink-2); font-size: .95rem; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.price { margin: 0; font-family: var(--serif); font-size: 1.5rem; }
.price span { font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--muted); }

.empty-card {
  display: grid; justify-items: center; gap: 14px; text-align: center;
  padding: clamp(32px, 5vw, 64px) var(--gutter); background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5);
}
.empty-card .crane-line { color: var(--red); margin: 0; }
.empty-card p { max-width: 34em; color: var(--ink-2); font-size: 1.05rem; margin: 0; }
.empty-card .cta-row { justify-content: center; }

/* blog */
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.posts-sm { margin-top: 18px; }
@media (max-width: 760px) { .posts { grid-template-columns: 1fr; } }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .4s var(--ease), border-color .4s; }
.post-card:hover { box-shadow: var(--shadow); border-color: #d7cbbb; }
.post-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.post-photo { aspect-ratio: 16 / 9; overflow: hidden; }
.post-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.post-card:hover .post-photo img { transform: scale(1.04); }
.post-body { padding: 22px; display: grid; gap: 4px; align-content: start; flex: 1; }
.post-body p:not(.branch-area) { color: var(--ink-2); }
.post-body .link-arrow { justify-self: start; }
.post-card:hover .link-arrow { color: var(--red); }

.post-head { max-width: 860px; padding-block: clamp(24px, 4vw, 56px) 20px; }
.post-head .lede { margin-top: .8em; }
.back-link { display: flex; width: fit-content; margin-bottom: 18px; font-size: .9rem; }
.post-cover { max-width: 1100px; }
.post-cover figure { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 8; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-text { max-width: 760px; padding-block: clamp(24px, 4vw, 48px) var(--section); font-size: 1.08rem; line-height: 1.75; }
.post-text p { color: var(--ink-2); margin-bottom: 1.1em; }
.post-text .h3 { margin-top: 1.4em; }
html[lang='ar'] .post-text { font-size: 1.12rem; line-height: 1.95; }

/* floating WhatsApp + Instagram (bottom-right; bottom-left in Arabic) */
.float-social { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 45; display: grid; gap: 10px; }
.fs-btn {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  color: #fff; text-decoration: none; box-shadow: 0 6px 18px -6px rgba(27, 24, 21, .45);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.fs-btn .i { width: 26px; height: 26px; stroke-width: 1.8; }
.fs-btn:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 24px -8px rgba(27, 24, 21, .5); }
.fs-wa { background: #25d366; }
.fs-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.nav-open .float-social { display: none; }
@media (max-width: 560px) { .float-social { inset-inline-end: 12px; bottom: 12px; } .fs-btn { width: 48px; height: 48px; } }
@media print { .float-social { display: none; } }
