@font-face {
  font-family: Alexandria;
  src: url("../display.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: PlexArabic;
  src: url("../body.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

[hidden] { display: none !important; }

body.kw-site {
  --bg: #151211;
  --surface: var(--bg);
  --paper: #201a17;
  --ink: #f7f0e4;
  --muted: #bdb2a7;
  --gold: #e8b958;
  --line: #4e4235;
  --display: Alexandria, PlexArabic, sans-serif;
  --body: PlexArabic, sans-serif;
  --gutter: clamp(20px, 5.6vw, 94px);
  --curtain-opacity: .72;
  color-scheme: dark;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.85 var(--body);
}

body.kw-site[data-page="home"] { --curtain-opacity: 1; }

.kw-site::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto auto 0;
  width: min(65vw, 980px);
  height: clamp(280px, 38vw, 590px);
  pointer-events: none;
  opacity: var(--curtain-opacity);
  background: url("../home/curtain.webp") left top / 100% auto no-repeat;
  mask-image: linear-gradient(90deg, #000 16%, #000d 50%, #0004 77%, transparent 95%),
    linear-gradient(#000 25%, #000b 65%, transparent 97%);
  mask-composite: intersect;
}

.kw-site main { background: none; }
.kw-site :is(a, button, summary):focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.kw-site :is(h1, h2, h3) { font-family: var(--display); }
.kw-shell, .kw-site .container { width: min(1372px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.kw-header { position: relative; z-index: 10; }
.kw-header-inner {
  min-height: 85px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.kw-brand { justify-self: start; }
.kw-brand img { display: block; width: 62px; height: 62px; object-fit: contain; }
.kw-nav { display: flex; gap: clamp(14px, 2.4vw, 38px); align-items: center; }
.kw-nav a {
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}
.kw-nav a:hover, .kw-nav a[aria-current] { color: var(--gold); background: #ffffff09; }
.kw-header-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.kw-download {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-height: 38px;
  padding: 5px 16px;
  border: 1px solid #ad7730;
  border-radius: 8px;
  background: #211715b0;
  color: var(--gold);
  font: 400 15px/1.7 var(--body);
  text-decoration: none;
  white-space: nowrap;
}
.kw-download:hover { background: #302019; border-color: var(--gold); color: var(--gold); }
.kw-menu {
  display: none;
  place-items: center;
  width: 37px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.kw-footer { border-top: 1px solid var(--line); }
.kw-footer .kw-shell {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px 25px;
  padding-block: 21px;
  color: var(--muted);
  font-size: 13px;
}
.kw-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.kw-footer a { color: inherit; text-decoration: none; }
.kw-footer a:hover { color: var(--gold); }
.kw-footer .kw-shell > span { white-space: nowrap; }

.kw-site.kw-support {
  --curtain-opacity: .44;
  --surface: #151211;
  --paper: #201a17;
  --ink: #f7f0e4;
  --muted: #bdb2a7;
  --line: #4e4235;
  --gold: #e8b958;
}
.kw-support .legal-main h1 { font-size: clamp(32px, 5vw, 52px); }
.kw-support .legal-main { position: relative; }
.kw-support .help-hero::before { background: radial-gradient(ellipse at 50% 0, #dca14815, transparent 63%); }
.kw-support .help-search { background: #211a17; border-color: #74573b; color: var(--ink); }
.kw-support .help-search :is(input, input::placeholder) { color: var(--muted); }
.kw-support .help-search svg { stroke: var(--gold); }
.kw-support .help-search button { color: var(--ink); }
.kw-support .help-topic { background: #201a17; }
.kw-support .contact-panel { background: #201a17; }

@media (max-width: 850px) {
  .kw-header-inner { min-height: 74px; grid-template-columns: auto 1fr; }
  .kw-brand img { width: 53px; height: 53px; }
  .kw-menu { display: grid; }
  .kw-nav {
    display: none;
    position: absolute;
    inset: 74px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 10px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .kw-nav.is-open { display: flex; }
  .kw-footer .kw-shell { flex-direction: column; }
}

@media (max-width: 620px) {
  .kw-site::before { width: 100%; height: 430px; opacity: calc(var(--curtain-opacity) * .72); }
}
