/* Shared components */

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem;
  min-height: 52px; padding: 0.8rem 1.6rem;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700; line-height: 1.2; text-decoration: none;
  border: 2px solid transparent; border-radius: 2px; white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn .ico { width: 1.2rem; height: 1.2rem; transition: transform 0.25s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn-primary { background: var(--red-accessible); color: var(--white); }
.btn-primary:hover { background: var(--red-accessible-dark); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: var(--red-accessible); }
.btn-ghost { border-color: currentColor; background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.on-ink .btn-ghost:hover, .hero .btn-ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-sm { min-height: 44px; padding: 0.55rem 1.25rem; font-size: 0.9375rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.link-arrow .ico { width: 1.2rem; height: 1.2rem; transition: transform 0.25s var(--ease); }
.link-arrow:hover .ico { transform: translateX(4px); }
.text-link { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }
.ico { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Road-marking components ---------- */
/* haaientanden: a row of small triangles */
.teeth {
  display: block; height: 14px; color: var(--ink); background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpolygon points='0,14 14,0 28,14'/%3E%3C/svg%3E") repeat-x left bottom / 28px 14px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpolygon points='0,14 14,0 28,14'/%3E%3C/svg%3E") repeat-x left bottom / 28px 14px;
}
.teeth-red { color: var(--red); }
.teeth-white { color: var(--white); }
.teeth-short { width: 140px; }
/* dashed centre line */
.dash { display: block; height: 4px; color: var(--ink); background: repeating-linear-gradient(90deg, currentColor 0 36px, transparent 36px 64px); }
.dash-white { color: var(--white); }
.dash-soft { color: var(--line-strong); }
.rule-red { display: block; width: 4.5rem; height: 3px; background: var(--red); }
/* licence-category code label */
.code {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.4em;
  padding: 0.05em 0.4em 0; font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 1.375rem; line-height: 1.25; letter-spacing: 0.04em; color: var(--ink);
  border: 2px solid currentColor; border-radius: 3px; background: transparent;
}
.on-ink .code { color: var(--white); }
.code-on { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1.5rem; }
.brand { display: block; flex: none; line-height: 0; }
.brand img { width: 160px; height: auto; }
@media (min-width: 1024px) { .brand img { width: 172px; } }
@media (min-width: 1200px) { .brand img { width: 200px; } }

.nav-toggle { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px; min-width: 48px; padding: 0 0.25rem 0 0.75rem; background: none; border: 0; font-weight: 700; font-size: 0.9375rem; }
.nav-toggle-bars { position: relative; width: 24px; height: 16px; display: block; }
.nav-toggle-bars::before, .nav-toggle-bars::after, .nav-toggle-bars i { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars i { top: 7px; }
.nav-toggle-bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 99;
  background: var(--white); padding: 1.5rem var(--gutter) 2.5rem; overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nav-links { display: grid; }
.nav-links a {
  display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line-strong); font-family: var(--font-display); font-size: 2.25rem; font-weight: 600;
  text-transform: uppercase; text-decoration: none; line-height: 1.1;
}
.nav-links a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); padding-left: 1rem; }
.nav-extras { margin-top: 2rem; display: grid; gap: 1rem; }
.nav-phone { font-weight: 700; font-size: 1.25rem; text-decoration: none; min-height: 48px; display: inline-flex; align-items: center; gap: 0.6rem; }
.nav-extras .btn { width: 100%; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 0; background: none; overflow: visible; visibility: visible; opacity: 1; transform: none; transition: none; }
  .nav-links { display: flex; gap: clamp(1rem, 1.8vw, 2rem); margin-left: clamp(1.5rem, 3vw, 3rem); }
  .nav-links a { min-height: 44px; padding: 0.5rem 0; border: 0; font-family: var(--font-body); font-size: 0.9375rem; font-weight: 500; text-transform: none; white-space: nowrap; position: relative; }
  .nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease); }
  .nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
  .nav-links a[aria-current="page"] { box-shadow: none; padding-left: 0; }
  .nav-extras { margin: 0; display: flex; align-items: center; gap: 1.25rem; }
  .nav-phone { font-size: 0.9375rem; white-space: nowrap; }
  .nav-extras .btn { width: auto; }
}

/* ---------- Sticky mobile bar ---------- */
.mobile-bar { display: none; }
@media (max-width: 767px) {
  .mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); }
  .mobile-bar .btn { min-height: 48px; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ---------- Footer (chalk) ---------- */
.site-footer { background: var(--chalk); color: var(--ink); padding-top: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 2.75rem; padding-bottom: 3rem; }
.footer-brand img { width: 200px; height: auto; }
.footer-slogan { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 2.25rem; margin-top: 1.25rem; line-height: 1; }
.footer-col h2 { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--grey); margin-bottom: 1rem; line-height: 1.3; }
.footer-col li a, .footer-col address a { display: inline-block; padding: 0.35rem 0; text-decoration: none; }
.footer-col li a:hover, .footer-col address a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.footer-col address { font-style: normal; line-height: 1.7; }
.footer-social { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.footer-social a { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 2px; }
.footer-social a:hover { background: var(--ink); color: var(--white); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; align-items: center; justify-content: space-between; padding-block: 1.5rem; border-top: 1px dashed var(--line-strong); font-size: var(--fs-small); color: var(--grey); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1.2fr; gap: 3rem; } }

.a11y { position: relative; }
.a11y-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.9rem; background: none; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 2px; font-size: var(--fs-small); font-weight: 500; }
.a11y-btn:hover { background: var(--ink); color: var(--white); }
.a11y-panel { position: absolute; right: 0; bottom: calc(100% + 0.5rem); z-index: 20; width: min(18rem, 86vw); padding: 0.75rem; background: var(--white); color: var(--ink); border-radius: 2px; display: grid; gap: 0.5rem; box-shadow: 0 0 0 1px var(--line-strong); }
.a11y-panel[hidden] { display: none; }
.a11y-opt { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; min-height: 48px; padding: 0 0.9rem; background: var(--white); border: 1px solid var(--line-strong); border-radius: 2px; font-weight: 500; text-align: left; }
.a11y-opt .state { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey); }
.a11y-opt[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.a11y-opt[aria-pressed="true"] .state { color: var(--white); }

/* ---------- FAQ / disclosure ---------- */
.faq details { border-top: 1px dashed var(--line-strong); }
.faq details:last-child { border-bottom: 1px dashed var(--line-strong); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; padding: 1.25rem 0 1.25rem 0;
  list-style: none; font-family: var(--font-display); font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.375rem); font-weight: 600; line-height: 1.1;
  position: relative; transition: padding 0.25s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 2.5rem; height: 2.5rem; border: 2px solid var(--ink); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-body); font-size: 1.5rem; font-weight: 500; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; background: var(--ink); color: var(--white); }
.faq details[open] summary { padding-left: 1.25rem; box-shadow: inset 4px 0 0 var(--red); }
.faq summary:hover { color: var(--red-accessible); }
.faq .answer { padding: 0.25rem 0 1.75rem 1.25rem; max-width: 44rem; }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; background: var(--white); border-bottom: 1px solid var(--line); }
.ticker-track { display: flex; width: max-content; }
.ticker-set { display: flex; flex: none; }
.ticker-item { display: inline-flex; align-items: center; padding: 0.65rem 1.6rem; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1; letter-spacing: 0.04em; color: var(--ink); }
.ticker-item.is-outline { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.ticker-item::after { content: ""; width: 0.4em; height: 0.28em; margin-left: 3.2rem; background: var(--ink); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
@media (prefers-reduced-motion: no-preference) {
  .ticker-track { animation: tick 46s linear infinite; }
  @keyframes tick { to { transform: translateX(-50%); } }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { width: auto; justify-content: center; }
  .ticker-set { flex-wrap: wrap; justify-content: center; }
  .ticker-set[aria-hidden="true"] { display: none; }
}

/* ---------- Reveal (subtle, never leaves blank space) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0.001; transform: translateY(10px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js [data-reveal].is-in, .js.reveal-all [data-reveal] { opacity: 1; transform: none; }
  .js .clip-reveal { clip-path: inset(7% 0 7% 0); transform: scale(1.04); transition: clip-path 1.3s var(--ease), transform 1.6s var(--ease); }
  .js .clip-reveal.is-in, .js.reveal-all .clip-reveal { clip-path: inset(0); transform: none; }
  .hero-enter > * { animation: enter 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  @keyframes enter { from { opacity: 0.001; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .hero .dash { clip-path: inset(0 100% 0 0); animation: draw 1.8s 0.3s var(--ease) forwards; }
  @keyframes draw { to { clip-path: inset(0 0 0 0); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
