/* static/css/site.css */
@import url("./traffel-tokens.css");

/* Layout helpers */
.site-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.site-main  { flex: 1; }

/* Focus rings — apply consistently to interactive elements via :focus-visible */
.tf-btn:focus-visible,
.tf-input:focus-visible,
.tf-nav a:focus-visible,
.tf-header__logo:focus-visible,
.tf-footer a:focus-visible,
.tf-cookies a:focus-visible,
.tf-cookies button:focus-visible {
  outline: 2px solid var(--traffel-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.tf-input:focus-visible {
  outline-color: var(--traffel-blue);
  outline-offset: 2px;
}
.tf-btn { touch-action: manipulation; }
.tf-nav a, .tf-footer a, .tf-header__logo { touch-action: manipulation; }

/* Header */
.tf-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.tf-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; min-height: 64px; }
.tf-header__logo  { display: inline-flex; align-items: center; }
.tf-header__mark  { height: 48px; width: auto; display: block; }
.tf-nav { display: flex; gap: 18px; }
.tf-nav a {
  font-weight: 600; color: var(--ink-700);
  transition: color var(--dur-fast) var(--ease-out);
}
.tf-nav a:hover { color: var(--traffel-blue-deep); }

/* Mobile nav (CSS-only hamburger) */
.tf-burger { display: none; }
#tf-burger-toggle { position: absolute; opacity: 0; pointer-events: none; }
@media (max-width: 720px) {
  .tf-nav { display: none; flex-direction: column; gap: 0; position: absolute; top: 60px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--border); }
  .tf-nav a { padding: 12px var(--gutter); border-top: 1px solid var(--border); }
  .tf-burger { display: inline-flex; }
  #tf-burger-toggle:checked ~ .tf-nav { display: flex; }
}

/* =========================================================
   HERO — full-bleed dark blue with route motif
   ========================================================= */
.tf-hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-11) 0 var(--space-10);
  background: linear-gradient(165deg, var(--traffel-blue) 0%, #0A78B6 60%, var(--traffel-blue-ink) 100%);
  color: #fff;
}
.tf-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 8% 12%, rgba(255,255,255,0.10), transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(127,206,236,0.22), transparent 48%);
}
.tf-hero__route {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; opacity: 0.55;
}
.tf-hero__inner { position: relative; }
.tf-hero h1 {
  color: #fff;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 14px 0 18px;
  max-width: 18ch;
}
.tf-hero p.lead {
  font-size: var(--text-md);
  color: rgba(255,255,255,0.86);
  max-width: 56ch;
  margin: 0 0 var(--space-7);
}
.tf-hero__eyebrow { color: var(--traffel-cyan-soft); }

/* Form on dark hero — keep input white but tune the helper text + checkbox */
.tf-hero .tf-form .checkbox { color: rgba(255,255,255,0.82); }
.tf-hero .tf-form .checkbox a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.tf-hero .tf-form .checkbox a:hover { color: var(--traffel-cyan-soft); }
.tf-hero .tf-form > .t-eyebrow { color: var(--traffel-cyan-soft); }
.tf-hero .tf-input:focus { box-shadow: 0 0 0 4px rgba(127, 206, 236, 0.30); border-color: var(--traffel-cyan); }
.tf-hero .tf-btn-primary { background: #fff; color: var(--traffel-blue-deep); }
.tf-hero .tf-btn-primary:hover { background: var(--traffel-cyan-soft); box-shadow: var(--shadow-md); }

@media (max-width: 720px) {
  .tf-hero { padding: var(--space-9) 0 var(--space-9); }
  .tf-hero h1 { max-width: none; }
}

/* =========================================================
   FEATURE GRID — icon tile + hover lift
   ========================================================= */
.tf-features { display: grid; gap: var(--space-6); grid-template-columns: repeat(3, 1fr); margin-top: var(--space-8); }
@media (max-width: 880px) { .tf-features { grid-template-columns: 1fr; } }

.tf-feature {
  display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.tf-feature:hover {
  border-color: var(--traffel-cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.tf-card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--traffel-sky);
  color: var(--traffel-blue-deep);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.tf-card__title { margin: 0; font-size: var(--text-md); font-weight: 700; line-height: var(--leading-snug); }
.tf-card__body  { margin: 0; color: var(--text-muted); font-size: var(--text-sm); line-height: var(--leading-base); }

/* Forms */
.tf-form { display: grid; gap: var(--space-3); max-width: 480px; }
.tf-form .row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.tf-form .row > .tf-input { flex: 1 1 220px; min-width: 0; }
.tf-form .row > .tf-btn { flex: 0 0 auto; }
.tf-form .checkbox { display: flex; gap: 8px; align-items: flex-start; font-size: var(--text-sm); color: var(--text-muted); }
.tf-form .errors { color: var(--danger); font-size: var(--text-sm); }
.tf-form .success { color: var(--success); font-size: var(--text-sm); }
.tf-form .website-trap { position: absolute; left: -9999px; top: -9999px; }

@media (max-width: 480px) {
  .tf-form .row { flex-direction: column; align-items: stretch; }
  .tf-form .row > .tf-btn { width: 100%; }
}

/* FAQ */
.tf-faq details { padding: 16px 0; border-bottom: 1px solid var(--border); }
.tf-faq summary { cursor: pointer; font-weight: 600; }
.tf-faq summary:focus-visible { outline: 2px solid var(--traffel-blue); outline-offset: 4px; }

/* =========================================================
   FOOTER — branded dark band with link groups
   ========================================================= */
.tf-footer {
  background: var(--ink-900);
  color: rgba(255,255,255,0.72);
  padding: var(--space-10) 0 var(--space-8);
  margin-top: var(--space-11);
}
.tf-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.tf-footer__brand { max-width: 320px; }
.tf-footer__mark { height: 56px; width: auto; display: block; margin-bottom: 16px; }
.tf-footer__tagline { font-size: var(--text-sm); line-height: var(--leading-base); color: rgba(255,255,255,0.7); }
.tf-footer__heading {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-mega);
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 14px;
}
.tf-footer__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tf-footer a {
  color: rgba(255,255,255,0.72);
  font-size: var(--text-sm);
  transition: color var(--dur-fast) var(--ease-out);
}
.tf-footer a:hover { color: #fff; }
.tf-footer__legal {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
}
@media (max-width: 720px) {
  .tf-footer__grid { grid-template-columns: 1fr; gap: var(--space-7); }
}

/* Cookie banner */
.tf-cookies {
  position: fixed; left: 12px; right: 12px; bottom: 12px;
  background: var(--paper); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-md); z-index: 30;
}
.tf-cookies__buttons { display: flex; gap: 8px; }

/* Page header */
.tf-page-header { padding: var(--space-9) 0 var(--space-7); border-bottom: 1px solid var(--border); }

/* Prose container for markdown bodies */
.tf-prose { max-width: 70ch; }
.tf-prose h2 { margin-top: var(--space-8); }
.tf-prose p { margin: 12px 0; }

/* Visually hidden helper */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* =========================================================
   Reduced motion — disable hover lifts and transitions
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .tf-feature:hover { transform: none; }
  .tf-btn:active { transform: none; }
}
