/* ===========================================================
   Sefsafi — "Studio 3D" theme
   Loaded only when site.theme === 'studio3d'. Fully self-contained:
   it never touches assets/css/style.css, so dark / light / vibrant
   keep behaving exactly as before.
   Mobile-first · LTR + RTL · Arabic type variant · reduced motion
   =========================================================== */

/* ---------------------------------------------------- tokens */
:root{
  --s3-bg:      #0C0C0C;
  --s3-bg-2:    #141418;
  --s3-ink:     #D7E2EA;
  --s3-grad-a:  #646973;
  --s3-grad-b:  #BBCCD7;
  --s3-line:    rgba(215,226,234,.16);
  --s3-radius:  40px;
  --s3-pad-x:   1.5rem;
  --s3-font:    "Kanit", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --s3-ease:    cubic-bezier(.25,.1,.25,1);

  --s3-btn:        linear-gradient(123deg,#18011F 7%,#B600A8 37%,#7621B0 72%,#BE4C00 100%);
  --s3-btn-shadow: 0 4px 4px rgba(181,1,167,.25), 4px 4px 12px #7721B1 inset;
  --s3-focus:      #B600A8;
}
@media (min-width:640px){ :root{ --s3-radius:50px; } }
@media (min-width:768px){ :root{ --s3-radius:60px; --s3-pad-x:2.5rem; } }

/* A custom accent from Appearance rebuilds the CTA gradient so the
   button still belongs to the brand instead of ignoring the picker. */
html[data-accent="1"]{
  --s3-btn: linear-gradient(123deg,
              color-mix(in srgb, var(--accent) 18%, #10000f) 7%,
              var(--accent) 40%,
              color-mix(in srgb, var(--accent) 65%, #7621B0) 72%,
              color-mix(in srgb, var(--accent) 55%, #BE4C00) 100%);
  --s3-btn-shadow: 0 4px 4px color-mix(in srgb, var(--accent) 30%, transparent),
                   4px 4px 12px color-mix(in srgb, var(--accent) 70%, #7721B1) inset;
  --s3-focus: var(--accent);
}

/* Arabic: no uppercase, no tracking (it breaks letter joining), looser leading. */
html[lang="ar"]{ --s3-font:"Tajawal", system-ui, sans-serif; }

/* ----------------------------------------------------- reset */
*,*::before,*::after{ box-sizing:border-box; }
*{ margin:0; padding:0; }
html,body{ background:var(--s3-bg); }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  font-family:var(--s3-font); color:var(--s3-ink);
  -webkit-font-smoothing:antialiased; line-height:1.5;
}
img,svg{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer; }
:focus-visible{ outline:2px solid var(--s3-focus); outline-offset:4px; border-radius:6px; }
::selection{ background:var(--s3-focus); color:#fff; }

.s3-wrap{ overflow-x:hidden; overflow-x:clip; background:var(--s3-bg); }

.s3-skip{
  position:absolute; inset-inline-start:12px; top:-60px; z-index:200;
  background:var(--s3-focus); color:#fff; padding:10px 16px; border-radius:8px; transition:top .25s;
}
.s3-skip:focus{ top:12px; }

.s3-banner{
  position:relative; z-index:60; background:#B600A8; color:#fff;
  font-size:.8rem; padding:10px 16px; text-align:center;
}
.s3-banner a{ text-decoration:underline; }

/* gradient display type */
.s3-grad{
  background:linear-gradient(180deg,var(--s3-grad-a) 0%,var(--s3-grad-b) 100%);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
}

.s3-display{
  font-weight:900; text-transform:uppercase; letter-spacing:-.025em;
  line-height:.9; text-align:center; font-size:clamp(2.6rem,12vw,160px);
}
/* Arabic ascenders (hamza, madda) sit above the Latin cap height — give the
   line box room or the tops get shaved off. */
html[lang="ar"] .s3-display{
  text-transform:none; letter-spacing:0; line-height:1.45;
  font-size:clamp(2.1rem,8vw,104px); padding-block:.06em;
}

.s3-kicker{
  text-transform:uppercase; letter-spacing:.22em; font-size:.7rem; font-weight:300;
  opacity:.55; text-align:center; margin-bottom:1rem;
}
html[lang="ar"] .s3-kicker{ text-transform:none; letter-spacing:0; }

/* -------------------------------------------------- fade-ins */
[data-fade]{
  opacity:0; transform:translate3d(var(--fx,0px),var(--fy,30px),0);
  transition:opacity var(--fd,.7s) var(--s3-ease) var(--fdl,0s),
             transform var(--fd,.7s) var(--s3-ease) var(--fdl,0s);
  will-change:opacity,transform;
}
[data-fade].in{ opacity:1; transform:translate3d(0,0,0); }

/* --------------------------------------------------- buttons */
.s3-btn{
  display:inline-block; border-radius:999px;
  background:var(--s3-btn); box-shadow:var(--s3-btn-shadow);
  outline:2px solid #fff; outline-offset:-3px;
  color:#fff; font-weight:500; text-transform:uppercase; letter-spacing:.1em;
  padding:.75rem 2rem; font-size:.75rem; white-space:nowrap; text-align:center;
  transition:transform .25s var(--s3-ease), filter .25s var(--s3-ease);
}
.s3-btn:hover{ transform:translateY(-2px); filter:brightness(1.12); }
.s3-btn-block{ display:block; width:100%; padding-block:1rem; }
html[lang="ar"] .s3-btn{ text-transform:none; letter-spacing:0; }
@media (min-width:640px){ .s3-btn{ padding:.875rem 2.5rem; font-size:.875rem; } }
@media (min-width:768px){ .s3-btn{ padding:1rem 3rem; font-size:1rem; } }

.s3-ghost{
  display:inline-block; border-radius:999px; border:2px solid var(--s3-ink);
  color:var(--s3-ink); font-weight:500; text-transform:uppercase; letter-spacing:.1em;
  padding:.7rem 1.6rem; font-size:.78rem; white-space:nowrap;
  transition:background-color .25s var(--s3-ease);
}
.s3-ghost:hover{ background:rgba(215,226,234,.10); }
html[lang="ar"] .s3-ghost{ text-transform:none; letter-spacing:0; }
@media (min-width:768px){ .s3-ghost{ padding:.875rem 2.5rem; font-size:1rem; } }

/* ====================================================== HERO */
.s3-hero{
  min-height:100svh; display:flex; flex-direction:column; position:relative;
  overflow-x:hidden; overflow-x:clip;
}

.s3-nav{
  display:flex; align-items:center; gap:1rem;
  padding:1.5rem var(--s3-pad-x) 0; position:relative; z-index:40;
}
@media (min-width:768px){ .s3-nav{ padding-top:2rem; gap:2rem; } }

.s3-logo{
  font-weight:900; text-transform:uppercase; letter-spacing:.02em;
  font-size:1rem; color:var(--s3-ink); flex:0 0 auto;
}
html[lang="ar"] .s3-logo{ text-transform:none; }
@media (min-width:768px){ .s3-logo{ font-size:1.25rem; } }

.s3-nav-links{ display:none; }
@media (min-width:900px){
  .s3-nav-links{
    display:flex; flex:1 1 auto; justify-content:space-evenly; align-items:center; gap:1rem;
  }
}
.s3-nav-links a, .s3-drawer a{
  color:var(--s3-ink); font-weight:500; text-transform:uppercase; letter-spacing:.05em;
  font-size:1.05rem; transition:opacity .2s var(--s3-ease);
}
.s3-nav-links a:hover, .s3-drawer a:hover{ opacity:.7; }
html[lang="ar"] .s3-nav-links a, html[lang="ar"] .s3-drawer a{ text-transform:none; letter-spacing:0; }
@media (min-width:1024px){ .s3-nav-links a{ font-size:1.4rem; } }

.s3-nav-end{ display:flex; align-items:center; gap:.75rem; margin-inline-start:auto; }
@media (min-width:900px){ .s3-nav-end{ margin-inline-start:0; } }

.s3-lang{ display:flex; gap:.4rem; align-items:center; }
.s3-lang a{
  font-size:.72rem; font-weight:500; letter-spacing:.08em; opacity:.5;
  padding:.25rem .45rem; border-radius:999px; transition:opacity .2s, background-color .2s;
}
.s3-lang a:hover{ opacity:.9; }
.s3-lang a.on{ opacity:1; background:rgba(215,226,234,.12); }

.s3-burger{
  width:40px; height:40px; display:grid; place-content:center; gap:6px;
  border-radius:999px; border:1px solid var(--s3-line);
}
.s3-burger span{ display:block; width:18px; height:2px; background:var(--s3-ink); border-radius:2px; transition:transform .3s var(--s3-ease); }
body.s3-menu .s3-burger span:first-child{ transform:translateY(4px) rotate(45deg); }
body.s3-menu .s3-burger span:last-child{ transform:translateY(-4px) rotate(-45deg); }
@media (min-width:900px){ .s3-burger{ display:none; } }

.s3-drawer{
  position:fixed; inset:0; z-index:90; background:rgba(12,12,12,.97);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1.5rem;
  font-size:1.4rem;
}
.s3-drawer[hidden]{ display:none; }

/* clip horizontally (the headline is deliberately full-bleed) but let
   ascenders/descenders breathe vertically */
.s3-title-clip{ overflow:hidden; overflow:clip; overflow-y:visible; width:100%; margin-top:1.5rem; }
@media (min-width:640px){ .s3-title-clip{ margin-top:1rem; } }
@media (min-width:768px){ .s3-title-clip{ margin-top:1.5rem; } }

.s3-h1{
  font-weight:900; text-transform:uppercase; letter-spacing:-.025em; line-height:.86;
  width:100%; text-align:center;
}
/* Each line is measured and sized by JS so it spans the full width. */
.s3-line{ display:block; white-space:nowrap; width:100%; font-size:13vw; }
@media (min-width:768px){ .s3-line{ font-size:15vw; } }

/* Arabic keeps a large but wrapping headline: Arabic has no uppercase,
   letter-spacing breaks the joins, and stretching it edge-to-edge makes
   the diacritics collide. */
html[lang="ar"] .s3-h1{ text-transform:none; letter-spacing:0; line-height:1.35; }
html[lang="ar"] .s3-line{ white-space:normal; font-size:clamp(1.9rem,6.5vw,76px); }

.s3-hero-spacer{ flex:1 1 auto; min-height:3rem; }

.s3-hero-bottom{
  display:flex; justify-content:space-between; align-items:flex-end; gap:1rem;
  padding:0 var(--s3-pad-x) 1.75rem; position:relative; z-index:20;
}
@media (min-width:640px){ .s3-hero-bottom{ padding-bottom:2rem; } }
@media (min-width:768px){ .s3-hero-bottom{ padding-bottom:2.5rem; } }

/* On narrow phones the lead + CTA side by side squeezes both, so stack them. */
@media (max-width:559px){
  .s3-hero-bottom{ flex-direction:column; align-items:stretch; gap:1.25rem; }
  .s3-hero-bottom .s3-btn{ width:100%; }
  .s3-portrait{ width:min(calc(78vw * var(--pscale)), 400px); top:42%; }
}
.s3-hero-left{ display:flex; flex-direction:column; gap:1rem; }
.s3-tag{
  color:var(--s3-ink); font-weight:300; text-transform:uppercase;
  letter-spacing:.025em; line-height:1.375;
  font-size:clamp(.75rem,1.4vw,1.5rem); max-width:170px;
}
@media (max-width:559px){ .s3-tag{ max-width:none; } }
html[lang="ar"] .s3-tag{ text-transform:none; letter-spacing:0; }
@media (min-width:640px){ .s3-tag{ max-width:230px; } }
@media (min-width:768px){ .s3-tag{ max-width:280px; } }

.s3-stats{ display:none; gap:1.75rem; }
@media (min-width:768px){ .s3-stats{ display:flex; } }
.s3-stat b{ display:block; font-weight:900; font-size:1.6rem; line-height:1; }
.s3-stat span{ display:block; font-weight:300; font-size:.7rem; opacity:.55; text-transform:uppercase; letter-spacing:.12em; margin-top:.35rem; }
html[lang="ar"] .s3-stat span{ text-transform:none; letter-spacing:0; }

.s3-portrait{
  --pscale:1;
  position:absolute; inset-inline-start:50%; translate:-50% -50%; top:50%;
  z-index:10; width:calc(270px * var(--pscale)); pointer-events:none;
}
.s3-p-sm{ --pscale:.8 } .s3-p-md{ --pscale:1 } .s3-p-lg{ --pscale:1.25 } .s3-p-xl{ --pscale:1.5 }

/* THE BLEND, and why it is on this element and not on the <img>:
   mix-blend-mode only blends with the backdrop of the *parent* stacking context.
   `.s3-magnet` has `will-change:transform`, which makes it a stacking context —
   so a blend on the <img> inside would be isolated to the magnet and do nothing
   visible. Put it here and the portrait blends against the hero, headline included.
   `lighten` keeps max(page, portrait): a pure-black studio background is darker
   than #0C0C0C, so it disappears completely and the type shows through, exactly
   like a cut-out — with none of the ragged edges background removal gives you. */
.s3-portrait[data-blend="lighten"]{ mix-blend-mode:lighten; }

.s3-magnet{ transform:translate3d(0,0,0); will-change:transform; }
.s3-portrait img{
  width:auto; max-width:100%; height:auto; margin-inline:auto;
  max-height:calc(58svh * var(--pscale));
}
/* Without the blend the image is an opaque rectangle, so feather its top edge
   rather than letting it slice through the headline. */
.s3-portrait[data-blend="none"] img{
  -webkit-mask-image:linear-gradient(180deg, transparent 0%, #000 11%);
          mask-image:linear-gradient(180deg, transparent 0%, #000 11%);
}
.s3-portrait-ph{
  width:100%; aspect-ratio:4/5; border-radius:var(--s3-radius);
  background:radial-gradient(120% 90% at 50% 20%, rgba(182,0,168,.35), transparent 62%),
             linear-gradient(160deg,#1a1a20,#0e0e12);
  border:1px solid var(--s3-line);
}
@media (min-width:640px){ .s3-portrait{ width:calc(360px * var(--pscale)); top:auto; bottom:0; translate:-50% 0; } }
@media (min-width:768px){ .s3-portrait{ width:calc(440px * var(--pscale)); } }
@media (min-width:1024px){ .s3-portrait{ width:calc(520px * var(--pscale)); } }
html[dir="rtl"] .s3-portrait{ translate:50% -50%; }
@media (min-width:640px){ html[dir="rtl"] .s3-portrait{ translate:50% 0; } }

/* =================================================== MARQUEE */
.s3-marquee{ background:var(--s3-bg); padding:6rem 0 2.5rem; overflow:hidden; }
@media (min-width:640px){ .s3-marquee{ padding-top:8rem; } }
@media (min-width:768px){ .s3-marquee{ padding-top:10rem; } }

.s3-mq-rows{ display:flex; flex-direction:column; gap:.75rem; }
.s3-mq-row{ display:flex; gap:.75rem; width:max-content; will-change:transform; }
.s3-tile{
  flex:0 0 auto; width:clamp(200px,30vw,420px); aspect-ratio:420/270;
  border-radius:1rem; overflow:hidden; background:var(--s3-bg-2);
}
.s3-tile img{ width:100%; height:100%; object-fit:cover; }

.s3-mq-text{ overflow:hidden; border-block:1px solid var(--s3-line); padding:1.25rem 0; }
.s3-mq-track{ display:flex; width:max-content; animation:s3-slide 26s linear infinite; }
.s3-mq-track span{
  padding-inline-end:2rem; white-space:nowrap; font-weight:300;
  text-transform:uppercase; letter-spacing:.18em; opacity:.5; font-size:.95rem;
}
@keyframes s3-slide{ from{ transform:translateX(0) } to{ transform:translateX(-50%) } }

/* ===================================================== ABOUT */
.s3-about{
  position:relative; min-height:100svh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; padding:5rem 1.25rem; overflow:hidden;
}
@media (min-width:640px){ .s3-about{ padding-inline:2rem; } }
@media (min-width:768px){ .s3-about{ padding-inline:2.5rem; } }

.s3-blob{ position:absolute; border-radius:50%; filter:blur(90px); opacity:.20; pointer-events:none; z-index:0; }
.s3-blob-a{ width:44vw; height:44vw; background:#B600A8; top:-8%; inset-inline-start:-10%; }
.s3-blob-b{ width:38vw; height:38vw; background:#BE4C00; bottom:-10%; inset-inline-end:-8%; }
html[data-accent="1"] .s3-blob-a{ background:var(--accent); }
html[data-accent="1"] .s3-blob-b{ background:color-mix(in srgb, var(--accent) 60%, #BE4C00); }

.s3-deco{ position:absolute; z-index:0; pointer-events:none; user-select:none; }
.s3-deco img{
  width:100%; height:100%; object-fit:cover;
  border-radius:24px; opacity:.85;
  -webkit-mask-image:radial-gradient(120% 120% at 50% 50%, #000 55%, transparent 100%);
          mask-image:radial-gradient(120% 120% at 50% 50%, #000 55%, transparent 100%);
}
.s3-deco-tl{ width:110px; aspect-ratio:1; top:3%;    inset-inline-start:1%; }
.s3-deco-tr{ width:110px; aspect-ratio:1; top:3%;    inset-inline-end:1%; }
.s3-deco-bl{ width:96px;  aspect-ratio:1; bottom:6%; inset-inline-start:3%; }
.s3-deco-br{ width:120px; aspect-ratio:1; bottom:6%; inset-inline-end:3%; }
@media (min-width:640px){
  .s3-deco-tl,.s3-deco-tr{ width:150px; }
  .s3-deco-bl{ width:130px; } .s3-deco-br{ width:160px; }
  .s3-deco-tl,.s3-deco-tr{ inset-inline-start:auto; }
  .s3-deco-tl{ inset-inline-start:2%; } .s3-deco-tr{ inset-inline-end:2%; }
  .s3-deco-bl{ inset-inline-start:6%; } .s3-deco-br{ inset-inline-end:6%; }
}
@media (min-width:768px){
  .s3-deco-tl,.s3-deco-tr{ width:200px; }
  .s3-deco-bl{ width:170px; } .s3-deco-br{ width:210px; }
  .s3-deco-tl{ inset-inline-start:4%; } .s3-deco-tr{ inset-inline-end:4%; }
  .s3-deco-bl{ inset-inline-start:10%; } .s3-deco-br{ inset-inline-end:10%; }
}

.s3-about-in{
  position:relative; z-index:1; display:flex; flex-direction:column;
  align-items:center; gap:2.5rem; max-width:760px;
}
@media (min-width:640px){ .s3-about-in{ gap:3.5rem; } }
@media (min-width:768px){ .s3-about-in{ gap:4rem; } }

.s3-about-copy{
  color:var(--s3-ink); font-weight:500; text-align:center; line-height:1.625;
  max-width:560px; font-size:clamp(1rem,2vw,1.35rem);
}
.s3-about-copy .w{ display:inline-block; white-space:nowrap; }
.s3-about-copy .c{ opacity:.2; transition:opacity .12s linear; }
html[lang="ar"] .s3-about-copy{ line-height:2; }

.s3-points{ display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center; position:relative; z-index:1; }
.s3-chip{
  border:1px solid var(--s3-line); border-radius:999px; padding:.45rem 1rem;
  font-size:.75rem; font-weight:300; opacity:.75;
}

.s3-about-cta{ margin-top:2.5rem; position:relative; z-index:1; }
@media (min-width:640px){ .s3-about-cta{ margin-top:3.5rem; } }
@media (min-width:768px){ .s3-about-cta{ margin-top:5rem; } }

/* ================================================== SERVICES */
.s3-services{
  background:#fff; color:#0C0C0C; position:relative; z-index:1;
  border-start-start-radius:var(--s3-radius); border-start-end-radius:var(--s3-radius);
  padding:5rem 1.25rem;
}
@media (min-width:640px){ .s3-services{ padding:6rem 2rem; } }
@media (min-width:768px){ .s3-services{ padding:8rem 2.5rem; } }
.s3-services .s3-display{ color:#0C0C0C; }
.s3-services-sub{
  text-align:center; max-width:640px; margin:1.25rem auto 0;
  font-weight:300; opacity:.6; font-size:clamp(.9rem,1.6vw,1.15rem);
}
.s3-svc-list{ max-width:64rem; margin:4rem auto 0; }
@media (min-width:640px){ .s3-svc-list{ margin-top:5rem; } }
@media (min-width:768px){ .s3-svc-list{ margin-top:7rem; } }

.s3-svc{ display:flex; align-items:flex-start; gap:1.25rem; padding:2rem 0; border-top:1px solid rgba(12,12,12,.15); }
.s3-svc:last-child{ border-bottom:1px solid rgba(12,12,12,.15); }
@media (min-width:640px){ .s3-svc{ padding:2.5rem 0; gap:2rem; } }
@media (min-width:768px){ .s3-svc{ padding:3rem 0; gap:2.5rem; } }

.s3-svc-num{ font-weight:900; line-height:.85; font-size:clamp(2.6rem,10vw,140px); flex:0 0 auto; }
.s3-svc-body{ display:flex; flex-direction:column; gap:.5rem; padding-top:.35em; }
.s3-svc-name{ font-weight:500; text-transform:uppercase; font-size:clamp(1rem,2.2vw,2.1rem); line-height:1.1; }
html[lang="ar"] .s3-svc-name{ text-transform:none; }
.s3-svc-desc{ font-weight:300; line-height:1.625; max-width:42rem; opacity:.6; font-size:clamp(.85rem,1.6vw,1.25rem); }

/* ================================================== PROJECTS */
.s3-projects{
  background:var(--s3-bg); position:relative; z-index:10;
  border-start-start-radius:var(--s3-radius); border-start-end-radius:var(--s3-radius);
  margin-top:-2.5rem; padding:5rem 1.25rem 0;
}
@media (min-width:640px){ .s3-projects{ margin-top:-3rem; padding-inline:2rem; } }
@media (min-width:768px){ .s3-projects{ margin-top:-3.5rem; padding-inline:2.5rem; } }
.s3-projects .s3-display{ margin-bottom:3rem; }

.s3-stack{ max-width:1400px; margin-inline:auto; }
.s3-slot{ height:100vh; --stick:5.5rem; }
@media (min-width:768px){ .s3-slot{ --stick:7rem; } }
.s3-card{
  position:sticky; top:calc(var(--stick) + var(--nudge,0px));
  border-radius:var(--s3-radius); border:2px solid var(--s3-ink);
  background:var(--s3-bg); padding:1rem; transform-origin:top center; will-change:transform;
}
@media (min-width:640px){ .s3-card{ padding:1.5rem; } }
@media (min-width:768px){ .s3-card{ padding:2rem; } }

.s3-card-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }
.s3-card-num{ font-weight:900; line-height:.8; font-size:clamp(2.2rem,7vw,110px); }
.s3-card-meta{ display:flex; flex-direction:column; gap:.25rem; justify-content:flex-end; flex:1 1 auto; padding-bottom:.4rem; min-width:0; }
.s3-card-cat{ font-size:.7rem; text-transform:uppercase; letter-spacing:.18em; font-weight:300; opacity:.55; }
html[lang="ar"] .s3-card-cat{ text-transform:none; letter-spacing:0; }
.s3-card-name{ font-weight:500; text-transform:uppercase; line-height:1.05; font-size:clamp(1rem,2.4vw,2.1rem); }
html[lang="ar"] .s3-card-name{ text-transform:none; }

.s3-card-grid{ display:grid; grid-template-columns:40fr 60fr; gap:.75rem; align-items:stretch; }
.s3-card-col{ display:flex; flex-direction:column; gap:.75rem; }
/* The image is absolutely placed so its intrinsic height never drives the
   card: the two stacked shots set the row height, the tall one fills it. */
.s3-shot{ border-radius:var(--s3-radius); overflow:hidden; background:var(--s3-bg-2); position:relative; }
.s3-shot img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.s3-shot-a{ height:clamp(110px, min(34vw,19vh), 230px); }
.s3-shot-b{ height:clamp(150px, min(46vw,27vh), 340px); }
.s3-shot-tall{ flex:1 1 auto; min-height:0; }

/* =============================================== PHOTOGRAPHY */
.s3-photo{ background:var(--s3-bg); padding:6rem 1.25rem 2rem; }
@media (min-width:640px){ .s3-photo{ padding-inline:2rem; } }
@media (min-width:768px){ .s3-photo{ padding:8rem 2.5rem 3rem; } }
.s3-photo-sub{ text-align:center; max-width:620px; margin:1.25rem auto 0; font-weight:300; opacity:.55; font-size:clamp(.9rem,1.6vw,1.15rem); }
.s3-gallery{
  max-width:1400px; margin:3.5rem auto 0;
  display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr)); gap:.75rem;
}
.s3-gphoto{ position:relative; border-radius:var(--s3-radius); overflow:hidden; aspect-ratio:4/5; background:var(--s3-bg-2); }
.s3-gphoto img{ width:100%; height:100%; object-fit:cover; transition:transform .6s var(--s3-ease); }
.s3-gphoto:hover img{ transform:scale(1.05); }
.s3-gphoto figcaption{
  position:absolute; inset-inline:0; bottom:0; padding:2.5rem 1.25rem 1.1rem;
  font-size:.72rem; font-weight:300; text-transform:uppercase; letter-spacing:.14em;
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.75));
}
html[lang="ar"] .s3-gphoto figcaption{ text-transform:none; letter-spacing:0; }

/* =================================================== CONTACT */
.s3-contact{ background:var(--s3-bg); padding:6rem 1.25rem 2rem; }
@media (min-width:640px){ .s3-contact{ padding-inline:2rem; } }
@media (min-width:768px){ .s3-contact{ padding:9rem 2.5rem 3rem; } }
.s3-contact-sub{ text-align:center; max-width:620px; margin:1.25rem auto 0; font-weight:300; opacity:.55; font-size:clamp(.9rem,1.6vw,1.15rem); }

.s3-contact-grid{
  max-width:1100px; margin:3.5rem auto 0; display:grid; gap:1.5rem;
  grid-template-columns:1fr;
}
@media (min-width:900px){
  .s3-contact-grid{ grid-template-columns:0.85fr 1.15fr; gap:2.5rem; align-items:start; }
  .s3-contact-grid.single{ grid-template-columns:1fr; max-width:640px; }
}

.s3-contact-info{ display:flex; flex-direction:column; gap:1.5rem; }
.s3-ci{ display:flex; flex-direction:column; gap:.25rem; }
.s3-ci .l{ font-size:.68rem; text-transform:uppercase; letter-spacing:.18em; opacity:.45; font-weight:300; }
html[lang="ar"] .s3-ci .l{ text-transform:none; letter-spacing:0; }
.s3-ci .v{ font-size:1.05rem; font-weight:500; word-break:break-word; }
a.s3-ci, .s3-ci a.v:hover{ opacity:.75; }

.s3-socials{ display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.5rem; }
.s3-socials a{
  display:inline-flex; align-items:center; gap:.5rem;
  border:1px solid var(--s3-line); border-radius:999px; padding:.5rem .9rem;
  font-size:.72rem; font-weight:300; transition:border-color .25s, background-color .25s;
}
.s3-socials a:hover{ border-color:var(--s3-ink); background:rgba(215,226,234,.06); }
.s3-socials svg{ width:16px; height:16px; }

.s3-form{ display:flex; flex-direction:column; gap:1rem; }
.s3-two{ display:grid; grid-template-columns:1fr; gap:1rem; }
@media (min-width:560px){ .s3-two{ grid-template-columns:1fr 1fr; } }
.s3-field{ display:flex; flex-direction:column; gap:.4rem; }
.s3-field label{ font-size:.68rem; text-transform:uppercase; letter-spacing:.18em; opacity:.45; font-weight:300; }
html[lang="ar"] .s3-field label{ text-transform:none; letter-spacing:0; }
.s3-field input, .s3-field textarea{
  font:inherit; color:var(--s3-ink); background:rgba(215,226,234,.04);
  border:1px solid var(--s3-line); border-radius:18px; padding:.9rem 1.1rem;
  transition:border-color .25s, background-color .25s;
}
.s3-field textarea{ min-height:150px; resize:vertical; }
.s3-field input::placeholder, .s3-field textarea::placeholder{ color:var(--s3-ink); opacity:.3; }
.s3-field input:focus, .s3-field textarea:focus{ outline:none; border-color:var(--s3-focus); background:rgba(215,226,234,.07); }
.s3-hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.s3-note{ min-height:1.2em; font-size:.85rem; opacity:0; transition:opacity .3s; }
.s3-note.show{ opacity:1; }
.s3-note.ok{ color:#7ee0a8; }
.s3-note.err{ color:#ff8a9b; }

/* ==================================================== FOOTER */
.s3-footer{
  background:var(--s3-bg); padding:5rem var(--s3-pad-x) 3rem;
  display:flex; flex-direction:column; align-items:center; gap:1rem; text-align:center;
}
.s3-legal{ display:flex; gap:1.25rem; flex-wrap:wrap; justify-content:center; font-size:.72rem; font-weight:300; }
.s3-legal a{ opacity:.5; transition:opacity .2s var(--s3-ease); }
.s3-legal a:hover{ opacity:1; }
.s3-fine{ font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; opacity:.3; font-weight:300; }
html[lang="ar"] .s3-fine{ text-transform:none; letter-spacing:0; }

.s3-top{
  position:fixed; inset-inline-end:18px; bottom:18px; z-index:70;
  width:44px; height:44px; display:grid; place-content:center;
  border:1px solid var(--s3-line); border-radius:999px; background:rgba(12,12,12,.7);
  backdrop-filter:blur(8px); opacity:0; pointer-events:none; transition:opacity .3s;
}
.s3-top.show{ opacity:1; pointer-events:auto; }
.s3-top svg{ width:18px; height:18px; transform:rotate(-90deg); }
html[dir="rtl"] .s3-top svg{ transform:rotate(-90deg) scaleY(-1); }

/* ============================================ REDUCED MOTION */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  [data-fade]{ opacity:1 !important; transform:none !important; transition:none !important; }
  .s3-about-copy .c{ opacity:1 !important; }
  .s3-mq-row,.s3-card,.s3-magnet{ transform:none !important; }
  .s3-mq-track{ animation:none; }
  .s3-gphoto:hover img{ transform:none; }
}
/* Appearance → Animations = off */
html[data-motion="0"] [data-fade]{ opacity:1 !important; transform:none !important; transition:none !important; }
html[data-motion="0"] .s3-about-copy .c{ opacity:1 !important; }
html[data-motion="0"] .s3-mq-row,
html[data-motion="0"] .s3-card,
html[data-motion="0"] .s3-magnet{ transform:none !important; }
html[data-motion="0"] .s3-mq-track{ animation:none; }
