/* =============================================================
   STUDIO RASHFAH — ستوديو رشفة
   Handmade ceramics. Warm, tactile, modern gallery.
   Palette pulled from her own glazes: oat clay, glaze blue,
   matcha, terracotta.
   ============================================================= */

:root {
  --paper:      #F7F2EA;   /* oat clay body      */
  --paper-2:    #EFE7DA;   /* deeper clay        */
  --ink:        #3A2E25;   /* clay brown ink     */
  --ink-2:      #6B5B4E;
  --muted:      #9A8A7B;
  --glaze:      #3E718C;   /* drippy blue rim    */
  --glaze-deep: #2B5468;
  --matcha:     #8AA657;
  --terra:      #C0714B;
  --line:       #E0D5C4;

  --f-display: "Instrument Serif", Georgia, serif;   /* modern editorial serif */
  --f-body:    "Inter", system-ui, sans-serif;
  --maxw: 1240px;
}
html[lang="ar"] {
  --f-display: "Tajawal", system-ui, sans-serif;     /* clean modern Arabic */
  --f-body:    "Tajawal", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* bilingual */
[data-lang] { display: none; }
html[lang="en"] [data-lang="en"] { display: revert; }
html[lang="ar"] [data-lang="ar"] { display: revert; }
html[lang="ar"] body { line-height: 1.9; }
/* Arabic must never be letter-spaced — it breaks cursive joining */
html[lang="ar"] .eyebrow, html[lang="ar"] .btn, html[lang="ar"] .nav__links a,
html[lang="ar"] .lang-toggle, html[lang="ar"] .steps__n, html[lang="ar"] .foot__links,
html[lang="ar"] figcaption, html[lang="ar"] .sec-head p { letter-spacing: normal; text-transform: none; }

/* paper grain */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- NAV ---------------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 28px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; }
.nav__mark { color: var(--ink); display: flex; }
.nav__name { font-family: var(--f-display); font-size: 1.1rem; font-weight: 600; letter-spacing: .01em; }
.nav__links { display: flex; gap: 26px; }
.nav__links a { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); transition: color .2s; }
.nav__links a:hover { color: var(--glaze); }
.nav__back { color: var(--muted) !important; }
.lang-toggle {
  font-family: var(--f-body); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 9px 15px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  border-radius: 999px; cursor: pointer; transition: .2s;
}
.lang-toggle:hover { background: var(--ink); color: var(--paper); }

/* ---------------- SHARED ---------------- */
.eyebrow {
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 20px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px; border-radius: 999px; border: 1px solid var(--ink);
  font-size: .84rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  transition: transform .2s, background .25s, color .25s, border-color .25s;
  min-height: 50px;
}
.btn:hover { transform: translateY(-2px); background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--glaze); border-color: var(--glaze); }

.sec-head { max-width: var(--maxw); margin: 0 auto clamp(28px, 5vh, 56px); }
.sec-head h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: -.02em; }
.sec-head p { color: var(--ink-2); margin-top: 12px; max-width: 46ch; }

/* ---------------- HERO ---------------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(40px, 8vh, 90px) clamp(18px, 4vw, 48px) clamp(40px, 7vh, 80px);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: center;
}
.hero__title {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 5.4rem); line-height: 1.02; letter-spacing: -.03em;
}
.hero__title em { color: var(--glaze); font-style: italic; }
html[lang="ar"] .hero__title { font-weight: 600; letter-spacing: normal; font-size: clamp(2.4rem, 7vw, 4.4rem); }
.hero__lede { color: var(--ink-2); font-size: 1.08rem; max-width: 44ch; margin: 24px 0 32px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__img { position: relative; }
.hero__img img {
  width: 100%; border-radius: 260px 260px 20px 20px;
  box-shadow: 0 40px 80px -50px rgba(58,46,37,.6);
}
.hero__img figcaption {
  position: absolute; bottom: 18px; inset-inline-start: 50%; transform: translateX(-50%);
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px);
  padding: 8px 16px; border-radius: 999px; font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-2); white-space: nowrap;
}

/* ---------------- MARQUEE ---------------- */
/* static ribbon — one centred line, no motion */
.marquee {
  border-block: 1px solid var(--line); background: var(--paper-2);
  overflow: hidden; padding: 16px clamp(16px, 4vw, 40px);
  text-align: center;
}
.marquee__track { display: none; }
html[lang="en"] .marquee__track[data-lang="en"],
html[lang="ar"] .marquee__track[data-lang="ar"] { display: block; }
.marquee__track span {
  font-family: var(--f-display); font-size: clamp(.95rem, 2vw, 1.35rem); font-weight: 300;
  color: var(--ink-2); white-space: normal;
}
.marquee__track span + span { display: none; }   /* the duplicate line was only for the old animation */

/* ---------------- MANIFESTO ---------------- */
.manifesto {
  max-width: 860px; margin: 0 auto;
  padding: clamp(70px, 14vh, 150px) clamp(18px, 4vw, 48px);
  text-align: center; position: relative;
}
.manifesto h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.9rem, 4.8vw, 3.2rem); line-height: 1.14; letter-spacing: -.01em;
  max-width: 20ch; margin-inline: auto;
}
html[lang="ar"] .manifesto h2 { font-weight: 500; letter-spacing: normal; line-height: 1.45; max-width: 24ch; }
.manifesto__body { color: var(--ink-2); margin-top: 24px; font-size: 1.05rem; line-height: 1.8; max-width: 58ch; margin-inline: auto; }
html[lang="ar"] .manifesto__body { font-size: 1.08rem; line-height: 2; }
.manifesto__body em { color: var(--terra); font-style: normal; font-weight: 500; }

/* ---------------- GALLERY ---------------- */
.work { max-width: var(--maxw); margin: 0 auto; padding: clamp(30px, 6vh, 60px) clamp(18px, 4vw, 48px) clamp(60px, 10vh, 110px); }
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 20px); grid-auto-flow: dense;
}
.tile {
  position: relative; overflow: hidden; border-radius: 14px;
  background: var(--paper-2); cursor: pointer; aspect-ratio: 4 / 5;
}
.tile--tall { grid-row: span 2; aspect-ratio: 4 / 6.6; }
.tile--wide { grid-column: span 2; aspect-ratio: 16 / 10; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.3,1), filter .4s; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.06); }
.tile figcaption {
  position: absolute; inset-inline-start: 14px; bottom: 14px;
  background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(6px);
  padding: 7px 14px; border-radius: 999px;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  opacity: 0; transform: translateY(6px); transition: .3s;
}
.tile:hover figcaption, .tile:focus-visible figcaption { opacity: 1; transform: none; }
.work__more { margin-top: 34px; color: var(--ink-2); font-size: 1rem; }
.work__more a { color: var(--glaze); border-bottom: 1px solid currentColor; margin-inline-start: 6px; }

/* cursor bubble */
.cursor-bubble {
  position: fixed; z-index: 80; top: 0; left: 0; pointer-events: none;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  transform: translate(-50%, -50%) scale(0); transition: transform .25s ease;
}
.cursor-bubble.is-on { transform: translate(-50%, -50%) scale(1); }

/* ---------------- PROCESS ---------------- */
.process { background: var(--paper-2); border-block: 1px solid var(--line); padding: clamp(60px, 10vh, 110px) clamp(18px, 4vw, 48px); }
.process .sec-head, .process__grid { max-width: var(--maxw); margin-inline: auto; }
.process__grid { display: grid; grid-template-columns: 1fr .9fr; gap: clamp(28px, 5vw, 70px); align-items: start; }
.steps { list-style: none; display: grid; gap: 30px; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: baseline; }
.steps__n { font-family: var(--f-display); font-size: 1.1rem; color: var(--terra); letter-spacing: .06em; }
.steps h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.35rem; }
.steps p { grid-column: 2; color: var(--ink-2); font-size: .99rem; }
.video { position: relative; border-radius: 16px; overflow: hidden; background: var(--ink); }
.video video { width: 100%; max-height: 620px; object-fit: cover; }
.video__play {
  position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content;
  display: flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 16px 40px -18px rgba(0,0,0,.6); transition: transform .2s, background .2s;
}
.video__play:hover { transform: scale(1.05); background: var(--glaze); color: var(--paper); }
.video.is-playing .video__play { display: none; }

/* ---------------- CTA ---------------- */
.cta { padding: clamp(70px, 12vh, 140px) clamp(18px, 4vw, 48px); text-align: center; }
.cta__inner { max-width: 720px; margin: 0 auto; }
.cta h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.06; letter-spacing: -.02em; }
html[lang="ar"] .cta h2 { font-weight: 600; letter-spacing: normal; }
.cta p { color: var(--ink-2); margin: 20px auto 32px; max-width: 50ch; font-size: 1.05rem; }
.cta__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------------- FOOTER ---------------- */
.foot {
  border-top: 1px solid var(--line); padding: 44px clamp(18px, 4vw, 48px) 90px;
  display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin-inline: auto;
}
.foot__mark { font-family: var(--f-display); font-size: .92rem; letter-spacing: .08em; }
.foot__links { list-style: none; display: flex; gap: 22px; }
.foot__links a { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); transition: color .2s; }
.foot__links a:hover { color: var(--glaze); }
.foot__note { font-size: .78rem; color: var(--muted); letter-spacing: .08em; }

/* sticky mobile CTA */
.sticky-cta { display: none; position: fixed; z-index: 65; bottom: 0; left: 0; right: 0; border-top: 1px solid var(--line); }
.sticky-cta a {
  flex: 1; text-align: center; padding: 15px 8px; font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase; background: var(--paper); color: var(--ink);
}
.sticky-cta a:first-child { background: var(--ink); color: var(--paper); }

/* ---------------- LIGHTBOX ---------------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: clamp(14px, 4vw, 50px);
}
.lb[hidden] { display: none; }
.lb__figure { display: grid; place-items: center; gap: 14px; max-height: 100%; }
.lb__figure img { max-height: 78vh; width: auto; border-radius: 10px; }
.lb__figure figcaption { color: var(--paper); font-size: .82rem; letter-spacing: .06em; text-align: center; opacity: .85; }
.lb__nav, .lb__close {
  background: transparent; border: 0; color: var(--paper); cursor: pointer;
  font-size: 2.4rem; line-height: 1; padding: 10px 14px; opacity: .7; transition: opacity .2s;
}
.lb__nav:hover, .lb__close:hover { opacity: 1; }
.lb__close { position: absolute; top: 14px; inset-inline-end: 18px; font-size: 2.6rem; }

/* ---------------- REVEALS ---------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------- FOCUS ---------------- */
:focus-visible { outline: 2px solid var(--glaze); outline-offset: 3px; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero__img { order: -1; max-width: 460px; margin-inline: auto; }
  .hero__img img { border-radius: 200px 200px 16px 16px; }
  .process__grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tile--wide { grid-column: span 2; }
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .tile, .tile--tall, .tile--wide { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 5; }
  .hero__cta .btn, .cta__btns .btn { width: 100%; }
  .sticky-cta { display: flex; }
  .foot { padding-bottom: 110px; }
  .cursor-bubble { display: none; }
}

/* ---------------- REDUCED MOTION ---------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .tile figcaption { opacity: 1; transform: none; }
}
