/* Homepage only. The shared stylesheet also serves the feature and word pages. */
.learning-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 38px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 62px 28px 54px;
}
.learning-copy { min-width: 0; }

.learning-platform {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--ai-light);
  font-size: 15px;
  font-weight: 500;
}

.learning-platform svg, .learning-offline svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.learning-copy h1 {
  font-size: clamp(48px, 5.1vw, 70px);
  line-height: 1.13;
  letter-spacing: -.035em;
  font-weight: 500;
}

.learning-intro {
  max-width: 440px;
  margin-top: 28px;
  color: var(--paper-dim);
  font-size: 19px;
  line-height: 1.65;
}

.learning-promise { margin-top: 14px; font-size: 16px; color: var(--paper); }
.learning-wait { margin-top: 32px; max-width: 450px; }
.learning-wait .wait-row { margin-top: 0; gap: 9px; }
.learning-wait .wait-row input { min-height: 50px; font-size: 16px; padding-left: 18px; }
.learning-wait .wait-row input::placeholder { color: var(--paper-dim); }
.learning-wait .wait-row button {
  min-height: 50px;
  padding: 12px 21px;
  background: var(--ai);
  border-color: var(--ai);
  color: var(--paper-bright);
  white-space: nowrap;
}
.learning-wait .wait-row button:hover { background: #497cab; border-color: #497cab; }
.learning-wait .wait-lede { margin-top: 10px; color: var(--paper-dim); font-size: 13px; }
.learning-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 26px; align-items: center; }
.learning-tour { font-size: 14px; padding: 7px 0; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--ai); }
.learning-tour span { display: inline-block; margin-left: 5px; color: var(--ai-light); }
.learning-tour:hover { color: var(--ai-light); }
.learning-offline { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ai-light); }

/* Content comes into the phone; the card goes out to Anki. The five paths
   form one entrance animation and settle within five seconds. */
.learning-demo { min-width: 0; width: 100%; max-width: 560px; justify-self: center; }
.learning-scene { position: relative; width: 100%; aspect-ratio: 1; isolation: isolate; }
.learning-paths { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.learning-wire { stroke: #354353; stroke-width: 1; }
.learning-signal { stroke: var(--ai-light); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 22 240; stroke-dashoffset: 25; opacity: 0; animation: learning-connect 1.8s ease-in-out both; }
.signal-youtube { animation-delay: .15s; }
.signal-x { animation-delay: .65s; }
.signal-photo { animation-delay: 1.15s; }
.signal-kanji { animation-delay: 1.65s; }
.signal-anki { animation-delay: 2.9s; }

.learning-source {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 96px;
  color: var(--paper-dim);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
.source-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid #353b47;
  border-radius: 18px;
  background: var(--ink-soft);
  box-shadow: 0 10px 26px #0003, inset 0 1px 0 #ffffff07;
  animation: learning-source-arrive .9s ease both;
}
.source-youtube .source-icon { animation-delay: .15s; }
.source-x .source-icon { animation-delay: .65s; }
.source-photo .source-icon { animation-delay: 1.15s; }
.source-kanji .source-icon { animation-delay: 1.65s; }
.source-anki .source-icon { animation-delay: 3.5s; }
a.learning-source:hover { color: var(--paper); }
a.learning-source:hover .source-icon { border-color: var(--ai-light); }
.source-youtube { left: 3.6%; top: 15.8%; transform: rotate(-8deg); }
.source-youtube > span:last-child { transform: rotate(8deg); }
.source-x { left: 3%; top: 54%; transform: rotate(5deg); }
.source-x > span:last-child { transform: rotate(-5deg); }
.source-photo { right: 3.6%; top: 20%; transform: rotate(9deg); }
.source-photo > span:last-child { transform: rotate(-9deg); }
.source-kanji { right: 2.6%; top: 53.5%; transform: rotate(-6deg); }
.source-kanji > span:last-child { transform: rotate(6deg); }
.source-anki { right: 7.5%; top: 80%; transform: rotate(5deg); }
.source-anki > span:last-child { transform: rotate(-5deg); }
.x-icon { color: #fff; }
.photo-icon { color: #b2c8b8; }
.photo-icon svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.kanji-icon { position: relative; color: #c3b5d8; }
.kanji-icon > span { font-family: var(--display); font-size: 32px; line-height: 1; }
.kanji-icon svg { position: absolute; bottom: 6px; right: 4px; fill: var(--ink-soft); stroke: currentColor; stroke-width: 1.5; }
.anki-icon svg rect { fill: #172736; stroke: #7eaed6; stroke-width: 1.2; }
.anki-icon svg path { fill: #8dc4f5; stroke: #8dc4f5; stroke-width: .6; }

.learning-phone {
  position: absolute;
  top: 1.5%;
  left: 28%;
  width: 44%;
  padding: 7px;
  background: #050609;
  border: 1px solid #69707b;
  border-radius: 37px;
  box-shadow: 0 0 0 3px #222730, 0 24px 44px #0006;
}
.learning-phone::before, .learning-phone::after { content: ""; position: absolute; width: 3px; background: #505862; border-radius: 2px; }
.learning-phone::before { left: -5px; top: 110px; height: 50px; }
.learning-phone::after { right: -5px; top: 145px; height: 60px; }
.learning-screen { position: relative; aspect-ratio: 700 / 1518; overflow: hidden; background: #10100e; border-radius: 29px; }
.study-screen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease; }
.study-screen.is-active { opacity: 1; visibility: visible; }
.learning-app-label { position: absolute; left: 24%; bottom: -1%; width: 52%; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--paper-dim); font-size: 12px; text-align: center; }
.learning-app-label img { flex: none; }
.study-controls { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 29px; }
.study-controls[hidden], .study-hint[hidden] { display: none; }
.study-step { padding: 9px 11px; min-height: 44px; font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--paper-dim); border: 1px solid transparent; border-radius: 999px; background: transparent; cursor: pointer; }
.study-step[aria-pressed="true"] { color: var(--paper); border-color: #435b73; background: #192633; }
.study-step:hover { color: var(--paper); }
.study-arrow { color: #6e8194; font-size: 13px; }
.study-hint { margin-top: 8px; text-align: center; color: var(--paper-dim); font-size: 12px; }
#features, #f-youtube, #f-social, #anki { scroll-margin-top: 90px; }

@keyframes learning-connect {
  0% { opacity: 0; stroke-dashoffset: 25; }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; stroke-dashoffset: -200; }
}
@keyframes learning-source-arrive {
  0% { transform: translateY(5px) scale(.94); opacity: .55; }
  60% { transform: translateY(-2px) scale(1.04); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

@media (min-width: 1500px) { .learning-hero { padding-top: 82px; padding-bottom: 74px; } }
@media (min-width: 901px) and (max-width: 1080px) {
  .learning-hero { gap: 18px; padding-inline: 24px; }
  .learning-copy h1 { font-size: 54px; }
  .learning-intro { font-size: 17px; }
  .learning-source { width: 76px; }
  .source-icon { width: 54px; height: 54px; border-radius: 16px; }
  .learning-app-label { font-size: 11px; }
}
@media (max-width: 900px) {
  .learning-hero { grid-template-columns: minmax(0, 1fr); padding: 44px 24px 46px; gap: 38px; }
  .learning-copy { text-align: center; }
  .learning-platform, .learning-links { justify-content: center; }
  .learning-copy h1 { font-size: clamp(45px, 8vw, 66px); }
  .learning-copy h1 br:nth-child(2) { display: none; }
  .learning-intro { max-width: 520px; margin-inline: auto; }
  .learning-wait { margin-inline: auto; }
  .learning-demo { max-width: 520px; }
}
@media (max-width: 540px) {
  .learning-hero { padding: 32px 18px 36px; gap: 32px; }
  .learning-platform { font-size: 13px; gap: 7px; margin-bottom: 18px; }
  .learning-copy h1 { font-size: clamp(36px, 10.1vw, 51px); letter-spacing: -.045em; line-height: 1.16; }
  .learning-intro { margin-top: 21px; font-size: 17px; line-height: 1.6; }
  .learning-promise { max-width: 310px; margin: 12px auto 0; font-size: 14px; }
  .learning-wait { margin-top: 24px; }
  .learning-wait .wait-row { flex-direction: row; gap: 7px; }
  .learning-wait .wait-row input { padding: 10px 12px; }
  .learning-wait .wait-row button { padding: 11px 14px; font-size: 13px; }
  .learning-wait .wait-lede { font-size: 12px; }
  .learning-links { gap: 6px 18px; margin-top: 16px; }
  .learning-source { width: 72px; font-size: 11px; gap: 7px; }
  .source-icon { width: 48px; height: 48px; border-radius: 14px; }
  .source-icon > svg { width: 27px; height: 27px; }
  .kanji-icon > span { font-size: 28px; }
  .kanji-icon > svg { width: 15px; height: 15px; }
  .source-youtube, .source-x { left: 0; }
  .source-photo, .source-kanji { right: 0; }
  .source-anki { right: 3%; top: 81%; }
  .learning-phone { padding: 5px; border-radius: 27px; }
  .learning-screen { border-radius: 21px; }
  .learning-phone::before { top: 65px; height: 30px; }
  .learning-phone::after { top: 85px; height: 36px; }
  .learning-app-label { left: 20%; width: 60%; bottom: -5%; font-size: 10px; line-height: 1.4; }
  .learning-app-label img { width: 14px; height: 14px; }
  .study-controls { margin-top: 38px; gap: 4px; }
  .study-step { font-size: 13px; padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .learning-signal, .source-icon { animation: none; }
  .study-screen { transition: none; }
}
