/* ---- tokens.css ---- */
/* Design tokens, derived from the maicode logo: blue chevron, teal chevron, orange triangle, navy wordmark. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #1b2a41;
  --ink-soft: #3d4a5c;
  --muted: #5b6980;
  --line: #e1e6ed;

  --blue: #4a8fe7;
  --blue-soft: #d6e6fb;
  --blue-softer: #e9f1fd;
  --teal: #5fd6b8;
  --teal-soft: #cdf2e7;
  --orange: #f5a623;
  --orange-soft: #fde4b8;
  --yellow: #fcd36a;
  --yellow-soft: #fdeec2;
  --dark: #1b2a41;
  --dark-hover: #2b3f5e;

  --font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(27, 42, 65, 0.06);
  --shadow-md: 0 10px 30px rgba(27, 42, 65, 0.08);

  --container: 1120px;
  --container-narrow: 1080px;
  --gutter: 24px;

  --section-gap: 96px;
  --section-gap-tight: 56px;
  --header-h: 96px;
}

/* ---- base.css ---- */
/* Reset + page-level rules + shared layout primitives. */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.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; }

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.container--narrow { width: min(var(--container-narrow), 100% - var(--gutter) * 2); }

.section { padding-block: calc(var(--section-gap) / 2); }
section[id], main[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.section--tight { padding-block: calc(var(--section-gap-tight) / 2); }
.section__intro {
  max-width: 560px;
  margin: 20px auto 32px;
  text-align: center;
  font-size: 18px;
  color: var(--ink-soft);
}
.section__actions { display: flex; justify-content: center; margin-top: 32px; }

/* Headings with a teal "marker" span. */
.heading {
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}
.heading--center { text-align: center; }
.heading--left { text-align: left; }
.heading > span { display: inline; }

.marker {
  display: inline;
  padding: 0.04em 0.28em;
  background: var(--teal);
  border-radius: 12px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
h1 .marker, h2 .marker { padding-inline: 0.28em; }
.marker--teal { background: var(--teal); }
.marker--yellow { background: var(--yellow); }
.marker--blue { background: var(--blue-soft); }

/* Blue grid background used by feature panels. */
.grid-bg {
  background-color: var(--blue-soft);
  background-image:
    linear-gradient(rgba(27, 42, 65, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 42, 65, 0.12) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: 40% 0;
}

/* ---- components.css ---- */
/* Reusable components: button, chip, card, placeholder, avatar, stars, tabs, faq... */

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.button--primary { background: var(--dark); color: #fff; box-shadow: var(--shadow-sm); }
.button--primary:hover { background: var(--blue); transform: translateY(-1px); }
.button--surface { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.button--surface:hover { background: #fafaf7; }
.button--teal { background: var(--teal); color: var(--ink); }
.button:active { transform: translateY(0); }
.button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  background: var(--teal-soft);
}
.chip--surface { background: var(--surface); box-shadow: var(--shadow-sm); }
.chip--muted { background: var(--bg); font-weight: 400; font-size: 12px; padding: 3px 9px; }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card--flush { padding: 0; overflow: hidden; }
.card--blue { background: var(--blue-soft); }
.card__title { font-weight: 500; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.card__title--lg { font-size: 28px; }
.card__text { margin-top: 12px; color: var(--ink-soft); font-size: 15px; }

/* Image placeholders (swap for real photos later) */
.placeholder {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--blue-soft);
  color: rgba(20, 20, 20, 0.35);
}
.placeholder--teal { background: linear-gradient(135deg, var(--teal-soft), var(--teal)); }
.placeholder--orange { background: linear-gradient(135deg, var(--orange-soft), var(--orange)); }
.placeholder--yellow { background: linear-gradient(135deg, var(--yellow-soft), var(--yellow)); }
.placeholder--blue { background: linear-gradient(135deg, var(--blue-softer), var(--blue-soft)); }
.placeholder--surface { background: var(--bg); }
.placeholder--dark { background: var(--dark); color: rgba(255, 255, 255, 0.35); }
.placeholder__icon { width: 26%; height: 26%; max-width: 120px; max-height: 120px; stroke-width: 1.2; }
.photo { display: block; width: 100%; height: auto; object-fit: cover; border-radius: var(--radius-lg); }

/* Avatars */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  background: var(--blue-soft);
  border: 2px solid var(--surface);
}
.avatar--blue { background: var(--blue-soft); }
.avatar--orange { background: var(--orange-soft); }
.avatar--teal { background: var(--teal-soft); }
.avatar--yellow { background: var(--yellow-soft); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -10px; }

/* Stars with fractional fill */
.stars { position: relative; display: inline-block; line-height: 0; color: var(--dark); }
.stars .icon { display: inline-block; width: 22px; height: 22px; }
.stars__base .icon { fill: none; }
.stars__fill { position: absolute; inset: 0; width: var(--fill, 100%); overflow: hidden; white-space: nowrap; }
.stars__fill .icon { fill: var(--orange); stroke: var(--orange); }

/* "Read more" text link */
.link-more { display: inline-block; margin-top: 16px; font-size: 15px; font-weight: 500; }
.link-more:hover { text-decoration: underline; }

/* Speech bubble */
.bubble {
  position: relative;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--yellow-soft);
  font-size: 15px;
  max-width: 300px;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: -10px;
  border: 10px solid transparent;
  border-top-color: var(--yellow-soft);
  border-bottom: 0;
}

/* Tabs */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}
.tabs__icon { width: 20px; height: 20px; }
.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tabs__tab[aria-selected="true"] { background: var(--teal-soft); color: var(--ink); }
.tabs__tab:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Numbered stepper (1 — 2 — 3) */
.stepper { display: flex; justify-content: center; align-items: flex-start; gap: 0; margin-bottom: 28px; }
.stepper__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; text-align: center; font-size: 14px; }
.stepper__num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  font-weight: 600;
  font-size: 14px;
}
.stepper__item:first-child .stepper__num { background: var(--teal); }
.stepper__item + .stepper__item::before {
  content: "";
  position: absolute;
  top: 16px;
  right: calc(50% + 20px);
  width: 80px;
  height: 2px;
  background: var(--line);
}

/* FAQ accordion (native <details>) */
.faq__list { border-top: 1px solid var(--ink); }
.faq__item { border-bottom: 1px solid var(--ink); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0;
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__icon { width: 32px; height: 32px; padding: 6px; border-radius: 50%; transition: transform 0.2s ease, background-color 0.2s ease; }
.faq__q:hover .faq__icon { background: var(--blue-soft); }
.faq__item[open] .faq__icon { transform: rotate(45deg); background: var(--yellow); }
.faq__a { padding: 0 0 26px; max-width: 760px; color: var(--ink-soft); }

/* ---- sections.css ---- */
/* Page sections, in page order. One block per section. */

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 0;
  background: linear-gradient(var(--bg) 60%, transparent);
}
.header__inner { display: flex; align-items: stretch; gap: 12px; }
.header__bar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px;
  min-height: 56px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.header__actions { display: flex; align-items: stretch; gap: 12px; }
.header__cta { min-height: 56px; border-radius: var(--radius-md); }
.header__burger {
  display: none;
  width: 56px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  place-items: center;
}
.header__burger .icon { width: 24px; height: 24px; }
.header__burger-close { display: none; }
.header[data-open] .header__burger-open { display: none; }
.header[data-open] .header__burger-close { display: block; }

.brand { display: inline-flex; align-items: center; }
.logo { display: block; height: auto; }
svg.logo { aspect-ratio: 640 / 88; }
.logo--header { width: 132px; }
.logo--certificate { width: 150px; }
.logo--footer { width: 140px; }

.nav { display: flex; gap: 32px; }
.nav__link { font-size: 15px; color: var(--muted); transition: color 0.15s ease; }
.nav__link:hover { color: var(--blue); }

/* Hero */
.hero { padding-top: 40px; }
.hero__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.hero__content { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero__title { margin-bottom: 0; font-size: clamp(34px, 4.8vw, 54px); }
.hero__text { font-size: 18px; color: var(--ink-soft); max-width: 420px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.hero__cta { min-width: 240px; }
.hero__link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink); }
.hero__link .icon { width: 18px; height: 18px; transition: transform 0.15s ease; }
.hero__link:hover { color: var(--blue); }
.hero__link:hover .icon { transform: translateX(3px); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__fact { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: var(--radius-pill); background: var(--teal-soft); font-size: 14px; font-weight: 500; }
.hero__fact-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: #1fa98a; flex: none; }
.hero__fact-icon .icon { width: 16px; height: 16px; }

/* Hero image stage: photo + floating code card, tech badges, project preview */
.hero__stage { position: relative; padding: 28px 44px 44px 22px; }
.hero__image { display: block; aspect-ratio: 740 / 576; width: 100%; border-radius: var(--radius-xl); }

.hero__code {
  position: absolute;
  top: 0;
  left: 0;
  width: min(280px, 54%);
  border-radius: var(--radius-md);
  background: var(--dark);
  color: #fff;
  padding: 12px 14px 14px;
  box-shadow: var(--shadow-md);
}
.hero__code-bar { display: flex; gap: 6px; margin-bottom: 10px; }
.hero__code-bar span { width: 8px; height: 8px; border-radius: 50%; }
.hero__code-bar span:nth-child(1) { background: #ff6159; }
.hero__code-bar span:nth-child(2) { background: #ffbd2e; }
.hero__code-bar span:nth-child(3) { background: #28c941; }
.hero__code-body { font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 11px; line-height: 1.7; white-space: pre; overflow-x: auto; }
.tok--kw { color: #8ab4ff; }
.tok--fn { color: #7ee7c7; }
.tok--str { color: #ffd479; }
.tok--p { color: #e8ecf5; }

.hero__badge { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; box-shadow: var(--shadow-md); }
.hero__badge .icon { width: 24px; height: 24px; }
.hero__badge--blue { background: var(--blue-soft); color: var(--blue); }
.hero__badge--teal { background: var(--teal-soft); color: #1fa98a; }
.hero__badge--surface { background: var(--surface); color: var(--ink); }
.hero__badge--code-top { top: -14px; left: 46%; }
.hero__badge--right-top { top: 16%; right: -14px; }
.hero__badge--left-bottom { bottom: 20%; left: -14px; }
.hero__badge--right-bottom { bottom: -14px; right: 8%; }

.hero__preview {
  position: absolute;
  right: -14px;
  bottom: 34%;
  width: 132px;
  aspect-ratio: 400 / 184;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-md);
}

/* Stats */
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { display: flex; align-items: center; gap: 16px; min-height: 116px; padding: 20px 22px; border-radius: var(--radius-lg); }
.stat--teal { background: var(--teal-soft); }
.stat--blue { background: var(--blue-soft); }
.stat--orange { background: var(--orange-soft); }
.stat--yellow { background: var(--yellow-soft); }
.stat__icon { display: grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat__icon .icon { width: 26px; height: 26px; color: var(--ink); }
.stat--teal .stat__icon .icon { color: #1fa98a; }
.stat--blue .stat__icon .icon { color: var(--blue); }
.stat--orange .stat__icon .icon, .stat--yellow .stat__icon .icon { color: var(--orange); }
.stat__value { font-size: 34px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.stat__label { margin-top: 6px; font-size: 14px; color: var(--ink-soft); }

/* Method */
.method__panel { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; align-items: stretch; }
.method__card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 36px; }
.method__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: var(--radius-md); background: var(--teal-soft); }
.method__icon .icon { width: 26px; height: 26px; color: #1fa98a; }
.method__facts { display: flex; flex-direction: column; gap: 10px; margin-top: auto; width: 100%; }
.fact { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-md); background: var(--teal-soft); }
.fact__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--surface); }
.fact__icon .icon { width: 20px; height: 20px; color: #1fa98a; }
.fact__text { font-size: 15px; }
.method__figure { position: relative; border-radius: var(--radius-xl); overflow: hidden; }
.method__figure::before { content: ""; position: absolute; inset: 0; background: var(--blue-soft); }
.method__figure::after { content: ""; position: absolute; right: 0; top: 0; width: 40%; height: 55%; background-image: linear-gradient(rgba(27, 42, 65, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(27, 42, 65, 0.12) 1px, transparent 1px); background-size: 40px 40px; border-bottom-left-radius: var(--radius-xl); }
.method__image { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-xl); }

/* Steps: image header + three rows */
.steps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step__head { position: relative; padding: 20px; }
.step--teal .step__head { background: var(--teal-soft); }
.step--yellow .step__head { background: var(--yellow-soft); }
.step--blue .step__head { background: var(--blue-soft); }
.step__image { display: block; width: 100%; height: auto; aspect-ratio: 453 / 216; object-fit: contain; border-radius: var(--radius-md); }
.step__body { padding: 24px 24px 28px; }
.step .card__title { font-size: 22px; }
.step__points { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.step__point { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.step__point > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.step__point b { font-weight: 600; color: var(--ink); }
.step__point-text { color: var(--ink-soft); }
.step__point-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--radius-sm); }
.step--teal .step__point-icon { background: var(--teal-soft); color: #1fa98a; }
.step--yellow .step__point-icon { background: var(--yellow-soft); color: var(--orange); }
.step--blue .step__point-icon { background: var(--blue-soft); color: var(--blue); }
.step__point-icon .icon { width: 20px; height: 20px; }

/* Courses: same flip component as teachers, cover in front, description behind */
.courses__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.flip--course { aspect-ratio: 1 / 0.92; }
.course__front { padding: 14px 14px 0; }
.course--teal .course__front { background: var(--teal-soft); }
.course--blue .course__front { background: var(--blue-soft); }
.course--yellow .course__front { background: var(--yellow-soft); }
.course--orange .course__front { background: var(--orange-soft); }
.course__cover { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.course__image { height: 100%; border-radius: var(--radius-md); }
.course__back .card__text { font-size: 14px; }
.course__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; background: var(--blue-soft); color: var(--ink); }
.course--teal .course__link { background: var(--teal-soft); }
.course--yellow .course__link, .course--orange .course__link { background: var(--yellow-soft); }
.course__link .icon { width: 16px; height: 16px; }
.course__link:hover { background: var(--blue); color: #fff; }
.course-cta {
  grid-column: span 2;
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--yellow);
  background-image: linear-gradient(rgba(27, 42, 65, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(27, 42, 65, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}
.course-cta__content { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 36px; }
.course-cta__title { font-size: 34px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; }
.course-cta__text { font-size: 17px; }
.course-cta__figure { align-self: end; justify-self: end; width: min(100%, 320px); height: auto; display: block; mix-blend-mode: multiply; }

/* Learning (tabs) */
.learning__panel { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.learning__frame { margin: 0; padding: 20px 20px 16px; border-radius: var(--radius-xl); background: var(--dark); color: #fff; display: flex; flex-direction: column; gap: 14px; }
.learning__image { display: block; width: 100%; height: auto; aspect-ratio: 762 / 409; object-fit: cover; border-radius: var(--radius-md); }
.learning__caption { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.learning__caption .icon { width: 20px; height: 20px; }
.learning__cards { display: flex; flex-direction: column; gap: 12px; }
.learning__card { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; flex: 1; }
.learning__cards .card:nth-child(1) { background: var(--teal-soft); }
.learning__cards .card:nth-child(2) { background: var(--yellow-soft); }
.learning__cards .card:nth-child(3) { background: var(--blue-soft); }
.learning__card-icon { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--surface); }
.learning__card-icon .icon { width: 24px; height: 24px; }
.learning__cards .card:nth-child(1) .learning__card-icon { color: #1fa98a; }
.learning__cards .card:nth-child(2) .learning__card-icon { color: var(--orange); }
.learning__cards .card:nth-child(3) .learning__card-icon { color: var(--blue); }
.learning__cards .card__title { font-size: 20px; }
.learning__cards .card__text { margin-top: 6px; font-size: 14px; }

/* Certificate / result */
.certificate__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.certificate__text { font-size: 18px; color: var(--ink-soft); max-width: 460px; }
.monetize { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.monetize__title { font-size: 20px; font-weight: 500; }
.monetize__item { display: flex; gap: 14px; align-items: flex-start; }
.monetize__icon { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--teal-soft); color: #1fa98a; }
.monetize__icon .icon { width: 24px; height: 24px; }
.monetize__name { font-weight: 500; }
.monetize__item .card__text { margin-top: 4px; font-size: 14px; }
.certificate__figure { width: 100%; height: auto; aspect-ratio: 766 / 700; object-fit: cover; border-radius: var(--radius-xl); }

/* Portfolio */
.portfolio__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.portfolio__head .heading { margin-bottom: 8px; }
.portfolio__intro { max-width: 520px; color: var(--ink-soft); font-size: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.filters__btn { padding: 8px 16px; border-radius: var(--radius-pill); background: var(--surface); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-sm); }
.filters__btn[aria-pressed="true"] { background: var(--dark); color: #fff; }
.filters__btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.portfolio__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project__image { display: block; width: 100%; height: auto; aspect-ratio: 400 / 184; object-fit: cover; }
.project__body { padding: 18px 22px 20px; }
.project__meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.card__title--sm { font-size: 19px; }
.project__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.project__tech { font-size: 13px; }
.project--teal .project__tech { background: var(--teal-soft); }
.project--yellow .project__tech { background: var(--yellow-soft); }
.project--blue .project__tech { background: var(--blue-soft); }
.project__arrow .icon { width: 18px; height: 18px; }

/* Flip card: photo/cover first, description slides in on hover, tap or keyboard. Shared by teachers and courses. */
.teachers__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.flip { position: relative; }
.flip--teacher { aspect-ratio: 1 / 1.18; }
.flip__front, .flip__back {
  position: absolute;
  inset: 0 0 56px 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.flip__front { z-index: 1; }
.teacher__photo { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.flip__back {
  padding: 20px 22px;
  background: var(--surface);
  opacity: 0;
  transform: translateY(18px);
  overflow: auto;
}
.flip__bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  background: var(--dark);
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  z-index: 2;
}
.flip__bar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flip__bar:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.flip__bar-icon { width: 22px; height: 22px; flex: none; transition: transform 0.35s ease; }
.flip[data-flipped] .flip__front { opacity: 0; transform: scale(1.04); pointer-events: none; }
.flip[data-flipped] .flip__back { opacity: 1; transform: none; }
.flip[data-flipped] .flip__bar-icon { transform: rotate(45deg); }
@media (hover: hover) {
  .flip:hover .flip__front, .flip:focus-within .flip__front { opacity: 0; transform: scale(1.04); pointer-events: none; }
  .flip:hover .flip__back, .flip:focus-within .flip__back { opacity: 1; transform: none; }
  .flip:hover .flip__bar-icon, .flip:focus-within .flip__bar-icon { transform: rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) {
  .flip__front, .flip__back, .flip__bar-icon { transition: none; }
}
.teacher__role { font-size: 14px; color: var(--muted); }
.teacher__metrics { display: flex; gap: 10px; margin-top: 12px; }
.metric { flex: 1; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--bg); display: flex; flex-direction: column; }
.metric b { font-size: 19px; font-weight: 600; line-height: 1.1; }
.metric span { font-size: 12px; color: var(--muted); }
.teacher__about { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.teacher__edu { margin-top: 8px; font-size: 13px; color: var(--muted); }
.teacher__directions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* Values */
.values__card { padding: 40px; border-radius: var(--radius-xl); }
.values__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.bubble__quote { display: block; margin-bottom: 6px; }
.bubble__quote .icon { width: 28px; height: 28px; color: var(--orange); fill: var(--orange); stroke: none; }
.values__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-top: 28px; }
.values__figure { margin: 0; padding: 20px; border-radius: var(--radius-xl); background: var(--blue-softer); display: flex; flex-direction: column; gap: 14px; }
.values__figure .photo { aspect-ratio: 605 / 372; border-radius: var(--radius-md); }
.values__caption { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-soft); }
.values__caption-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--blue); }
.values__caption-icon .icon { width: 18px; height: 18px; }
.values__subtitle { font-size: 22px; font-weight: 500; line-height: 1.3; margin-bottom: 28px; }
.values__points { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.values__points li { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--ink-soft); }
.values__point-icon { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%; }
.values__point-icon--teal { background: var(--teal-soft); color: #1fa98a; }
.values__point-icon--blue { background: var(--blue-soft); color: var(--blue); }
.values__point-icon .icon { width: 24px; height: 24px; }

/* Reviews */
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review { display: flex; flex-direction: column; }
.review__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.review__avatar { width: 56px; height: 56px; font-size: 20px; border: 0; }
.review__author { font-weight: 500; }
.review__course { font-size: 14px; color: var(--muted); }
.review__who { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.review__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; }
.review__teacher { display: inline-block; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--yellow-soft); font-size: 13px; font-weight: 500; }
.review__text {
  font-size: 15px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review[data-expanded] .review__text { -webkit-line-clamp: unset; display: block; }
.review .link-more { margin: 0; }

/* Trial (replaces the sign-up form: contact happens in chat) */
.trial__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.trial__content { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.trial__content .heading { margin-bottom: 0; }
.trial__text { font-size: 18px; color: var(--ink-soft); max-width: 480px; }
.trial__card { padding: 36px; }
.trial__steps { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; font-size: 15px; color: var(--ink-soft); }
.trial__steps strong { color: var(--ink); font-weight: 500; }
.trial__note { margin-top: 20px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--teal-soft); font-size: 14px; }

/* Channels */
.channels__card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
  padding: 44px 48px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--blue-softer), var(--blue-soft));
}
.channels__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.channels__card .heading { margin-bottom: 0; }
.channels__text { font-size: 16px; color: var(--ink-soft); max-width: 420px; }
.channels__status { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-soft); }
.channels__dot { width: 10px; height: 10px; border-radius: 50%; background: #25d366; box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2); }
.channels__direct { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; font-weight: 500; }
.channels__direct a:hover { color: var(--blue); text-decoration: underline; }
.channels__list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.channel:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.channel:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.channel__text { display: flex; flex-direction: column; line-height: 1.25; }
.channel__text b { font-weight: 600; font-size: 16px; }
.channel__text small { font-size: 13px; color: var(--muted); margin-top: 3px; }
.channel__mark { display: block; width: 52px; height: 52px; flex: none; border-radius: 14px; }
.channel__arrow { width: 20px; height: 20px; margin-left: auto; color: var(--muted); transition: transform 0.18s ease, color 0.18s ease; }
.channel:hover .channel__arrow { transform: translateX(3px); color: var(--blue); }

/* Footer */
.footer { padding: 64px 0 48px; }
.footer__grid { display: grid; grid-template-columns: 1.1fr 1.5fr 1fr; gap: 40px; }
.footer__note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.footer__channels { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.footer__channel { display: flex; align-items: center; gap: 12px; }
.footer__channel-icon { display: block; width: 32px; height: 32px; border-radius: 9px; overflow: hidden; flex: none; transition: transform 0.15s ease; }
.footer__channel-icon-img { display: block; width: 100%; height: 100%; }
.footer__channel-icon:hover { transform: translateY(-2px); }
.footer__channel-icon:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.footer__channel-label { font-size: 14px; color: var(--ink-soft); }
.footer__contact { display: flex; flex-direction: column; gap: 4px; margin-top: 24px; }
.footer__phone, .footer__email { display: inline-block; font-size: 16px; font-weight: 600; color: var(--ink); }
.footer__phone:hover, .footer__email:hover { color: var(--blue); text-decoration: underline; }
.footer__email-note { margin-top: 4px; font-size: 13px; color: var(--muted); max-width: 260px; }
.footer__title { font-size: 20px; font-weight: 500; margin-bottom: 16px; }
.footer__link { display: block; padding: 5px 0; font-size: 15px; color: var(--ink-soft); }
.footer__link:hover { color: var(--blue); text-decoration: underline; }
.footer__col--wide { grid-column: span 1; }
.footer__list--split { display: flex; gap: 32px; }
.footer__list-col { display: flex; flex-direction: column; flex: 1; min-width: 0; }

/* ---- responsive.css ---- */
/* Breakpoints: 1024 (tablet landscape), 768 (tablet portrait), 480 (phone). Overrides only. */

@media (max-width: 1024px) {
  .teachers__grid { grid-template-columns: repeat(2, 1fr); }
  .flip--teacher { aspect-ratio: auto; display: flex; flex-direction: column; }
  .flip--teacher .flip__front, .flip--teacher .flip__back { position: static; opacity: 1; transform: none; transition: none; }
  .flip--teacher .flip__front { order: 0; aspect-ratio: 4 / 3; }
  .flip--teacher .flip__bar { position: static; order: 1; cursor: default; }
  .flip--teacher .flip__bar-icon { display: none; }
  .flip--teacher .flip__back { order: 2; overflow: visible; }
  .flip--teacher[data-flipped] .flip__front, .flip--teacher:hover .flip__front { opacity: 1; transform: none; pointer-events: auto; }
  .steps__grid { grid-template-columns: repeat(3, 1fr); }
  .step__point-icon { width: 36px; height: 36px; }
  .learning__panel { grid-template-columns: 1.2fr 1fr; }
  .portfolio__grid { grid-template-columns: repeat(2, 1fr); }
  :root { --section-gap: 72px; }
  .nav { gap: 14px; }
  .nav__link { font-size: 14px; }
  .header__bar { padding: 0 16px; gap: 16px; }
  .logo--header { width: 112px; }
  .header__cta { padding-inline: 20px; }
  .hero__grid { gap: 32px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .courses__grid, .steps__grid, .reviews__grid { grid-template-columns: repeat(2, 1fr); }
  .learning__panel { grid-template-columns: 1fr; }
  .learning__cards { flex-direction: row; }
  .logo--header { width: 112px; }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; --section-gap: 56px; }

  /* Header collapses into burger + dropdown nav */
  .header__burger { display: grid; }
  .header__cta { display: none; }
  .header__bar { padding-inline: 16px; }
  .nav {
    display: none;
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: calc(100% + 8px);
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }
  .header[data-open] .nav { display: flex; }
  .nav__link { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 16px; color: var(--ink); }
  .nav__link:hover { background: var(--bg); }
  .header__inner { position: relative; }

  .heading { margin-bottom: 24px; }
  .hero { padding-top: 16px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__stage { order: -1; padding: 0; }
  .hero__image { aspect-ratio: 16 / 10; }
  .hero__code, .hero__badge, .hero__preview { display: none; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero__cta { width: 100%; min-width: 0; }
  .hero__link { justify-content: center; }

  .method__panel { grid-template-columns: 1fr; }
  .method__card { padding: 24px; }
  .method__figure { aspect-ratio: 4 / 3; }

  .learning__cards { flex-direction: column; }

  .course-cta { grid-column: span 2; grid-template-columns: 1fr; }
  .course-cta__figure { width: 200px; }

  .certificate__grid, .trial__grid { grid-template-columns: 1fr; gap: 28px; }
  .teachers__grid { grid-template-columns: 1fr; }
  .flip { aspect-ratio: auto; display: flex; flex-direction: column; }
  .flip__front, .flip__back { position: static; opacity: 1; transform: none; transition: none; }
  .flip__front { order: 0; }
  .flip--teacher .flip__front { aspect-ratio: 4 / 3; }
  .flip__bar { position: static; order: 1; cursor: default; }
  .flip__bar-icon { display: none; }
  .flip__back { order: 2; overflow: visible; }
  .flip[data-flipped] .flip__front { opacity: 1; transform: none; pointer-events: auto; }
  .course__front { padding-bottom: 14px; }
  .course__back .course__link { display: none; }
  .learning__panel { grid-template-columns: 1fr; }
  .portfolio__head { flex-direction: column; align-items: flex-start; }
  .steps__grid { grid-template-columns: 1fr; }
  .portfolio__grid { grid-template-columns: 1fr; }
  .channels__card { grid-template-columns: 1fr; padding: 24px; }
  .values__card { padding: 24px; }
  .values__head { flex-direction: column; }
  .values__grid { grid-template-columns: 1fr; }
  .values__points { grid-template-columns: 1fr; gap: 16px; }
  .values__points li { align-items: center; }

  .stepper__item { width: 96px; }
  .stepper__item + .stepper__item::before { width: 56px; right: calc(50% + 18px); }
  .trial__card { padding: 24px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
  .footer__list--split { flex-direction: column; gap: 0; }
}

@media (max-width: 560px) {
  .channels__list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stepper__item { width: auto; flex: 1; }
  .stepper__item + .stepper__item::before { width: 60%; right: 70%; }
  .stats__grid { grid-template-columns: 1fr; }
  .stat { min-height: 110px; }
  .courses__grid, .steps__grid, .reviews__grid { grid-template-columns: 1fr; }
  .course-cta { grid-column: span 1; }
  .course-cta__title { font-size: 28px; }
  .tabs__list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .tabs__list::-webkit-scrollbar { display: none; }
  .tabs__tab { flex: none; }
  .faq__q { font-size: 18px; padding: 20px 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__brand { grid-column: auto; }
}
