:root {
  --coral: #D9573A;
  --navy: #1F2A44;
  --cream: #FBF4EA;
  --yellow: #F2B33D;
  --teal: #4FA3A5;
  --grey: #E6E1D8;
  --muted: #5E6475;
  --latin: 'Lexend', 'Avenir Next', 'Segoe UI', sans-serif;
  --kurdish: 'Beiruti', 'Noto Sans Arabic', 'Geeza Pro', sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--latin);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
html[lang="ckb"] body { font-family: var(--kurdish); font-size: 19px; }
h1, h2, p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* Language switching: elements carry data-l="ckb" or data-l="en"; only the active language shows. */
html[lang="ckb"] [data-l="en"], html[lang="en"] [data-l="ckb"] { display: none !important; }
[data-l="ckb"] { font-family: var(--kurdish); }
[data-l="en"] { font-family: var(--latin); }

.skip { position: absolute; inset-inline-start: 16px; top: 16px; transform: translateY(-200%); background: var(--navy); color: var(--cream); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { transform: none; }

/* ---------- Header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--gutter);
  position: relative;
  z-index: 2;
}
.top .logo img { width: clamp(150px, 18vw, 200px); height: auto; }
.lang {
  font: 500 15px/1 var(--latin);
  color: var(--navy);
  background: #FFFFFF;
  border: 1px solid var(--grey);
  border-radius: 999px;
  padding: 11px 18px;
  min-height: 44px;
  cursor: pointer;
}
.lang [data-l="en"] { font-family: var(--kurdish); font-size: 17px; }
.lang:hover, .icon-btn:hover { border-color: var(--navy); }
.lang:focus-visible, .icon-btn:focus-visible, .btn:focus-visible, .link:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.tools { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  background: #FFFFFF;
  border: 1px solid var(--grey);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn[aria-pressed="true"] .off, .icon-btn[aria-pressed="false"] .on { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(16px, 4vh, 48px) var(--gutter) clamp(48px, 8vh, 96px);
  max-width: 1360px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  padding: 7px 16px;
  border-radius: 999px;
}
html[lang="ckb"] .badge { font-size: 18px; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

h1 {
  font-weight: 700;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1[data-l="ckb"] { line-height: 1.2; letter-spacing: 0; font-size: clamp(46px, 6.6vw, 96px); }
h1 .accent { color: var(--coral); }
.lead { font-size: clamp(18px, 1.6vw, 21px); max-width: 34ch; color: var(--navy); text-wrap: pretty; }
html[lang="ckb"] .lead { font-size: clamp(21px, 1.9vw, 25px); max-width: 32ch; }

.levels { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.levels li { font: 700 16px/1 var(--latin); padding: 11px 18px; border-radius: 999px; direction: ltr; }
.l1 { background: var(--teal); color: var(--navy); }
.l2 { background: #FFFFFF; color: var(--navy); border: 2px solid var(--yellow); }
.l3 { background: var(--coral); color: #FFFFFF; }
.levels .online { background: transparent; font-weight: 500; padding-inline: 4px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--coral);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
html[lang="ckb"] .btn { font-size: 21px; }
.btn:hover { background: #C44B30; transform: translateY(-2px); }
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.note { font-size: 15px; color: var(--muted); }
html[lang="ckb"] .note { font-size: 18px; }
.link { font-weight: 500; text-decoration-color: var(--coral); text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* ---------- Chat visual ---------- */
.stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 580px;
  justify-self: center;
}
.stage .shape { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--coral); }
.stage .shape-teal { position: absolute; width: 30%; height: 30%; left: -6%; bottom: -4%; color: var(--teal); }
.chat {
  position: absolute;
  inset: 14% 13% 22% 17%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  direction: ltr;
  font-family: var(--latin);
  overflow: hidden;
}
.msg {
  max-width: 86%;
  padding: 13px 18px;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.35;
  font-weight: 600;
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(31, 42, 68, 0.12);
  animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.msg.teacher { align-self: flex-start; background: var(--navy); color: var(--cream); border-bottom-left-radius: 6px; }
.msg.student { align-self: flex-end; background: #FFFFFF; color: var(--navy); border-bottom-right-radius: 6px; }
.msg small { display: block; font-family: var(--kurdish); font-weight: 500; font-size: 0.9em; opacity: 0.8; direction: rtl; text-align: right; margin-top: 2px; }
.msg.typing { display: inline-flex; gap: 5px; padding: 16px 18px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.4; animation: bounce 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }
.msg.leaving { animation: fade 0.4s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.92); } }
@keyframes bounce { 50% { transform: translateY(-4px); opacity: 1; } }
@keyframes fade { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 24px;
  padding: 22px var(--gutter) 28px;
  border-top: 1px solid var(--grey);
  font-size: 15px;
  color: var(--muted);
  max-width: 1360px;
  margin: 0 auto;
}
.foot .tag { font: 500 13px/1 var(--latin); letter-spacing: 0.18em; color: var(--navy); }
.foot [data-l="ckb"] { font-size: 17px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .stage { max-width: 440px; order: 2; }
  .copy { order: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Teacher link page ---------- */
.card-page { min-height: 100svh; display: flex; flex-direction: column; }
.card-wrap { flex-grow: 1; display: flex; justify-content: center; padding: 8px var(--gutter) 48px; }
.profile { width: 100%; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.avatar { width: 112px; height: 112px; border-radius: 50%; background: var(--coral); display: flex; align-items: center; justify-content: center; }
.avatar img { width: 64px; height: auto; }
.who { display: flex; flex-direction: column; gap: 2px; }
.who .name { font: 700 34px/1.15 var(--latin); letter-spacing: -0.01em; }
.who .name-ku { font: 700 28px/1.3 var(--kurdish); }
.who .role { font: 400 16px/1.4 var(--latin); color: var(--muted); margin-top: 6px; }
.who .role-ku { font: 500 19px/1.4 var(--kurdish); color: var(--muted); }
.stack { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 20px;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid var(--grey);
  text-decoration: none;
  color: var(--navy);
  text-align: start;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.row:hover { transform: translateY(-2px); border-color: var(--navy); }
.row:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.row.primary { background: var(--coral); border-color: var(--coral); color: #FFFFFF; }
.row svg { width: 24px; height: 24px; flex-shrink: 0; }
.row .label { flex-grow: 1; display: flex; flex-direction: column; line-height: 1.25; }
.row .label b { font: 600 17px/1.3 var(--latin); }
.row .label span { font: 400 14px/1.3 var(--latin); opacity: 0.75; }
.row .ku { font: 500 18px/1.3 var(--kurdish); direction: rtl; }

/* ---------- Brand book page ---------- */
.brand { max-width: 1200px; margin: 0 auto; padding: 16px var(--gutter) 72px; display: flex; flex-direction: column; gap: 72px; }
.brand-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-top: clamp(16px, 4vh, 48px); }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; color: var(--coral); }
.brand h1 { font-size: clamp(40px, 6vw, 80px); max-width: 14ch; }
.brand .lead { max-width: 46ch; }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; }
.downloads .btn { font-size: 17px; }
.downloads .meta { font-weight: 400; font-size: 14px; opacity: 0.8; }
.btn.secondary { background: #FFFFFF; color: var(--navy); border: 1px solid var(--grey); }
.btn.secondary:hover { background: #FFFFFF; border-color: var(--navy); }
.brand-section { display: flex; flex-direction: column; gap: 18px; }
.brand-section h2 { font-size: clamp(28px, 3vw, 36px); font-weight: 700; letter-spacing: -0.01em; }
.fine { font-size: 15px; color: var(--muted); }

.logo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.logo-card { margin: 0; background: #FFFFFF; border: 1px solid var(--grey); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.logo-art { height: 220px; display: flex; align-items: center; justify-content: center; padding: 24px; }
.logo-art img { height: auto; max-width: 100%; }
.logo-card figcaption { border-top: 1px solid var(--grey); padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--muted); }
.logo-card figcaption b { font-size: 16px; font-weight: 600; color: var(--navy); }
.logo-card .files { display: flex; gap: 14px; margin-top: 8px; }
.logo-card .files a { font-weight: 600; color: var(--coral); text-underline-offset: 3px; }

.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.swatch { font: inherit; text-align: start; background: #FFFFFF; border: 1px solid var(--grey); border-radius: 18px; padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; color: var(--navy); transition: transform 0.15s ease, border-color 0.15s ease; }
.swatch:hover { transform: translateY(-2px); border-color: var(--navy); }
.swatch:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.swatch .chip { height: 88px; border-radius: 12px; background: var(--c); margin-bottom: 10px; }
.swatch .chip.light { box-shadow: inset 0 0 0 1px var(--grey); }
.swatch b { font-size: 16px; font-weight: 600; padding-inline: 4px; }
.swatch span:not(.chip) { font-size: 13px; line-height: 1.4; color: var(--muted); padding-inline: 4px; }

.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.type-card { background: #FFFFFF; border: 1px solid var(--grey); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.type-card .spec { font-size: 34px; line-height: 1.25; font-weight: 700; color: var(--navy); }

.pages { display: flex; flex-direction: column; gap: 28px; }
.pages figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pages img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--grey); background: #FFFFFF; }
.pages .portrait { max-width: 640px; }
.pages figcaption { font-size: 14px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy); color: var(--cream); font-size: 15px; font-weight: 500; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 960px) {
  .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .type-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .logo-art { height: 160px; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
