/* ==========================================================================
   components.css — header, buttons, hero, video, offer rows, about, facts,
   footer. Loads after base.css. Tokens only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Site header — white bar, gutter on the contents only. The links wrap on a
   phone instead of collapsing into a menu button; "Kontakt" is a button.
   -------------------------------------------------------------------------- */

.siteheader {
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.siteheader__inner {
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding: var(--space-2) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
}

/* Text wordmark until Vidar has a logo. The dot is the accent, nothing more. */
.wordmark {
  font-family: var(--font-sans);
  font-size: var(--step-l);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
  text-decoration: none;
}
.wordmark::after { content: "."; color: var(--accent); }
.wordmark:hover { color: var(--primary-strong); }

.sitenav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  font-size: var(--step-s);
  font-weight: 500;
}
.sitenav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: none;
}
.sitenav a:not(.btn):hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* --------------------------------------------------------------------------
   Buttons — sans, 600, slightly rounded.
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--step-s);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.btn--sm { min-height: 40px; padding: 0.5rem 1.1rem; }

.btn--primary {
  background: var(--primary);
  color: var(--ink-inverse);
}
.btn--primary:hover { background: var(--primary-strong); color: var(--ink-inverse); }

.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--ink-inverse); }

/* On a dark or primary band the pair inverts. */
.band--dark .btn--primary,
.band--primary .btn--primary {
  background: var(--ink-inverse);
  color: var(--primary);
}
.band--dark .btn--primary:hover,
.band--primary .btn--primary:hover {
  background: var(--surface);
  color: var(--primary-strong);
}
.band--dark .btn--ghost,
.band--primary .btn--ghost { color: var(--ink-inverse); }
.band--dark .btn--ghost:hover,
.band--primary .btn--ghost:hover { background: var(--ink-inverse); color: var(--primary); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* --------------------------------------------------------------------------
   Hero — a photo of Vidar teaching behind a green scrim, like
   aiskilltrees.com's. When the video is back under it, add
   clamp(4rem, 14vw, 12rem) to the bottom padding: that is the room the
   video frame overlaps.
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-band);
}

/* On a phone the photo fills the band under a dense scrim. From 900px it
   covers only the right part, so Vidar stands beside the headline rather
   than behind it, and the scrim fades from solid green into the photo. */
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim-strong);
}

@media (min-width: 900px) {
  .hero__bg { left: auto; width: 55%; }
  .hero__scrim {
    background: linear-gradient(90deg,
      var(--primary) 0%, var(--primary) 45%,
      var(--scrim-mid) 62%, var(--scrim-weak) 100%);
  }
}

.hero__inner { position: relative; }

.hero h1 {
  font-size: var(--step-3xl);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-bottom: var(--space-3);
}

.hero .lede {
  font-family: var(--font-sans);
  font-size: var(--step-m);
  line-height: 1.55;
  max-width: 52ch;
  opacity: 0.9;
}

/* --------------------------------------------------------------------------
   Video — pulled up over the hero's bottom edge. Not on the page until the
   video exists; see the comment in index.html.
   -------------------------------------------------------------------------- */

/* Positioned so it paints above the hero it overlaps, and transparent so
   its own ground does not cover the hero beside the frame. */
.showreel { padding-block: 0; position: relative; z-index: 1; background: transparent; }

.showreel__frame {
  margin-top: calc(-1 * clamp(4rem, 14vw, 12rem));
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.showreel__frame img,
.showreel__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Offer rows — photo on one side, kind / title / chips / text / button on
   the other. Every second row puts the photo on the right. On a phone the
   photo goes above the text.
   -------------------------------------------------------------------------- */

.offers {
  display: grid;
  gap: var(--space-band);
}

.offer {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 900px) {
  .offer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); }
  .offer:nth-child(even) .offer__media { order: 2; }
}

.offer__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--rule);   /* a white screenshot needs the edge */
}
.offer__media img { width: 100%; height: 100%; object-fit: cover; }

.offer__kind {
  font-size: var(--step-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-1);
}

.offer__title {
  font-size: var(--step-xl);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3);
}
.chips li {
  font-size: var(--step-xs);
  font-weight: 500;
  color: var(--ink);
  background: var(--accent-tint);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.8rem;
}

.offer__body {
  font-size: var(--step-m);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 var(--space-4);
}

/* --------------------------------------------------------------------------
   About — portrait left, text right, on the tinted band.
   -------------------------------------------------------------------------- */

.about {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-6); }
}

.about__portrait {
  aspect-ratio: 4 / 5;
  max-width: 22rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.about__portrait img { width: 100%; height: 100%; object-fit: cover; }

.about .prose { font-family: var(--font-sans); color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Facts — the short key/value list at the top of each offer page.
   -------------------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
}
.facts div {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.facts dt {
  font-size: var(--step-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-1);
}
.facts dd { margin: 0; font-weight: 500; }

/* Lists inside prose keep the serif and the measure. */
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 var(--space-3); }
.prose li { margin-bottom: var(--space-1); }
.prose h2 { margin-top: var(--space-5); }
.prose h2:first-child { margin-top: 0; }

.backlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  margin-bottom: var(--space-3);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.sitefooter {
  font-size: var(--step-xs);
  padding-block: var(--space-5);
}

.sitefooter__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  justify-content: space-between;
  align-items: baseline;
}

.sitefooter p { margin: 0; opacity: 0.8; }
.sitefooter a { color: var(--ink-inverse); }
