:root {
  color-scheme: light;
  --bg: #fbf7ef;
  --bg-soft: #f4ecdf;
  --ink: #1f2421;
  --muted: #68665e;
  --line: #d9d0c2;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --green: #2f9a6d;
  --green-soft: #dff3e7;
  --blue: #2f76b7;
  --blue-soft: #dfeefa;
  --coral: #d9604b;
  --coral-soft: #f7ddd5;
  --amber: #c08b2b;
  --shadow: 0 18px 60px rgba(45, 38, 28, 0.12);
  --radius: 8px;
  --content: min(1120px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.78), rgba(251, 247, 239, 0.96) 24rem),
    repeating-linear-gradient(90deg, rgba(31, 36, 33, 0.035) 0 1px, transparent 1px 96px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(47, 154, 109, 0.1), transparent 26rem),
    linear-gradient(315deg, rgba(217, 96, 75, 0.08), transparent 28rem);
}

a {
  color: inherit;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  background: rgba(47, 154, 109, 0.22);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-180%);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 10px 14px;
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(31, 36, 33, 0.08);
  background: rgba(251, 247, 239, 0.84);
  backdrop-filter: blur(18px);
}

.nav-shell,
.hero,
.section,
.footer-inner {
  width: var(--content);
  margin: 0 auto;
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(31, 36, 33, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 154, 109, 0.22), rgba(47, 118, 183, 0.12)),
    var(--surface);
  color: var(--green);
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 18px;
  font-weight: 750;
  text-decoration: none;
  line-height: 1.1;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button:focus-visible,
.switcher-button:focus-visible {
  outline: 3px solid rgba(47, 118, 183, 0.35);
  outline-offset: 3px;
}

.button-dark {
  background: var(--ink);
  color: var(--surface-strong);
  box-shadow: 0 10px 30px rgba(31, 36, 33, 0.18);
}

.button-light {
  background: rgba(255, 253, 248, 0.72);
  border-color: rgba(31, 36, 33, 0.14);
  color: var(--ink);
}

.button-small {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 0.9rem;
}

.hero {
  min-height: min(760px, calc(100vh - 72px));
  padding: 58px 0 44px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 56px;
  align-items: center;
}

.hero-copy {
  max-width: 610px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3.6rem, 6.4vw, 6rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  font-weight: 900;
}

h3 {
  font-size: 1.35rem;
  font-weight: 850;
}

.hero-lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: #4d4b45;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

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

.promise-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.promise-row span {
  border: 1px solid rgba(31, 36, 33, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
  padding: 8px 10px;
  color: #45423d;
  font-size: 0.86rem;
  font-weight: 750;
}

.hero-lab {
  border: 1px solid rgba(31, 36, 33, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lab-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid rgba(31, 36, 33, 0.1);
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 154, 109, 0.12);
}

.lab-topbar strong {
  color: var(--ink);
}

.lab-grid {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  grid-template-rows: 1fr 1fr;
  min-height: 470px;
}

.preview-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-color: rgba(31, 36, 33, 0.1);
}

.preview-writing {
  grid-row: span 2;
  border-right: 1px solid rgba(31, 36, 33, 0.1);
  background: linear-gradient(180deg, rgba(217, 96, 75, 0.12), rgba(255, 253, 248, 0.28));
}

.preview-health {
  border-bottom: 1px solid rgba(31, 36, 33, 0.1);
  background: linear-gradient(135deg, rgba(47, 154, 109, 0.13), rgba(255, 253, 248, 0.24));
}

.preview-audio {
  background: linear-gradient(135deg, rgba(47, 118, 183, 0.14), rgba(255, 253, 248, 0.2));
}

.pane-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pane-head img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: var(--radius);
}

.pane-head p {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
}

.pane-head span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.84rem;
}

.grammar-preview {
  display: grid;
  gap: 18px;
  margin-top: 40px;
}

.grammar-preview p {
  margin: 0;
  border: 1px solid rgba(31, 36, 33, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.76);
  padding: 18px;
  color: #393833;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 720;
}

.grammar-preview mark {
  border-radius: 5px;
  background: rgba(217, 96, 75, 0.18);
  color: #7c2417;
  padding: 0 4px;
}

.grammar-preview .corrected {
  border-color: rgba(47, 154, 109, 0.25);
  color: #175b3d;
}

.chart-preview {
  height: 124px;
  display: flex;
  align-items: end;
  gap: 8px;
  margin-top: 30px;
  border-bottom: 1px solid rgba(31, 36, 33, 0.18);
}

.chart-preview span {
  flex: 1;
  min-width: 10px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--green), rgba(47, 154, 109, 0.28));
}

.wave-preview {
  height: 106px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
}

.wave-preview span {
  flex: 1;
  min-width: 7px;
  border-radius: 99px;
  background: var(--blue);
  animation: wave 1600ms ease-in-out infinite;
}

.wave-preview span:nth-child(1) { height: 30%; animation-delay: -500ms; }
.wave-preview span:nth-child(2) { height: 72%; animation-delay: -220ms; }
.wave-preview span:nth-child(3) { height: 44%; animation-delay: -800ms; }
.wave-preview span:nth-child(4) { height: 88%; animation-delay: -120ms; }
.wave-preview span:nth-child(5) { height: 40%; animation-delay: -650ms; }
.wave-preview span:nth-child(6) { height: 63%; animation-delay: -360ms; }
.wave-preview span:nth-child(7) { height: 32%; animation-delay: -920ms; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.78); opacity: 0.72; }
  50% { transform: scaleY(1.06); opacity: 1; }
}

.section {
  padding: 92px 0;
}

.section-intro {
  max-width: 760px;
  margin-bottom: 36px;
}

.section-intro p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.apps-section {
  border-top: 1px solid rgba(31, 36, 33, 0.08);
}

.app-switcher {
  width: fit-content;
  max-width: 100%;
  display: flex;
  gap: 4px;
  border: 1px solid rgba(31, 36, 33, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
  padding: 4px;
  overflow-x: auto;
}

.switcher-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 9px 13px;
  font-weight: 780;
  cursor: pointer;
  white-space: nowrap;
}

.switcher-button.is-active {
  background: var(--ink);
  color: var(--surface-strong);
}

.apps-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 28px;
  align-items: stretch;
  margin-top: 22px;
}

.app-detail,
.app-card,
.principle-item,
.about-panel {
  border: 1px solid rgba(31, 36, 33, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.84);
}

.app-detail {
  padding: 24px;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.detail-status,
.app-card-status {
  width: fit-content;
  border-radius: 6px;
  padding: 5px 8px;
  background: var(--green-soft);
  color: #155d3d;
  font-size: 0.78rem;
  font-weight: 850;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.detail-head img {
  border-radius: var(--radius);
  object-fit: contain;
}

.detail-head p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.detail-copy {
  margin: 30px 0 0;
  color: #3f3d38;
  font-size: 1.28rem;
  line-height: 1.45;
}

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

.detail-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-weight: 650;
}

.detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--green);
}

.detail-actions {
  margin-top: auto;
  padding-top: 32px;
}

.app-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.app-card {
  min-height: 450px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.app-card:hover,
.app-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(31, 36, 33, 0.24);
  box-shadow: 0 14px 34px rgba(45, 38, 28, 0.1);
}

.app-card img {
  width: 42px;
  height: 42px;
  margin-top: 34px;
  border-radius: var(--radius);
  object-fit: contain;
}

.app-card h3 {
  margin-top: 22px;
}

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

.app-card[data-card-app="glpal"] .app-card-status {
  background: var(--green-soft);
}

.app-card[data-card-app="audio"] .app-card-status {
  background: var(--blue-soft);
  color: #1d527e;
}

.principles {
  border-top: 1px solid rgba(31, 36, 33, 0.08);
  border-bottom: 1px solid rgba(31, 36, 33, 0.08);
}

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

.principle-item {
  min-height: 320px;
  padding: 22px;
}

.principle-number {
  color: var(--coral);
  font-weight: 900;
  font-size: 0.9rem;
}

.principle-item h3 {
  margin-top: 54px;
  max-width: 12ch;
}

.principle-item p {
  margin: 18px 0 0;
  color: var(--muted);
}

.about-section {
  padding-bottom: 54px;
}

.about-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(47, 154, 109, 0.1), transparent 45%),
    rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow);
}

.about-copy {
  display: grid;
  gap: 18px;
}

.about-copy p {
  margin: 0;
  color: #45423d;
  font-size: 1.05rem;
}

.final-cta {
  padding-top: 44px;
}

.final-copy {
  max-width: 780px;
}

.final-copy p:not(.eyebrow) {
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 1.12rem;
}

.site-footer {
  border-top: 1px solid rgba(31, 36, 33, 0.1);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-inner p {
  margin: 0;
}

.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 520ms ease, transform 520ms ease;
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

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

  .hero,
  .apps-layout,
  .about-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 58px;
  }

  .hero-lab {
    max-width: 720px;
  }

  .apps-layout {
    gap: 18px;
  }

  .app-detail,
  .app-card {
    min-height: auto;
  }

  .app-cards,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .principle-item {
    min-height: 240px;
  }

  .principle-item h3 {
    margin-top: 34px;
    max-width: none;
  }
}

@media (max-width: 660px) {
  :root {
    --content: min(100vw - 28px, 1120px);
  }

  .site-header {
    position: static;
  }

  .nav-shell {
    min-height: 66px;
  }

  .nav-shell > .button {
    display: none;
  }

  .brand {
    font-size: 0.96rem;
  }

  .hero {
    padding: 30px 0 26px;
    gap: 22px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 3.9rem);
  }

  h2 {
    font-size: clamp(2.25rem, 12vw, 3.4rem);
  }

  .hero-lead,
  .detail-copy {
    font-size: 1.02rem;
  }

  .lab-grid {
    grid-template-columns: repeat(3, minmax(154px, 1fr));
    grid-template-rows: auto;
    min-height: auto;
    overflow-x: auto;
  }

  .lab-topbar {
    min-height: 44px;
  }

  .preview-writing {
    grid-row: auto;
    border-right: 1px solid rgba(31, 36, 33, 0.1);
    border-bottom: 0;
  }

  .preview-pane {
    min-height: 144px;
    padding: 14px;
  }

  .pane-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .pane-head p,
  .pane-head span {
    overflow-wrap: normal;
  }

  .grammar-preview,
  .chart-preview,
  .wave-preview {
    display: none;
  }

  .promise-row {
    margin-top: 20px;
  }

  .section {
    padding: 62px 0;
  }

  .app-switcher {
    width: 100%;
  }

  .switcher-button {
    flex: 1;
    font-size: 0.86rem;
    padding-inline: 9px;
  }

  .app-detail,
  .about-panel {
    padding: 20px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
