:root {
  color-scheme: light;
  --ink: #101214;
  --muted: #687078;
  --paper: #e7e3d8;
  --panel: #f7f4ec;
  --panel-strong: #fffdf7;
  --stone: #c9c2b3;
  --line: #2c3136;
  --line-soft: rgba(16, 18, 20, 0.16);
  --dark: #08090b;
  --graphite: #111419;
  --steel: #78818b;
  --accent: #c4b28a;
  --accent-strong: #e5d6ad;
  --danger: #8b2525;
  --danger-soft: #f3e5df;
  --warning-soft: #f3ecd8;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--dark);
}

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

body[dir="rtl"],
html[dir="rtl"] body {
  font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 46px;
  border: 1px solid var(--dark);
  border-radius: 2px;
  background: var(--dark);
  color: #f7f4ec;
  font-weight: 760;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

button:hover {
  border-color: #000;
  background: #000;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.topbar {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-home .topbar {
  justify-content: flex-end;
}

.page-apply .topbar {
  justify-content: flex-end;
}

.brand,
.nav-link {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(229, 214, 173, 0.34);
  background: rgba(8, 9, 11, 0.34);
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.12) brightness(1.35);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid rgba(229, 214, 173, 0.42);
  border-radius: 2px;
  color: #f7f4ec;
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link.dark {
  color: var(--dark);
  border-color: rgba(16, 18, 20, 0.22);
  background: rgba(255, 253, 247, 0.72);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  border: 1px solid rgba(229, 214, 173, 0.28);
  border-radius: 2px;
  background: rgba(8, 9, 11, 0.22);
  backdrop-filter: blur(14px);
}

.app-header .language-toggle {
  border-color: rgba(16, 18, 20, 0.16);
  background: rgba(255, 253, 247, 0.68);
}

.language-toggle button {
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0.03em;
}

.hero .language-toggle button,
.hero .brand {
  color: #f7f4ec;
}

.language-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: #08090b;
}

.app-header .language-toggle button[aria-pressed="true"] {
  background: var(--dark);
  color: #f7f4ec;
}

.hero-home {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  overflow: hidden;
  color: #f7f4ec;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 88px 100%,
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 100% 72px,
    radial-gradient(circle at 78% 22%, rgba(196, 178, 138, 0.08), transparent 31%),
    linear-gradient(120deg, #060708 0%, #111419 48%, #1a1d22 100%);
}

.hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(255, 255, 255, 0.045) 42% 42.35%, transparent 42.35% 62%, rgba(255, 255, 255, 0.035) 62% 62.2%, transparent 62.2%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 34%, rgba(0, 0, 0, 0.42));
  pointer-events: none;
}

.hero-home::after {
  content: "";
  position: absolute;
  inset: auto 7vw 7vh auto;
  width: min(34vw, 360px);
  aspect-ratio: 1;
  background: url("/assets/kakakhel-logo.png") center / contain no-repeat;
  opacity: 0.055;
  filter: grayscale(1) contrast(1.25);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  align-self: center;
  padding: 54px 0 78px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(330px, 400px);
  gap: clamp(34px, 7vw, 96px);
  align-items: center;
}

.hero-story {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

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

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

h1,
h2,
h3,
h4 {
  letter-spacing: 0;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 5vw, 4.85rem);
  font-weight: 500;
  line-height: 0.98;
}

.hero-copy {
  max-width: 610px;
  margin: 24px 0 0;
  color: rgba(247, 244, 236, 0.74);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
}

.hero-answer {
  max-width: 560px;
  color: rgba(229, 214, 173, 0.92);
}

.lead-panel,
.form-panel,
.journey-panel {
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(247, 244, 236, 0.96);
  box-shadow: var(--shadow);
}

.lead-panel {
  display: grid;
  gap: 15px;
  padding: 22px;
  color: var(--ink);
  border-color: rgba(229, 214, 173, 0.28);
  background: rgba(247, 244, 236, 0.94);
}

.cta-panel {
  align-content: center;
  justify-items: center;
  min-height: 390px;
  text-align: center;
}

.cta-logo {
  width: 196px;
  height: 196px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.1);
}

.lead-panel .eyebrow {
  color: rgba(37, 42, 44, 0.72);
}

.lead-panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.62rem;
  font-weight: 500;
  line-height: 1.05;
}

.lead-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.mentor-inline-cta {
  font-size: 0.86rem;
}

.primary-cta {
  min-height: 48px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid var(--dark);
  border-radius: 2px;
  background: var(--dark);
  color: #f7f4ec;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.primary-cta:hover {
  border-color: #000;
  background: #000;
}

.primary-cta:active {
  transform: translateY(1px);
}

.text-link-button {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: inherit;
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link-button:hover {
  background: transparent;
  color: #000;
}

.mentor-lead-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: var(--panel);
}

.mentor-note-field,
.mentor-lead-form button,
.mentor-lead-form .alert {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 780;
  letter-spacing: 0.01em;
}

.field-help {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.38;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(16, 18, 20, 0.22);
  border-radius: 2px;
  padding: 10px 11px;
  background: rgba(255, 253, 247, 0.88);
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 102px;
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #08090b;
  box-shadow: 0 0 0 2px rgba(8, 9, 11, 0.14);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.microcopy {
  font-size: 0.8rem;
}

.alert {
  border-radius: 2px;
  padding: 11px 12px;
  line-height: 1.45;
  font-weight: 720;
}

.alert.error,
.danger {
  background: var(--danger-soft);
  border: 1px solid #d6b8b0;
  color: var(--danger);
}

.alert.success {
  background: #e7ede5;
  border: 1px solid #bbc9b8;
  color: #173f26;
}

.alert.setup {
  background: #e7ebef;
  border: 1px solid #b9c0c8;
  color: #26313d;
}

.app-header {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 94px 100%,
    var(--dark);
  border-bottom: 1px solid rgba(229, 214, 173, 0.2);
}

.application-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 58px;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 24px;
  align-items: stretch;
}

.journey-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
  color: #f7f4ec;
  border-color: rgba(229, 214, 173, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 45%),
    #101214;
}

.journey-panel h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-weight: 500;
  line-height: 1.02;
}

.journey-panel > p:not(.eyebrow) {
  color: rgba(247, 244, 236, 0.72);
  line-height: 1.6;
}

.journey-logo {
  width: clamp(116px, 12vw, 168px);
  height: auto;
  margin: auto auto 0;
  object-fit: contain;
  filter: grayscale(1) invert(1) brightness(1.35) contrast(0.9);
  opacity: 0.78;
}

.form-panel {
  padding: 24px;
  background: var(--panel-strong);
}

.form-heading,
.progress-meta,
.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.form-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.78rem;
  font-weight: 500;
  line-height: 1.05;
}

.form-title-logo {
  width: 86px;
  height: 86px;
  margin-inline-end: 42%;
  object-fit: contain;
  filter: grayscale(1) contrast(1.1);
}

.progress-wrap {
  margin: 18px 0 22px;
}

.progress-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 18, 20, 0.12);
}

.progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--dark);
  transition: width 180ms ease;
}

form {
  display: grid;
  gap: 17px;
}

.form-step {
  display: grid;
  gap: 16px;
}

.form-step[hidden] {
  display: none;
}

.parent-mode .form-step[data-step="0"] .field-help {
  display: none;
}

.form-step h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.46rem;
  font-weight: 500;
  line-height: 1.12;
}

.grid {
  display: grid;
  gap: 13px;
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-note,
.meet-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.notice {
  border-radius: 2px;
  padding: 12px 13px;
  line-height: 1.45;
  font-weight: 720;
}

.warning {
  background: var(--warning-soft);
  border: 1px solid #d4c69c;
  color: #4c4128;
}

.guardian-box,
.parent-referral-box {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px solid rgba(16, 18, 20, 0.14);
  border-radius: 2px;
  background: rgba(231, 227, 216, 0.48);
}

.guardian-box[hidden],
.parent-referral-box[hidden] {
  display: none;
}

.guardian-box h4 {
  margin: 0;
  font-size: 1rem;
}

.parent-referral-box {
  margin-top: 2px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.45;
  font-weight: 680;
}

.check input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--dark);
}

.review-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(16, 18, 20, 0.14);
  border-radius: 2px;
  background: rgba(231, 227, 216, 0.42);
}

.review-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.review-summary strong {
  color: var(--ink);
}

.completion-panel {
  display: grid;
  gap: 14px;
  min-height: 360px;
  align-content: center;
  padding: 34px;
  border: 1px solid rgba(16, 18, 20, 0.14);
  background: rgba(255, 253, 248, 0.82);
}

.completion-panel[hidden] {
  display: none;
}

.completion-panel h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.completion-panel p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.completion-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.completion-reference strong {
  color: var(--ink);
}

.wizard-actions {
  margin-top: 4px;
}

.secondary-button {
  border: 1px solid rgba(16, 18, 20, 0.24);
  background: transparent;
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--dark);
  background: rgba(16, 18, 20, 0.06);
}

.language-modal,
.mentor-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 7, 8, 0.76);
}

.mentor-modal {
  z-index: 45;
}

.language-modal[hidden],
.mentor-modal[hidden] {
  display: none;
}

.language-card,
.mentor-modal-card {
  border: 1px solid rgba(229, 214, 173, 0.24);
  border-radius: 2px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.language-card {
  width: min(460px, 100%);
  padding: 24px;
  text-align: center;
}

.mentor-modal-card {
  position: relative;
  width: min(640px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  padding: 24px;
}

.mentor-modal-card h2,
.language-card h2 {
  margin: 12px 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 1.08;
}

.mentor-modal-card h2 {
  max-width: calc(100% - 46px);
  margin-top: 0;
}

.mentor-modal-card p:not(.eyebrow),
.language-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid rgba(16, 18, 20, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
}

.modal-close:hover {
  border-color: var(--dark);
  background: rgba(16, 18, 20, 0.06);
}

.language-card img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.1);
}

.language-choice-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 960px) {
  .hero-grid,
  .application-shell {
    grid-template-columns: 1fr;
  }

  .journey-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .topbar {
    width: min(100% - 20px, 680px);
    padding: 12px 0;
    align-items: flex-start;
  }

  .brand {
    width: 48px;
    height: 48px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .topbar-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
  }

  .language-toggle button {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 0.7rem;
  }

  .nav-link {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .hero-content,
  .application-shell {
    width: min(100% - 20px, 680px);
  }

  .hero-content {
    padding: 30px 0 42px;
  }

  .lead-panel,
  .form-panel,
  .journey-panel {
    padding: 16px;
  }

  .journey-logo {
    width: 106px;
    margin-top: 28px;
  }

  .cta-logo {
    width: 142px;
    height: 142px;
  }

  .language-card img {
    width: 58px;
    height: 58px;
  }

  .cta-panel {
    min-height: 0;
  }

  .two,
  .mentor-lead-form,
  .language-choice-grid {
    grid-template-columns: 1fr;
  }

  .form-heading,
  .wizard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-title-logo {
    width: 70px;
    height: 70px;
    margin-inline-end: 0;
    align-self: center;
  }

  .wizard-actions button {
    width: 100%;
  }
}
