/* ==========================================================================
   Safety Fire — سيفتي فاير
   Static site styles. Arabic / RTL. No framework.
   Font: Cairo, self-hosted (assets/fonts/) — arabic + latin subsets only,
   4 weights, WOFF2. Fetched from Google Fonts' own per-script split, so
   it's already subsetted; nothing else to strip.
   ========================================================================== */

/* ---------- Self-hosted Cairo ---------- */
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/cairo-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/cairo-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cairo-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/cairo-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/cairo-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/cairo-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/cairo-arabic-800.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/cairo-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}

/* ---------- Design tokens ---------- */
:root {
  --red: #E4032E;
  --red-dark: #B80125;
  --ink: #0E0E10;
  --ink-soft: #2A2A2E;
  --muted: #6B6B72;
  --line: #E2E2E5;
  --bg: #FFFFFF;
  --bg-alt: #F4F4F5;
  --bg-dark: #0E0E10;
  --white: #FFFFFF;

  --container: 1200px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(14, 14, 16, .08);
  --shadow-lg: 0 24px 60px rgba(14, 14, 16, .16);

  --step: 8px;
  --header-h: 84px;

  --font: "Cairo", "Segoe UI", Tahoma, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: clamp(15px, 1vw + 13px, 17px);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 { line-height: 1.25; font-weight: 800; color: var(--ink); }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 2.4vw + .8rem, 2.5rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.15rem, 1vw + .8rem, 1.45rem); }
p { color: var(--ink-soft); }

::selection { background: var(--red); color: #fff; }

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

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

.section { padding-block: clamp(40px, 5vw, 64px); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: #fff; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #C9C9CF; }
.section--tight { padding-block: clamp(26px, 3vw, 42px); }

.stack > * + * { margin-block-start: var(--step); }

.section-head { max-width: 640px; margin-block-end: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .08em;
  color: var(--red);
  text-transform: uppercase;
  margin-block-end: 14px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--red);
}
.section-head p { margin-block-start: 12px; color: var(--muted); }

.lead { font-size: 1.1em; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--red);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: .98rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  box-shadow: 0 10px 24px rgba(228, 3, 46, .28);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); background: var(--red-dark); box-shadow: 0 16px 32px rgba(228, 3, 46, .34); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--ink); --btn-fg: #fff; border-color: var(--ink); box-shadow: none; }

.btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.btn--light:hover { background: #f1f1f1; }

.btn--sm { padding: 10px 18px; font-size: .9rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  border-block-end: 1px solid var(--line);
  transition: box-shadow .25s var(--ease);
}
/* backdrop-filter would make .site-header the containing block for the
   fixed mobile nav (collapsing it) — only enable it on wide screens. */
@media (min-width: 961px) {
  .site-header { background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px); }
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(14, 14, 16, .08); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
  padding-block: 12px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.brand strong { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.4vw, 22px);
  list-style: none;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 8px 6px;
  font-weight: 600;
  font-size: .96rem;
  color: var(--ink-soft);
  position: relative;
  transition: color .2s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 6px;
  bottom: 2px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform .2s var(--ease);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--red); }

.header-cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink);
  direction: ltr;
}
.header-phone svg { width: 18px; height: 18px; color: var(--red); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .header-cta .btn { display: none; }
  .header-phone { padding: 10px; }
  .header-phone span { display: none; }
  .main-nav {
    position: fixed;
    z-index: 101;                       /* above the backdrop (99) */
    inset-block: var(--header-h) 0;
    inset-inline-start: 0;              /* RTL: anchored to the right edge, by the toggle */
    width: min(320px, 84vw);
    background: #fff;
    border-inline-end: 1px solid var(--line);
    padding: 20px;
    transform: translateX(-100%);       /* LTR: hide to the left */
    transition: transform .3s var(--ease);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  [dir="rtl"] .main-nav { transform: translateX(100%); } /* RTL: hide to the right */
  .main-nav.is-open,
  [dir="rtl"] .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a { padding: 13px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .main-nav a[aria-current="page"] { color: var(--red); }
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(14, 14, 16, .4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
    z-index: 99;
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  isolation: isolate;
  padding-block: clamp(88px, 12vh, 124px);
  display: flex;
  align-items: center;
  min-height: clamp(520px, 72vh, 680px);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; }
/* overlay lives on the (non-flex) bg layer so it always covers the full hero */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(300deg, rgba(228, 3, 46, .30), transparent 52%),
    linear-gradient(180deg,
      rgba(14, 14, 16, .52) 0%,
      rgba(14, 14, 16, .60) 42%,
      rgba(14, 14, 16, .86) 80%,
      rgba(14, 14, 16, .98) 100%);
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero p { color: #E7E7EA; font-size: 1.15rem; max-width: 52ch; margin-block: 20px 30px; }
.hero .btn-row { margin-block-start: 8px; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-block-start: 46px;
  padding-block-start: 28px;
  border-block-start: 1px solid rgba(255, 255, 255, .18);
}
.hero__meta div strong { display: block; font-size: 1.8rem; color: #fff; }
.hero__meta div span { color: #C9C9CF; font-size: .9rem; }
/* tags removed — collapse the block so the hero content stays vertically centered */
.hero__meta:empty {
  margin-block-start: 0;
  padding-block-start: 0;
  border-block-start: 0;
  min-height: 0;
}

/* Page banner (inner pages) — gradient + ambient motion, compact */
.page-hero {
  color: #fff;
  padding-block: clamp(38px, 5.5vw, 72px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 88% 0%, rgba(228, 3, 46, .30), transparent 55%),
    linear-gradient(115deg, #0b0b0d 0%, #1a0509 44%, #0b0b0d 80%);
}
/* breathing red glow */
.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: -35% auto;
  inset-inline-end: -6%;
  width: min(46vw, 440px);
  aspect-ratio: 1;
  background: radial-gradient(circle at center, rgba(228, 3, 46, .5), transparent 68%);
  filter: blur(8px);
  opacity: .5;
  animation: heroGlow 7s ease-in-out infinite;
  pointer-events: none;
}
/* slow diagonal light sweep */
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .06) 50%, transparent 58%);
  transform: translateX(-45%);
  animation: sheen 9s ease-in-out infinite;
  pointer-events: none;
}
.page-hero__embers {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.page-hero__embers i {
  position: absolute;
  bottom: -10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd9a0, #ff7a1a 45%, rgba(228, 3, 46, 0) 72%);
  box-shadow: 0 0 8px rgba(255, 138, 26, .7);
  opacity: 0;
  animation: emberRiseShort var(--dur, 9s) linear var(--delay, 0s) infinite;
}
.page-hero__embers i:nth-child(1) { left: 10%; --dur: 9s;   --delay: 0s;   --drift: 16px;  }
.page-hero__embers i:nth-child(2) { left: 26%; --dur: 11s;  --delay: 2s;   --drift: -20px; }
.page-hero__embers i:nth-child(3) { left: 44%; --dur: 8.5s; --delay: 4s;   --drift: 12px;  }
.page-hero__embers i:nth-child(4) { left: 62%; --dur: 12s;  --delay: 1s;   --drift: -14px; }
.page-hero__embers i:nth-child(5) { left: 78%; --dur: 9.5s; --delay: 3.5s; --drift: 22px;  }
.page-hero__embers i:nth-child(6) { left: 90%; --dur: 10.5s;--delay: 5s;   --drift: -10px; }
@keyframes emberRiseShort {
  0%   { opacity: 0;  transform: translate3d(0, 0, 0); }
  12%  { opacity: .9; }
  70%  { opacity: .7; }
  100% { opacity: 0;  transform: translate3d(var(--drift, 16px), -240px, 0); }
}

.page-hero h1 { color: #fff; font-size: clamp(1.65rem, 2.4vw + 1rem, 2.5rem); }
.page-hero p { color: #C9C9CF; margin-block-start: 8px; max-width: 54ch; font-size: .98rem; }
.breadcrumb { display: flex; gap: 8px; font-size: .84rem; color: #9A9AA2; margin-block-end: 10px; }
.breadcrumb a:hover { color: #fff; }

/* ---------- About strip ---------- */
.about-strip { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-strip__media { position: relative; }
.about-strip__media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.about-strip__badge {
  position: absolute;
  inset-block-end: -22px;
  inset-inline-start: -22px;
  background: var(--red);
  color: #fff;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  box-shadow: var(--shadow-lg);
}
.about-strip__badge span { display: block; font-size: .8rem; font-weight: 600; opacity: .9; }
@media (max-width: 820px) {
  .about-strip { grid-template-columns: 1fr; }
  .about-strip__media { order: -1; }
  .about-strip__badge { inset-inline-start: 12px; inset-block-end: -18px; }
}

/* ---------- Feature list ---------- */
.checklist { list-style: none; padding: 0; display: grid; gap: 14px; margin-block-start: 20px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.checklist svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--red); margin-block-start: 3px; }

/* ---------- Service cards ---------- */
.card-grid { display: grid; gap: clamp(16px, 2.5vw, 26px); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.service-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .32s var(--ease), box-shadow .32s var(--ease), border-color .32s var(--ease);
}
.service-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), #ff5a3c);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(228, 3, 46, .22);
  box-shadow:
    0 1px 4px rgba(14, 14, 16, .05),
    0 16px 36px -14px rgba(228, 3, 46, .30),
    0 34px 60px -24px rgba(14, 14, 16, .22);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(228, 3, 46, .1);
  color: var(--red);
  margin-block-end: 18px;
}
.service-card__icon svg { width: 28px; height: 28px; }
.service-card h3 { margin-block-end: 8px; }
.service-card p { font-size: .96rem; color: var(--muted); }
.service-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-block-start: 16px;
  font-weight: 700;
  color: var(--red);
  font-size: .92rem;
}
.service-card a svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.service-card:hover a svg { transform: translateX(-5px); }

.section--dark .service-card { background: #17171A; border-color: #26262B; }
.section--dark .service-card p { color: #A9A9B2; }

/* ---------- Workflow timeline ---------- */
.workflow { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.workflow__step {
  position: relative;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.workflow__step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--red);
  margin-block-end: 12px;
  font-feature-settings: "tnum";
}
.workflow__step h3 { font-size: 1.1rem; margin-block-end: 6px; }
.workflow__step p { font-size: .93rem; color: var(--muted); }

/* ---------- Projects grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-block-end: 34px; }
.filters button {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.filters button:hover { border-color: var(--ink); }
.filters button.is-active { background: var(--red); border-color: var(--red); color: #fff; }

.project-grid { display: grid; gap: clamp(18px, 3vw, 30px); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform .32s var(--ease), box-shadow .32s var(--ease), border-color .32s var(--ease);
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(228, 3, 46, .22);
  box-shadow:
    0 1px 4px rgba(14, 14, 16, .05),
    0 16px 36px -14px rgba(228, 3, 46, .28),
    0 34px 62px -24px rgba(14, 14, 16, .24);
}
.project-card__media { aspect-ratio: 3 / 2; overflow: hidden; position: relative; }
.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(228, 3, 46, .28));
  opacity: 0;
  transition: opacity .32s var(--ease);
}
.project-card:hover .project-card__media::after { opacity: 1; }
.project-card__media img { width: 100%; height: 100%; transition: transform .5s var(--ease); }
.project-card:hover .project-card__media img { transform: scale(1.06); }
.project-card__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-card__tag {
  align-self: flex-start;
  font-size: .76rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(228, 3, 46, .1);
  padding: 4px 12px;
  border-radius: 999px;
}
.project-card h3 { font-size: 1.15rem; }
.project-card__service { font-size: .9rem; color: var(--muted); }
.project-card__more {
  margin-block-start: auto;
  padding-block-start: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ink);
  font-size: .9rem;
}
.project-card__more svg { width: 16px; height: 16px; color: var(--red); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- Project detail ---------- */
.project-detail__meta { display: flex; flex-wrap: wrap; gap: 22px; margin-block: 8px 30px; color: var(--muted); font-weight: 600; }
.project-detail__meta span { display: inline-flex; align-items: center; gap: 8px; }
.project-detail__meta svg { width: 18px; height: 18px; color: var(--red); }
.project-detail__body { max-width: 68ch; font-size: 1.05rem; }
.project-detail__body p + p { margin-block-start: 1em; }

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-block-start: 34px; }
.gallery button { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 100%; transition: transform .3s var(--ease); }
.gallery button:hover img { transform: scale(1.05); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 12, .92);
  display: grid;
  place-items: center;
  padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 86vh; border-radius: 8px; }
.lightbox__close,
.lightbox__nav {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background .2s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox__close { top: 24px; inset-inline-end: 24px; }
.lightbox__close svg { width: 22px; height: 22px; }
.lightbox__nav svg { width: 26px; height: 26px; }
.lightbox__nav--prev { inset-inline-start: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { inset-inline-end: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__counter { position: absolute; bottom: 24px; inset-inline: 0; text-align: center; color: #C9C9CF; font-size: .9rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .9); margin-block: 12px 26px; max-width: 52ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.field { display: grid; gap: 6px; margin-block-end: 18px; }
.field label { font-weight: 700; font-size: .92rem; }
.field input,
.field textarea {
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(228, 3, 46, .12);
}
.field textarea { resize: vertical; min-height: 130px; }
.field--error input,
.field--error textarea { border-color: var(--red); }
.field__msg { font-size: .82rem; color: var(--red); min-height: 1em; }
.hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; }

.form-note { font-size: .85rem; color: var(--muted); margin-block-start: 10px; }
.form-status { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 600; margin-block-end: 18px; }
.form-status--ok { background: #E7F7EC; color: #1B7F3B; }
.form-status--err { background: #FDECEC; color: var(--red-dark); }

.contact-cards { display: grid; gap: 14px; }
.contact-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.contact-card svg { width: 24px; height: 24px; color: var(--red); flex-shrink: 0; }
.contact-card strong { display: block; margin-block-end: 2px; }
.contact-card a, .contact-card span { color: var(--muted); }
.contact-card a:hover { color: var(--red); }
.contact-card .ltr { direction: ltr; display: inline-block; }

.map-embed { margin-block-start: 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { width: 100%; height: 300px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #C9C9CF; padding-block: clamp(48px, 7vw, 80px) 30px; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-brand img { height: 52px; margin-block-end: 16px; }
.footer-brand p { color: #9A9AA2; font-size: .95rem; max-width: 40ch; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-block-end: 16px; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 10px; font-size: .95rem; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; color: var(--red); flex-shrink: 0; margin-block-start: 3px; }
.footer-contact .ltr { direction: ltr; }
.footer-bottom {
  margin-block-start: 40px;
  padding-block-start: 24px;
  border-block-start: 1px solid #26262B;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .86rem;
  color: #7A7A82;
}

/* ---------- Utilities / motion ---------- */
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px;
  background: #fff; color: var(--ink); padding: 10px 18px; border-radius: 8px;
  z-index: 300; transition: top .2s var(--ease); font-weight: 700;
}
.skip-link:focus { top: 12px; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  /* short beat before it plays so the reader's eye lands first */
  transition-delay: var(--reveal-delay, .16s);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; will-change: auto; }

/* cards animate in place (fade + faint scale) so a staggered grid never
   looks misaligned mid-transition */
.service-card.reveal:not(.is-visible),
.project-card.reveal:not(.is-visible),
.workflow__step.reveal:not(.is-visible) { transform: scale(.955); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ==========================================================================
   Continuous / ambient animations
   ========================================================================== */

/* --- Hero: slow Ken-Burns drift on the background photo --- */
.hero__bg img {
  animation: heroPan 26s ease-in-out infinite alternate;
  transform-origin: 60% 40%;
  will-change: transform;
}
@keyframes heroPan {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.14) translate3d(-2.5%, -2%, 0); }
}

/* --- Hero: breathing red glow behind the copy --- */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: -20% auto;
  inset-inline-start: -10%;
  width: min(60vw, 640px);
  aspect-ratio: 1;
  background: radial-gradient(circle at center, rgba(228, 3, 46, .55), transparent 68%);
  filter: blur(10px);
  opacity: .5;
  animation: heroGlow 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes heroGlow {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: .7;  transform: scale(1.12); }
}

/* --- Hero: rising embers --- */
.hero__embers {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero__embers span {
  position: absolute;
  bottom: -12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd9a0, #ff7a1a 45%, rgba(228, 3, 46, 0) 72%);
  box-shadow: 0 0 10px rgba(255, 138, 26, .8);
  opacity: 0;
  animation: emberRise var(--dur, 9s) linear var(--delay, 0s) infinite;
}
.hero__embers span:nth-child(1)  { left: 8%;  --dur: 8s;  --delay: 0s;   --drift: 20px;  }
.hero__embers span:nth-child(2)  { left: 20%; --dur: 11s; --delay: 1.6s; --drift: -26px; transform: scale(.7); }
.hero__embers span:nth-child(3)  { left: 33%; --dur: 9.5s;--delay: 3.1s; --drift: 14px;  }
.hero__embers span:nth-child(4)  { left: 46%; --dur: 12s; --delay: .8s;  --drift: -18px; transform: scale(1.3); }
.hero__embers span:nth-child(5)  { left: 58%; --dur: 8.6s;--delay: 4.2s; --drift: 30px;  transform: scale(.6); }
.hero__embers span:nth-child(6)  { left: 70%; --dur: 10.5s;--delay: 2.2s;--drift: -12px; }
.hero__embers span:nth-child(7)  { left: 82%; --dur: 9s;  --delay: 5.5s; --drift: 22px;  transform: scale(1.15); }
.hero__embers span:nth-child(8)  { left: 92%; --dur: 13s; --delay: 3.7s; --drift: -24px; transform: scale(.8); }
@keyframes emberRise {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) scale(var(--s, 1)); }
  10%  { opacity: .9; }
  75%  { opacity: .8; }
  100% { opacity: 0; transform: translate3d(var(--drift, 20px), -78vh, 0) scale(var(--s, 1)); }
}

/* (kicker accent line: static, no animation) */

/* --- Service / feature icon tiles: gentle idle float + ring on hover --- */
.service-card__icon { position: relative; animation: iconFloat 6s ease-in-out infinite; }
.service-card:nth-child(2n) .service-card__icon { animation-delay: -2s; }
.service-card:nth-child(3n) .service-card__icon { animation-delay: -4s; }
@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.service-card__icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 2px solid rgba(228, 3, 46, .35);
  opacity: 0;
  transform: scale(.82);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.service-card:hover .service-card__icon::after { opacity: 1; transform: scale(1); }

/* --- Scroll-cue in the hero --- */
.scroll-cue {
  position: absolute;
  inset-inline: 0;
  bottom: clamp(26px, calc(3vh + 10px), 40px);
  margin-inline: auto;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-radius: 13px;
  opacity: .85;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 6px;
  margin-inline: auto;
  width: 4px;
  height: 7px;
  border-radius: 2px;
  background: #fff;
  animation: scrollCue 1.9s ease-in-out infinite;
}
@keyframes scrollCue {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  60%  { opacity: 1; transform: translateY(11px); }
  100% { opacity: 0; transform: translateY(11px); }
}
@media (max-height: 620px) { .scroll-cue { display: none; } }

/* --- CTA band: slow moving sheen --- */
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .16) 48%, transparent 66%);
  transform: translateX(-60%);
  animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen {
  0%, 100% { transform: translateX(-60%); }
  50%      { transform: translateX(60%); }
}

/* --- About badge: subtle pulse --- */
.about-strip__badge { animation: badgePulse 4s ease-in-out infinite; }
@keyframes badgePulse {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50%      { box-shadow: 0 24px 60px rgba(228, 3, 46, .38); }
}

/* --- Respect reduced-motion: kill every ambient loop --- */
@media (prefers-reduced-motion: reduce) {
  .hero__bg img,
  .hero::before,
  .hero__embers span,
  .kicker::before,
  .service-card__icon,
  .scroll-cue::after,
  .cta-band::before,
  .about-strip__badge,
  .page-hero::before,
  .page-hero::after,
  .page-hero__embers i { animation: none !important; }
  .hero__embers,
  .page-hero__embers { display: none; }
}
