@font-face {
  font-family: Anybody;
  src: url("../fonts/anybody-vd.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Familjen Grotesk";
  src: url("../fonts/familjen-grotesk-vd.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Arabic";
  src: url("../fonts/noto-sans-arabic-vd.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Cairo;
  src: url("../fonts/cairo-vd.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}


:root {
  --stage: #000000;
  --ink: #ffffff;
  --tile: #131313;
  --acid: #d3de5d;
  --band: #ffffff;
  --band-ink: #000000;
  --mute: rgba(255, 255, 255, 0.62);
  --rule: rgba(255, 255, 255, 0.22);
  --inset: 30px;
  --rail: 52px;
  --pill: 51px;
  --tile-r: 32px;
  --display: Anybody, "Arial Narrow", sans-serif;
  --ui: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--stage);
  color: var(--ink);
  min-height: 100%;
}

body {
  font-family: var(--ui);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
}

body.is-result {
  overflow: hidden;
}

a {
  color: inherit;
}

:focus {
  outline: none;
}

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

.btn:focus-visible,
.chip:focus-visible,
.nav-link:focus-visible,
.brand:focus-visible {
  outline-offset: 3px;
}

.cta-bar :focus-visible,
.legal-in-cta :focus-visible {
  outline-color: var(--band-ink);
}

[hidden] {
  display: none !important;
}

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

.noscript {
  background: var(--band);
  color: var(--band-ink);
  padding: 16px var(--inset);
  font-size: 16px;
}

.noscript a {
  font-weight: 700;
}

/* Tick field */
.ticks {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.tick {
  position: absolute;
  height: 2px;
  background: var(--ink);
  opacity: 0.16;
  will-change: transform;
}

/* Ribbon */
.ribbon {
  position: fixed;
  inset-inline: 0;
  bottom: 6vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.11;
  white-space: nowrap;
}

body.is-result .ribbon {
  opacity: 0.1;
  bottom: 36vh;
}

.ribbon-track {
  display: inline-flex;
  gap: 80px;
  will-change: transform;
}

.ribbon-track span {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "wght" 800, "wdth" 75;
  font-size: clamp(88px, 11vw, 160px);
  line-height: 0.82;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

/* Top rail */
.top {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 20;
  height: var(--rail);
  padding: 0 var(--inset);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--stage);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 22px;
  height: 22px;
  color: var(--ink);
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-word {
  font-family: Anybody, "Arial Narrow", sans-serif;
  font-weight: 800;
  font-stretch: 80%;
  font-variation-settings: "wght" 800, "wdth" 80;
  font-size: 16px;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.top-end {
  display: flex;
  align-items: center;
  gap: 22px;
}

.ad-label,
.nav-link {
  font-family: var(--ui);
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
}

.ad-label {
  color: var(--mute);
}

.nav-link {
  border-bottom: 1px solid transparent;
}

.nav-link:hover {
  border-bottom-color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  align-items: stretch;
  height: 28px;
  border: 1px solid var(--rule);
  border-radius: 90px;
  overflow: hidden;
  flex: 0 0 auto;
}

.lang-switch button {
  appearance: none;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--mute);
  padding: 0 10px;
  font-family: var(--ui);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--stage);
}

.lang-switch button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

/* Stage */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: calc(var(--rail) + 36px) var(--inset) 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

body.is-result .stage {
  height: 100vh;
  min-height: 100vh;
  padding-bottom: 148px;
}

.intro h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-variation-settings: "wght" 800, "wdth" 75;
  font-size: clamp(52px, 8.2vw, 102px);
  line-height: 0.82;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  max-width: 16ch;
  text-wrap: balance;
}

.lead {
  margin: 28px 0 0;
  max-width: 22em;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 90%;
  font-variation-settings: "wght" 800, "wdth" 90;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.ask {
  margin-top: 40px;
  max-width: 1120px;
}

#prompt {
  display: block;
  width: 100%;
  resize: none;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 8px 0 14px;
  font-family: var(--ui);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.25;
  caret-color: var(--ink);
}

#prompt::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

#prompt:focus-visible {
  outline: none;
  border-bottom-width: 2px;
}

.ask-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.chip {
  appearance: none;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 90px;
  height: 40px;
  padding: 0 16px;
  padding-inline: 16px;
  font-family: var(--ui);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.chip:hover,
.chip.is-on {
  background: var(--ink);
  color: var(--stage);
  border-color: var(--ink);
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--pill);
  padding: 0 20px;
  border-radius: 90px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--stage);
  font-family: var(--ui);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--stage);
  color: var(--ink);
}

.btn-ask {
  flex: 0 0 auto;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  height: 40px;
  padding: 0 16px;
  padding-inline: 16px;
  font-size: 15px;
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--stage);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Results */
.results {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  flex: 0 0 auto;
}

.asked {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 85%;
  font-variation-settings: "wght" 800, "wdth" 85;
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  max-width: 28ch;
  text-wrap: balance;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.voice {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--tile);
  color: var(--ink);
  border: 0;
  border-radius: var(--tile-r);
  padding: 22px 22px 20px;
  text-align: start;
  cursor: pointer;
  overflow: hidden;
  will-change: transform;
}

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

.voice.is-kept {
  background: var(--acid);
  color: var(--stage);
}

.voice.is-dim {
  opacity: 0.42;
}

.voice-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.voice-name {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 80%;
  font-variation-settings: "wght" 800, "wdth" 80;
  font-size: 20px;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.voice-role {
  font-family: var(--ui);
  font-weight: 400;
  font-size: 13px;
  line-height: 1;
  opacity: 0.7;
}

.voice-body {
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-family: var(--ui);
  font-weight: 400;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.4;
  text-wrap: pretty;
  white-space: pre-wrap;
}

.voice-keep {
  margin-top: 16px;
  font-family: var(--ui);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
  opacity: 0.85;
}

.voice.is-ready .voice-keep,
.voice:hover .voice-keep,
.voice:focus-visible .voice-keep,
.voice.is-kept .voice-keep {
  opacity: 1;
}

.voice.is-kept .voice-keep {
  font-weight: 700;
}

/* Conversion inversion */
.cta-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  background: var(--band);
  color: var(--band-ink);
  padding: 16px var(--inset) 12px;
  border-top: 1px solid var(--band-ink);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-line {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 85%;
  font-variation-settings: "wght" 800, "wdth" 85;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  max-width: 22em;
  text-wrap: balance;
}

.cta-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.btn-cta {
  background: var(--band-ink);
  color: var(--band);
  border-color: var(--band-ink);
  height: var(--pill);
}

.btn-cta:hover {
  background: var(--band);
  color: var(--band-ink);
}

.btn-text {
  background: transparent;
  color: var(--band-ink);
  border-color: transparent;
  height: 40px;
  padding: 0 4px;
  border-radius: 0;
  border-bottom: 1px solid var(--band-ink);
}

.btn-text:hover {
  background: transparent;
  color: var(--band-ink);
  opacity: 0.55;
}

.legal {
  font-size: 13px;
  line-height: 1.4;
  text-wrap: pretty;
}

.legal p {
  margin: 0;
}

.legal-dock {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 15;
  padding: 14px var(--inset) 16px;
  color: var(--mute);
  background: var(--stage);
}

.legal-in-cta {
  margin-top: 10px;
  color: rgba(0, 0, 0, 0.62);
}

body.is-result .legal-dock {
  display: none;
}

/* Short desktop height (1366x768 and similar) */
@media (max-height: 820px) {
  .stage {
    padding-top: calc(var(--rail) + 18px);
    padding-bottom: 80px;
  }

  .intro h1 {
    font-size: clamp(48px, 8.8vh, 78px);
  }

  .lead {
    margin-top: 18px;
    font-size: clamp(18px, 3.2vh, 26px);
  }

  .ask {
    margin-top: 24px;
  }

  .board {
    gap: 16px;
  }

  .voice {
    padding: 16px 16px 14px;
    border-radius: 24px;
  }

  .ribbon-track span {
    font-size: 96px;
  }

  body.is-result .stage {
    padding-bottom: 128px;
  }
}

@media (max-width: 1100px) {
  .ask-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-ask {
    align-self: flex-start;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  :root {
    --inset: 18px;
  }

  .board {
    grid-template-columns: 1fr;
    min-height: 0;
    flex: none;
    gap: 14px;
  }

  .voice {
    min-height: 200px;
  }

  .results-head {
    flex-direction: column;
    align-items: flex-start;
  }

  body.is-result {
    overflow: auto;
  }

  body.is-result .stage {
    height: auto;
    min-height: 0;
    padding-bottom: 24px;
  }

  .cta-bar {
    position: static;
    padding: 20px var(--inset) 20px;
  }

  .cta-line {
    max-width: none;
    font-size: 28px;
  }

  .chip {
    white-space: normal;
    height: auto;
    padding: 10px 16px;
    line-height: 1.25;
  }

  .intro h1 {
    font-size: clamp(44px, 14vw, 72px);
  }

  .ribbon {
    bottom: 10vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tick,
  .ribbon-track,
  .voice,
  .btn,
  .chip {
    will-change: auto;
  }
}

/* Arabic typography and RTL */
html[dir="rtl"] {
  --display: "Noto Sans Arabic", Anybody, sans-serif;
  --ui: Cairo, "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
}

html[dir="rtl"] body {
  line-height: 1.65;
}

html[dir="rtl"] .intro h1,
html[dir="rtl"] .lead,
html[dir="rtl"] .asked,
html[dir="rtl"] .cta-line,
html[dir="rtl"] .ribbon-track span,
html[dir="rtl"] .voice-name {
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.15;
}

html[dir="rtl"] .intro h1 {
  line-height: 1.2;
  max-width: 12ch;
  font-stretch: 75%;
  font-variation-settings: "wght" 800, "wdth" 75;
}

html[dir="rtl"] .lead {
  line-height: 1.35;
  max-width: 26em;
  font-stretch: 85%;
  font-variation-settings: "wght" 700, "wdth" 85;
}

html[dir="rtl"] .asked,
html[dir="rtl"] .cta-line {
  line-height: 1.3;
  max-width: 22em;
  font-stretch: 85%;
  font-variation-settings: "wght" 800, "wdth" 85;
}

html[dir="rtl"] .voice-name {
  font-stretch: 85%;
  font-variation-settings: "wght" 800, "wdth" 85;
}

html[dir="rtl"] .voice-body,
html[dir="rtl"] .legal,
html[dir="rtl"] #prompt {
  line-height: 1.7;
}

html[dir="rtl"] .chip,
html[dir="rtl"] .btn {
  line-height: 1.3;
}

html[dir="rtl"] .ribbon {
  direction: ltr;
  bottom: 0;
  opacity: 0.07;
  height: 18vh;
}

html[dir="rtl"] body.is-result .ribbon {
  bottom: 28vh;
  height: 22vh;
  opacity: 0.08;
}

html[dir="rtl"] .ribbon-track span {
  direction: rtl;
  unicode-bidi: isolate;
  font-stretch: 75%;
  font-variation-settings: "wght" 800, "wdth" 75;
  font-size: clamp(56px, 7.2vw, 104px);
  line-height: 1.2;
}

html[dir="rtl"] .legal-dock {
  padding-top: 18px;
  padding-bottom: 16px;
}

html[dir="rtl"] body.is-result .stage {
  padding-bottom: 176px;
}

@media (max-height: 820px) {
  html[dir="rtl"] body.is-result .stage {
    padding-bottom: 168px;
  }

  html[dir="rtl"] .cta-line {
    font-size: clamp(18px, 1.7vw, 24px);
  }

  html[dir="rtl"] .cta-bar {
    padding-top: 12px;
    padding-bottom: 8px;
  }
}

@media (max-width: 900px) {
  html[dir="rtl"] .ribbon {
    height: 14vh;
    bottom: 0;
  }

  html[dir="rtl"] body.is-result .stage {
    padding-bottom: 24px;
  }
}

html[dir="rtl"] .cta-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  html[dir="rtl"] .cta-actions {
    justify-content: flex-start;
  }
}

@media (max-height: 820px) {
  html[dir="rtl"] .intro h1 {
    line-height: 1.15;
  }
}
