/* Northarc Technologies — coming-soon page */
:root {
  --navy: #1F3A5F;
  --navy-line: #2C4A72;
  --dusk: #4E6585;
  --dune: #D8C39C;
  --dune-hover: #E6D6B6;
  --ivory: #F3EDE2;
  --muted: #C6D0DC;
  --muted-2: #B8C4D4;
  --placeholder: #8EA0B8;
  --error: #F0B9A0;
  --pad: clamp(20px, 5vw, 64px);
  --font-latin: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--navy);
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--font-latin);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[lang="ar"] body { font-family: var(--font-arabic); }

a { color: var(--dune); text-decoration: none; }
a:hover { color: var(--ivory); }
:focus-visible { outline: 2px solid var(--dune); outline-offset: 3px; }

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

/* Layout */
.page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;
}

.bg-mark {
  position: absolute;
  z-index: -1;
  top: 55%;
  inset-inline-end: 0;
  width: min(70vw, 90vh, 900px);
  width: min(70vw, 90svh, 900px);
  height: auto;
  transform: translate(50%, -50%);
  pointer-events: none;
}
[dir="rtl"] .bg-mark { transform: translate(-50%, -50%); }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px max(var(--pad), env(safe-area-inset-right)) 28px max(var(--pad), env(safe-area-inset-left));
}

/* Logo */
.brand { display: flex; align-items: center; gap: 14px; color: inherit; }
.brand-mark { width: 44px; height: 44px; flex: none; }
.wordmark { display: flex; flex-direction: column; gap: 6px; }
.wordmark-name {
  font-weight: 700;
  font-stretch: 125%;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.14em;
  margin-right: -0.14em;
  color: var(--ivory);
}
.wordmark-sub {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  font-stretch: 110%;
  font-size: 6.5px;
  line-height: 1;
  color: var(--dune);
}
.wordmark-ar { display: flex; flex-direction: column; }
.wordmark-ar-name { font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--ivory); }
.wordmark-ar-sub { font-weight: 500; font-size: 11px; line-height: 1.3; color: var(--dune); }

/* Language switch */
.lang { display: flex; align-items: center; gap: 4px; }
.lang a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  border-bottom: 1px solid transparent;
}
.lang a:lang(ar) { font-family: var(--font-arabic); font-size: 15px; letter-spacing: 0; }
.lang a:hover { color: var(--ivory); }
.lang a[aria-current="page"] { color: var(--ivory); border-bottom-color: var(--dune); }

/* Hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 1240px;
  padding: 48px max(var(--pad), env(safe-area-inset-right)) 64px max(var(--pad), env(safe-area-inset-left));
}
.hero-inner { display: flex; flex-direction: column; gap: 28px; max-width: 660px; }

.eyebrow {
  margin: 0;
  font-weight: 600;
  font-stretch: 115%;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dune);
}

h1 {
  margin: 0;
  font-weight: 500;
  font-stretch: 108%;
  font-size: clamp(34px, min(6vw, 10vh), 76px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ivory);
  text-wrap: balance;
}

.lead {
  margin: 0;
  max-width: 540px;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* Signup */
.signup { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.signup-row { display: flex; flex-wrap: wrap; gap: 8px; }

.signup input {
  flex: 1 1 240px;
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  background: rgba(243, 237, 226, 0.06);
  border: 1px solid var(--dusk);
  border-radius: 2px;
  color: var(--ivory);
  font: inherit;
  font-size: 16px; /* 16px stops iOS from zooming on focus */
  -webkit-appearance: none;
  appearance: none;
}
.signup input::placeholder { color: var(--placeholder); opacity: 1; }
.signup input:focus { outline: none; border-color: var(--dune); }
.signup input[aria-invalid="true"] { border-color: var(--error); }

.btn {
  flex: none;
  height: 54px;
  padding: 0 26px;
  background: var(--dune);
  border: 0;
  border-radius: 2px;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-stretch: 115%;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--dune-hover); }

.form-error { margin: 0; font-size: 14px; color: var(--error); }

.form-success {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 520px;
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid var(--dune);
  border-radius: 2px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ivory);
}
.form-success:focus { outline: none; }
.form-success svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--dune); stroke-width: 2; }

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  padding: 22px max(var(--pad), env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left));
  border-top: 1px solid var(--navy-line);
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}
.copyright { margin-inline-start: auto; }

/* Arabic adjustments */
html[lang="ar"] .eyebrow { font-size: 15px; letter-spacing: 0; }
html[lang="ar"] h1 { font-weight: 600; font-size: clamp(32px, min(5.4vw, 9vh), 68px); line-height: 1.3; letter-spacing: 0; }
html[lang="ar"] .lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.8; max-width: 560px; }
html[lang="ar"] .signup input { text-align: right; }
html[lang="ar"] .btn { font-size: 16px; letter-spacing: 0; padding: 0 28px; }
html[lang="ar"] .form-error { font-size: 15px; }
html[lang="ar"] .footer { font-size: 15px; line-height: 1.5; }

/* Tablets, phones and landscape phones: no background compass (logo stays in the header) */
@media (max-width: 900px) {
  .bg-mark { display: none; }
  .footer { flex-direction: column; gap: 6px; }
  .copyright { margin-inline-start: 0; margin-top: 6px; }
}

/* Medium and short heights: tighten vertical rhythm */
@media (max-height: 760px) {
  .header { padding-top: 18px; padding-bottom: 18px; }
  .hero { padding-top: 24px; padding-bottom: 40px; }
  .hero-inner { gap: 20px; }
}

/* Phones */
@media (max-width: 640px) {
  .header { padding-top: 20px; padding-bottom: 20px; }
  .brand-mark { width: 38px; height: 38px; }
  .hero { justify-content: flex-start; padding-top: min(12vh, 48px); padding-bottom: 40px; }
  .hero-inner { gap: 22px; }
  .bg-mark { display: none; }
  .btn { flex: 1 1 100%; }
  .footer { flex-direction: column; gap: 6px; }
  .copyright { margin-inline-start: 0; margin-top: 6px; }
}

/* Narrow phones: compact header so logo and language switch fit side by side */
@media (max-width: 400px) {
  .header { gap: 12px; }
  .brand { gap: 10px; }
  .brand-mark { width: 34px; height: 34px; }
  .wordmark { gap: 5px; }
  .wordmark-name { font-size: 15px; }
  .wordmark-sub { font-size: 5.5px; }
  .wordmark-ar-name { font-size: 19px; }
  .wordmark-ar-sub { font-size: 10px; }
  .lang a { padding: 0 8px; }
}

/* Very short landscape screens (phones on their side) */
@media (max-height: 520px) and (orientation: landscape) {
  .header { padding-top: 12px; padding-bottom: 12px; }
  .hero { justify-content: flex-start; padding-top: 4px; padding-bottom: 20px; }
  .hero-inner { gap: 14px; }
  .bg-mark { display: none; }
  .footer {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 24px;
    padding-top: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .copyright { margin-inline-start: auto; margin-top: 0; }
}

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

/* Signup in flight */
.btn:disabled { opacity: 0.6; cursor: default; }
.btn:disabled:hover { background: var(--dune); }
