/**
 * MTB de Zeeleeuw — base
 *
 * Google Fonts import moved to index.php (dynamic, based on the
 * font_pairing Template Style param) — this file no longer hardcodes one.
 */

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

html {
  scroll-behavior: smooth;
}

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

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

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: 1.05;
  margin: 0 0 var(--space-4);
  color: var(--z-ink);
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, 5rem); font-weight: 700; }
h2 { font-size: clamp(1.85rem, 3vw + 1rem, 3.25rem); }
h3 { font-size: var(--step-xl); }
h4 { font-size: var(--step-lg); font-weight: 600; letter-spacing: 0; }

p {
  margin: 0 0 var(--space-4);
  color: var(--z-ink);
}

a {
  color: var(--z-accent);
  text-decoration: none;
  transition: opacity var(--dur) var(--ease);
}

a:hover {
  opacity: 0.75;
}

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

ul, ol {
  padding-left: 1.25em;
}

/* Visible keyboard focus everywhere — never suppressed.
   box-shadow instead of outline on purpose (v2.1.22): outline is drawn
   by browsers as a separate overlay that approximates the element's
   border-radius rather than reading it directly, so on a rounded
   element (inputs at --radius-sm, buttons at their 999px pill radius)
   its corner curve doesn't quite coincide with the border's own curve -
   a gap/seam right at the corner, confirmed with close-up screenshots
   on two different browsers so not one engine's quirk. box-shadow is
   painted by the same border-radius-aware path as the border itself,
   so it's geometrically incapable of this mismatch - it's the standard
   fix for this exact class of bug, not another offset tweak. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--z-accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-lg);
  color: var(--z-ink);
  margin-bottom: var(--space-2);
}

/* Two CTA styles now, matching apple.com's own pattern: a minimal
   chevron text-link for most calls to action, and the solid pill
   reserved for the one genuine conversion moment per page (e.g. "Word
   lid" at the very end) — not sprinkled everywhere the way a
   traditional button-heavy site would. */
.btn-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step-lg);
  color: var(--z-accent);
}

.btn-link::after {
  content: "\203A";
  margin-left: 0.2em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--step-base);
  padding: 0.75em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
  text-decoration: none;
}

/* A bare <svg> icon with no width/height attribute (e.g. the WebAuthn
   plugin's passkey icon) falls back to the browser's large SVG default
   size instead of behaving like a small inline icon — without this, a
   button containing one of these renders as an oversized blob dominated
   by a giant icon rather than a normal-sized button with a small icon
   next to its label. */
.btn svg {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
  opacity: 0.9;
}

.btn-primary {
  background: var(--z-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--z-accent);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Joomla's own core markup (mod_login's password-visibility toggle, the
   WebAuthn passkey button, and other core UI) uses `btn btn-secondary`
   directly — this template didn't define that class at all, so those
   buttons got `.btn`'s full pill sizing/padding with *no* background or
   text color, which is exactly what made them look like an empty, mostly
   invisible dark-outlined blob rather than a real button. */
.btn-secondary {
  background: var(--z-paper);
  border-color: var(--z-line);
  color: var(--z-ink);
}

.btn-secondary:hover {
  background: #fff;
  border-color: var(--z-accent);
  color: var(--z-ink);
}

/* Bootstrap-style width utility — Joomla's core markup (the same login
   form buttons above) expects this to exist, same as it would on a
   Bootstrap-based template. */
.w-100 {
  width: 100%;
}

/* The password show/hide toggle specifically is meant to be a small
   icon control living inside the password field's input-group, not a
   full CTA pill — Joomla's own markup happens to reuse the generic
   `btn btn-secondary` classes for it, but it still needs its own
   compact sizing here rather than inheriting .btn's large CTA padding. */
.input-password-toggle {
  padding: 0.4em 0.6em;
  border-radius: var(--radius-sm);
}

.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--step-xs);
  font-weight: 600;
  padding: 0.3em 0.7em;
  border-radius: 999px;
}

.badge-green { background: var(--z-green-soft); color: #1c7a48; }
.badge-gold  { background: var(--z-gold-soft); color: #8a6d00; }
.badge-pink  { background: var(--z-pink-soft); color: #a02458; }
