@import url("https://fonts.googleapis.com/css2?family=Lalezar&family=Vazirmatn:wght@400;500;700&display=swap");

/* آکادمی گفت‌وگو — theme */
:root {
  --lapis: #1D4FB8;
  --lapis-deep: #133A8A;
  --sky: #E3EBFB;
  --paper: #F7F9FE;
  --ink: #17213A;
  --muted: #4A5672;
  --sun: #FFC83D;
  --sun-deep: #F2B310;
  --coral: #FF6B57;
  --coral-deep: #F0503B;
  --white: #FFFFFF;

  --font-head: "Lalezar", "Vazirmatn", system-ui, sans-serif;
  --font-body: "Vazirmatn", system-ui, sans-serif;

  --r-lg: 1.75rem;
  --r-md: 1.1rem;
  --r-sm: 0.4rem;
  --line: 2px solid var(--lapis);
  --wrap: 72rem;
  --gap: clamp(1rem, 3vw, 2rem);
  --space: clamp(3.5rem, 9vw, 6.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.9;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 0.6em;
  color: var(--ink);
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: clamp(2.2rem, 7vw, 4.4rem); line-height: 1.25; }
h2 { font-size: clamp(1.8rem, 4.6vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 38em; }

a { color: var(--lapis); text-underline-offset: 0.25em; text-decoration-thickness: 2px; }
a:hover { color: var(--lapis-deep); }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

[lang="en"], [lang="de"] { font-family: var(--font-head); }

/* ---------- utilities ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.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;
}

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  background: var(--sun); color: var(--ink); padding: 0.6rem 1.2rem;
  border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

section { padding-block: var(--space); }
.section--tint { background: var(--sky); }

.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 5vw, 3rem); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.6rem 1.6rem;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--sun { background: var(--sun); color: var(--ink); border-color: var(--ink); }
.btn--sun:hover { background: var(--sun-deep); color: var(--ink); }
.btn--coral { background: var(--coral); color: var(--ink); }
.btn--coral:hover { background: var(--coral-deep); color: var(--ink); }
.btn--line { background: transparent; color: var(--lapis); border-color: var(--lapis); }
.btn--line:hover { background: var(--lapis); color: var(--white); }
.btn--light { background: var(--white); color: var(--lapis-deep); }
.btn--light:hover { background: var(--sky); color: var(--lapis-deep); }
.btn--small { min-height: 2.5rem; padding: 0.4rem 1.1rem; font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* ---------- header & nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 249, 254, 0.94);
  border-bottom: 2px solid var(--sky);
  backdrop-filter: blur(6px);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.25rem; flex-wrap: wrap;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-head); font-size: 1.45rem; line-height: 1;
}
.brand svg { width: 2.4rem; height: 2.4rem; flex: none; }
.brand small { display: block; font-family: var(--font-body); font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.4rem 1rem;
  background: var(--sky); color: var(--lapis-deep);
  border: 0; border-radius: 999px;
  font: 700 0.95rem var(--font-body); cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 4px; }
.nav-toggle__bars span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle[aria-expanded="true"] { background: var(--lapis); color: var(--white); }

#site-nav { display: none; flex-basis: 100%; padding-bottom: 1rem; }
#site-nav[data-open="true"] { display: block; }
#site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
#site-nav a {
  display: block; padding: 0.55rem 1rem; border-radius: var(--r-md);
  color: var(--ink); text-decoration: none; font-weight: 500;
}
#site-nav a:hover { background: var(--sky); color: var(--lapis-deep); }
#site-nav a[aria-current="page"] { background: var(--lapis); color: var(--white); }

.header-cta { display: none; }

/* always-visible placement test on phones */
.test-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: var(--lapis-deep);
  display: flex; justify-content: center;
}
.test-bar .btn { width: 100%; max-width: 26rem; }
body { padding-bottom: 4.5rem; }

/* ---------- speech bubbles ---------- */
.bubble {
  position: relative;
  display: inline-block;
  max-width: 34rem;
  padding: 0.85rem 1.3rem;
  border-radius: var(--r-lg);
  background: var(--sky);
  color: var(--ink);
  line-height: 1.8;
}
.bubble p:last-child { margin-bottom: 0; }
.bubble--them { border-end-start-radius: var(--r-sm); background: var(--white); border: var(--line); }
.bubble--me { border-end-end-radius: var(--r-sm); background: var(--lapis); color: var(--white); }
.bubble--sun { background: var(--sun); color: var(--ink); border-end-end-radius: var(--r-sm); }
.bubble--coral { background: var(--coral); color: var(--ink); border-end-start-radius: var(--r-sm); }
.bubble__who { display: block; font-size: 0.8rem; font-weight: 700; opacity: 0.75; margin-bottom: 0.15rem; }

.bubble--hello {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 3.4vw, 2rem);
  line-height: 1.3;
  padding: 0.5rem 1.2rem;
  white-space: nowrap;
}

.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; max-width: 46rem; }
.thread li { display: flex; }
.thread .from-me { justify-content: flex-start; }
.thread .from-them { justify-content: flex-end; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) var(--space); overflow: hidden; }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero h1 { margin-bottom: 0.4em; }

.hello-board { position: relative; min-height: 20rem; display: grid; place-items: center; padding-block: 3rem; }
.hello-board svg.hello-board__art { width: 100%; max-width: 30rem; margin-inline: auto; }
.hello-board .bubble--hello { position: absolute; }
.hello-board .h1 { top: 0; inset-inline-start: 4%; }
.hello-board .h2 { top: 8%; inset-inline-end: 2%; }
.hello-board .h3 { top: 42%; inset-inline-start: 0; }
.hello-board .h4 { bottom: 4%; inset-inline-end: 6%; }
.hello-board .h5 { bottom: 0; inset-inline-start: 22%; }

/* ---------- courses ---------- */
.panels { display: grid; gap: var(--gap); }
.panel {
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--white);
  border: var(--line);
  display: flex; flex-direction: column; gap: 0.6rem;
}
.panel--en { border-end-start-radius: var(--r-sm); }
.panel--de { border-end-end-radius: var(--r-sm); background: var(--sky); border-color: var(--lapis-deep); }
.panel__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.panel__top h3 { margin: 0; }
.panel ul { margin: 0.4rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.panel li { padding-inline-start: 1.6rem; position: relative; }
.panel li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.7em;
  width: 0.8rem; height: 0.6rem; border-radius: 0.35rem 0.35rem 0.35rem 0.1rem;
  background: var(--coral);
}
.panel .btn { align-self: flex-start; margin-top: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin: 2rem 0 0; }
.chip {
  padding: 0.4rem 1rem; border-radius: 999px;
  background: var(--sun); color: var(--ink); font-weight: 700; font-size: 0.95rem;
}
.chip--line { background: transparent; border: var(--line); color: var(--lapis-deep); }

/* ---------- lapis band ---------- */
.band { background: var(--lapis); color: var(--white); }
.band h2, .band h3 { color: var(--white); }
.band .lead { color: var(--sky); }
.band a:not(.btn) { color: var(--sun); }
.band__grid { display: grid; gap: clamp(2rem, 5vw, 3rem); align-items: center; }
.band svg { max-width: 26rem; margin-inline: auto; }

/* ---------- big line ---------- */
.big-line {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 5.6vw, 3.6rem);
  line-height: 1.45;
  max-width: 22em;
  margin: 0 0 1.2rem;
}
.big-line strong { font-weight: 400; color: var(--lapis); }

/* ---------- placement teaser ---------- */
.sun-panel {
  background: var(--sun);
  border-radius: var(--r-lg);
  border-end-end-radius: var(--r-sm);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  display: grid; gap: 2rem; align-items: center;
}
.sun-panel .lead { color: var(--ink); }
.sun-panel .thread { gap: 0.7rem; }
.sun-panel .bubble--them { border-color: var(--ink); }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: var(--gap); }
.contact-card {
  background: var(--white); border: var(--line); border-radius: var(--r-lg);
  padding: 1.6rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.contact-card:nth-child(2) { border-end-start-radius: var(--r-sm); }
.contact-card h3 { margin: 0; }
.contact-card .big {
  font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.1rem);
  color: var(--lapis); text-decoration: none; margin: 0;
  align-self: flex-start;
}
.contact-card .btn { align-self: flex-start; margin-top: 0.6rem; }

/* ---------- page head (inner pages) ---------- */
.page-head { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { font-size: clamp(2rem, 6vw, 3.6rem); }

/* ---------- teachers ---------- */
.teachers { display: grid; gap: var(--gap); }
.teacher {
  background: var(--white); border: var(--line); border-radius: var(--r-lg);
  padding: 1.5rem; display: grid; gap: 0.8rem; align-content: start;
}
.teacher:nth-child(even) { border-end-start-radius: var(--r-sm); }
.teacher:nth-child(odd) { border-end-end-radius: var(--r-sm); }
.teacher svg { width: 5.5rem; height: 5.5rem; }
.teacher h3 { margin: 0; }
.teacher__langs { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 0.9rem; max-width: 46rem; }
.faq details {
  background: var(--white); border: var(--line); border-radius: var(--r-lg);
  border-end-start-radius: var(--r-sm);
}
.faq summary {
  cursor: pointer; padding: 1rem 1.3rem; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-head); font-size: 1.5rem; line-height: 1; color: var(--coral-deep); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.3rem 1.1rem; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.1rem; max-width: 40rem; }
.form__row { display: grid; gap: 1.1rem; }
.form__field { display: grid; gap: 0.35rem; }
.form__field label, .form__label { font-weight: 700; }
.form__hint { font-size: 0.9rem; color: var(--muted); }
.form__input {
  width: 100%; min-height: 3.1rem; padding: 0.7rem 1rem;
  font: inherit; color: var(--ink);
  background: var(--white); border: 2px solid #B9C8EA; border-radius: var(--r-md);
}
textarea.form__input { min-height: 8rem; resize: vertical; }
.form__input:focus { border-color: var(--lapis); outline: none; box-shadow: 0 0 0 4px var(--sky); }
.form__input:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.form__input[dir="ltr"] { text-align: right; }
.form__field[data-state="error"] .form__input { border-color: var(--coral-deep); background: #FFF1EE; }
.form__field[data-state="ok"] .form__input { border-color: var(--lapis); }
.form__status { margin: 0; font-weight: 700; min-height: 1.5em; }
.form__status[data-state="error"] { color: #B3301E; }
.form__status[data-state="sent"] { color: var(--lapis-deep); }

/* multi-step: each step is a question bubble in a thread */
.form-steps { display: grid; gap: 1.5rem; max-width: 44rem; }
.form__step { border: 0; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.form__step legend {
  float: left; width: auto; margin-bottom: 0.9rem;
  font-family: var(--font-head); font-size: clamp(1.2rem, 3vw, 1.5rem);
}
.form__step legend + * { clear: both; }
.form__step-count { display: block; font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; opacity: 0.8; }
.choices { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-start; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: inline-block; padding: 0.55rem 1.2rem; border-radius: 999px;
  border: var(--line); background: var(--white); color: var(--lapis-deep); font-weight: 700;
}
.choice input:checked + span { background: var(--lapis); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 3px; }

/* ---------- footer ---------- */
.site-footer { background: var(--lapis-deep); color: var(--sky); padding-block: 3.5rem 2rem; }
.site-footer a { color: var(--white); }
.site-footer .brand { color: var(--white); }
.site-footer .brand small { color: var(--sky); }
.footer__grid { display: grid; gap: 2rem; }
.footer__title { font-family: var(--font-head); font-size: 1.25rem; color: var(--white); margin-bottom: 0.5rem; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.footer__bottom {
  margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(227, 235, 251, 0.25);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem; font-size: 0.9rem;
}
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- style guide helpers ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; }
.swatch { border-radius: var(--r-lg); border: 2px solid var(--sky); overflow: hidden; background: var(--white); }
.swatch__chip { height: 6rem; }
.swatch__meta { padding: 0.7rem 1rem; font-size: 0.9rem; }
.swatch__meta code { direction: ltr; unicode-bidi: isolate; }
.chip-lapis { background: #1D4FB8; }
.chip-lapis-deep { background: #133A8A; }
.chip-sky { background: #E3EBFB; }
.chip-paper { background: #F7F9FE; }
.chip-ink { background: #17213A; }
.chip-sun { background: #FFC83D; }
.chip-coral { background: #FF6B57; }
.type-sample { border-bottom: 2px dashed var(--sky); padding-block: 1rem; }
.type-sample code { font-size: 0.85rem; color: var(--muted); direction: ltr; unicode-bidi: isolate; }
.sg-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ---------- breakpoints ---------- */
@media (min-width: 600px) {
  .form__row { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .teachers { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .hello-board { min-height: 24rem; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-header__inner { flex-wrap: nowrap; }
  #site-nav { display: block; flex-basis: auto; padding: 0; }
  #site-nav ul { display: flex; gap: 0.1rem; }
  #site-nav a { padding: 0.4rem 0.7rem; font-size: 0.95rem; border-radius: 999px; }
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; }
  .panels { grid-template-columns: 1fr 1fr; }
  .band__grid { grid-template-columns: 1fr 1fr; }
  .sun-panel { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 1200px) {
  body { padding-bottom: 0; }
  .test-bar { display: none; }
  .header-cta { display: inline-flex; }
  #site-nav a { padding: 0.45rem 0.8rem; font-size: 1rem; }
  .teachers { grid-template-columns: repeat(4, 1fr); }
  .hello-board { min-height: 28rem; }
}

@media (max-width: 380px) {
  .brand small { display: none; }
  .bubble--hello { font-size: 1.1rem; padding: 0.4rem 0.9rem; }
  .btn { padding-inline: 1.1rem; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover { transform: none; }
}

/* === imprint: prose === */
.prose { max-width: 44rem; }
.prose h3 { margin-top: 2rem; color: var(--lapis-deep); }
.prose ul { margin: 0 0 1em; padding-inline-start: 1.4rem; }
.prose li { margin-bottom: 0.3rem; }
.prose li::marker { color: var(--coral-deep); }
