/* Layer order is repeated in every file: browsers use the first declaration they see, and files load alphabetically. */
@layer tokens, base, components, pages;

@layer pages {
  .wrap--wide { max-width: calc(64rem + 2 * var(--gutter)); }
  /* The landing page reads in one centred column, a little wider than the
     lessons, so the cards and quotes get room on a laptop. */
  .wrap--landing { max-width: calc(48rem + 2 * var(--gutter)); }

  /* The hero: a quiet looping video behind a wash of the primary colour, text on the left. */
  .hero { position: relative; isolation: isolate; overflow: hidden; padding-bottom: var(--space-lg); }

  .hero__video {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 72% 40%;
  }

  .hero__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary-deep) 86%, transparent) 0%, color-mix(in srgb, var(--primary) 74%, transparent) 50%, color-mix(in srgb, var(--primary-deep) 88%, transparent) 100%);
  }

  /* On wide screens the text only covers the left: keep it dark there and let
     the warm light of the video through on the right. */
  @media (min-width: 48rem) {
    .hero--video .hero__shade {
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--primary-deep) 90%, transparent) 0%, color-mix(in srgb, var(--primary-deep) 72%, transparent) 42%, color-mix(in srgb, var(--primary-deep) 18%, transparent) 75%, transparent 100%),
        linear-gradient(180deg, color-mix(in srgb, var(--primary-deep) 60%, transparent) 0%, transparent 22%, transparent 70%, color-mix(in srgb, var(--primary-deep) 55%, transparent) 100%);
    }
  }

  /* A quieter video: more of the band colour shows through, with less contrast. */
  .hero--quiet .hero__video { opacity: 0.55; filter: contrast(0.8) saturate(0.8); }

  /* Hero without video: a few quiet "windows" drawn in SVG behind the wash. */
  .hero__windows {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    color: var(--on-primary-muted);
  }
  .hero--windows { background: var(--primary); }
  .hero__avatar--initials, .person__photo--initials {
    display: inline-grid;
    place-items: center;
    flex: none;
    font-family: var(--font-display);
    letter-spacing: 0.04em;
  }
  .hero__avatar--initials { background: var(--primary-soft); color: var(--on-primary); }
  .person__photo--initials { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); color: var(--on-primary); }

  .hero__content { position: relative; }
  .hero__body { padding-block: var(--space-lg); }
  .hero .lead { color: var(--on-primary); }

  .hero__foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-sm); }
  .hero__person { display: flex; align-items: center; gap: 0.875rem; }
  .hero__avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 2px solid var(--on-primary-muted); }
  @media (min-width: 48rem) { .hero__avatar { width: 80px; height: 80px; } }
  .hero__caption { font-size: 0.9375rem; line-height: 1.4; }
  .hero__caption strong { display: block; font-weight: 600; }
  .hero__caption span { color: var(--on-primary-muted); }

  .hero__pause {
    display: grid;
    place-items: center;
    flex: none;
    width: var(--tap);
    height: var(--tap);
    border: 1px solid var(--on-primary-muted);
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-deep) 55%, transparent);
    color: var(--on-primary);
    cursor: pointer;
  }

  .hero__pause:hover { background: color-mix(in srgb, var(--primary-deep) 85%, transparent); }
  .hero__pause[data-state="paused"] .hero__pause-icon--pause,
  .hero__pause[data-state="playing"] .hero__pause-icon--play { display: none; }
  .hero__pause[hidden] { display: none; }

  .intro { padding-top: var(--space-xl); }
  .intro .serif { font-size: 1.5rem; line-height: 1.35; }

  .section { padding-block: var(--space-xl) 0; }

  /* Two small previews of the app, built in HTML so the text stays sharp. */
  .previews { display: grid; gap: var(--space-md); }
  .preview { margin: 0; display: flex; flex-direction: column; gap: 0.625rem; }

  .preview__card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .preview__eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }
  .preview__prompt { font-weight: 600; }
  .preview__hint, .preview__note { font-size: var(--text-sm); color: var(--muted); }
  .preview__field { min-height: 5.5rem; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); }
  .preview__button { padding: 0.75rem; border-radius: var(--radius-md); background: var(--primary); color: var(--on-primary); font-weight: 600; text-align: center; }
  .preview__entry { display: flex; flex-direction: column; gap: 0.125rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }

  .hero__alt { font-size: 0.9375rem; color: var(--on-primary-muted); }
  .hero__alt a { color: var(--on-primary); }

  /* Two ways in: the free Vooraf, or straight to the free module 1. */
  .start-choice { display: grid; gap: var(--space-md); }
  .start-choice__card { padding: 1.5rem; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--accent-line); }
  .start-choice__card .button { margin-top: auto; }
  .start-choice__eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }

  /* Over Yvette: her story beside her photo, signed with her signature. */
  .about { padding-block: var(--space-xl); }
  .about .watermark { width: 22rem; height: 22rem; right: -5rem; bottom: -5rem; }
  .about__layout { display: grid; gap: var(--space-md); align-items: start; }
  .about__photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 6px var(--paper); }
  .about__text p:not(.small) { font-size: var(--text-lg); }
  .about__sign { margin-top: var(--space-sm); color: var(--primary); }
  .signature { display: block; width: 12rem; height: auto; margin-bottom: 0.25rem; }
  /* Two makers: their photos side by side on a phone, stacked beside the text on wider screens. */
  .about__photos { display: flex; gap: var(--space-sm); }
  @media (min-width: 48rem) {
    .about__layout { grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-xl); }
    .about__photo { width: 160px; height: 160px; position: sticky; top: var(--space-lg); }
    .about__photos { flex-direction: column; gap: var(--space-md); }
    .about__photos .about__photo { position: static; }
  }

  /* Begin gratis: on the primary colour with the logo as watermark; what you get on the left, the
     form on a light card on the right (stacked on a phone). */
  .signup { padding-block: var(--space-xl); }
  .signup .watermark { width: 24rem; height: 24rem; right: -5rem; bottom: -6rem; color: var(--accent); opacity: 0.08; }
  .signup__layout { display: grid; gap: var(--space-lg); align-items: start; }
  .signup__intro h2 { font-size: var(--heading-lg); line-height: 1.1; }
  .signup__intro p { font-size: var(--text-lg); color: var(--on-primary); }
  .signup__points { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
  .signup__points li { display: grid; grid-template-columns: 1.5rem 1fr; gap: 0.625rem; align-items: start; }
  .signup__points li::before {
    content: "";
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    border-radius: 50%;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231F4A45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.875rem no-repeat;
  }

  .signup__card {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    background: var(--canvas);
    color: var(--ink);
    box-shadow: 0 1.25rem 2.5rem -1.5rem rgb(0 0 0 / 0.45);
  }
  .signup__card .field__input { background: var(--paper); border: 1px solid var(--line); }
  .signup__card .check input { accent-color: var(--primary); }
  .signup__card a:not(.button) { color: var(--primary); }
  .signup__card .muted { color: var(--muted); }
  .signup__card .field-error { color: var(--error); }
  .signup__card .button--accent { background: var(--primary); color: var(--on-primary); }
  .signup__card .button--accent:hover { background: var(--primary-deep); color: var(--on-primary); }
  /* "Geen wachtwoord nodig" is already among the points beside the card. */
  .signup__card .button + .small { display: none; }

  @media (min-width: 48rem) {
    .hero { min-height: 34rem; display: flex; }
    .hero__content { display: flex; flex-direction: column; justify-content: space-between; min-height: 30rem; }
    .hero__shade { background: linear-gradient(90deg, color-mix(in srgb, var(--primary-deep) 94%, transparent) 0%, color-mix(in srgb, var(--primary) 86%, transparent) 42%, color-mix(in srgb, var(--primary) 35%, transparent) 100%); }
    .hero__body { max-width: 34rem; }
    .hero__body h1 { font-size: 3.5rem; }
    .hero__button { display: inline-flex; width: auto; align-self: flex-start; }

    .previews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .start-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .signup__layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-xl); }
    .signup__intro { padding-top: var(--space-sm); }
    .signup__card { padding: var(--space-lg); }
  }

  .hero__note { font-size: var(--text-sm); color: var(--on-primary-muted); }

  .outcomes > li { font-size: var(--text-lg); }

  /* Ervaringen: on the primary colour with a large watermark. One quote large with a big
     quotation mark, the others on softer cards; an initial instead of a photo. */
  .testimonials-band { padding-block: var(--space-xl); }
  .testimonials-band .watermark { width: 26rem; height: 26rem; right: -6rem; bottom: -5rem; color: var(--accent); opacity: 0.08; }
  .testimonials-band h2 { color: var(--accent); font-size: var(--heading-sm); }

  .testimonial-feature { position: relative; margin: 0; padding-top: 2.75rem; display: grid; gap: var(--space-md); }
  .testimonial-feature::before {
    content: "\201C";
    position: absolute;
    top: -0.75rem;
    left: -0.25rem;
    font-family: var(--font-display);
    font-size: 6.5rem;
    line-height: 1;
    color: var(--accent);
  }
  .testimonial-feature__quote {
    margin: 0;
    max-width: 44rem;
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 1.1rem + 1.3vw, 2rem);
    line-height: 1.32;
    color: var(--on-primary);
  }

  .testimonials { display: grid; gap: var(--space-md); margin: 0; padding: 0; list-style: none; }
  .testimonial {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    background: var(--primary-soft);
  }
  .testimonial__quote { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.45; color: var(--on-primary); }

  .testimonial__by { display: flex; align-items: center; gap: 0.75rem; }
  .testimonial__by > span:last-child { display: flex; flex-direction: column; }
  .testimonial__initial {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 1.25rem;
  }
  .testimonial__name { font-weight: 600; color: var(--on-primary); }
  .testimonial__age { font-size: var(--text-sm); color: var(--on-primary-muted); }

  @media (min-width: 48rem) {
    .testimonials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* With an odd number of cards, the first takes the whole row. */
    .testimonials__wide { grid-column: 1 / -1; }
    .numbered--columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md) var(--space-lg); }
  }

  .faq { display: grid; border-top: 1px solid var(--line); }
  .faq__item { border-bottom: 1px solid var(--line); }
  .faq__question { cursor: pointer; padding-block: 1rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
  .faq__question::-webkit-details-marker { display: none; }
  .faq__question::after { content: "+"; flex: none; font-weight: 400; font-size: 1.25rem; line-height: 1; color: var(--primary); }
  .faq__item[open] .faq__question::after { content: "−"; }
  .faq__answer { padding-bottom: 1.125rem; color: var(--ink-soft); }

  /* Phones only: the start button stays within reach after the hero. */
  .sticky-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--canvas) 94%, transparent);
    border-top: 1px solid var(--line);
  }
  @media (min-width: 48rem) { .sticky-cta { display: none; } }

}
