/* Newgate site styles. One typeface (Alexandria) for English and Arabic.
   Company pages use the Newgate palette; pages with <body class="atharhum">
   switch to the app's deep blue and amber. */
@font-face {
  font-family: "Alexandria";
  src: url("fonts/alexandria.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ground: #F3F5F2;
  --panel: #E4EAE5;
  --ink: #0F2A2B;
  --muted: #47595A;
  --line: #C9D3CD;
  --accent: #FF5A4E;
  --solid: #0F2A2B;      /* filled buttons and bands */
  --on-solid: #FFFFFF;
  --measure: 62ch;
  --wrap: 1120px;
}
body.atharhum {
  --ground: #FFFFFF;
  --panel: #F4F7FA;
  --ink: #13212C;
  --muted: #55636F;
  --line: #D3DCE4;
  --accent: #F2A33A;
  --solid: #0F3D5E;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Alexandria", system-ui, "Segoe UI", Tahoma, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}
[lang="ar"] body, body[lang="ar"] { line-height: 1.85; }
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--solid); color: var(--on-solid); padding: 0.75rem 1rem; }
.skip:focus { inset-inline-start: 0; z-index: 10; }

/* Header */
.site-header { padding-block: 1.25rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand svg { height: 2.25rem; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 0.25rem 1.5rem; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav a { text-decoration: none; padding-block: 0.6rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 0.14em; }
.site-nav .lang { border: 1.5px solid var(--ink); border-radius: 999px; padding: 0.35rem 0.95rem; }
.site-nav .lang:hover { background: var(--solid); color: var(--on-solid); text-decoration: none; border-color: var(--solid); }

/* Type */
h1, h2, h3 { line-height: 1.12; font-weight: 700; margin: 0; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; line-height: 1.3; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0; max-width: var(--measure); }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); }
.muted { color: var(--muted); }
.stack > * + * { margin-block-start: 1rem; }
.stack-lg > * + * { margin-block-start: 2rem; }

.button {
  display: inline-block; background: var(--solid); color: var(--on-solid);
  text-decoration: none; font-weight: 600; padding: 0.85rem 1.5rem; border-radius: 999px;
  border: 1.5px solid var(--solid);
}
.button:hover { background: transparent; color: var(--ink); }
.button.quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.button.quiet:hover { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

section { padding-block: clamp(2.5rem, 7vw, 5.5rem); }

/* Home hero: the gate itself */
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) 0; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 2rem; align-items: end; }
.hero-text { padding-block-end: clamp(2.5rem, 7vw, 5.5rem); }
.hero-gate { display: block; width: 100%; max-width: 420px; justify-self: end; margin-block-end: -1px; }
.hero-gate .walker { animation: walk-in 1.4s cubic-bezier(.2,.7,.2,1) 0.3s both; }
@keyframes walk-in { from { transform: translateX(var(--from, -70px)); opacity: 0; } to { transform: none; opacity: 1; } }
[dir="rtl"] .hero-gate .walker { --from: 70px; }
@media (prefers-reduced-motion: reduce) { .hero-gate .walker { animation: none; } }
.ground-line { border: 0; border-top: 2px solid var(--ink); margin: 0; }

/* Work list */
.work { list-style: none; margin-block-end: 0; padding: 0; border-top: 1px solid var(--line); }
.work li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
.work img, .work .slot { width: 5.5rem; height: 5.5rem; border-radius: 22%; display: block; }
.work .slot { border: 2px dashed var(--line); }
.status { display: inline-block; font-size: 0.85rem; border: 1.5px solid currentColor; border-radius: 999px; padding: 0.15rem 0.75rem; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem 4rem; }

/* Facts table (About) */
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: minmax(9rem, 16rem) minmax(0, 1fr); gap: 0.25rem 2rem; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.mail { font-size: clamp(1.4rem, 4vw, 2.4rem); font-weight: 700; overflow-wrap: anywhere; }

/* Atharhum */
.band { background: var(--solid); color: var(--on-solid); }
.band .lede, .band .muted { color: #DCE7F0; }
.band .button { background: var(--accent); border-color: var(--accent); color: #2B1A00; }
.band .button:hover { background: transparent; color: var(--on-solid); }
.band .button.quiet { background: transparent; border-color: var(--on-solid); color: var(--on-solid); }
.band .button.quiet:hover { background: var(--on-solid); color: var(--solid); }
.band .status { color: var(--accent); }
.app-head { display: flex; align-items: center; gap: 1.25rem; }
.app-head img { width: 5rem; height: 5rem; border-radius: 22%; border: 2px solid rgba(255,255,255,0.4); }
.amber-rule { width: 4rem; height: 5px; border-radius: 3px; background: var(--accent); border: 0; margin: 0; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.shots img { display: block; width: 100%; border-radius: 14px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 3rem; list-style: none; margin-block-end: 0; padding: 0; }
.features p { color: var(--muted); margin-block-start: 0.4rem; }
.panel { background: var(--panel); border-radius: 18px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.checks { margin-block-end: 0; padding-inline-start: 1.2rem; max-width: var(--measure); }
.checks li + li { margin-block-start: 0.5rem; }

/* Long text: policy and support */
.doc { max-width: 46rem; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.doc h2 { font-size: 1.4rem; margin-block-start: 2.5rem; }
.doc > * + * { margin-block-start: 1rem; }
.doc ul { padding-inline-start: 1.3rem; margin-block: 0.75rem; }
.doc li + li { margin-block-start: 0.35rem; }
.doc li > ul { margin-block: 0.35rem; }
.langnote { border: 1.5px solid var(--line); border-radius: 12px; padding: 0.75rem 1rem; display: inline-block; }
details { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; padding-block: 0.95rem; font-weight: 600; }
details > div { padding-block-end: 1.1rem; color: var(--muted); }
details > div p + p, details > div ul { margin-block-start: 0.5rem; }
details ul { padding-inline-start: 1.3rem; }

/* Footer */
.site-footer { border-top: 2px solid var(--ink); padding-block: 2.5rem; font-size: 0.9rem; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; }
.site-footer p { color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; justify-items: start; }
.site-footer a { display: inline-block; padding-block: 0.3rem; }

@media (max-width: 820px) {
  .hero .wrap, .two, .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-text { padding-block-end: 1rem; }
  .hero-gate { max-width: 240px; justify-self: start; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work li { grid-template-columns: 4rem minmax(0, 1fr); }
  .work img, .work .slot { width: 4rem; height: 4rem; }
  .work li > :last-child { grid-column: 2; justify-self: start; }
  .facts div { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .features { grid-template-columns: minmax(0, 1fr); }
}
.doc h3 { margin-block-start: 2rem; }
