/* AKS Media — aks-digital.com
   Palette from the logo kit: night #0A1424, ivory #FAF4E9, coral→broken red #FF7157→#DE4033.
   System fonts only: no external requests. */
:root {
  --bg: #0a1424;
  --bg-2: #10203a;
  --bg-3: #162a4a;
  --line: rgba(250, 244, 233, 0.14);
  --text: #faf4e9;
  --muted: rgba(250, 244, 233, 0.72);
  --red: #de4033;
  --red-2: #b8352b;
  --coral: #f4584a;
  --sapphire: #4d8bff;
  --wrap: 68rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2.5px;
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem);
}

h2 {
  font-size: clamp(1.35rem, 1rem + 1.4vw, 1.9rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: -4rem;
  background: var(--red);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  z-index: 10;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

/* header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 32, 58, 0.9), rgba(10, 20, 36, 0));
}

.bar {
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.logo {
  display: inline-flex;
  text-decoration: none;
  margin-inline-end: auto;
}

.logo img {
  width: 197px;
  height: 30px;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  font-size: 0.95rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.35rem 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--coral);
}

.lang-switch {
  position: relative;
  flex: 0 0 auto;
}

.lang-switch > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(16, 32, 58, 0.4);
}

.lang-switch > summary::-webkit-details-marker,
.lang-switch > summary::marker {
  display: none;
  content: "";
}

.lang-switch > summary:hover {
  color: var(--text);
  border-color: var(--coral);
}

.lang-switch > summary:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

.lang-switch .globe {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--muted);
}

.lang-switch > summary:hover .globe {
  color: var(--coral);
}

.lang-switch .current-name {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 6.5rem;
}

.lang-switch .chevron {
  width: 10px;
  height: 7px;
  flex: none;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.lang-switch[open] > summary .chevron {
  transform: rotate(180deg);
}

.lang-switch[open] > summary {
  color: var(--text);
  border-color: var(--coral);
}

.lang-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.6rem);
  inset-inline-end: 0;
  width: min(21rem, calc(100vw - 2.5rem));
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 0.85rem;
  animation: lang-menu-in 0.14s ease;
}

@keyframes lang-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-menu-label {
  margin: 0 0 0.6rem;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.lang-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 0.5rem;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-radius: 7px;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
}

a.lang-item:hover,
a.lang-item:focus-visible {
  background: rgba(250, 244, 233, 0.08);
}

a.lang-item:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: -2px;
}

.lang-item.is-current {
  color: var(--coral);
  font-weight: 600;
}

.lang-item .check {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--coral);
}

@media (max-width: 600px) {
  /* The pill sits at the row's start edge once nav wraps below it (mirrors
     for RTL automatically), so the menu opens from that same edge instead
     of the desktop's inline-end anchor — otherwise it overshoots the
     viewport on the opposite side. */
  .lang-menu {
    inset-inline-start: 0;
    inset-inline-end: auto;
  }

  .lang-menu ul {
    grid-template-columns: 1fr;
  }
}

/* main */
main {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

main.doc {
  max-width: 44rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40rem;
}

.prose h1 {
  margin-bottom: 0.75rem;
}

.prose section {
  margin-top: 2.25rem;
}

.prose h2 {
  font-size: 1.3rem;
  padding-top: 0.25rem;
}

.prose ul {
  padding-inline-start: 1.25rem;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose .updated {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.button {
  display: inline-block;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  border: 1px solid transparent;
  overflow-wrap: anywhere;
}

.button:hover {
  background: var(--red-2);
}

/* home */
.hero {
  padding: 2rem 0 3rem;
  max-width: 46rem;
}

.hero-mark {
  width: 72px;
  height: 78px;
  margin-bottom: 1.25rem;
}

.hero .lead {
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.3rem);
}

.brands,
.approach,
.cta {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.cards,
.steps,
.topics {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 8px;
  padding: 1.25rem 1.25rem 0.5rem;
}

.card.brand-0 {
  border-top-color: var(--sapphire);
}

.card .focus {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.card .status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.steps li,
.topics li {
  padding: 1rem 1.15rem 0.25rem;
  border-inline-start: 3px solid var(--red);
  background: rgba(16, 32, 58, 0.55);
  border-radius: 6px;
}

.steps h3,
.topics h3 {
  margin-bottom: 0.35rem;
}

.cta p {
  max-width: 40rem;
}

/* contact */
.email-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 1.5rem 0 2rem;
}

.email-row .label {
  color: var(--muted);
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 1.75rem 0 2.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.footer-links a {
  color: var(--text);
}

.legal-line,
.operator {
  margin: 0.25rem 0 0;
}

[dir="rtl"] .og-card,
[dir="rtl"] .hero,
[dir="rtl"] .prose {
  text-align: start;
}

/* OG source card (1200×630, rendered headless) */
body.og {
  width: 1200px;
  height: 630px;
  min-height: 0;
  display: block;
  background: radial-gradient(120% 90% at 0% 0%, #162a4a, #0a1424 65%);
}

.og-card {
  height: 630px;
  padding: 80px 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.og-card img {
  width: 590px;
  height: 90px;
}

.og-line {
  font-size: 58px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 950px;
}

.og-sub {
  font-size: 30px;
  color: var(--muted);
  margin: 0;
}

.og-url {
  font-size: 26px;
  color: var(--coral);
  margin: 0;
  font-weight: 600;
}

@media (max-width: 600px) {
  .bar {
    padding: 0.85rem 0;
  }

  .logo img {
    width: 160px;
    height: 24px;
  }

  /* order/width belong on the actual flex item (the <nav> wrapper), not
     the inner .nav list — putting them on the list left the wrapper sized
     to its unwrapped max-content width, which blew out the whole page's
     layout viewport on narrow screens (worst on RTL, where everything
     anchors from the opposite edge and slides off-screen). */
  .bar > nav {
    order: 3;
    width: 100%;
  }

  .nav {
    gap: 0.1rem 0.9rem;
    font-size: 0.9rem;
  }

  .lang-switch > summary {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
  }

  .lang-switch .current-name {
    max-width: 4.5rem;
  }

  main {
    padding-top: 1.75rem;
  }

  .hero {
    padding-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* legal operator line (pages) */
.operator-line {
  color: var(--muted);
  font-size: 0.95rem;
  border-inline-start: 3px solid var(--red);
  padding-inline-start: 0.9rem;
  margin: 1.25rem 0 0;
}
