:root {
  color-scheme: light;
  --page-bg: #f6f9fb;
  --surface: #ffffff;
  --ink: #142033;
  --muted: #626d7d;
  --line: rgba(20, 32, 51, 0.12);
  --video-deep: #123f39;
  --video-mid: #1c7b72;
  --video-soft: #dcfbf3;
  --comic-deep: #7b2f37;
  --comic-mid: #c85265;
  --comic-soft: #fff0f3;
  --focus: #1768ac;
  --shadow-card: 0 24px 70px rgba(24, 35, 55, 0.13);
  --shadow-card-strong: 0 34px 100px rgba(24, 35, 55, 0.2);
}

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

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 5%, rgba(28, 123, 114, 0.2), transparent 26rem),
    radial-gradient(circle at 93% 96%, rgba(200, 82, 101, 0.18), transparent 28rem),
    linear-gradient(180deg, #fbfdfc 0%, var(--page-bg) 48%, #f7f5f8 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.page-shell {
  width: calc(100% - 40px);
  max-width: 1180px;
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 42px 0 24px;
}

.site-header {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  animation: page-enter 520ms ease both;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 42px rgba(28, 42, 64, 0.12);
  outline: none;
  overflow: hidden;
}

.brand-mark:focus-visible {
  outline: 3px solid rgba(23, 104, 172, 0.34);
  outline-offset: 4px;
}

.brand-mark img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  transform: scale(1.1);
}

.hero-copy,
.site-header h1,
.site-header p {
  margin: 0;
}

.hero-copy {
  display: grid;
  gap: 9px;
  justify-items: center;
  min-width: 0;
}

.site-header h1 {
  font-size: 3rem;
  line-height: 1.04;
  font-weight: 880;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero-subtitle {
  max-width: 720px;
  color: #29364a;
  font-size: 1.17rem;
  line-height: 1.55;
  font-weight: 640;
  overflow-wrap: break-word;
}

.hero-note {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.portal-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.choice-card {
  --card-deep: var(--video-deep);
  --card-mid: var(--video-mid);
  --card-soft: var(--video-soft);
  --card-glow: rgba(28, 123, 114, 0.16);
  --card-border-hover: rgba(28, 123, 114, 0.28);
  --card-shadow: rgba(18, 63, 57, 0.18);
  --pointer-x: 50%;
  --pointer-y: 50%;
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 600px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 330px minmax(0, 1fr);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.62)),
    linear-gradient(135deg, var(--card-soft), rgba(255, 255, 255, 0.9));
  box-shadow: var(--shadow-card);
  text-decoration: none;
  outline: none;
  transform: translateY(0);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  animation: card-enter 620ms ease both;
}

.choice-card::before,
.choice-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.choice-card::before {
  z-index: -2;
  background:
    radial-gradient(circle at 22% 8%, var(--card-glow), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 42%),
    repeating-linear-gradient(135deg, rgba(20, 32, 51, 0.026) 0 1px, transparent 1px 22px);
}

.choice-card::after {
  z-index: -1;
  opacity: 0;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.72), transparent 18rem),
    radial-gradient(circle at 50% 0%, var(--card-glow), transparent 24rem);
  transition: opacity 220ms ease;
}

.choice-comic {
  --card-deep: var(--comic-deep);
  --card-mid: var(--comic-mid);
  --card-soft: var(--comic-soft);
  --card-glow: rgba(200, 82, 101, 0.18);
  --card-border-hover: rgba(200, 82, 101, 0.3);
  --card-shadow: rgba(123, 47, 55, 0.18);
  animation-delay: 80ms;
}

.choice-card:hover,
.choice-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  box-shadow:
    var(--shadow-card-strong),
    0 0 0 1px rgba(255, 255, 255, 0.78),
    0 0 36px var(--card-glow);
}

.choice-card:hover::after,
.choice-card:focus-visible::after {
  opacity: 1;
}

.choice-card:focus-visible {
  outline: 3px solid rgba(23, 104, 172, 0.34);
  outline-offset: 5px;
}

.choice-card:active {
  transform: translateY(-1px) scale(0.996);
}

.choice-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 32px 34px 0;
}

.choice-media::before {
  content: "";
  position: absolute;
  width: 72%;
  height: 72%;
  border-radius: 999px;
  background: radial-gradient(circle, var(--card-glow), transparent 66%);
}

.course-preview {
  position: relative;
  width: 100%;
  max-width: 470px;
  aspect-ratio: 1.58;
  display: block;
  padding: 13px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.52));
  box-shadow: 0 30px 76px rgba(18, 63, 57, 0.24);
  transform: perspective(900px) rotateX(3deg) rotateY(-5deg);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.course-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
}

.choice-video:hover .course-preview,
.choice-video:focus-visible .course-preview {
  box-shadow: 0 34px 86px rgba(18, 63, 57, 0.28);
  transform: perspective(900px) rotateX(1deg) rotateY(-2deg) translateY(-4px);
}

.comic-page-preview {
  box-shadow: 0 30px 76px rgba(123, 47, 55, 0.22);
  transform: perspective(900px) rotateX(3deg) rotateY(5deg);
}

.choice-comic:hover .comic-page-preview,
.choice-comic:focus-visible .comic-page-preview {
  box-shadow: 0 34px 86px rgba(123, 47, 55, 0.27);
  transform: perspective(900px) rotateX(1deg) rotateY(2deg) translateY(-4px);
}

.media-bar {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 25px;
  display: flex;
  gap: 7px;
}

.media-bar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 1px rgba(18, 63, 57, 0.12);
}

.comic-media {
  padding-top: 26px;
}

.comic-glow {
  position: absolute;
  width: 295px;
  height: 295px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(200, 82, 101, 0.28), rgba(200, 82, 101, 0.08) 48%, transparent 70%);
  transform: translate(22px, 4px);
}

.comic-stack {
  position: relative;
  width: 224px;
  height: 304px;
  display: grid;
  place-items: center;
}

.comic-stack img {
  position: relative;
  z-index: 3;
  width: auto;
  height: 296px;
  aspect-ratio: 520 / 932;
  object-fit: cover;
  object-position: center top;
  border-radius: 7px;
  box-shadow: 0 28px 74px rgba(123, 47, 55, 0.28);
  transform: rotate(-4deg);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.comic-page {
  position: absolute;
  width: 166px;
  height: 296px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: linear-gradient(180deg, #fffefe, #fff6f4);
  box-shadow: 0 18px 46px rgba(123, 47, 55, 0.13);
}

.comic-page::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(123, 47, 55, 0.11) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(123, 47, 55, 0.12) 0 1px, transparent 1px 44%, rgba(123, 47, 55, 0.12) 44% calc(44% + 1px), transparent calc(44% + 1px) 100%),
    linear-gradient(135deg, rgba(200, 82, 101, 0.12), transparent 54%);
}

.comic-page-back {
  z-index: 1;
  opacity: 0.66;
  transform: translate(38px, 14px) rotate(7deg);
}

.comic-page-mid {
  z-index: 2;
  opacity: 0.9;
  transform: translate(22px, 5px) rotate(3deg);
}

.choice-comic:hover .comic-stack img,
.choice-comic:focus-visible .comic-stack img {
  box-shadow: 0 34px 84px rgba(123, 47, 55, 0.32);
  transform: rotate(-2deg) translateY(-5px);
}

.choice-content {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 6px 34px 34px;
}

.choice-kicker {
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--card-deep);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 820;
  letter-spacing: 0;
}

.choice-title {
  color: var(--card-deep);
  font-size: 2.15rem;
  line-height: 1.06;
  font-weight: 880;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.choice-copy {
  width: 100%;
  max-width: 34rem;
  color: #2f4050;
  font-size: 1.04rem;
  line-height: 1.58;
  overflow-wrap: break-word;
}

.choice-badges {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.choice-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--card-deep);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 720;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.choice-action {
  margin-top: auto;
  width: fit-content;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--card-deep), var(--card-mid));
  box-shadow: 0 16px 34px var(--card-shadow);
  font-weight: 820;
  font-size: 0.96rem;
  letter-spacing: 0;
}

.choice-action svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms ease;
}

.choice-card:hover .choice-action svg,
.choice-card:focus-visible .choice-action svg {
  transform: translateX(3px);
}

.site-footer {
  width: 100%;
  max-width: 780px;
  margin: 2px auto 0;
  padding: 8px 0 0;
  color: rgba(20, 32, 51, 0.58);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1060px) {
  .page-shell {
    width: calc(100% - 32px);
    max-width: 1120px;
  }

  .choice-card {
    min-height: 570px;
    grid-template-rows: 300px minmax(0, 1fr);
  }

  .course-preview {
    max-width: 450px;
  }

  .comic-stack {
    width: 204px;
    height: 280px;
  }

  .comic-stack img,
  .comic-page {
    height: 270px;
  }

  .comic-page {
    width: 151px;
  }

  .choice-title {
    font-size: 1.95rem;
  }
}

@media (max-width: 900px) {
  .page-shell {
    width: calc(100% - 28px);
    max-width: 660px;
    gap: 20px;
    padding: 26px 0 22px;
  }

  .site-header {
    padding-top: 6px;
  }

  .site-header h1 {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.04rem;
  }

  .portal-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .choice-card {
    min-height: 0;
    grid-template-rows: 250px minmax(0, auto);
  }

  .choice-media {
    padding: 24px 24px 0;
  }

  .course-preview {
    max-width: 430px;
  }

  .comic-stack {
    width: 192px;
    height: 244px;
  }

  .comic-stack img,
  .comic-page {
    height: 232px;
  }

  .comic-page {
    width: 129px;
  }

  .comic-glow {
    width: 240px;
    height: 240px;
  }

  .choice-content {
    padding: 4px 24px 26px;
  }

  .choice-action {
    margin-top: 8px;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: calc(100% - 20px);
    max-width: 660px;
    gap: 16px;
    padding-top: 20px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .brand-mark img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
  }

  .site-header {
    gap: 12px;
  }

  .site-header h1 {
    font-size: 1.86rem;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .hero-note {
    font-size: 0.93rem;
  }

  .choice-card {
    grid-template-rows: 220px minmax(0, auto);
  }

  .choice-media {
    padding: 20px 18px 0;
  }

  .course-preview {
    padding: 10px;
  }

  .media-bar {
    top: 18px;
    left: 20px;
  }

  .comic-stack {
    width: 174px;
    height: 218px;
  }

  .comic-stack img,
  .comic-page {
    height: 208px;
  }

  .comic-page {
    width: 116px;
  }

  .comic-glow {
    width: 214px;
    height: 214px;
  }

  .choice-content {
    gap: 11px;
    padding: 2px 18px 20px;
  }

  .choice-title {
    font-size: 1.52rem;
  }

  .choice-copy {
    font-size: 0.96rem;
  }

  .choice-badges {
    gap: 6px;
  }

  .choice-badge {
    min-height: 28px;
    padding: 0 9px;
    font-size: 0.78rem;
  }

  .choice-action {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    font-size: 0.92rem;
  }

  .site-footer {
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .choice-card,
  .choice-card:hover,
  .choice-card:focus-visible,
  .choice-card:active,
  .course-preview,
  .choice-video:hover .course-preview,
  .choice-video:focus-visible .course-preview,
  .comic-stack img,
  .choice-comic:hover .comic-stack img,
  .choice-comic:focus-visible .comic-stack img,
  .choice-action svg {
    transform: none !important;
  }
}
