:root {
  --navy-950: #020a16;
  --navy-900: #061224;
  --navy-800: #0b1e36;
  --gold-500: #dfa02b;
  --gold-400: #f0b544;
  --text: #f7f8fb;
  --muted: #bbc4d2;
  --line: rgba(240, 181, 68, 0.34);
  --glass: rgba(3, 12, 25, 0.74);
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(90deg, rgba(2, 10, 22, 0.92), rgba(2, 10, 22, 0.54)),
    linear-gradient(180deg, rgba(2, 10, 22, 0.35), rgba(2, 10, 22, 0.82)),
    url("assets/background/karkaot-ai-background.png") center / cover fixed;
  color: var(--text);
}

button {
  font: inherit;
}

.app {
  min-height: 100svh;
  padding: clamp(18px, 3vw, 42px);
}

.hidden {
  display: none !important;
}

.language-screen {
  min-height: calc(100svh - clamp(36px, 6vw, 84px));
  display: grid;
  align-items: center;
}

.brand-panel {
  width: min(680px, 100%);
  padding: clamp(26px, 5vw, 54px) 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-400);
  font-size: clamp(0.78rem, 1.5vw, 0.9rem);
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.1rem, 10vw, 7.3rem);
  line-height: 0.9;
  text-transform: uppercase;
}

h1 span {
  display: block;
  color: var(--gold-400);
}

.intro {
  width: min(520px, 100%);
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.language-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(620px, 100%);
  margin-top: 32px;
}

.language-button,
.ghost-button,
.nav-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(4, 16, 32, 0.82);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.language-button {
  min-height: 86px;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
}

.language-button[dir="rtl"] {
  text-align: right;
}

.language-button span {
  font-size: clamp(1rem, 2.3vw, 1.25rem);
  font-weight: 800;
}

.language-button small {
  color: var(--muted);
  font-size: 0.78rem;
}

.language-button.primary {
  border-color: rgba(240, 181, 68, 0.72);
  background: linear-gradient(135deg, rgba(223, 160, 43, 0.98), rgba(150, 95, 12, 0.95));
  color: #08101d;
}

.language-button.primary small {
  color: rgba(8, 16, 29, 0.82);
}

.language-button:hover,
.ghost-button:hover,
.nav-button:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(240, 181, 68, 0.82);
}

.notice {
  min-height: 28px;
  margin: 20px 0 0;
  color: var(--gold-400);
  font-weight: 700;
}

.carousel-screen {
  min-height: calc(100svh - clamp(36px, 6vw, 84px));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(16px, 2vw, 24px);
}

.carousel-screen:focus {
  outline: none;
}

.carousel-header {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 16px;
}

.carousel-header h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 2rem);
  line-height: 1.08;
}

.carousel-header .eyebrow {
  margin-bottom: 5px;
}

.ghost-button,
.nav-button {
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.ghost-button {
  width: 48px;
  height: 48px;
  font-size: 1.35rem;
}

.slide-counter {
  min-width: 72px;
  margin: 0;
  color: var(--gold-400);
  font-weight: 800;
  text-align: right;
}

.carousel-shell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  align-items: center;
  gap: clamp(10px, 2vw, 18px);
}

.nav-button {
  width: 58px;
  height: 72px;
  font-size: 3rem;
  line-height: 1;
}

.nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.slide-frame {
  width: min(100%, 1380px, calc((100svh - 178px) * 16 / 9));
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.slide-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--navy-900);
}

@media (max-width: 720px) {
  body {
    background-position: 62% center;
  }

  .language-actions {
    grid-template-columns: 1fr;
  }

  .language-button {
    min-height: 70px;
  }

  .carousel-header {
    grid-template-columns: 44px 1fr;
  }

  .slide-counter {
    grid-column: 2;
    text-align: left;
  }

  .carousel-shell {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .slide-frame {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
  }

  .nav-button {
    width: 100%;
    height: 52px;
    font-size: 2.1rem;
  }
}

@media (max-width: 420px) {
  .app {
    padding: 16px;
  }

  h1 {
    font-size: clamp(2.6rem, 15vw, 3.5rem);
  }
}
