/* ==========================================================================
   SAN-MIA — Design System
   Minimalism × Glassmorphism · light paper surfaces, brand-navy contrast
   sections, gold used sparingly as punctuation.
   ========================================================================== */

/* 01. Fonts ---------------------------------------------------------------- */
@font-face { font-family: 'DIN Pro'; src: url('../fonts/din-pro-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'DIN Pro'; src: url('../fonts/din-pro-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'DIN Pro'; src: url('../fonts/din-pro-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'DIN Arabic'; src: url('../fonts/din-arabic-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'DIN Arabic'; src: url('../fonts/din-arabic-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'DIN Arabic'; src: url('../fonts/din-arabic-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'DIN Arabic'; src: url('../fonts/din-arabic-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* 02. Tokens --------------------------------------------------------------- */
:root {
  /* Brand */
  --navy: #0D1B3D;
  --navy-2: #13264F;
  --navy-3: #1C3366;
  --navy-deep: #081230;
  --gold: #D4A017;
  --gold-soft: #E6B93C;
  --gold-ink: #946F06;            /* gold for small text on light (AA) */

  /* Surfaces */
  --paper: #F4F5F7;
  --paper-2: #E9ECF1;
  --white: #FFFFFF;

  /* Ink on light */
  --ink: #0D1B3D;
  --ink-2: #46506A;
  --ink-3: #6C7690;
  --line: rgba(13, 27, 61, 0.12);
  --line-strong: rgba(13, 27, 61, 0.24);

  /* Ink on dark */
  --on-dark: #FFFFFF;
  --on-dark-2: rgba(255, 255, 255, 0.74);
  --on-dark-3: rgba(255, 255, 255, 0.52);
  --line-dark: rgba(255, 255, 255, 0.14);

  /* Glass */
  --glass-blur: 18px;
  --glass-light: rgba(255, 255, 255, 0.6);
  --glass-light-strong: rgba(255, 255, 255, 0.8);
  --glass-light-edge: rgba(255, 255, 255, 0.7);
  --glass-dark: rgba(13, 27, 61, 0.46);
  --glass-dark-strong: rgba(13, 27, 61, 0.7);
  --glass-dark-edge: rgba(255, 255, 255, 0.16);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(13, 27, 61, 0.05), 0 6px 16px -8px rgba(13, 27, 61, 0.12);
  --shadow-md: 0 22px 48px -24px rgba(13, 27, 61, 0.32);
  --shadow-lg: 0 44px 90px -36px rgba(13, 27, 61, 0.42);

  /* Type */
  --font-latin: 'DIN Pro', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-arabic: 'DIN Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --font: var(--font-latin);

  --fs-hero: clamp(2.75rem, 6.3vw, 6rem);
  --fs-h1: clamp(2.5rem, 5.4vw, 5.25rem);
  --fs-h2: clamp(2rem, 3.9vw, 3.5rem);
  --fs-h3: clamp(1.3rem, 1.75vw, 1.625rem);
  --fs-statement: clamp(1.55rem, 2.7vw, 2.5rem);
  --fs-lead: clamp(1.1rem, 1.3vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.75rem;

  --lh-tight: 0.98;
  --lh-head: 1.06;
  --lh-body: 1.7;
  --track-caps: 0.22em;

  /* Layout */
  --container: 1360px;
  --narrow: 880px;
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(96px, 11vw, 172px);
  --section-tight: clamp(64px, 7vw, 112px);
  --header-h: 76px;

  /* Shape */
  --r-xs: 2px;
  --r-sm: 10px;
  --r-md: 18px;
  --r-pill: 999px;
  --cut: clamp(20px, 2.6vw, 44px);   /* chamfered corner, echoes the hexagonal mark */

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 0.25s;
  --t-med: 0.5s;
  --t-slow: 0.9s;
  --t-xslow: 1.3s;
}

html[dir="rtl"] {
  --font: var(--font-arabic);
  --fs-body: 1.125rem;
  --fs-sm: 1rem;
  --fs-xs: 0.875rem;
  --lh-tight: 1.22;
  --lh-head: 1.3;
  --lh-body: 1.85;
  --track-caps: 0;
}

/* 03. Reset & base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: var(--lh-body);
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html[dir="rtl"] body { font-weight: 400; }

body.is-locked { overflow: hidden; }

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--ink);
  line-height: var(--lh-head);
  letter-spacing: -0.015em;
}
html[dir="rtl"] :is(h1, h2, h3, h4, h5, h6) { letter-spacing: 0; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }

strong, b { font-weight: 700; color: var(--ink); }
::selection { background: var(--gold); color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: 16px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--navy);
  color: var(--on-dark);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus { transform: none; }

/* 04. Layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--narrow) + var(--gutter) * 2); }

.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: var(--section-tight); }

/* Surfaces. `--surface` feeds image-reveal curtains so they match the section. */
.surface-paper { background: var(--paper); --surface: var(--paper); }
.surface-white { background: var(--white); --surface: var(--white); }
.surface-navy  {
  background: var(--navy);
  --surface: var(--navy);
  color: var(--on-dark-2);
}
.surface-navy :is(h1, h2, h3, h4, h5, h6, strong, b) { color: var(--on-dark); }
.surface-deep  { background: var(--navy-deep); --surface: var(--navy-deep); color: var(--on-dark-2); }
.surface-deep :is(h1, h2, h3, h4, h5, h6, strong, b) { color: var(--on-dark); }

/* 12-column editorial grid */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.2vw, 32px);
}

/* 05. Typography ----------------------------------------------------------- */
.t-hero {
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
html[dir="rtl"] .t-hero { text-transform: none; letter-spacing: 0; }

.t-h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.025em; }
.t-h2 { font-size: var(--fs-h2); line-height: var(--lh-head); letter-spacing: -0.02em; }
.t-h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.01em; }
html[dir="rtl"] :is(.t-h1, .t-h2, .t-h3) { letter-spacing: 0; }

.t-statement {
  font-size: var(--fs-statement);
  font-weight: 300;
  line-height: 1.28;
  letter-spacing: -0.012em;
  color: var(--ink);
}
html[dir="rtl"] .t-statement { line-height: 1.6; letter-spacing: 0; font-weight: 300; }
.t-statement strong { font-weight: 700; }
.t-statement .muted { color: var(--ink-3); }
.surface-navy .t-statement { color: var(--on-dark); }
.surface-navy .t-statement .muted { color: var(--on-dark-3); }

.t-lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); max-width: 46ch; }
html[dir="rtl"] .t-lead { line-height: 1.85; }
.surface-navy .t-lead, .surface-deep .t-lead { color: var(--on-dark-2); }

.t-caps {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  line-height: 1.4;
}
html[dir="rtl"] .t-caps { text-transform: none; }

.t-muted { color: var(--ink-3); }
.surface-navy .t-muted, .surface-deep .t-muted { color: var(--on-dark-3); }

/* Gold full stop — the brand's typographic signature ("DELIVERY.") */
.dot { color: var(--gold); }

/* Eyebrow: index + hairline + label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1.4;
}
html[dir="rtl"] .eyebrow { text-transform: none; }
.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
  flex: none;
}
.eyebrow__idx { color: var(--gold-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.surface-navy .eyebrow, .surface-deep .eyebrow { color: var(--on-dark-2); }
.surface-navy .eyebrow__idx, .surface-deep .eyebrow__idx { color: var(--gold); }
.eyebrow--plain::before { display: none; }

/* Section head pattern: eyebrow over title, optional aside */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px 48px;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.section-head .eyebrow { margin-bottom: 22px; }
.section-head__aside { max-width: 400px; color: var(--ink-3); }
.surface-navy .section-head__aside { color: var(--on-dark-3); }

/* Rich text from the editor */
.prose { color: var(--ink-2); max-width: 70ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--fs-h3); margin-top: 2.2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.8em; }
.prose a { color: var(--ink); background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 1px no-repeat; }
.prose ul { padding-inline-start: 0; }
.prose ul li { position: relative; padding-inline-start: 26px; }
.prose ul li + li { margin-top: 0.5em; }
.prose ul li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.8em;
  width: 12px; height: 1px;
  background: var(--gold);
}
.prose img { border-radius: var(--r-xs); }
.prose blockquote {
  border-inline-start: 2px solid var(--gold);
  padding-inline-start: 24px;
  font-size: var(--fs-lead);
  color: var(--ink);
}

/* 06. Icons ---------------------------------------------------------------- */
.i { flex: none; }
[dir="rtl"] .i-dir { transform: scaleX(-1); }

/* 07. Buttons & links ------------------------------------------------------ */
.btn {
  --btn-bg: var(--navy);
  --btn-fg: var(--on-dark);
  --btn-icon-bg: rgba(255, 255, 255, 0.12);
  --btn-icon-fg: currentColor;
  --btn-border: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding-block: 8px;
  padding-inline: 28px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition:
    background-color var(--t-med) var(--ease),
    color var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease),
    transform var(--t-med) var(--ease);
}
html[dir="rtl"] .btn { letter-spacing: 0; }
.btn:not(:has(.btn__icon)) { padding-inline: 28px; }

.btn__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--btn-icon-bg);
  color: var(--btn-icon-fg);
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.btn__icon .i { transition: transform var(--t-med) var(--ease); }

.btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px) scale(1.015);
}
.btn:hover .btn__icon { --btn-icon-bg: var(--gold); --btn-icon-fg: var(--navy); }
.btn:hover .btn__icon .i-arrow { transform: translateX(3px); }
[dir="rtl"] .btn:hover .btn__icon .i-arrow { transform: scaleX(-1) translateX(3px); }
.btn:hover .btn__icon .i-download { transform: translateY(2px); }
.btn:hover .btn__icon .i-arrow-up { transform: translate(2px, -2px); }
.btn:active { transform: scale(0.985); }

.btn--primary:hover { --btn-bg: var(--navy-2); }

.btn--light { --btn-bg: var(--white); --btn-fg: var(--navy); --btn-icon-bg: var(--paper); }
.btn--light:hover { --btn-bg: var(--gold); --btn-fg: var(--navy); }
.btn--light:hover .btn__icon { --btn-icon-bg: var(--navy); --btn-icon-fg: var(--white); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
  --btn-icon-bg: var(--paper-2);
}
.btn--ghost:hover { --btn-bg: var(--white); --btn-border: var(--white); }

.btn--glass {
  --btn-bg: var(--glass-dark);
  --btn-fg: var(--on-dark);
  --btn-border: var(--glass-dark-edge);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}
.btn--glass:hover { --btn-bg: rgba(255, 255, 255, 0.14); --btn-border: rgba(255, 255, 255, 0.32); }

.surface-navy .btn--ghost, .surface-deep .btn--ghost {
  --btn-fg: var(--on-dark);
  --btn-border: var(--line-dark);
  --btn-icon-bg: rgba(255, 255, 255, 0.08);
}
.surface-navy .btn--ghost:hover, .surface-deep .btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.08); --btn-border: rgba(255, 255, 255, 0.34); }

.btn--sm { min-height: 44px; padding-inline: 20px 6px; font-size: 0.875rem; gap: 10px; }
.btn--sm:not(:has(.btn__icon)) { padding-inline: 20px; }
.btn--sm .btn__icon { width: 32px; height: 32px; }
.btn--block { width: 100%; justify-content: space-between; }

/* Text link with drawn underline + travelling arrow */
.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--ink);
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat,
              linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat;
  transition: background-size var(--t-med) var(--ease), color var(--t-fast) var(--ease);
}
[dir="rtl"] .link { background-position: 100% 100%, 100% 100%; }
.link .i { transition: transform var(--t-med) var(--ease); }
.link:hover { background-size: 100% 1px, 100% 1px; color: var(--ink); }
.link:hover .i-arrow { transform: translateX(4px); }
[dir="rtl"] .link:hover .i-arrow { transform: scaleX(-1) translateX(4px); }
.link:hover .i-arrow-up { transform: translate(3px, -3px); }
.surface-navy .link, .surface-deep .link { color: var(--on-dark); }

/* 08. Glass ---------------------------------------------------------------- */
.glass {
  background: var(--glass-light);
  border: 1px solid var(--glass-light-edge);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow-md);
  border-radius: var(--r-md);
}
.glass--strong { background: var(--glass-light-strong); }
.glass--dark {
  background: var(--glass-dark);
  border-color: var(--glass-dark-edge);
  color: var(--on-dark-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 60px -30px rgba(0, 0, 0, 0.55);
}
.glass--dark :is(h3, h4, strong) { color: var(--on-dark); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, 0.94); }
  .glass--dark { background: rgba(13, 27, 61, 0.94); }
  .btn--glass { --btn-bg: rgba(13, 27, 61, 0.9); }
}

/* 09. Media ---------------------------------------------------------------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xs);
  background: var(--paper-2);
  isolation: isolate;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-xslow) var(--ease), filter var(--t-med) var(--ease);
}
.media__parallax { position: absolute; inset: -9% 0; will-change: transform; }
.media__parallax img { height: 100%; }

/* Hover zoom, triggered from any interactive ancestor */
.has-zoom:hover .media img, .media.has-zoom:hover img { transform: scale(1.05); }

/* Chamfered corner (top-end). Mirrors in RTL. */
.cut {
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
[dir="rtl"] .cut {
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
}
.cut--bs {
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
[dir="rtl"] .cut--bs {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

/* Small glass label sitting on imagery */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark);
  background: var(--glass-dark);
  border: 1px solid var(--glass-dark-edge);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
html[dir="rtl"] .chip { letter-spacing: 0; text-transform: none; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.chip--light { color: var(--ink); background: var(--glass-light-strong); border-color: var(--glass-light-edge); }

/* 10. Specs (definition lists for project data) ---------------------------- */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.specs > div {
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.specs > div:nth-child(odd) { padding-inline-end: 16px; }
.specs > div:nth-child(even) { padding-inline-start: 16px; border-inline-start: 1px solid var(--line); }
.specs dt {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
html[dir="rtl"] .specs dt { letter-spacing: 0; text-transform: none; }
.specs dd { color: var(--ink); font-weight: 500; line-height: 1.35; }
.glass--dark .specs, .surface-navy .specs { border-color: var(--line-dark); }
.glass--dark .specs > div, .surface-navy .specs > div { border-color: var(--line-dark); }
.glass--dark .specs dt, .surface-navy .specs dt { color: var(--on-dark-3); }
.glass--dark .specs dd, .surface-navy .specs dd { color: var(--on-dark); }

/* 11. Reveal motion -------------------------------------------------------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition:
    opacity var(--t-slow) var(--ease),
    transform var(--t-xslow) var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Image curtain: a surface-coloured panel lifts away, the image settles from 1.12 */
html.js [data-reveal="media"] { opacity: 1; transform: none; }
html.js [data-reveal="media"]::after {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 2;
  background: var(--surface, var(--paper));
  transform-origin: 50% 0;
  transition: transform 1.25s var(--ease-io);
  transition-delay: calc(var(--i, 0) * 90ms);
  pointer-events: none;
}
html.js [data-reveal="media"] img { transform: scale(1.12); }
html.js [data-reveal="media"].is-in::after { transform: scaleY(0); }
html.js [data-reveal="media"].is-in img { transform: scale(1); transition-duration: 1.8s; }
html.js .has-zoom:hover [data-reveal="media"].is-in img,
html.js [data-reveal="media"].is-in.has-zoom:hover img { transform: scale(1.05); transition-duration: var(--t-xslow); }

/* Line-by-line headline reveal (lines are authored in markup) */
.lines .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
html[dir="rtl"] .lines .line { padding-bottom: 0.14em; margin-bottom: -0.14em; }
.lines .line > span { display: inline-block; }
html.js .lines[data-reveal] { opacity: 1; transform: none; }
html.js .lines[data-reveal] .line > span {
  transform: translate3d(0, 108%, 0);
  transition: transform 1.15s var(--ease);
  transition-delay: calc(var(--l, 0) * 110ms + 120ms);
}
html.js .lines[data-reveal].is-in .line > span { transform: none; }

/* Hairline that draws itself */
html.js [data-reveal="rule"] { opacity: 1; transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.4s var(--ease); }
[dir="rtl"] [data-reveal="rule"] { transform-origin: 100% 50%; }
html.js [data-reveal="rule"].is-in { transform: scaleX(1); }

/* 12. Header / floating glass navigation ----------------------------------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding-top: 14px;
  padding-inline: clamp(12px, 2.4vw, 32px);
  pointer-events: none;
  transition: transform 0.6s var(--ease);
}
.site-header.is-hidden { transform: translateY(-130%); }

.site-header__bar {
  pointer-events: auto;
  max-width: calc(var(--container) + 40px);
  margin-inline: auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-inline: 22px 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(13, 27, 61, 0.06);
  background: rgba(255, 255, 255, 0.34);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  transition:
    background-color var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease),
    -webkit-backdrop-filter var(--t-med) var(--ease),
    backdrop-filter var(--t-med) var(--ease),
    height var(--t-med) var(--ease);
}
.site-header.is-scrolled .site-header__bar {
  height: 58px;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 18px 40px -22px rgba(13, 27, 61, 0.35);
}
/* Over dark sections the bar turns to navy glass */
.site-header.on-dark .site-header__bar {
  background: rgba(13, 27, 61, 0.42);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.5);
}
.site-header.on-dark.is-scrolled .site-header__bar { background: rgba(13, 27, 61, 0.66); }

.brand { position: relative; display: block; flex: none; width: 150px; height: 35px; }
.brand__logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transition: opacity var(--t-med) var(--ease);
}
[dir="rtl"] .brand__logo { object-position: right center; }
.brand__logo--light { opacity: 0; }
.on-dark .brand__logo--dark { opacity: 0; }
.on-dark .brand__logo--light { opacity: 1; }

.primary-nav { margin-inline: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative;
  display: block;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
html[dir="rtl"] .nav-link { font-size: 0.95rem; }
.nav-link::after {
  content: '';
  position: absolute;
  inset-inline: 14px;
  bottom: 5px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-med) var(--ease);
}
[dir="rtl"] .nav-link::after { transform-origin: 100% 50%; }
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--ink); }
.on-dark .nav-link { color: var(--on-dark-2); }
.on-dark .nav-link:hover, .on-dark .nav-link[aria-current="page"] { color: var(--on-dark); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.primary-nav + .header-actions { margin-inline-start: 0; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding-inline: 14px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.lang-switch:hover { background: rgba(13, 27, 61, 0.06); }
.lang-switch [lang="ar"] { font-family: 'Segoe UI', Tahoma, system-ui, sans-serif; font-weight: 600; }
.lang-switch [lang="en"] { font-family: var(--font-latin); letter-spacing: 0.08em; }
.on-dark .lang-switch { color: var(--on-dark); }
.on-dark .lang-switch:hover { background: rgba(255, 255, 255, 0.1); }

.site-header .btn--sm { --btn-icon-bg: rgba(255, 255, 255, 0.14); }
.on-dark .header-cta { --btn-bg: var(--white); --btn-fg: var(--navy); --btn-icon-bg: var(--paper); }
.on-dark .header-cta:hover { --btn-bg: var(--gold); }

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-dark);
}
.menu-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-med) var(--ease), top var(--t-med) var(--ease);
}
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }
.on-dark .menu-toggle { background: var(--white); color: var(--navy); }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 40px) var(--gutter) 32px;
  background: rgba(8, 18, 48, 0.86);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  backdrop-filter: blur(26px) saturate(140%);
  color: var(--on-dark);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med) var(--ease), visibility 0s linear var(--t-med);
}
.drawer.is-open { opacity: 1; visibility: visible; transition: opacity var(--t-med) var(--ease), visibility 0s; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__link {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line-dark);
  font-size: clamp(1.75rem, 7vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--on-dark);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-slow) var(--ease), color var(--t-fast);
  transition-delay: calc(var(--i, 0) * 60ms + 80ms);
}
.drawer__link small { font-size: var(--fs-xs); font-weight: 500; color: var(--gold); letter-spacing: 0.1em; min-width: 22px; }
.drawer__link[aria-current="page"] { color: var(--gold); }
.drawer.is-open .drawer__link { opacity: 1; transform: none; }
.drawer__foot {
  margin-top: auto;
  padding-top: 36px;
  display: grid;
  gap: 12px;
}
.drawer__contact { display: grid; gap: 10px; margin-top: 8px; }
.drawer__contact a {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--on-dark);
}
.drawer__contact-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--gold);
}
/* the handset opens toward the number that follows it */
[dir="rtl"] .drawer__contact-icon--phone .i { transform: scaleX(-1); }

/* 13. Footer ---------------------------------------------------------------- */
.site-footer { position: relative; overflow: hidden; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px 64px;
  align-items: end;
  padding-block: clamp(80px, 9vw, 140px) clamp(56px, 6vw, 88px);
  border-bottom: 1px solid var(--line-dark);
}
.footer-top__title { font-size: clamp(2.25rem, 5vw, 4.5rem); line-height: var(--lh-tight); letter-spacing: -0.025em; }
html[dir="rtl"] .footer-top__title { letter-spacing: 0; }
.footer-top__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding-block: clamp(56px, 6vw, 88px);
}
.footer-brand img { width: 220px; height: auto; margin-bottom: 24px; }
.footer-brand p { max-width: 36ch; font-size: var(--fs-sm); color: var(--on-dark-3); }
.footer-social {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: 24px;
  border-radius: 50%;
  border: 1px solid rgba(212, 160, 23, 0.45);
  color: var(--gold);
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.footer-social:hover { background: var(--gold); color: var(--navy); transform: translateY(-2px); }
.footer-col h2 {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: 22px;
}
html[dir="rtl"] .footer-col h2 { text-transform: none; }
.footer-col ul { display: grid; gap: 12px; }
.footer-col a, .footer-col li { font-size: var(--fs-sm); color: var(--on-dark-2); }
.footer-col a {
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: color var(--t-fast) var(--ease), background-size var(--t-med) var(--ease);
}
[dir="rtl"] .footer-col a { background-position: 100% 100%; }
.footer-col a:hover { color: var(--on-dark); background-size: 100% 1px; }
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  padding-block: 28px 36px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.8125rem;
  color: var(--on-dark-3);
}
.footer-bottom a { color: var(--on-dark-2); }
.footer-bottom a:hover { color: var(--gold); }
.footer-mark {
  position: absolute;
  inset-inline-end: -4vw;
  bottom: -6vw;
  width: min(38vw, 520px);
  opacity: 0.05;
  pointer-events: none;
}

/* Floating WhatsApp (glass) */
.wa-float {
  position: fixed;
  inset-inline-end: clamp(16px, 2.4vw, 32px);
  bottom: clamp(84px, 7vw, 104px);
  z-index: 80;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--on-dark);
  background: rgba(13, 27, 61, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 18px 40px -16px rgba(13, 27, 61, 0.55);
  transition: background-color var(--t-med) var(--ease), transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.wa-float:hover { background: #1FA855; transform: translateY(-2px) scale(1.04); }
.wa-float .i { width: 26px; height: 26px; }

/* 14. Shared page hero (inner pages) --------------------------------------- */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(72px, 9vw, 140px));
  padding-bottom: clamp(56px, 7vw, 104px);
}
.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: end;
}
.page-hero .eyebrow { margin-bottom: clamp(24px, 3vw, 40px); }
.page-hero__title { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.03em; }
html[dir="rtl"] .page-hero__title { letter-spacing: 0; }
.page-hero__intro { color: var(--ink-2); font-size: var(--fs-lead); line-height: 1.6; }
html[dir="rtl"] .page-hero__intro { line-height: 1.85; }
.page-hero__aside { display: grid; gap: 28px; justify-items: start; padding-bottom: 0.5em; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.page-hero__media { margin-top: clamp(56px, 7vw, 104px); height: clamp(320px, 50vw, 680px); }
.page-hero__media .media__parallax img { object-position: 50% 50%; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span[aria-hidden] { color: var(--gold); }

/* 15. Closing CTA band (shared) -------------------------------------------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px clamp(40px, 6vw, 96px);
  align-items: end;
}
.cta-band__title { font-size: var(--fs-h2); line-height: var(--lh-head); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* 16. Forms ----------------------------------------------------------------- */
.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field { position: relative; display: grid; gap: 8px; }
.field__label {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
html[dir="rtl"] .field__label { letter-spacing: 0; text-transform: none; }
.field__label em { font-style: normal; color: var(--gold-ink); }
.field__input {
  width: 100%;
  min-height: 52px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: var(--fs-body);
  font-weight: 400;
  transition: border-color var(--t-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field__input::placeholder { color: var(--ink-3); opacity: 0.7; }
.field__input:focus { outline: none; border-color: transparent; }
.field::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-med) var(--ease);
}
[dir="rtl"] .field::after { transform-origin: 100% 50%; }
.field:focus-within::after { transform: scaleX(1); }
textarea.field__input { min-height: 120px; resize: vertical; line-height: 1.6; }
select.field__input {
  cursor: pointer;
  padding-inline-end: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23D4A017' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}
[dir="rtl"] select.field__input { background-position: left 2px center; }
select.field__input option { color: var(--navy); background: var(--white); }

/* Fields on dark glass */
.glass--dark .field__label, .surface-navy .field__label { color: var(--on-dark-3); }
.glass--dark .field__input, .surface-navy .field__input { color: var(--on-dark); border-color: rgba(255, 255, 255, 0.24); }
.glass--dark .field__input::placeholder, .surface-navy .field__input::placeholder { color: var(--on-dark-3); }

.form-response-notice {
  display: none;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.form-response-notice.success { display: block; background: rgba(46, 160, 67, 0.12); color: #1D7A34; border: 1px solid rgba(46, 160, 67, 0.3); }
.form-response-notice.error { display: block; background: rgba(214, 69, 65, 0.1); color: #B03A36; border: 1px solid rgba(214, 69, 65, 0.3); }
.glass--dark .form-response-notice.success { color: #8FE0A2; }
.glass--dark .form-response-notice.error { color: #FFB1AE; }
.form__note { font-size: 0.8125rem; color: var(--ink-3); }
.glass--dark .form__note { color: var(--on-dark-3); }

/* 17. Utilities ------------------------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.tabular { font-variant-numeric: tabular-nums; }

/* 18. Responsive ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .primary-nav { display: none; }
  .menu-toggle { display: block; }
  .header-actions, .primary-nav + .header-actions { margin-inline-start: auto; }
}

@media (max-width: 960px) {
  .page-hero__grid,
  .cta-band__grid,
  .footer-top { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .cta-band__actions, .footer-top__actions { justify-content: flex-start; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .section-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .site-header { padding-top: 10px; }
  .site-header__bar { height: 58px; padding-inline: 16px 7px; gap: 8px; }
  .site-header.is-scrolled .site-header__bar { height: 54px; }
  .brand { width: 124px; height: 29px; }
  .header-cta { display: none; }
  .lang-switch { padding-inline: 10px; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .footer-col h2 { color: var(--gold); font-size: 0.9375rem; margin-bottom: 18px; }
  html[dir="rtl"] .footer-col h2 { font-size: 1.0625rem; }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .specs > div:nth-child(n) { padding-inline: 0; border-inline-start: 0; }
  .btn { white-space: normal; text-align: start; }
  .wa-float { width: 50px; height: 50px; }
}

/* 19. Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  html.js [data-reveal], html.js .lines[data-reveal] .line > span { opacity: 1 !important; transform: none !important; }
  html.js [data-reveal="media"]::after { display: none; }
  html.js [data-reveal="media"] img { transform: none !important; }
  .media__parallax { transform: none !important; }
}

/* 20. Contact Form 7 — mapped onto the theme's form system ------------------ */
.sanmia-cf7 .wpcf7-form > p:empty { display: none; }
.sanmia-cf7 .wpcf7-form-control-wrap { display: block; }
.sanmia-cf7 .field__input.wpcf7-not-valid { border-color: #E5736F; }
.sanmia-cf7 .wpcf7-not-valid-tip { display: block; margin-top: 6px; font-size: 0.8125rem; color: #E5736F; }
.sanmia-cf7 .cf7-submit {
  width: 100%;
  justify-content: center;
  padding-inline: 28px;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.sanmia-cf7 .cf7-submit:disabled { opacity: 0.6; cursor: progress; }
.sanmia-cf7 .wpcf7-spinner { display: block; margin: 12px auto 0; }
.sanmia-cf7 .wpcf7 form .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  border-width: 1px;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.sanmia-cf7 .wpcf7 form.sent .wpcf7-response-output { border-color: rgba(46, 160, 67, 0.4); background: rgba(46, 160, 67, 0.12); color: #1D7A34; }
.sanmia-cf7 .wpcf7 form.invalid .wpcf7-response-output,
.sanmia-cf7 .wpcf7 form.unaccepted .wpcf7-response-output,
.sanmia-cf7 .wpcf7 form.failed .wpcf7-response-output,
.sanmia-cf7 .wpcf7 form.spam .wpcf7-response-output { border-color: rgba(229, 115, 111, 0.45); background: rgba(214, 69, 65, 0.1); color: #B03A36; }
.glass--dark .sanmia-cf7 .wpcf7 form.sent .wpcf7-response-output { color: #8FE0A2; }
.glass--dark .sanmia-cf7 .wpcf7 form:is(.invalid, .unaccepted, .failed, .spam) .wpcf7-response-output { color: #FFB1AE; }
.glass--dark .sanmia-cf7 .cf7-submit,
.surface-navy .sanmia-cf7 .cf7-submit { --btn-bg: var(--white); --btn-fg: var(--navy); }
.glass--dark .sanmia-cf7 .cf7-submit:hover,
.surface-navy .sanmia-cf7 .cf7-submit:hover { --btn-bg: var(--gold); }
[dir="rtl"] .sanmia-cf7 input[type="email"], [dir="rtl"] .sanmia-cf7 input[type="tel"] { direction: ltr; text-align: right; }
