/* 1771 Management - public landing page.
   Colours follow the panel (dark surfaces, amber accent). System fonts only. */

:root {
  --bg: #0E1317;
  --bg-2: #10171C;
  --surface: #141B21;
  --raise: #1A232B;
  --line: #26323C;
  --line-2: #33414C;
  --text: #E8EDF1;
  --soft: #C4CFD8;
  --muted: #A9B6C1;
  --dim: #8595A2;
  --accent: #E3A04A;
  --accent-hi: #F2C27F;
  --on-accent: #141B21;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-ar: -apple-system, "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", Tahoma, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* JS on and a non-Turkish language chosen: keep the page hidden until the
   strings are swapped (site.js removes the class; it also does so on load). */
.i18n-pending body { visibility: hidden; }

html[lang="ar"] body {
  font-family: var(--font-ar);
  line-height: 1.8;
}

[lang="ar"] { font-family: var(--font-ar); }

::selection { background: rgba(227, 160, 74, .35); color: #FFFFFF; }

svg { display: block; }

/* ---------- focus & skip link ---------- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#main:focus { outline: none; }

.skip {
  position: absolute;
  top: -100px;
  inset-inline-start: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { top: 12px; }
.skip:focus-visible { outline-color: var(--accent-hi); }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

main { flex: 1 0 auto; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--raise);
  border: 1px solid var(--line);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.brand-sub {
  font-size: .8125rem;
  color: var(--dim);
}

.langs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.langs[hidden] { display: none; }

/* With JS on, keep the switcher's space from the first paint (no layout shift);
   site.js removes [hidden] once the language is applied. */
.js .langs[hidden] { display: flex; visibility: hidden; }

.langs button {
  font: inherit;
  min-height: 40px;
  min-width: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.langs button[lang="ar"] { font-family: var(--font-ar); }

.langs button:hover { background: var(--raise); color: var(--text); }

.langs button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

.langs button:focus-visible { outline-offset: 2px; }

@media (max-width: 480px) {
  .langs { width: 100%; }
  .langs button { flex: 1 1 0; }
}

/* ---------- hero ---------- */

.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 440px at 85% -10%, rgba(227, 160, 74, .10), transparent 62%),
    var(--bg);
}

html[dir="rtl"] .hero {
  background:
    radial-gradient(900px 440px at 15% -10%, rgba(227, 160, 74, .10), transparent 62%),
    var(--bg);
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-block: clamp(40px, 8vw, 96px);
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 56px;
  }
}

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0 0 20px;
  padding: 5px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--soft);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.eyebrow .sep { color: var(--accent); }

h1, h2, h3 { color: var(--text); text-wrap: balance; }

h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(1.875rem, 4.6vw, 3rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.02em;
}

.lead {
  margin: 22px 0 0;
  max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: var(--muted);
}

.cta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(227, 160, 74, .16);
  transition: background-color .15s ease, box-shadow .15s ease;
}

.btn:hover {
  background: var(--accent-hi);
  box-shadow: 0 12px 32px rgba(227, 160, 74, .24);
}

.btn:focus-visible { outline-color: var(--accent-hi); }

.btn svg { flex: none; }

html[dir="rtl"] .arrow { transform: scaleX(-1); }

.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  max-width: 52ch;
  font-size: .875rem;
  color: var(--muted);
}

.note svg {
  flex: none;
  margin-top: 2px;
  color: var(--accent);
}

@media (max-width: 420px) {
  .cta .btn { width: 100%; }
}

/* decorative emblem panel (wide screens only) */

.art { display: none; }

@media (min-width: 880px) {
  .art {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    justify-self: end;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
      radial-gradient(closest-side, rgba(227, 160, 74, .16), transparent 78%),
      linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 28px 28px,
      linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 28px 28px,
      var(--bg-2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
  }
}

.art-emblem {
  width: 58%;
  height: auto;
}

.art-num {
  /* LTR in every language, so the start padding always sits on the left and
     balances the trailing letter-spacing on the right (keeps "1771" centred in RTL). */
  direction: ltr;
  unicode-bidi: isolate;
  padding-inline-start: .45em;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: .45em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- features ---------- */

.features { padding-block: clamp(48px, 8vw, 88px); }

.section-head {
  max-width: 62ch;
  margin-bottom: 28px;
}

h2 {
  margin: 0;
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 680px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--raise);
  border: 1px solid var(--line);
  color: var(--accent);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

h3 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: .9375rem;
  color: var(--muted);
}

.card-soon {
  border-style: dashed;
  border-color: #3E4D59;
  background: transparent;
}

.card-soon .card-icon { color: var(--dim); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid rgba(227, 160, 74, .4);
  border-radius: 999px;
  background: rgba(227, 160, 74, .12);
  color: var(--accent-hi);
  font-size: .78125rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

/* ---------- access ---------- */

.access { padding-bottom: clamp(48px, 8vw, 88px); }

.access-box {
  display: grid;
  gap: 22px;
  align-items: center;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(227, 160, 74, .08), transparent 55%),
    var(--surface);
}

html[dir="rtl"] .access-box {
  background:
    linear-gradient(225deg, rgba(227, 160, 74, .08), transparent 55%),
    var(--surface);
}

@media (min-width: 780px) {
  .access-box {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
  }
}

.access-copy p {
  margin: 10px 0 0;
  max-width: 62ch;
  color: var(--muted);
}

.access-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

@media (min-width: 780px) {
  .access-action { align-items: center; }
}

@media (max-width: 420px) {
  .access-action { align-items: stretch; }
}

.host {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--dim);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 28px 36px;
}

.copy {
  margin: 0;
  font-size: .875rem;
  font-weight: 600;
  color: var(--soft);
}

.disclaimer {
  margin: 0;
  max-width: 80ch;
  font-size: .8125rem;
  color: var(--dim);
}

/* ---------- Arabic: no letter-spacing (it breaks joined letters) ---------- */

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
  letter-spacing: 0;
  line-height: 1.4;
}

html[lang="ar"] .eyebrow { letter-spacing: 0; }

/* Arabic glyphs read small at the smallest sizes: about 1px larger there. */
html[lang="ar"] .eyebrow,
html[lang="ar"] .disclaimer { font-size: .875rem; }
html[lang="ar"] .badge { font-size: .84375rem; }
html[lang="ar"] .note { font-size: .9375rem; }

/* ---------- motion & forced colours ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

@media (forced-colors: active) {
  .btn, .langs button, .badge { border: 1px solid ButtonText; }
  .langs button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 4px; }
}
