/* Nourish Agent Demo
   Palette borrowed from Cook for Your Life: deep teal + lime, on a warm cream. */

:root {
  --teal-950: #00343a;
  --teal: #00484f;
  --teal-700: #1d6a70;
  --teal-300: #7fb6ad;
  --teal-100: #dcebe6;
  --lime: #b0d136;
  --lime-200: #e4f0b4;
  --cream: #f7f4ec;
  --paper: #fffdf8;
  --ink: #17292b;
  --ink-soft: #4a5d5e;
  --line: #e3ddcf;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Poppins', system-ui, sans-serif;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.375rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.75vw, 1.95rem);
  --step-4: clamp(2.4rem, 1.8rem + 3vw, 4.4rem);

  --radius: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: min(1160px, 100% - 2 * clamp(1.25rem, 4vw, 3rem));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--teal);
  color: var(--paper);
  border-radius: 8px;
}
.skip:focus {
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--teal-700);
  outline-offset: 3px;
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-700);
}
.eyebrow--light {
  color: var(--lime);
}

.section-title {
  font-size: var(--step-2);
  color: var(--teal);
}
.section-title--light {
  color: var(--paper);
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 999px;
  font: 600 var(--step-0) / 1 var(--font-body);
  cursor: pointer;
  transition:
    transform 0.25s var(--ease-out),
    background-color 0.25s var(--ease-out);
}
.btn--primary {
  background: var(--teal);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--teal-950);
  transform: translateY(-2px);
}
.btn--lime {
  margin-top: 1.25rem;
  background: var(--lime);
  color: var(--teal-950);
  font-size: var(--step--1);
  padding: 0.75rem 1.25rem;
}
.btn--lime:hover {
  background: var(--lime-200);
  transform: translateY(-2px);
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

/* ── Header ──────────────────────────────────────────────────────── */

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--teal);
}
.logo__mark {
  width: 34px;
  height: 34px;
}
.logo__mark .leaf-a {
  color: var(--lime);
}
.logo__mark .leaf-b {
  color: var(--teal-300);
}
.logo__word {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.logo__tag {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--lime-200);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.me {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.me__avatar {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--lime);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}
.me__text {
  display: grid;
  line-height: 1.2;
}
.me__label {
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.me__name {
  font-weight: 600;
}

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(3rem, 7vw, 6rem);
  overflow-x: clip;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.hero__copy {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
}
.hero h1 {
  font-size: var(--step-4);
  color: var(--teal);
  max-width: 11ch;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--teal-700);
  background: linear-gradient(transparent 62%, var(--lime-200) 62% 92%, transparent 92%);
}
.hero__lede {
  max-width: 38ch;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.hero__figure {
  position: relative;
  margin: 0;
}
.hero__figure::before {
  content: '';
  position: absolute;
  inset: 8% -6% -7% 10%;
  border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
  background: var(--lime);
  z-index: -1;
}
.hero__figure img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 58% 42% 48% 52% / 46% 54% 46% 54%;
  box-shadow: 0 30px 60px -30px rgb(0 52 58 / 0.45);
}

/* ── Pick up where you left off ──────────────────────────────────── */

.resume {
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
.resume .section-title {
  margin-bottom: 1.5rem;
}
.resume__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.25rem;
}
.resume h3 {
  font-size: var(--step-2);
  margin-top: 0.4rem;
}

.resume__course {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius);
  background: var(--teal);
  color: var(--paper);
}
.resume__module {
  color: var(--teal-100);
}

.progress {
  margin-block: 1.25rem 1.5rem;
}
.progress__track {
  height: 10px;
  border-radius: 999px;
  background: rgb(255 253 248 / 0.16);
  overflow: hidden;
}
.progress__fill {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  border-radius: inherit;
  background: var(--lime);
  transform-origin: left;
  animation: grow 1.1s 0.3s var(--ease-out) both;
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
}
.progress__label {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  color: var(--teal-100);
}

.resume__next {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 253 248 / 0.18);
}
.resume__next-label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--lime);
}
.resume__next-label span {
  color: var(--teal-100);
  font-weight: 400;
}
.resume__next-title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.3;
  margin-block: 0.35rem;
}
.resume__next-meta {
  font-size: var(--step--1);
  color: var(--teal-100);
}

.resume__plan {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}
.resume__plan h3 {
  color: var(--teal);
}
.resume__goal {
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.plan {
  margin: 1.5rem 0 0;
}
.plan > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding-block: 0.8rem;
  border-top: 1px solid var(--line);
}
.plan dt {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-700);
  padding-top: 0.15rem;
}
.plan dd {
  margin: 0;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--teal-100);
  font-size: var(--step--1);
}
.facts__label {
  font-weight: 600;
  color: var(--teal);
}

/* ── Ask Nourish ─────────────────────────────────────────────────── */

.ask {
  background: var(--teal);
  color: var(--paper);
  padding-block: clamp(3rem, 7vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.ask::before {
  content: '';
  position: absolute;
  width: 34rem;
  aspect-ratio: 1;
  right: -12rem;
  top: -16rem;
  border-radius: 50%;
  background: var(--teal-700);
  opacity: 0.55;
}
.ask__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.ask__intro {
  display: grid;
  gap: 1rem;
}
.ask__intro > p {
  color: var(--teal-100);
  max-width: 40ch;
}

.questions {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.questions li {
  animation: rise 0.7s calc(0.08s * var(--i, 0)) var(--ease-out) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
.question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.35rem;
  border: 1px solid rgb(255 253 248 / 0.22);
  border-radius: 14px;
  background: rgb(255 253 248 / 0.06);
  color: var(--paper);
  font: 500 var(--step-1) / 1.35 var(--font-display);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out);
}
.question__arrow {
  flex: none;
  font-family: var(--font-body);
  transition: transform 0.3s var(--ease-out);
}
.question:hover:not(:disabled) {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--teal-950);
}
.question:hover:not(:disabled) .question__arrow {
  transform: translateX(4px);
}
.question:focus-visible {
  outline-color: var(--lime);
}
.question:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background: rgb(255 253 248 / 0.06);
  color: var(--paper);
}

/* ── What we know about you ──────────────────────────────────────── */

.known {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.known__head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.known__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--lime);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
}
.known__lede {
  margin-top: 0.35rem;
  color: var(--ink-soft);
}
.known__grid {
  columns: 2 26rem;
  column-gap: 1.25rem;
}
.known__card {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}
.known__card h3 {
  font-size: var(--step-1);
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.known__card dl {
  margin: 0;
}
.known__card dl > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  padding-block: 0.7rem;
  border-top: 1px solid var(--line);
}
.known__card dl > div:first-child {
  border-top: 0;
}
.known__card dt {
  color: var(--ink-soft);
  font-size: var(--step--1);
  padding-top: 0.1rem;
}
.known__card dd {
  margin: 0;
}

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
  padding-block: 2rem 2.5rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.site-footer p {
  max-width: 60ch;
}
.site-footer strong {
  color: var(--ink);
}

/* ── Library pages ───────────────────────────────────────────────── */

.doc__back {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--teal);
}
.doc {
  padding-block: 1.5rem 3.5rem;
}
.doc article {
  max-width: 70ch;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.doc h1 {
  margin-block: 0.35rem 1.25rem;
  font-size: var(--step-2);
  color: var(--teal);
}
.doc h2,
.doc h3,
.doc h4,
.doc h5,
.doc h6 {
  margin-block: 1.75rem 0.6rem;
  color: var(--teal);
}
.doc h2 {
  font-size: var(--step-1);
}
.doc h3,
.doc h4 {
  font-size: var(--step-0);
}
.doc h5,
.doc h6 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.doc p,
.doc ul,
.doc ol,
.doc blockquote,
.doc pre {
  margin-block: 0 1rem;
}
.doc ul,
.doc ol {
  padding-left: 1.4rem;
}
.doc li + li {
  margin-top: 0.3rem;
}
.doc blockquote {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--lime);
  background: var(--cream);
  border-radius: 0 10px 10px 0;
}
.doc blockquote p {
  margin: 0;
}
.doc pre {
  white-space: pre-wrap;
  font: inherit;
}
.doc a {
  color: var(--teal-700);
}
.doc__lede {
  color: var(--ink-soft);
}
.doc__list {
  columns: 2 18rem;
  column-gap: 2rem;
}
.doc__list li {
  break-inside: avoid;
}
.doc__source {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* ── Load-in ─────────────────────────────────────────────────────── */

.hero__copy > *,
.hero__figure {
  animation: rise 0.8s var(--ease-out) both;
}
.hero__copy > :nth-child(2) {
  animation-delay: 0.06s;
}
.hero__copy > :nth-child(3) {
  animation-delay: 0.12s;
}
.hero__copy > :nth-child(4) {
  animation-delay: 0.18s;
}
.hero__figure {
  animation-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── Small screens ───────────────────────────────────────────────── */

@media (max-width: 860px) {
  .hero__grid,
  .resume__grid,
  .ask__grid {
    grid-template-columns: 1fr;
  }
  .hero__figure {
    order: -1;
    width: min(100%, 520px);
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .me__label,
  .logo__tag {
    display: none;
  }
  .plan > div,
  .known__card dl > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}
