@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Manrope:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@1,6..72,500&display=swap");

:root {
  --ink: #18312d;
  --muted: #63716d;
  --paper: #f6f3ec;
  --card: rgba(255, 255, 255, 0.84);
  --line: rgba(24, 49, 45, 0.12);
  --green: #1f5a4e;
  --green-deep: #153f37;
  --coral: #ec775f;
  --gold: #d8a653;
  --sage: #9fbca9;
  --violet: #9d91bc;
  --shadow: 0 24px 80px rgba(37, 61, 56, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(236, 119, 95, 0.42);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
}

.ambient-one {
  width: 28rem;
  height: 28rem;
  right: -12rem;
  top: 10rem;
  background: rgba(229, 176, 102, 0.12);
}

.ambient-two {
  width: 24rem;
  height: 24rem;
  left: 8rem;
  bottom: -14rem;
  background: rgba(114, 161, 146, 0.11);
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  transition: filter 0.45s ease, transform 0.45s ease;
}

body.is-locked .app-shell {
  filter: blur(7px);
  transform: scale(0.99);
  pointer-events: none;
  user-select: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  padding: 34px 28px 26px;
  background: rgba(249, 247, 241, 0.78);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  z-index: 4;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 48% 52% / 47% 48% 52% 53%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-family: "Newsreader", Georgia, serif;
  font-size: 24px;
  font-style: italic;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  transform: rotate(-4deg);
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  font-size: 18px;
}

.brand strong,
.gate-brand strong {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand small,
.gate-brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

nav {
  display: grid;
  gap: 7px;
  margin-top: 62px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--green);
  background: rgba(31, 90, 78, 0.07);
}

.nav-icon {
  width: 21px;
  text-align: center;
  font-size: 17px;
}

.sidebar-card {
  margin-top: auto;
  padding: 17px;
  border-radius: 16px;
  background: #eae5d8;
}

.sidebar-card p {
  margin: 8px 0 0;
  color: #57645e;
  font-size: 12px;
  line-height: 1.55;
}

.text-button {
  margin-top: 18px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 4px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}

main {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  height: 76px;
  padding: 0 clamp(28px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 9px;
  margin-right: auto;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.45);
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ea38a;
  box-shadow: 0 0 0 4px rgba(110, 163, 138, 0.13);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-size: 11px;
  font-weight: 600;
}

.content {
  max-width: 1280px;
  padding: 36px clamp(28px, 5vw, 72px) 30px;
}

.hero {
  min-height: 410px;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: 40px;
  padding: 54px clamp(36px, 5vw, 70px);
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 85% 18%, rgba(238, 174, 94, 0.3), transparent 28%),
    linear-gradient(135deg, #173f38 0%, #1e5c4f 68%, #2a6b5d 100%);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  right: -220px;
  bottom: -220px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #bed5cc;
}

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

.hero h1 {
  margin: 15px 0 20px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: #efb271;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
}

.hero p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  line-height: 1.7;
}

.primary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 14px 20px;
  color: var(--green-deep);
  background: #f4bf79;
  box-shadow: 0 10px 28px rgba(10, 31, 27, 0.17);
}

.primary-button:hover {
  transform: translateY(-2px);
}

.hero .primary-button {
  margin-top: 13px;
}

.hero-orbit {
  width: min(100%, 370px);
  aspect-ratio: 1;
  justify-self: center;
  position: relative;
}

.orbit-ring {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.ring-two {
  inset: 28%;
  border-style: dashed;
  animation: spin 40s linear infinite;
}

.orbit-core {
  position: absolute;
  inset: 36%;
  border-radius: 50% 48% 52% 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: #f4bf79;
  color: var(--green-deep);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: rotate(4deg);
}

.orbit-core > * {
  transform: rotate(-4deg);
}

.orbit-core span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.orbit-core strong {
  margin-top: 2px;
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: 23px;
  line-height: 0.85;
}

.orbit-label {
  position: absolute;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  backdrop-filter: blur(8px);
}

.label-nature {
  top: 5%;
  left: 41%;
}

.label-ability {
  top: 43%;
  right: 0;
}

.label-situation {
  left: 35%;
  bottom: 2%;
}

.label-motivators {
  left: -1%;
  top: 47%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.section {
  padding: 70px 0 30px;
}

.ai-foundation {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  padding: 26px 30px 24px;
  border: 1px solid rgba(24, 49, 45, 0.13);
  border-radius: 22px;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.82), rgba(238, 234, 222, 0.8)),
    var(--card);
  box-shadow: 0 10px 38px rgba(44, 68, 62, 0.05);
}

.ai-foundation::after {
  content: "AI";
  position: absolute;
  right: 12px;
  top: -42px;
  color: rgba(31, 90, 78, 0.045);
  font-family: "Manrope", sans-serif;
  font-size: 150px;
  font-weight: 700;
  letter-spacing: -0.1em;
  pointer-events: none;
}

.ai-foundation-heading {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #8c6f45;
}

.foundation-index {
  color: var(--muted);
  font-size: 10px;
}

.ai-foundation-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
  gap: 50px;
  align-items: start;
  margin-top: 17px;
}

.ai-foundation h2 {
  max-width: 440px;
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(25px, 3vw, 39px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.ai-foundation h3 {
  margin: 10px 0 0;
  color: var(--coral);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(22px, 2.5vw, 32px);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.ai-foundation-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.ai-foundation-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.ai-foundation-copy strong {
  color: var(--ink);
}

.human-controls {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.human-controls span {
  padding: 7px 10px;
  border: 1px solid rgba(31, 90, 78, 0.13);
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.6);
  font-size: 9px;
  font-weight: 600;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section .eyebrow {
  color: #8c6f45;
}

.section h2,
.insight-dialog h2 {
  margin: 10px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.045em;
}

.progress-label {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 3px;
  margin: 24px 0 30px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(24, 49, 45, 0.1);
}

.progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  background: var(--coral);
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.lesson-card {
  min-height: 328px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 35px rgba(44, 68, 62, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.lesson-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(44, 68, 62, 0.09);
}

.lesson-card.featured {
  color: white;
  border-color: transparent;
  background: #d96d59;
}

.lesson-number {
  position: absolute;
  right: 18px;
  top: 9px;
  color: rgba(24, 49, 45, 0.07);
  font-family: "Manrope", sans-serif;
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.featured .lesson-number {
  color: rgba(255, 255, 255, 0.13);
}

.lesson-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  color: var(--muted);
  font-size: 10px;
}

.featured .lesson-meta {
  color: rgba(255, 255, 255, 0.72);
}

.tag {
  padding: 6px 9px;
  border-radius: 999px;
  color: #863c30;
  background: #f5d3cb;
  font-weight: 600;
}

.tag.sage {
  color: #466657;
  background: #d9e6dc;
}

.tag.amber {
  color: #79582f;
  background: #f0dfbf;
}

.tag.violet {
  color: #625679;
  background: #e4dff0;
}

.lesson-card h3 {
  margin: 74px 0 12px;
  font-family: "Manrope", sans-serif;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.lesson-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.featured p {
  color: rgba(255, 255, 255, 0.75);
}

.card-link {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding: 12px 0 2px;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

.featured .card-link {
  color: white;
  border-top-color: rgba(255, 255, 255, 0.18);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

footer p {
  max-width: 690px;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(420px, 1.08fr);
  background: #f5f1e8;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.gate.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 6vw, 76px);
  background:
    radial-gradient(circle at 15% 10%, rgba(242, 190, 120, 0.14), transparent 27%),
    #faf8f3;
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gate-copy {
  max-width: 540px;
  margin: auto 0 32px;
}

.gate-copy .eyebrow {
  color: #9a7041;
}

.gate-copy h1 {
  margin: 14px 0 15px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(48px, 5vw, 76px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.gate-copy p {
  max-width: 480px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

#gateForm {
  max-width: 560px;
}

#gateForm > label {
  display: block;
  margin-bottom: 9px;
  font-size: 11px;
  font-weight: 600;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.code-row input {
  min-width: 0;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: white;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.error-message {
  margin: 10px 0 0 16px;
  min-height: 18px;
  color: #a84b3f;
  font-size: 10px;
}

.gate-notice {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  max-width: 560px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.gate-notice span {
  color: var(--ink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gate-notice p {
  margin: 0;
}

.gate-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(50px, 8vw, 110px);
  color: white;
  background:
    radial-gradient(circle at 73% 22%, rgba(240, 179, 105, 0.35), transparent 21%),
    radial-gradient(circle at 29% 78%, rgba(138, 173, 157, 0.25), transparent 28%),
    linear-gradient(145deg, #143c35, #215e51);
}

.gate-art::before,
.gate-art::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.gate-art::before {
  width: 540px;
  height: 540px;
  right: -210px;
  top: -130px;
}

.gate-art::after {
  width: 320px;
  height: 320px;
  left: -170px;
  bottom: -90px;
}

.gate-art p {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 600px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(33px, 4.4vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  color: rgba(255, 255, 255, 0.42);
}

.gate-art .return-line {
  color: white;
}

.gate-art em {
  color: #efb271;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
}

.art-line {
  width: 130px;
  height: 1px;
  margin: 38px 0;
  background: rgba(255, 255, 255, 0.34);
}

.art-seal {
  position: absolute;
  right: 8vw;
  bottom: 7vw;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #efb271;
  font-family: "Newsreader", Georgia, serif;
  font-size: 39px;
  font-style: italic;
  transform: rotate(-8deg);
}

.insight-dialog {
  width: min(620px, calc(100vw - 36px));
  border: 0;
  border-radius: 24px;
  padding: 38px;
  color: var(--ink);
  background: #faf8f3;
  box-shadow: 0 30px 100px rgba(15, 42, 36, 0.3);
}

.insight-dialog::backdrop {
  background: rgba(15, 36, 32, 0.56);
  backdrop-filter: blur(5px);
}

.dialog-close {
  position: absolute;
  right: 17px;
  top: 15px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 21px;
}

.insight-dialog .eyebrow {
  color: #9a7041;
}

.insight-dialog h2 {
  margin: 12px 0 18px;
}

#dialogBody {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

#dialogBody ul {
  padding-left: 20px;
}

.dialog-boundary {
  margin-top: 24px;
  padding: 17px;
  border-radius: 14px;
  background: #e8eee9;
}

.dialog-boundary strong {
  font-size: 11px;
}

.dialog-boundary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 1050px) {
  .lesson-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gate {
    grid-template-columns: 1fr 0.9fr;
  }

  .gate-art {
    padding: 50px;
  }
}

@media (max-width: 800px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  main {
    grid-column: auto;
  }

  .topbar {
    padding: 0 20px;
  }

  .mobile-brand {
    display: flex;
  }

  .content {
    padding: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 38px 28px;
  }

  .hero-orbit {
    display: none;
  }

  .ai-foundation {
    padding: 23px;
  }

  .ai-foundation-grid,
  .ai-foundation-copy {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ai-foundation-copy {
    gap: 10px;
  }

  .gate {
    display: block;
    overflow-y: auto;
  }

  .gate-panel {
    min-height: 100vh;
    padding: 28px 22px;
  }

  .gate-copy {
    margin: 18vh 0 28px;
  }

  .gate-art {
    display: none;
  }
}

@media (max-width: 560px) {
  .status-pill {
    display: none;
  }

  .hero h1 {
    font-size: 40px;
  }

  .lesson-grid {
    grid-template-columns: 1fr;
  }

  .lesson-card {
    min-height: 290px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .code-row .primary-button {
    width: 100%;
  }

  .gate-notice {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
  }
}

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