@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal/Tajawal-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal/Tajawal-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal/Tajawal-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal/Tajawal-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal/Tajawal-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal/Tajawal-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal/Tajawal-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Frgaa site — wholesale dock / shutter vernacular
   Not SaaS. Not soft glow. Packing tape + stencil + paper notice. */
:root {
  --navy: #062b71;
  --navy-deep: #041d4d;
  --ice: #87ccdb;
  --ice-deep: #5eb6cb;
  --paper: #ffffff;
  --ink: #0b0d10;
  --steel: #6b7785;
  --danger: #e53935;
  --tape: var(--ice);
  --line: rgba(6, 43, 113, 0.18);
  --shutter: #062b71;
  --notice: #fffef8;
  --font: "Tajawal", sans-serif;
  --max: 1080px;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #050910;
  --ink: #eef3f8;
  --steel: #8b97a6;
  --line: rgba(135, 204, 219, 0.22);
  --notice: #0c1628;
  --shutter: #031533;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

html[lang="ar"] .lang-en,
html[lang="en"] .lang-ar {
  display: none !important;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 2px solid var(--navy);
}

body.is-home .site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  background: transparent;
  border-bottom-color: transparent;
  color: #fff;
}

body.is-home .site-header.is-solid {
  background: var(--paper);
  border-bottom-color: var(--navy);
  color: var(--ink);
}

body.is-home #brand,
body.is-home #work,
body.is-home #who {
  scroll-margin-top: 72px;
}

body.is-home .site-header:not(.is-solid) .brand-text strong {
  color: #fff;
}

body.is-home .site-header:not(.is-solid) .brand-text span {
  color: rgba(255, 255, 255, 0.7);
}

body.is-home .site-header:not(.is-solid) .nav-links a {
  color: rgba(255, 255, 255, 0.85);
}

body.is-home .site-header:not(.is-solid) .switcher {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
}

body.is-home .site-header:not(.is-solid) .switcher button {
  color: rgba(255, 255, 255, 0.65);
}

body.is-home .site-header:not(.is-solid) .switcher button.is-active {
  background: var(--ice);
  color: var(--navy);
}

body.is-home .site-header:not(.is-solid) .icon-btn {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
}

/* Logo is navy-on-transparent — dies on the blue gate. Plate it while header floats. */
body.is-home .site-header:not(.is-solid) .brand img {
  background: #fff;
  padding: 3px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--navy);
}

[data-theme="dark"] .brand-text strong {
  color: var(--ice);
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--steel);
}

.nav-links {
  display: flex;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.75;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
  outline: none;
  color: var(--navy);
}

[data-theme="dark"] .nav-links a:hover {
  color: var(--ice);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.switcher {
  display: inline-flex;
  padding: 2px;
  border: 1.5px solid var(--line);
  background: var(--paper);
}

.switcher button {
  border: 0;
  background: transparent;
  color: var(--steel);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
}

.switcher button.is-active {
  background: var(--navy);
  color: #fff;
}

[data-theme="dark"] .switcher button.is-active {
  background: var(--ice);
  color: var(--navy);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
}

[data-theme="dark"] .icon-btn {
  color: var(--ice);
}

.icon-btn:focus-visible,
.switcher button:focus-visible,
.btn:focus-visible,
.gate-scroll:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-moon {
  display: block;
}

.menu-toggle {
  display: none;
}

/* —— GATE (hero before hero) —— */
.gate {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 5.5rem 1.25rem 3rem;
  background: var(--shutter);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.045) 0 14px,
      rgba(0, 0, 0, 0.12) 14px 16px,
      rgba(255, 255, 255, 0.02) 16px 30px,
      rgba(0, 0, 0, 0.18) 30px 32px
    );
  pointer-events: none;
}

.gate::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 10px;
  z-index: 1;
  background: var(--tape);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.15);
}

.gate-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  text-align: center;
}

.gate-stamp {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.9rem;
  border: 3px solid var(--danger);
  color: var(--danger);
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-6deg);
  background: rgba(255, 255, 255, 0.04);
}

.gate-notice {
  background: var(--notice);
  color: var(--ink);
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    4px 4px 0 rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  text-align: start;
  position: relative;
}

.gate-notice::before {
  content: "";
  position: absolute;
  top: -8px;
  inset-inline-start: 28%;
  width: 44%;
  height: 16px;
  background: rgba(135, 204, 219, 0.55);
  transform: rotate(-1.5deg);
}

.gate-notice .dock-id {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--steel);
  margin: 0 0 0.85rem;
  letter-spacing: 0.04em;
}

.gate-notice h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 5vw, 2.55rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy);
}

[data-theme="dark"] .gate-notice h1 {
  color: var(--ice);
}

.gate-notice p {
  margin: 0;
  font-size: 1rem;
  color: var(--steel);
  font-weight: 500;
}

.gate-scroll {
  margin-top: 2rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
}

.gate-scroll span[aria-hidden] {
  display: block;
  width: 1px;
  height: 28px;
  background: var(--ice);
  animation: gatePulse 1.4s ease infinite;
}

@keyframes gatePulse {
  0%,
  100% {
    transform: scaleY(0.55);
    opacity: 0.4;
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
    transform-origin: top;
  }
}

/* —— Brand wall (real hero) —— */
.brand-wall {
  position: relative;
  padding: clamp(3.5rem, 10vw, 6rem) 0 clamp(3rem, 7vw, 4.5rem);
  background: var(--paper);
  overflow: hidden;
}

.brand-wall .tape-bar {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 12px;
  background: var(--tape);
  box-shadow: 0 3px 0 rgba(6, 43, 113, 0.25);
}

.brand-wall-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}

.brand-wall .eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--steel);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-wall h2 {
  margin: 0;
  font-size: clamp(3.2rem, 12vw, 7.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--navy);
}

[data-theme="dark"] .brand-wall h2 {
  color: #fff;
}

.brand-wall .subname {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  font-weight: 500;
  color: var(--ice-deep);
  letter-spacing: 0;
}

.brand-wall-mark {
  width: clamp(120px, 22vw, 200px);
  height: auto;
  border: 3px solid var(--navy);
}

[data-theme="dark"] .brand-wall-mark {
  border-color: var(--ice);
}

.brand-thesis {
  margin: 2rem 0 0;
  max-width: 36rem;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
}

.brand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  font-weight: 800;
  font-size: 0.92rem;
  border: 2px solid var(--navy);
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--navy-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
}

.btn-ghost:hover {
  background: var(--navy);
  color: #fff;
}

[data-theme="dark"] .btn {
  border-color: var(--ice);
  background: var(--ice);
  color: var(--navy);
}

[data-theme="dark"] .btn-ghost {
  background: transparent;
  color: var(--ice);
}

[data-theme="dark"] .btn-ghost:hover {
  background: var(--ice);
  color: var(--navy);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  width: 100%;
}

.btn-danger:hover {
  filter: brightness(0.92);
}

/* —— Work strips —— */
.work {
  border-top: 2px solid var(--navy);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.work-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.work-head h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 900;
  color: var(--navy);
}

[data-theme="dark"] .work-head h3 {
  color: #fff;
}

.work-head p {
  margin: 0;
  max-width: 28rem;
  color: var(--steel);
  font-weight: 500;
}

.work-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.work-row:first-of-type {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
}

.work-label {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--ice-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 0.2rem;
}

.work-row h4 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.work-row p {
  margin: 0;
  color: var(--steel);
  max-width: 40rem;
}

/* —— Who —— */
.who {
  background: var(--navy);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  position: relative;
}

.who .tape-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 10px;
  background: var(--ice);
}

.who h3 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
}

.who-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.who-list li {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(135, 204, 219, 0.35);
  font-size: 1.05rem;
}

.who-list strong {
  font-weight: 900;
  color: var(--ice);
}

.who-list span {
  font-weight: 500;
  opacity: 0.9;
}

/* —— Page (legal / delete) —— */
.page-hero {
  padding: 2.5rem 0 1.25rem;
  border-bottom: 2px solid var(--navy);
  position: relative;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 6px;
  background: var(--ice);
}

.page-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  color: var(--navy);
}

[data-theme="dark"] .page-hero h1 {
  color: #fff;
}

.page-hero p {
  margin: 0;
  color: var(--steel);
}

.legal-content {
  padding: 2.25rem 0 4rem;
  max-width: 680px;
}

.legal-content h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--navy);
  border-inline-start: 4px solid var(--ice);
  padding-inline-start: 0.65rem;
}

[data-theme="dark"] .legal-content h2 {
  color: var(--ice);
}

.legal-content p,
.legal-content li {
  color: var(--steel);
}

.legal-content ul {
  padding-inline-start: 1.2rem;
}

.form-shell {
  width: min(100%, 440px);
  margin: 2rem auto 4rem;
}

.form-shell .lead {
  color: var(--steel);
  margin: 0 0 1.5rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 800;
  font-size: 0.9rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 2px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--ice);
  border-color: var(--navy);
}

.alert {
  padding: 0.8rem 1rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid;
}

.alert-success {
  border-color: var(--ice);
  background: rgba(135, 204, 219, 0.15);
  color: var(--navy);
}

[data-theme="dark"] .alert-success {
  color: var(--ice);
}

.alert-error {
  border-color: var(--danger);
  background: rgba(229, 57, 53, 0.08);
  color: var(--danger);
}

/* —— Footer —— */
.site-footer {
  border-top: 2px solid var(--navy);
  padding: 2.5rem 0 1.25rem;
  background: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.75rem;
}

.footer-brand p {
  margin: 0.75rem 0 0;
  color: var(--steel);
  max-width: 26rem;
  font-size: 0.95rem;
}

.footer-col h3 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
}

[data-theme="dark"] .footer-col h3 {
  color: var(--ice);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-col a,
.footer-col li {
  color: var(--steel);
  font-size: 0.92rem;
  font-weight: 500;
}

.footer-col a:hover {
  color: var(--navy);
}

[data-theme="dark"] .footer-col a:hover {
  color: var(--ice);
}

.footer-bottom {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--steel);
  font-size: 0.8rem;
  font-weight: 600;
}

.socials {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.socials a {
  width: 34px;
  height: 34px;
  border: 2px solid var(--navy);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.72rem;
  color: var(--navy);
}

[data-theme="dark"] .socials a {
  border-color: var(--ice);
  color: var(--ice);
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    inset-inline: 1rem;
    top: 68px;
    background: var(--paper);
    border: 2px solid var(--navy);
    padding: 1rem;
    color: var(--ink);
  }

  body.is-home .site-header:not(.is-solid) .nav-links.is-open {
    background: var(--navy-deep);
    color: #fff;
  }

  .menu-toggle {
    display: grid;
  }

  .nav-bar {
    position: relative;
  }

  .brand-wall-grid {
    grid-template-columns: 1fr;
  }

  .brand-wall-mark {
    order: -1;
  }

  .work-row,
  .who-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .brand-text {
    display: none;
  }

  .brand-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
