:root {
  color-scheme: light;
  --ink: #1f2a2b;
  --muted: #5f6f6e;
  --paper: #fffaf3;
  --surface: #ffffff;
  --mist: #eef6f1;
  --line: #d7e2dc;
  --green: #477a62;
  --green-deep: #285946;
  --teal: #237f86;
  --coral: #c86f56;
  --sun: #f3c66d;
  --shadow: 0 18px 44px rgba(31, 42, 43, 0.12);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-sm: 0.2s;
  --duration-md: 0.5s;
  --duration-lg: 0.9s;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--green-deep);
  text-underline-offset: 0.22em;
}

a:hover,
a:focus-visible {
  color: var(--teal);
}

:focus-visible {
  outline: 3px solid rgba(35, 127, 134, 0.38);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 250, 243, 0.94);
  border-bottom: 1px solid rgba(71, 122, 98, 0.18);
  backdrop-filter: blur(12px);
  transition: background var(--duration-sm), box-shadow var(--duration-sm);
}

.site-header.header-scrolled {
  background: rgba(255, 250, 243, 0.98);
  box-shadow: 0 4px 20px rgba(31, 42, 43, 0.08);
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: min-height var(--duration-sm);
}

.header-scrolled .header-inner {
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 26%, var(--sun) 0 13%, transparent 14%),
    linear-gradient(135deg, var(--green-deep), var(--teal));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  flex: 0 0 auto;
  transition: width var(--duration-sm), height var(--duration-sm);
}

.header-scrolled .brand-mark {
  width: 28px;
  height: 28px;
}

.brand-text {
  display: grid;
  gap: 0;
  min-width: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  transition: font-size var(--duration-sm);
}

.header-scrolled .brand-name {
  font-size: 14px;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  transition: font-size var(--duration-sm), opacity var(--duration-sm);
}

.header-scrolled .brand-subtitle {
  font-size: 11px;
  opacity: 0.8;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
  color: var(--teal);
}

.site-nav a.active {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform var(--duration-sm), opacity var(--duration-sm);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: center;
  background-image: url("hero-learning.png");
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 250, 243, 0.94) 0%, rgba(255, 250, 243, 0.78) 36%, rgba(255, 250, 243, 0.18) 74%),
    linear-gradient(0deg, rgba(255, 250, 243, 0.32), rgba(255, 250, 243, 0.08));
  z-index: -1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(243, 198, 109, 0.12), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(35, 127, 134, 0.10), transparent 40%);
  z-index: -1;
  animation: hero-shimmer 12s ease-in-out infinite alternate;
}

@keyframes hero-shimmer {
  from {
    transform: translateX(-20px) scale(1);
  }
  to {
    transform: translateX(20px) scale(1.05);
  }
}

.hero-inner,
.section-inner,
.footer-inner,
.legal-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-copy {
  max-width: 650px;
  padding: 72px 0 96px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green-deep);
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: 0;
}

.hero-lede {
  margin: 22px 0 0;
  max-width: 560px;
  color: #344444;
  font-size: 19px;
}

.hero-english {
  margin: 14px 0 0;
  max-width: 570px;
  color: var(--muted);
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--green-deep);
  background: var(--green-deep);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--green-deep);
}

.button:hover,
.button:focus-visible {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.section {
  padding: 78px 0;
}

.section.alt {
  background: var(--mist);
}

.section.compact {
  padding: 54px 0;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
}

.section h2,
.legal-main h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-intro,
.legal-intro {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(31, 42, 43, 0.06);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.fact {
  padding: 18px 20px;
  border-left: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.74);
}

.fact strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.fact span {
  color: var(--muted);
}

.notice-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.notice-list li {
  position: relative;
  padding-left: 24px;
}

.notice-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}

.contact-band {
  background: var(--green-deep);
  color: #fff;
}

.contact-band .section-kicker,
.contact-band .section-intro {
  color: rgba(255, 255, 255, 0.78);
}

.contact-band a {
  color: #fff;
}

.contact-line {
  margin-top: 22px;
  font-size: 22px;
  font-weight: 800;
}

.legal-main {
  padding: 72px 0 82px;
}

.legal-main article {
  max-width: 850px;
}

.legal-main section {
  margin-top: 36px;
}

.legal-main h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.3;
}

.legal-main p,
.legal-main li {
  color: var(--muted);
}

.legal-main ul {
  padding-left: 22px;
}

.page-label {
  color: var(--coral);
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 12px;
}

.site-footer {
  border-top: 1px solid rgba(71, 122, 98, 0.2);
  background: #f7efe4;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  padding: 30px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--muted);
}

.footer-record {
  margin-top: 8px;
}

.footer-record a {
  color: var(--muted);
}

.error-page {
  min-height: 100svh;
  display: grid;
  align-items: center;
  background: var(--paper);
}

.error-panel {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
}

.error-panel h1 {
  font-size: 44px;
}

.error-panel p {
  color: var(--muted);
  font-size: 18px;
}

.reveal {
  opacity: 1;
  transform: translateY(20px);
  transition: transform var(--duration-md) var(--ease-out);
  will-change: transform;
}

.reveal-visible {
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.button {
  position: relative;
  overflow: hidden;
  transition: background var(--duration-sm), color var(--duration-sm), border-color var(--duration-sm), transform var(--duration-sm);
}

.button:active {
  transform: translateY(1px);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: ripple-effect 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.card {
  transition: transform var(--duration-sm), box-shadow var(--duration-sm);
}

.card-lift:hover,
.card-lift:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(31, 42, 43, 0.12);
}

.card-tilt {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}

.demo {
  max-width: 680px;
  margin: 0 auto;
}

.demo .section-intro {
  margin-bottom: 20px;
}

.demo-chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  max-height: 60vh;
  padding: 16px;
  overflow-y: auto;
  background: #f7efe4;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: inset 0 2px 8px rgba(31, 42, 43, 0.04);
}

@media (min-width: 860px) {
  .demo-chat {
    max-height: 640px;
    padding: 20px;
  }
}

.message {
  max-width: 85%;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.55;
  border-radius: 16px;
  opacity: 0;
  animation: message-in 0.35s var(--ease-out) forwards;
}

.message-child {
  align-self: flex-end;
  background: var(--green-deep);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-nix {
  align-self: flex-start;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.message-divider {
  align-self: center;
  max-width: 100%;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
}

.message-divider::before,
.message-divider::after {
  content: " ··· ";
  color: var(--green);
  letter-spacing: 0.1em;
}

.message-report {
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}

.message-report h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--green-deep);
}

.message-report ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.message-report li + li {
  margin-top: 6px;
}

.report-illustration {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-bottom: 12px;
  border-radius: 12px;
}

.message-approval {
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}

.message-approval > p {
  margin: 0 0 12px;
}

.approval-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.approval-choices .button {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
}

.message-text {
  margin: 0 0 8px;
}

.message-text:last-child {
  margin-bottom: 0;
}

.voice-bubble {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
}

.voice-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--green-deep);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.voice-play:hover,
.voice-play:focus-visible {
  background: var(--teal);
}

.voice-waveform {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 22px;
}

.voice-bar {
  flex: 0 0 auto;
  width: 3px;
  border-radius: 1.5px;
  background: var(--green);
  opacity: 0.5;
}

.voice-duration {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.voice-transcript {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.privacy-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.contact-line {
  position: relative;
  display: inline-block;
}

.copy-toast {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  background: var(--ink);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity var(--duration-sm), transform var(--duration-sm);
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.error-panel .page-label {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 64px;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
  }

  body.js-nav-ready .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }

  body.js-nav-ready .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 8px 20px 16px;
    background: rgba(255, 250, 243, 0.98);
    border-bottom: 1px solid rgba(71, 122, 98, 0.18);
    backdrop-filter: blur(12px);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--duration-md) var(--ease-out), opacity var(--duration-md) var(--ease-out);
  }

  body.js-nav-ready .site-nav.menu-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 8px 14px;
  }

  .site-nav a {
    width: auto;
    padding: 0;
    font-size: 13px;
    border-bottom: none;
  }

  body.js-nav-ready .site-nav a {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(71, 122, 98, 0.10);
  }

  body.js-nav-ready .site-nav a:last-child {
    border-bottom: none;
  }

  .hero {
    min-height: 560px;
    background-position: 40% center;
  }

  .hero::before {
    background: rgba(255, 250, 243, 0.82);
  }

  h1 {
    font-size: 40px;
  }

  .hero-copy {
    padding: 56px 0 72px;
  }

  .grid,
  .grid.two,
  .facts {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .hero-inner,
  .section-inner,
  .footer-inner,
  .legal-main,
  .error-panel {
    width: min(100% - 28px, 1120px);
  }

  .brand {
    align-items: flex-start;
  }

  .site-nav {
    font-size: 13px;
  }

  .hero {
    min-height: 500px;
    background-position: 42% center;
  }

  h1 {
    font-size: 32px;
  }

  .hero-lede {
    font-size: 17px;
  }

  .section {
    padding: 58px 0;
  }

  .section h2,
  .legal-main h1 {
    font-size: 28px;
  }

  .card {
    padding: 20px;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-visible {
    transform: none;
    transition: none;
  }

  .hero::after,
  .error-panel .page-label {
    animation: none;
  }

  .card,
  .card-lift:hover,
  .card-lift:focus-within,
  .card-tilt,
  .button,
  .message,
  .site-header,
  .header-inner,
  .brand-mark,
  .brand-name,
  .brand-subtitle,
  .site-nav {
    transition: none;
    transform: none;
    animation: none;
  }
}
