/* Page-level layouts: hero, page hero, 404. */

/* ── Home hero ─────────────────────────────────────── */
.hero { padding-block: clamp(36px, 7vw, 96px) calc(var(--section) / 2); }
.hero__grid { display: grid; gap: var(--s-8); align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--s-9); } }
.hero__text .display { margin-block-end: var(--s-5); }
.hero__text .lead { margin-block-end: var(--s-7); }

.trust { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-block-start: var(--s-7); }
.trust li { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); color: var(--text-2); }
.trust .icon { width: 18px; height: 18px; color: var(--ios-green); }

.hero__visual { position: relative; width: 100%; max-width: 420px; margin-inline: auto; padding: var(--s-6) var(--s-5); }
.hero-photo { position: relative; padding: 10px; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: calc(var(--r-xl) - 10px); }
.hero-photo figcaption {
  position: absolute; inset-block-end: 22px; inset-inline: 22px;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); text-align: center;
  font-size: var(--fs-xs); font-weight: 600; color: var(--text);
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

.hero-chips li { position: absolute; }
.float-chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding-block: 6px; padding-inline: 6px var(--s-4);
  border-radius: var(--r-pill); font-size: var(--fs-small); font-weight: 600; white-space: nowrap;
  animation: float 7s var(--ease) infinite alternate;
}
.float-chip .icon-chip { width: 32px; height: 32px; border-radius: 50%; }
.float-chip .icon-chip .icon { width: 18px; height: 18px; }
.hero__visual .hero-chips li:nth-child(1) { inset-block-start: 6%; inset-inline-start: -4%; }
.hero__visual .hero-chips li:nth-child(2) { inset-block-start: 26%; inset-inline-end: -6%; animation-delay: -2s; }
.hero__visual .hero-chips li:nth-child(3) { inset-block-start: 52%; inset-inline-start: -8%; animation-delay: -4s; }
.hero__visual .hero-chips li:nth-child(4) { inset-block-start: 70%; inset-inline-end: -4%; animation-delay: -6s; }
@media (max-width: 520px) {
  .hero__visual { max-width: 340px; padding-inline: var(--s-2); }
  .float-chip { font-size: var(--fs-xs); }
  .hero__visual .hero-chips li:nth-child(1), .hero__visual .hero-chips li:nth-child(3) { inset-inline-start: 0; }
  .hero__visual .hero-chips li:nth-child(2), .hero__visual .hero-chips li:nth-child(4) { inset-inline-end: 0; }
}
@keyframes float { from { transform: translateY(-5px); } to { transform: translateY(5px); } }

/* ── Inner page hero (pillar pages) ────────────────── */
.page-hero { padding-block: clamp(36px, 6vw, 80px) var(--s-6); }
.page-hero .lead { margin-block-end: var(--s-6); }

/* ── Hero visual: tiles (pages without screenshots) ── */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); width: 100%; max-width: 440px; margin-inline: auto; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); font-weight: 650; line-height: 1.35; }
.tile .icon-chip { color: var(--tone, var(--brand)); }
.tile:nth-child(even) { transform: translateY(var(--s-5)); }
.hero-photo--page { max-width: 380px; margin-inline: auto; }

/* Course page */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); padding: var(--s-6); border-radius: var(--r-xl); }
.facts dt { font-size: var(--fs-xs); color: var(--text-2); }
.facts dd { font-weight: 650; line-height: 1.4; }
.topics { display: grid; gap: var(--s-4); margin: 0; padding: 0; list-style: none; counter-reset: topic; }
@media (min-width: 700px) { .topics { grid-template-columns: 1fr 1fr; } }
.topics li { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); counter-increment: topic; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong); }
.topics li::before { content: counter(topic); flex: none; font-weight: 800; color: var(--tone); }
.container--narrow { max-width: calc(820px + 2 * var(--gutter)); }
.stats--3 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.band__title { font-size: var(--fs-h3); }

/* Case studies */
.cases { display: grid; gap: var(--s-7); }
.case { display: grid; padding: 0; overflow: hidden; -webkit-backdrop-filter: none; backdrop-filter: none; }
.case__media { aspect-ratio: 16 / 10; background: var(--brand-soft); }
.case__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case__body { display: flex; flex-direction: column; justify-content: center; gap: var(--s-3); padding: var(--s-6); }
.case__body > * { margin: 0; }
.case__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); font-size: var(--fs-small); }
@media (min-width: 900px) {
  .case { grid-template-columns: 1.15fr 1fr; align-items: stretch; }
  .case__body { padding: var(--s-8); }
}
.case .btn { white-space: normal; text-align: center; }

/* Contact */
.contact-grid { display: grid; gap: var(--s-5); align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 5fr 7fr; } }
@media (max-width: 959px) { .contact-form { order: 2; } }
.contact-side { display: grid; gap: var(--s-5); }
.contact-side h2, .contact-form h2 { font-size: var(--fs-h3); }
.contact-list { gap: var(--s-4); font-size: var(--fs-body); }

/* Legal text */
.legal__body { padding: clamp(24px, 5vw, 56px); border-radius: var(--r-xl); -webkit-backdrop-filter: none; backdrop-filter: none; }
.legal__body h1 { font-size: var(--fs-h2); }
.legal__body h2 { margin-block: var(--s-7) var(--s-3); font-size: var(--fs-h3); }
.legal__updated { font-size: var(--fs-small); color: var(--text-2); }
.legal__list { display: grid; gap: var(--s-2); margin: 0 0 var(--s-4); padding-inline-start: 1.25em; list-style: disc; }
.legal__body .actions { margin-block-start: var(--s-7); }

/* ── 404 ───────────────────────────────────────────── */
.hero--compact { padding-block: clamp(40px, 8vw, 112px); }
.notfound { max-width: 720px; margin-inline: auto; padding: clamp(28px, 6vw, 64px); text-align: center; border-radius: var(--r-xl); }
.notfound .lead { margin-inline: auto; margin-block-end: var(--s-7); }
.notfound .actions, .notfound .chips { justify-content: center; }
.notfound__links-title { margin-block: var(--s-8) var(--s-4); font-size: var(--fs-small); color: var(--text-2); }

/* ── Service page hero ─────────────────────────────── */
.page-hero__grid { display: grid; gap: var(--s-8); align-items: center; }
@media (min-width: 960px) {
  .page-hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--s-9); }
  .page-hero__grid--single { grid-template-columns: minmax(0, 820px); }
}
.page-hero .display { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); margin-block-end: var(--s-5); }
.page-hero .lead { margin-block-end: var(--s-7); }

/* Device mockups */
.devices { position: relative; width: 100%; max-width: 560px; margin-inline: auto; aspect-ratio: 6 / 5; }
.device { position: absolute; width: 80%; padding: 0; overflow: hidden; border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.device--back { inset-block-start: 0; inset-inline-end: 0; transform: rotate(2deg); }
.device--front { inset-block-end: 4%; inset-inline-start: 0; }
[dir="rtl"] .device--back { transform: rotate(-2deg); }
.device__bar { display: flex; gap: 6px; padding: 9px 12px; direction: ltr; background: var(--glass-strong); border-block-end: 1px solid var(--hairline); }
.device__bar span { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; }
.device__bar span:nth-child(2) { background: #FEBC2E; }
.device__bar span:nth-child(3) { background: #28C840; }
.device img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.devices .hero-chips li:nth-child(1) { inset-block-start: 44%; inset-inline-end: -2%; }
.devices .hero-chips li:nth-child(2) { inset-block-start: -2%; inset-inline-start: 4%; animation-delay: -3s; }
.devices .hero-chips li:nth-child(3) { inset-block-end: -4%; inset-inline-end: 6%; animation-delay: -5s; }
@media (max-width: 520px) {
  .devices .hero-chips li:nth-child(1) { inset-inline-end: 0; }
}
