.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 660;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

#planos,
#faq {
  scroll-margin-top: 72px;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(44px, 9vw, 130px);
  align-items: end;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -28px;
}

.section-heading h2,
.contexts-heading h2,
.plans-heading h2 {
  font-size: clamp(48px, 6vw, 78px);
}

.section-heading > p:last-child {
  margin-bottom: 4px;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.7;
}

.contexts-section {
  padding-block: clamp(92px, 11vw, 144px);
}

.contexts-heading {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(40px, 8vw, 110px);
  align-items: end;
}

.contexts-heading .eyebrow { margin-bottom: 8px; }

.contexts-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.3vw, 32px);
  margin-top: 64px;
  padding: 0;
  list-style: none;
}

.contexts-gallery figure { margin: 0; }

.contexts-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
}

.contexts-gallery figcaption {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 13px;
  font-size: 14px;
  font-weight: 620;
}

.student-stories {
  overflow: hidden;
  background: var(--canvas);
  padding-block: clamp(92px, 10vw, 136px);
}

.student-stories-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
}

.student-stories-heading h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(48px, 6vw, 76px);
  font-variation-settings: "wdth" 94;
  font-weight: 635;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.student-stories-heading p {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.65;
}

.student-stories-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.student-stories-controls button,
.student-story-controls button {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  cursor: pointer;
}

.student-stories-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--canvas);
  color: var(--ink);
  transition: border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.student-stories-controls button:not(:disabled):hover {
  border-color: var(--ink);
}

.student-stories-controls button:disabled {
  color: var(--line);
  cursor: default;
  opacity: 0.7;
}

.student-stories-controls svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.student-stories-viewport {
  width: 100%;
  margin-top: 52px;
  overflow-x: auto;
  padding-bottom: 12px;
  cursor: grab;
  scroll-padding-inline: max(24px, calc((100vw - var(--max)) / 2));
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  user-select: none;
}

.student-stories-viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.student-stories-viewport::-webkit-scrollbar { display: none; }

.student-stories-track {
  display: grid;
  width: max-content;
  grid-auto-columns: clamp(238px, 22vw, 306px);
  grid-auto-flow: column;
  gap: clamp(12px, 1.3vw, 18px);
  margin: 0;
  padding: 16px max(24px, calc((100vw - var(--max)) / 2));
  list-style: none;
}

.student-story-card {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  scroll-snap-align: start;
  transform: scale(0.94);
  transition: transform 220ms ease;
}

.student-story-card.is-active {
  z-index: 1;
  transform: scale(1);
}

.student-story-card::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 120ms ease 140ms, visibility 0s linear 260ms;
}

.student-story-card.is-active.is-buffering::after {
  opacity: 1;
  visibility: visible;
  animation: student-story-buffering 720ms linear infinite;
  transition-delay: 140ms, 0s;
}

@keyframes student-story-buffering {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.student-story-card video {
  display: block;
  width: 100%;
  height: 100%;
  background: #111;
  cursor: inherit;
  -webkit-user-drag: none;
  object-fit: cover;
}

.student-story-controls {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  gap: 7px;
  opacity: 0.78;
  transition: opacity 160ms ease;
}

.student-story-card.is-active .student-story-controls { opacity: 1; }

.student-story-controls button {
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #18171a;
  box-shadow: 0 8px 24px rgba(16, 14, 18, 0.16);
  transition: transform 160ms ease, background-color 160ms ease;
}

.student-story-controls button:hover { transform: scale(1.04); }

.student-story-controls svg {
  grid-area: 1 / 1;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.student-story-toggle .icon-play { fill: currentColor; }
.student-story-toggle .icon-pause,
.student-story-toggle[aria-pressed="true"] .icon-play,
.student-story-sound .icon-sound-off,
.student-story-sound[aria-pressed="true"] .icon-sound-on { opacity: 0; }
.student-story-toggle[aria-pressed="true"] .icon-pause,
.student-story-sound[aria-pressed="true"] .icon-sound-off { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .student-story-card.is-active.is-buffering::after { animation: none; }
}

.plans-section {
  --plan-deep: #211d24;
  --plan-deep-soft: #c8c2ca;
  --plan-success: #2f6a50;
  --plan-savings-bg: #dcebe4;
  --plan-savings-ink: #116d3b;
  --plan-pro-surface: #f4eff9;
  --plan-ultra-surface: #ebe2f4;
  --plan-ultra-accent: #5b3a82;
  --billing-active: #5b3a82;
  background: var(--surface);
  padding-block: clamp(94px, 11vw, 144px);
}

:root[data-theme="dark"] .plans-section {
  --plan-deep: #09090b;
  --plan-deep-soft: #c8c2ca;
  --plan-success: #7aa98c;
  --plan-savings-bg: #1c3428;
  --plan-savings-ink: #91d3aa;
  --plan-pro-surface: #1d1823;
  --plan-ultra-surface: #261e30;
  --plan-ultra-accent: #c6a5e2;
  --billing-active: #6d478f;
}

.plans-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
}

.plans-heading h2 {
  max-width: 780px;
  margin: 0;
  font-variation-settings: "wdth" 94;
  font-weight: 635;
  letter-spacing: -0.06em;
  line-height: 0.97;
}

.plans-heading > div:first-child > p:last-child {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.65;
}

.billing-switch {
  justify-self: end;
}

.billing-switch button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 4px 2px;
  font: inherit;
  cursor: pointer;
}

.billing-switch-copy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.billing-switch-copy small {
  border: 0;
  border-radius: 999px;
  background: var(--plan-savings-bg);
  color: var(--plan-savings-ink);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.billing-switch-control {
  position: relative;
  width: 34px;
  height: 18px;
  flex: 0 0 34px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 16%, var(--canvas));
  transition: background-color 180ms ease;
}

.billing-switch-control > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 18, 22, 0.18);
  transition: transform 180ms ease;
}

.billing-switch button:hover .billing-switch-control {
  background: color-mix(in srgb, var(--ink) 24%, var(--canvas));
}

.billing-switch button[aria-checked="true"] .billing-switch-control {
  background: var(--billing-active);
}

.billing-switch button[aria-checked="true"] .billing-switch-control > span {
  transform: translateX(16px);
}

.plan-tabs { display: none; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 54px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.plan {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 520px;
  grid-template-rows: auto auto auto auto 1fr auto;
  padding: 30px clamp(20px, 2.2vw, 28px) 28px;
  container: plan-card / inline-size;
}

.plan + .plan { border-left: 1px solid var(--line); }
.plan.is-featured { background: var(--plan-pro-surface); }
.plan.is-ultra { background: var(--plan-ultra-surface); }
.plan.is-teams { background: var(--plan-deep); color: #fff; }

.plan-top {
  display: flex;
  min-height: 30px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-name {
  margin: 0;
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.plan-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.plan.is-ultra .plan-badge {
  background: color-mix(in srgb, var(--plan-ultra-accent) 12%, transparent);
  color: var(--plan-ultra-accent);
}

.plan.is-teams .plan-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #d7bced;
}

.plan-price {
  display: flex;
  min-width: 0;
  min-height: 84px;
  align-items: baseline;
  gap: 4px;
  margin-top: 22px;
  flex-wrap: nowrap;
}

.plan-price strong {
  min-width: 0;
  white-space: nowrap;
  font-size: clamp(32px, 3vw, 44px);
  font-variation-settings: "wdth" 92;
  font-weight: 630;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  transition: opacity 140ms ease, transform 180ms ease;
}

.plan-price strong.is-changing { opacity: 0; transform: translateY(5px); }

.plan-price--custom strong {
  font-size: clamp(30px, 2.7vw, 40px);
}

.plan-price span {
  flex: 0 0 auto;
  color: var(--soft);
  font-size: 12px;
  white-space: nowrap;
}

@container plan-card (max-width: 245px) {
  .plan-price strong { font-size: 30px; }
  .plan-price span { font-size: 11px; }
}

.plan-billing-note {
  min-height: 18px;
  margin: -14px 0 22px;
  color: var(--soft);
  font-size: 12px;
}

.plan-summary {
  min-height: 68px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

.plan.is-teams .plan-price span,
.plan.is-teams .plan-billing-note,
.plan.is-teams .plan-summary { color: var(--plan-deep-soft); }

.plan-features {
  display: grid;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-feature {
  display: flex;
  min-height: 46px;
  align-items: flex-start;
  gap: 11px;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  padding: 13px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 540;
  line-height: 1.4;
}

.plan-action .lucide {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.plan-feature-mark {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
}

.plan.is-ultra .plan-feature-mark { background: var(--plan-ultra-accent); }
.plan.is-teams .plan-feature { color: #fff; }
.plan.is-teams .plan-feature-mark { background: #d7bced; }

.plan-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  border: 1px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--canvas);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
  transition: transform 160ms ease;
}

.plan.is-featured .plan-action { border-color: var(--accent); background: var(--accent); color: #fff; }
.plan.is-ultra .plan-action { border-color: var(--plan-ultra-accent); background: var(--plan-ultra-accent); color: #fff; }
.plan.is-teams .plan-action { border-color: #fff; background: #fff; color: var(--plan-deep); }
.plan-action:hover { transform: translateY(-1px); }
.plan-action .lucide { width: 17px; height: 17px; }

.faq-section {
  display: grid;
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1.58fr);
  gap: clamp(48px, 7vw, 112px);
  padding-block: clamp(92px, 11vw, 140px);
}

.faq-section > header {
  position: sticky;
  top: 112px;
  align-self: start;
}

.faq-section h2 {
  max-width: 7ch;
  font-size: clamp(42px, 4.6vw, 60px);
  text-wrap: balance;
}

.faq-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 52px);
}

.faq-column { border-top: 1px solid var(--line); }

.faq-item {
  border-bottom: 1px solid var(--line);
  transition: border-color 220ms ease;
}

.faq-item summary {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 2px;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 590;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-question {
  transition: color 180ms ease, transform 220ms cubic-bezier(.2, .75, .25, 1);
}

.faq-toggle {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  color: var(--soft);
  transition: color 180ms ease, background-color 180ms ease, transform 260ms cubic-bezier(.2, .75, .25, 1);
}

.faq-toggle::before,
.faq-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 99px;
  background: currentColor;
  content: '';
  transform: translate(-50%, -50%);
}

.faq-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }

.faq-item summary:hover .faq-question { transform: translateX(4px); }

.faq-item summary:hover .faq-toggle {
  background: var(--surface);
  color: var(--ink);
}

.faq-item[open] { border-bottom-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }

.faq-item[open] .faq-question { color: var(--accent); }

.faq-item[open] .faq-toggle {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  transform: rotate(45deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-5px);
  transition:
    grid-template-rows 300ms cubic-bezier(.2, .75, .25, 1),
    opacity 180ms ease,
    transform 260ms cubic-bezier(.2, .75, .25, 1);
}

.faq-answer-inner { overflow: hidden; }

.faq-item[open] .faq-answer {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

.faq-answer p {
  max-width: 700px;
  margin: 0;
  padding: 0 40px 26px 2px;
  color: var(--soft);
  font-size: 14.5px;
  line-height: 1.68;
}

@media (max-width: 1040px) {
  .section-heading { min-height: auto; }
  .section-heading .eyebrow { margin-bottom: -18px; }
  .section-heading > p:last-child { max-width: 680px; }

  .faq-section { grid-template-columns: 1fr; gap: 52px; }
  .faq-section > header { position: static; }
  .faq-columns { grid-template-columns: 1fr; gap: 0; }
  .faq-column + .faq-column { border-top: 0; }

  .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .plan:nth-child(4) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .contexts-heading,
  .plans-heading,
  .faq-section {
    grid-template-columns: 1fr;
  }

  .contexts-heading { gap: 12px; }
  .contexts-gallery { margin-top: 46px; }

  .plans-heading { align-items: start; }
}

@media (max-width: 639px) {
  .contexts-section,
  .student-stories,
  .plans-section,
  .faq-section {
    padding-block: 82px;
  }

  .section-heading { gap: 26px; }
  .section-heading .eyebrow { margin-bottom: 0; }

  .section-heading h2,
  .contexts-heading h2,
  .plans-heading h2,
  .faq-section h2 {
    font-size: 46px;
  }

  .section-heading > p:last-child {
    font-size: 16px;
  }

  .contexts-heading { display: block; }
  .contexts-heading .eyebrow { margin-bottom: 18px; }

  .contexts-gallery {
    display: flex;
    width: 100%;
    gap: 14px;
    margin-top: 46px;
    overflow-x: auto;
    padding: 0 16px 12px;
    scroll-padding-inline: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .contexts-gallery::-webkit-scrollbar { display: none; }

  .contexts-gallery li {
    width: min(76vw, 292px);
    flex: 0 0 min(76vw, 292px);
    scroll-snap-align: start;
  }

  #planos,
  #faq {
    scroll-margin-top: 66px;
  }

  .student-stories-heading {
    display: grid;
    gap: 30px;
  }

  .student-stories-heading h2 { font-size: 46px; }

  .student-stories-controls { justify-self: end; }

  .student-stories-viewport {
    margin-top: 38px;
    scroll-padding-inline: 16px;
  }

  .student-stories-track {
    grid-auto-columns: min(76vw, 292px);
    gap: 12px;
    padding-inline: 16px;
  }

  .faq-section { gap: 38px; }
  .faq-section h2 { max-width: 8ch; }
  .faq-item summary { min-height: 66px; gap: 14px; font-size: 15px; }
  .faq-toggle { width: 28px; height: 28px; flex-basis: 28px; }
  .faq-answer p { padding: 0 36px 22px 2px; font-size: 14px; }

  .billing-switch { width: 100%; margin-top: 6px; justify-self: stretch; }
  .billing-switch button { width: 100%; }

  .plan-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-top: 38px;
    border-bottom: 1px solid var(--line);
  }

  .plan-tabs button {
    min-height: 46px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--soft);
    font: inherit;
    font-size: 13px;
  }

  .plan-tabs button[aria-pressed="true"] {
    border-bottom-color: var(--accent);
    color: var(--ink);
    font-weight: 650;
  }

  .plans-grid { display: block; margin-top: 0; border: 0; }

  .plan {
    display: none;
    min-height: 500px;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--canvas);
    padding: 28px 22px;
  }

  .plan.is-mobile-active { display: grid; }
  .plan + .plan { border-left: 1px solid var(--line); }
  .plan.is-featured { background: var(--plan-pro-surface); }
  .plan.is-ultra { background: var(--plan-ultra-surface); }
  .plan.is-teams { background: var(--plan-deep); }
  .plan-price strong { font-size: 40px; }
  .plan-summary { min-height: 0; }
}
