/* ---- Trena landing — design tokens ---- */
:root {
  --bg: #ffffff;
  --surface: #f5f4f1;
  --surface-2: #efede8;
  --line: rgba(20, 20, 18, 0.08);
  --line-strong: rgba(20, 20, 18, 0.14);
  --ink: #171717;
  --ink-2: #4a4a48;
  --ink-3: #7a7a76;
  --green: #20965f;
  --green-ink: #0f4f31;
  --green-soft: #e3f1ea;
  /* Primary CTA — slightly deeper green than accent for hierarchy */
  --orange: #1d8a58;
  --orange-hover: #166c45;
  --orange-soft: #d8ebe1;
  /* Standalone warning color — used for the "cancelled" lesson tag */
  --warn: #c44326;
  --warn-soft: #fce6dd;
  --shadow-sm: 0 1px 2px rgba(20,20,18,0.04), 0 1px 1px rgba(20,20,18,0.03);
  --shadow-md: 0 8px 24px -8px rgba(20,20,18,0.12), 0 2px 4px rgba(20,20,18,0.04);
  --shadow-lg: 0 32px 60px -24px rgba(20,20,18,0.22), 0 8px 16px -8px rgba(20,20,18,0.08);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-w: 1200px;
  --pad-x: clamp(20px, 4vw, 56px);
  font-feature-settings: "ss01", "cv11";
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; }
.num { font-variant-numeric: tabular-nums; }

/* ---- Layout ---- */
.wrap { max-width: var(--max-w); margin: 0 auto; padding-inline: var(--pad-x); }
section { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--green-ink);
  background: var(--green-soft);
  padding: 6px 12px; border-radius: 999px;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 999px;
  background: var(--green);
}

h1, h2, h3, h4 { font-family: inherit; margin: 0; letter-spacing: -0.02em; }
h1 {
  font-size: clamp(40px, 6.2vw, 72px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h3 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.018em;
}
p { margin: 0; }
.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 56ch;
  text-wrap: pretty;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease, color .12s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06) inset, 0 6px 14px -4px rgba(29, 138, 88, 0.4);
}
.btn-primary:hover { background: var(--orange-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }
.btn-lg { padding: 17px 26px; font-size: 17px; border-radius: 14px; }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 10px; }

.arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap {
  display: flex; align-items: center; gap: 32px;
  height: 68px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 19px; letter-spacing: -0.025em;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--green);
  color: #fff;
  display: inline-grid; place-items: center;
  font-weight: 700; font-size: 16px;
  letter-spacing: -0.04em;
}
.nav {
  display: flex; gap: 6px; margin-left: 16px;
}
.nav a {
  padding: 8px 12px; border-radius: 8px;
  font-size: 14.5px; color: var(--ink-2); font-weight: 500;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.header-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.btn-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.btn-link:hover { color: var(--ink); background: var(--surface); }

@media (max-width: 480px) {
  /* .btn-link visible on mobile (chat fix) */
}

@media (max-width: 760px) {
  .nav { display: none; }
}

/* ---- Hero ---- */
.hero {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 110px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}
.hero h1 .accent-line {
  display: inline-block;
  position: relative;
  white-space: nowrap;
}
.hero h1 .accent-line::after {
  content: ''; position: absolute;
  left: -2%; right: -2%; bottom: 0.04em;
  height: 0.28em; background: var(--green-soft);
  z-index: -1; border-radius: 4px;
}
.hero-sub {
  margin-top: 24px;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-2); line-height: 1.5;
  max-width: 52ch; text-wrap: pretty;
}
.hero-actions {
  display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap;
}
.hero-meta {
  display: flex; gap: 18px; margin-top: 28px;
  flex-wrap: wrap;
  color: var(--ink-3); font-size: 14px;
}
.hero-meta-item { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta-item svg { color: var(--green); }

/* ---- Section spacing ---- */
.section { padding-block: clamp(64px, 8vw, 120px); }
.section-tinted { background: var(--surface); }
.section-head {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 720px;
}
.section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}

/* ---- Cards ---- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease;
}
.card:hover { border-color: var(--line-strong); }
.card .glyph {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--surface); color: var(--ink);
  display: grid; place-items: center;
  margin-bottom: 20px;
}

/* ---- Problem section ---- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 760px) { .problem-grid { grid-template-columns: 1fr; } }
.problem-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; gap: 18px; align-items: flex-start;
}
.problem-card .glyph {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px;
  background: var(--orange-soft); color: var(--orange);
  display: grid; place-items: center;
}
.problem-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.problem-card p { color: var(--ink-2); font-size: 15px; }

/* ---- Solution (3 big cards) ---- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 920px) { .pillar-grid { grid-template-columns: 1fr; } }
.pillar {
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column;
  min-height: 260px;
  position: relative; overflow: hidden;
}
.pillar .num-tag {
  font-size: 13px; font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}
.pillar h3 { margin-bottom: 12px; }
.pillar p { color: var(--ink-2); }
.pillar .glyph-lg {
  position: absolute; top: 28px; right: 28px;
  width: 56px; height: 56px;
}

/* ---- Features grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
@media (max-width: 920px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: #fff;
  padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 200px;
}
.feature .glyph {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--green-soft); color: var(--green);
  display: grid; place-items: center;
}
.feature h4 { font-size: 17px; font-weight: 600; }
.feature p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }

/* ---- Roles tabs ---- */
.roles-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface);
  gap: 4px;
  margin-bottom: 36px;
}
.roles-tabs button {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14.5px; font-weight: 500;
  color: var(--ink-2);
  transition: background .15s ease, color .15s ease;
}
.roles-tabs button:hover { color: var(--ink); }
.roles-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.roles-tabs button .dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 999px;
  margin-right: 8px; vertical-align: 1px;
}

.roles-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 980px) { .roles-layout { grid-template-columns: 1fr; } }

.roles-side h3 { font-size: 28px; margin-bottom: 12px; }
.roles-side .role-desc { color: var(--ink-2); margin-bottom: 28px; }
.role-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.role-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; color: var(--ink);
}
.role-features li svg { flex-shrink: 0; margin-top: 3px; color: var(--green); }

/* ---- Social proof ---- */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 32px;
}
@media (max-width: 760px) { .proof-strip { grid-template-columns: repeat(3, 1fr); } }
.proof-logo {
  height: 64px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  background: #fff;
}

/* ---- FAQ ---- */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  border-top: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item button {
  width: 100%;
  padding: 22px 4px;
  display: flex; align-items: center; justify-content: space-between;
  text-align: left;
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.01em;
  gap: 16px;
}
.faq-item button:hover { color: var(--green-ink); }
.faq-toggle {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--surface);
  display: grid; place-items: center;
  transition: transform .2s ease, background .15s ease;
  color: var(--ink-2);
}
.faq-item.open .faq-toggle {
  background: var(--ink); color: #fff;
  transform: rotate(45deg);
}
.faq-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
}
.faq-body-inner {
  padding: 0 4px 24px;
  color: var(--ink-2);
  font-size: 16px;
  max-width: 66ch;
}
.faq-item.open .faq-body { max-height: 320px; }

/* ---- Final CTA ---- */
.cta-band {
  border-radius: var(--radius-lg);
  padding: clamp(48px, 6vw, 80px);
  position: relative; overflow: hidden;
  color: #fff;
}
.cta-band.green { background: linear-gradient(135deg, #1d8a58 0%, #20965f 60%, #25a76a 100%); }
.cta-band.orange { background: linear-gradient(135deg, #166c45 0%, #1d8a58 60%, #2aa069 100%); }
.cta-band.ink { background: #171717; }
.cta-band h2 { font-size: clamp(32px, 4.5vw, 56px); margin-bottom: 16px; }
.cta-band p { font-size: clamp(17px, 1.4vw, 20px); opacity: 0.88; max-width: 56ch; }
.cta-band .btn-primary {
  background: #fff; color: var(--ink);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.cta-band .btn-primary:hover { background: #f5f5f0; }
.cta-band-bg-shape {
  position: absolute; right: -60px; top: -60px;
  width: 360px; height: 360px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
}
.cta-band-bg-shape.two {
  right: 140px; top: 100px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.07);
}
.cta-band-inner {
  position: relative; max-width: 720px;
}
.cta-band .actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Footer ---- */
.site-footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink); font-weight: 600;
  margin: 0 0 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid li a:hover { color: var(--ink); }
.footer-tagline { margin-top: 14px; max-width: 32ch; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,20,18,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 20px;
  z-index: 100;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px; width: 100%;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: pop .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
  color: var(--ink-2);
}
.modal-close:hover { background: var(--surface); color: var(--ink); }
.modal h3 { font-size: 26px; margin-bottom: 6px; }
.modal .lede { font-size: 15px; margin-bottom: 24px; }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.form-row .req { color: var(--orange); }
.form-row input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-row input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.form-row.error input {
  border-color: var(--orange);
}
.form-row.error input:focus {
  box-shadow: 0 0 0 3px var(--orange-soft);
}
.form-error {
  color: var(--orange); font-size: 13px; margin-top: 2px;
}
.form-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 440px) { .form-row-split { grid-template-columns: 1fr; } }

.modal .btn-primary { width: 100%; margin-top: 8px; padding: 15px; }
.consent {
  margin-top: 14px; font-size: 12.5px; color: var(--ink-3); line-height: 1.5;
}

.thanks {
  text-align: center; padding: 16px 8px;
}
.thanks-mark {
  width: 64px; height: 64px; border-radius: 999px;
  background: var(--green-soft); color: var(--green);
  display: grid; place-items: center; margin: 0 auto 20px;
}

/* ---- Product mockup chrome ---- */
.frame {
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.frame-bar {
  height: 36px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 14px;
  gap: 8px;
  background: #fafaf8;
}
.frame-bar .dot { width: 10px; height: 10px; border-radius: 999px; background: var(--line-strong); }
.frame-bar .url {
  margin-left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-3);
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  flex: 1; max-width: 320px;
}

/* ---- Calendar mockup ---- */
.cal {
  padding: 18px;
  display: grid;
  gap: 14px;
  background: #fbfaf7;
}
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
}
.cal-month {
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
}
.cal-controls { display: flex; gap: 6px; }
.cal-controls button {
  width: 28px; height: 28px; border-radius: 8px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-2);
  display: grid; place-items: center;
}
.cal-controls .pill {
  width: auto; padding: 0 12px;
  font-size: 13px; font-weight: 500;
}
.cal-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-2);
}
.cal-legend .chip { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .chip .sq { width: 10px; height: 10px; border-radius: 3px; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-family: 'Inter', sans-serif;
}
.cal-dow {
  font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 4px 6px;
  font-weight: 500;
}
.cal-day {
  aspect-ratio: 1 / 1.05;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  display: flex; flex-direction: column;
  font-size: 11px;
  border: 1px solid rgba(20,20,18,0.04);
  min-height: 64px;
  position: relative;
}
.cal-day.out { background: transparent; border-color: transparent; color: var(--ink-3); opacity: 0.45; }
.cal-day.today { border-color: var(--orange); }
.cal-day .n { font-weight: 600; font-size: 12px; color: var(--ink); margin-bottom: 4px; }
.cal-day.today .n { color: var(--orange); }
.cal-day.out .n { color: var(--ink-3); font-weight: 400; }
.cal-event {
  font-size: 9.5px;
  padding: 2px 5px;
  border-radius: 4px;
  margin-bottom: 2px;
  font-weight: 500;
  background: var(--bg-evt, var(--green-soft));
  color: var(--c-evt, var(--green-ink));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.cal-event.more {
  background: transparent;
  color: var(--ink-3);
  padding: 1px 3px;
  font-weight: 500;
}

/* ---- Phone mockup (attendance) ---- */
.phone {
  width: 280px;
  background: #1a1a18;
  border-radius: 38px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
  position: relative;
}
.phone-screen {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 9 / 18;
  display: flex; flex-direction: column;
}
.phone-notch {
  height: 22px; width: 92px;
  background: #1a1a18;
  position: absolute; top: 10px;
  left: 50%; transform: translateX(-50%);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-status {
  display: flex; justify-content: space-between;
  padding: 12px 28px 8px;
  font-size: 11px; font-weight: 600;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.attendance-head {
  padding: 8px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.attendance-head .ttl { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.attendance-head .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.attendance-list {
  flex: 1; padding: 8px 12px;
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto;
}
.att-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
}
.att-avatar {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}
.att-name { flex: 1; font-weight: 500; }
.att-state {
  width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1.5px solid var(--line-strong);
  color: var(--ink-3);
}
.att-state.present { background: var(--green); border-color: var(--green); color: #fff; }
.att-state.absent { background: #fff; border-color: var(--warn); color: var(--warn); }
.att-row.present { background: #f5fbf8; border-color: rgba(32, 150, 95, 0.25); }
.att-row.absent { background: #fdf6f3; border-color: rgba(196, 67, 38, 0.22); }
.attendance-footer {
  padding: 12px;
  border-top: 1px solid var(--line);
  display: flex; gap: 8px; align-items: center;
  font-size: 12px;
}
.att-counter { color: var(--ink-2); }
.att-save {
  margin-left: auto;
  background: var(--orange); color: #fff;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12px; font-weight: 600;
}

/* ---- Dashboard mockup ---- */
.dash {
  padding: 18px;
  background: #fbfaf7;
  display: grid;
  gap: 14px;
}
.dash-toolbar {
  display: flex; gap: 8px; align-items: center;
}
.dash-toolbar .title { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.dash-toolbar .pill {
  margin-left: auto; padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  background: var(--surface); color: var(--ink-2);
  font-weight: 500;
}
.kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.kpi .lbl { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.kpi .val { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; }
.kpi .delta { font-size: 11.5px; margin-top: 2px; font-weight: 500; }
.kpi .delta.up { color: var(--green); }
.kpi .delta.down { color: var(--warn); }

.chart {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.chart-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.chart-head .ttl { font-size: 13px; font-weight: 600; }
.chart-head .sub { font-size: 11px; color: var(--ink-3); }
.bars {
  display: flex; align-items: flex-end; gap: 6px;
  height: 100px;
}
.bar {
  flex: 1;
  background: var(--green-soft);
  border-radius: 4px 4px 2px 2px;
  position: relative;
  transition: background .15s ease;
}
.bar::before {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--paid, 0%);
  background: var(--green);
  border-radius: 0 0 2px 2px;
}
.bar.highlight { background: var(--orange-soft); }
.bar.highlight::before { background: var(--orange); }
.bars-labels {
  display: flex; gap: 6px; margin-top: 6px;
  font-size: 10px; color: var(--ink-3);
}
.bars-labels span { flex: 1; text-align: center; }

/* ---- Parent screen mockup ---- */
.parent-screen {
  padding: 16px 18px;
  background: #fbfaf7;
  display: grid; gap: 12px;
}
.parent-header { display: flex; align-items: center; gap: 12px; }
.parent-avatar {
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-ink);
  display: grid; place-items: center;
  font-weight: 600; font-size: 14px;
}
.parent-header .who { font-size: 12px; color: var(--ink-3); }
.parent-header .name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.parent-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.parent-block .lbl { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; margin-bottom: 8px; }
.lesson {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
}
.lesson + .lesson { border-top: 1px solid var(--line); }
.lesson-date {
  width: 42px; flex-shrink: 0;
  text-align: center;
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 0;
}
.lesson-date .d { font-size: 14px; font-weight: 700; line-height: 1; }
.lesson-date .m { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.lesson-meta { flex: 1; min-width: 0; }
.lesson-meta .ttl { font-size: 13px; font-weight: 500; }
.lesson-meta .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.lesson-tag {
  font-size: 10.5px; padding: 3px 8px;
  border-radius: 999px;
  font-weight: 500;
  flex-shrink: 0;
}
.lesson-tag.upcoming { background: var(--green-soft); color: var(--green-ink); }
.lesson-tag.done { background: var(--surface); color: var(--ink-2); }
.lesson-tag.cancelled { background: var(--warn-soft); color: var(--warn); text-decoration: line-through; }

.parent-pay {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
}
.parent-pay .progress {
  height: 6px; background: var(--surface-2); border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.parent-pay .progress > div {
  height: 100%; background: var(--green);
  width: 65%;
}
.parent-pay .count {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
}
.parent-pay .count small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.parent-pay .pay-btn {
  background: var(--orange); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px;
}

/* ---- Hero floating chips ---- */
.hero-chip {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  font-weight: 500;
  z-index: 5;
}
.hero-chip .glyph {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.hero-chip .glyph.green { background: var(--green-soft); color: var(--green); }
.hero-chip .glyph.orange { background: var(--orange-soft); color: var(--orange); }
.hero-chip-1 { top: 6%; left: -8%; }
.hero-chip-2 { bottom: 8%; right: -4%; }
@media (max-width: 980px) { .hero-chip { display: none; } }

.hero-visual {
  position: relative;
}
.hero-visual-bg {
  position: absolute;
  inset: 4% -4% -4% 4%;
  background: var(--green-soft);
  border-radius: var(--radius-md);
  z-index: -1;
  opacity: 0.7;
}

/* ---- Accessibility & misc ---- */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 6px;
}
.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;
}

/* ---- Mobile polish ---- */
@media (max-width: 760px) {
  body { font-size: 16px; }

  /* Header */
  .site-header .wrap { height: 60px; gap: 12px; }
  .logo { font-size: 17px; }
  .logo-mark { width: 28px; height: 28px; font-size: 15px; }
  .header-cta { gap: 6px; }
  .btn-sm { padding: 9px 13px; font-size: 13.5px; }

  /* Hero — give the visual breathing room, drop floating bg */
  .hero { padding-top: 40px; padding-bottom: 56px; }
  .hero-visual-bg { display: none; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-meta { gap: 14px; }
  .hero-meta-item { font-size: 13px; }

  /* Section padding */
  .section { padding-block: 56px; }
  .section-head { margin-bottom: 32px; }

  /* Cards & grids tighten */
  .card, .problem-card, .feature, .pillar { padding: 22px; }
  .pillar { min-height: 0; }
  .pillar .glyph-lg { width: 44px; height: 44px; top: 22px; right: 22px; }
  .pillar .glyph-lg svg { width: 44px; height: 44px; }
  .pillar .num-tag { margin-bottom: 24px; }

  /* Roles */
  .roles-tabs { display: flex; width: 100%; justify-content: space-between; }
  .roles-tabs button { flex: 1; padding: 10px 8px; font-size: 13.5px; }
  .roles-side h3 { font-size: 24px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 32px; }
  .footer-bottom { font-size: 12.5px; }

  /* CTA band */
  .cta-band { padding: 40px 28px; border-radius: 20px; }
  .cta-band-bg-shape { display: none; }
  .cta-band .actions { gap: 14px; }
  .cta-band .actions .btn { width: 100%; justify-content: center; }
  .cta-band .actions > span { width: 100%; justify-content: center; }

  /* Modal */
  .modal { padding: 28px 22px; }
  .modal h3 { font-size: 22px; }
}

@media (max-width: 600px) {
  /* Calendar mockup — compact */
  .cal { padding: 14px; gap: 12px; }
  .cal-grid { gap: 2px; }
  .cal-day { min-height: 52px; padding: 4px; border-radius: 6px; }
  .cal-day .n { font-size: 11px; margin-bottom: 2px; }
  .cal-event { font-size: 8.5px; padding: 1px 3px; border-radius: 3px; }
  .cal-event.more { font-size: 8.5px; }
  .cal-legend { font-size: 11px; gap: 10px 12px; }
  .cal-month { font-size: 16px; }
  .cal-dow { font-size: 10px; padding: 2px 4px; }

  /* Dashboard KPIs stack 1+2 — outline of the month is the hero */
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:first-child { grid-column: 1 / -1; }
  .kpi { padding: 12px; }
  .kpi .val { font-size: 19px; }
  .bars { height: 80px; }

  /* Phone mockup */
  .phone { width: 260px; }
}

@media (max-width: 420px) {
  h1 { font-size: 36px; }
  .nav { display: none; }
  /* .btn-link display: none removed (chat fix) */
  .hero-meta { flex-direction: column; gap: 8px; }
  .hero-chip { display: none; }
}

/* ---- Mobile polish — Pass 2: a11y/touch/iOS gaps ---- */

/* iPhone home-indicator: страница не должна обрезаться внизу. */
@supports (padding: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-width: 760px) {
  /* iOS Safari зумит при tap на input с font-size < 16px. Закрепляем минимум
     на всех полях ввода (включая модалку «Запросить демо», где сейчас 15px). */
  input,
  select,
  textarea,
  .form-row input {
    font-size: 16px;
  }

  /* Тач-цели по WCAG 2.2 / Apple HIG — 44×44. Исключаем .btn-sm (header-chip)
     и .btn-link (текстовая ссылка), у них своя визуальная роль. */
  .btn:not(.btn-sm):not(.btn-link) {
    min-height: 44px;
  }
  .modal-close {
    width: 44px;
    height: 44px;
  }

  /* Модалка «Запросить демо» — full-screen на узких экранах. */
  .modal-backdrop {
    padding: 0;
    align-items: stretch;
    justify-items: stretch;
  }
  .modal {
    max-width: 100vw;
    width: 100vw;
    min-height: 100vh;
    border-radius: 0;
    padding: 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
  }
  .modal-close {
    top: 12px;
    right: 12px;
  }

  /* FAQ — тиснее padding по бокам (минимум 12px от края экрана). */
  .faq-item button {
    padding: 20px 8px;
    font-size: 17px;
    gap: 12px;
  }
  .faq-body-inner {
    padding: 0 8px 22px;
  }
}



/* Mobile overflow protection - chat fix */
@media (max-width: 760px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  .wrap, .hero, .hero-copy, .section, main, header, footer {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Текст не должен вылезать */
  .hero h1, .hero-sub, h1, h2, h3, p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* H1 на узких — пропорционально */
  .hero h1 {
    font-size: clamp(26px, 7.5vw, 40px) !important;
    line-height: 1.15 !important;
  }
  
  /* Картинки и мокапы — ограничены viewport */
  img, video, iframe, .hero-visual, .phone, .browser-mockup {
    max-width: 100%;
    height: auto;
  }
  
  /* CTA-кнопки не должны выходить за рамку */
  .btn, .btn-lg, .btn-primary {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Containers с фиксированным padding не должны множить ширину */
  .container, .wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: clamp(24px, 7vw, 34px) !important;
  }
}


/* Mobile btn-link compact - chat fix */
@media (max-width: 760px) {
  .btn-link {
    font-size: 13px;
    padding: 8px 10px;
  }
}
@media (max-width: 420px) {
  .btn-link {
    font-size: 12.5px;
    padding: 6px 8px;
  }
  /* Прижимаем header-cta к правому краю, разрешаем переносы */
  .header-cta {
    flex-wrap: nowrap;
    gap: 4px;
  }
}


/* btn-link force visible override - chat fix v2 */
@media (max-width: 760px) {
  .btn-link { display: inline-flex !important; align-items: center; }
}
