/* ==========================================================================
   US Business Funding Solutions — design system
   All colors are HSL triplets so they can be composed with alpha:
   hsl(var(--primary) / 0.5)
   ========================================================================== */

:root {
  --background: 0 0% 100%;
  --foreground: 216 47% 12%;

  --card: 0 0% 100%;
  --card-foreground: 216 47% 12%;

  --primary: 216 94% 27%;
  --primary-foreground: 0 0% 100%;
  --primary-glow: 216 100% 35%;

  --secondary: 216 20% 96%;
  --secondary-foreground: 216 47% 12%;

  --muted: 216 20% 96%;
  --muted-foreground: 216 12% 54%;

  --accent: 43 96% 56%;
  --accent-foreground: 216 47% 12%;

  --success: 142 76% 36%;
  --success-foreground: 0 0% 100%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 100%;

  --border: 216 20% 91%;
  --input: 216 20% 91%;
  --ring: 216 94% 27%;

  --gradient-primary: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-glow)));
  --gradient-accent: linear-gradient(135deg, hsl(var(--accent)), hsl(43 100% 65%));
  --gradient-subtle: linear-gradient(180deg, hsl(0 0% 100%), hsl(216 20% 98%));

  --shadow-elegant: 0 10px 30px -10px hsl(var(--primary) / 0.1);
  --shadow-glow: 0 0 40px hsl(var(--primary-glow) / 0.15);
  --shadow-sm: 0 1px 2px 0 hsl(var(--foreground) / 0.05);
  --shadow-lg: 0 10px 15px -3px hsl(var(--foreground) / 0.1), 0 4px 6px -4px hsl(var(--foreground) / 0.1);

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --radius: 0.75rem;
  --header-height: 4rem;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid hsl(var(--border));
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p, blockquote, figure, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

strong { font-weight: 600; }

:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.section {
  padding-block: 4rem;
}

.section--muted { background-color: hsl(var(--muted) / 0.3); }
.section--muted-soft {
  background-color: hsl(var(--muted) / 0.2);
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}
.section--subtle { background-image: var(--gradient-subtle); }
.section--primary {
  position: relative;
  overflow: hidden;
  background-image: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
}
.section--tint {
  background-image: linear-gradient(to bottom right,
    hsl(var(--primary) / 0.05), hsl(var(--background)), hsl(var(--accent) / 0.05));
}

/* First section on an interior page sits below the fixed header. */
.section--top { padding-top: calc(var(--header-height) + 4rem); }
.section--hero { padding-top: calc(var(--header-height) + 4rem); overflow: hidden; position: relative; }

.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: 0.75rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.stack-xl > * + * { margin-top: 2rem; }
.stack-2xl > * + * { margin-top: 3rem; }

.grid { display: grid; gap: 1.5rem; }
.grid--gap-lg { gap: 2rem; }
.grid--gap-xl { gap: 3rem; }
.grid--2,
.grid--3,
.grid--4,
.grid--split { grid-template-columns: 1fr; }

.center { text-align: center; }
.measure { max-width: 48rem; margin-inline: auto; }
.measure-lg { max-width: 56rem; margin-inline: auto; }
.measure-xl { max-width: 64rem; margin-inline: auto; }
.measure-sm { max-width: 36rem; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.title-xl { font-size: 2.25rem; }
.title-lg { font-size: 1.875rem; }
.title-md { font-size: 1.5rem; }
.title-sm { font-size: 1.25rem; }

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: hsl(var(--muted-foreground));
}
.lead--lg { font-size: 1.25rem; }

.text-muted { color: hsl(var(--muted-foreground)); }
.text-body { line-height: 1.7; color: hsl(var(--muted-foreground)); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-primary { color: hsl(var(--primary)); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.italic { font-style: italic; }

.gradient-text {
  background-image: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background-color: hsl(var(--background) / 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid hsl(var(--border));
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-image: var(--gradient-primary);
  box-shadow: var(--shadow-elegant);
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  font-size: 1.125rem;
}

.brand__name {
  font-size: 0.875rem;
  font-weight: 700;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}

.nav a:hover,
.nav a.is-active { color: hsl(var(--primary)); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  background: none;
  cursor: pointer;
  color: hsl(var(--foreground));
  transition: var(--transition-smooth);
}

.nav-toggle:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.nav-toggle svg { width: 1.5rem; height: 1.5rem; }

/* Slide-over mobile menu */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
}

.mobile-nav[data-open="true"] { visibility: visible; }

.mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  background-color: hsl(var(--foreground) / 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav__panel {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: min(300px, 85vw);
  padding: 1.5rem;
  background-color: hsl(var(--background));
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-nav[data-open="true"] .mobile-nav__backdrop { opacity: 1; }
.mobile-nav[data-open="true"] .mobile-nav__panel { transform: translateX(0); }

.mobile-nav__close {
  margin-left: auto;
  display: block;
  background: none;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
}

.mobile-nav__close svg { width: 1.25rem; height: 1.25rem; }

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.mobile-nav__links a {
  font-size: 1.125rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}

.mobile-nav__links a:hover,
.mobile-nav__links a.is-active { color: hsl(var(--primary)); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding-inline: 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  transition: var(--transition-smooth);
}

.btn:hover { background-color: hsl(var(--primary) / 0.9); }
.btn:disabled { pointer-events: none; opacity: 0.5; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.btn--lg { height: 2.75rem; padding-inline: 2rem; }
.btn--full { width: 100%; }
.btn--tall { height: 3rem; }

.btn--gradient {
  background-image: var(--gradient-primary);
}
.btn--gradient:hover { box-shadow: var(--shadow-glow); }

.btn--outline {
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  color: hsl(var(--foreground));
}
.btn--outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn--outline-primary {
  background-color: transparent;
  border: 1px solid hsl(var(--primary));
  color: hsl(var(--primary));
}
.btn--outline-primary:hover { background-color: hsl(var(--primary) / 0.05); }

.btn--on-primary {
  background-color: hsl(var(--primary-foreground));
  color: hsl(var(--primary));
}
.btn--on-primary:hover { background-color: hsl(var(--primary-foreground) / 0.9); }

.btn--ghost-on-primary {
  background-color: transparent;
  border: 1px solid hsl(var(--primary-foreground));
  color: hsl(var(--primary-foreground));
}
.btn--ghost-on-primary:hover { background-color: hsl(var(--primary-foreground) / 0.1); }

.btn--link {
  height: auto;
  padding: 0;
  background: none;
  color: hsl(var(--primary));
  text-underline-offset: 4px;
}
.btn--link:hover { background: none; text-decoration: underline; }

.btn--gradient:hover .btn__arrow { transform: translateX(0.25rem); }
.btn__arrow { transition: transform 0.2s ease; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.card--lift:hover {
  box-shadow: var(--shadow-elegant);
  transform: translateY(-0.25rem);
}

.card--hover:hover { box-shadow: var(--shadow-elegant); }
.card--elegant { box-shadow: var(--shadow-elegant); }

.card--accent {
  border-left: 4px solid hsl(var(--accent));
  background-color: hsl(var(--accent) / 0.05);
}

.card--tint {
  background-image: linear-gradient(to bottom right,
    hsl(var(--primary) / 0.05), hsl(var(--accent) / 0.05));
}

.card--glass {
  background-color: hsl(var(--primary-foreground) / 0.1);
  border-color: hsl(var(--primary-foreground) / 0.2);
  backdrop-filter: blur(4px);
  box-shadow: none;
}

.card__header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem;
}

.card__title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  transition: color 0.2s ease;
}

.card__title--lg { font-size: 1.875rem; color: hsl(var(--primary)); }
.card__title--sm { font-size: 1.125rem; }
.card__title--md { font-size: 1.25rem; }

.card--lift:hover .card__title,
.card--hover:hover .card__title { color: hsl(var(--primary)); }

.card__description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.card__description--lg { font-size: 1.125rem; margin-top: 1rem; }

.card__body { padding: 0 1.5rem 1.5rem; }
.card__body--pad { padding: 1.5rem; }
.card__body--pad-lg { padding: 2rem; }

/* Icon tile used on feature cards */
.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius);
  background-image: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  transition: var(--transition-smooth);
}

.icon-tile svg { width: 2rem; height: 2rem; }
.icon-tile--center { margin-inline: auto; }
.icon-tile--round { border-radius: 9999px; }
.card--lift:hover .icon-tile,
.card--hover:hover .icon-tile { box-shadow: var(--shadow-glow); }

.icon-tile--soft {
  background-image: none;
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: 0.5rem;
}

.card--lift:hover .icon-tile--soft {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* --------------------------------------------------------------------------
   Badges, stars, check lists
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--primary { background-color: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.badge--success { background-color: hsl(var(--success) / 0.1); color: hsl(var(--success)); }
.badge--accent { background-color: hsl(var(--accent) / 0.1); color: hsl(var(--accent)); }
.badge--outline {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
  background-color: transparent;
}

.stars {
  display: flex;
  gap: 0.25rem;
  color: hsl(var(--accent));
}

.stars svg { width: 1rem; height: 1rem; fill: currentColor; }
.stars--lg svg { width: 1.25rem; height: 1.25rem; }
.stars--gold { color: #facc15; }

.check-list { display: flex; flex-direction: column; gap: 0.75rem; }

.check-list li,
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.check-item__icon,
.check-list svg {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.125rem;
  color: hsl(var(--success));
}

.check-list--sm svg { width: 1.25rem; height: 1.25rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero-media { position: relative; }

.hero-media img {
  width: 100%;
  border-radius: 1rem;
  box-shadow: var(--shadow-elegant);
}

.hero-media__overlay {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  background-image: linear-gradient(to top, hsl(var(--primary) / 0.2), transparent);
}

.hero-media__overlay--strong {
  background-image: linear-gradient(to top, hsl(var(--primary) / 0.3), transparent);
}

.hero-badge {
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  padding: 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background-color: hsl(var(--card));
  box-shadow: var(--shadow-elegant);
  animation: glow 3s ease-in-out infinite;
}

.hero-badge__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-badge__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background-color: hsl(var(--success));
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom right,
    hsl(var(--primary) / 0.9), hsl(var(--primary-glow) / 0.9));
}

.cta-content { position: relative; z-index: 10; }

.on-primary { color: hsl(var(--primary-foreground)); }
.on-primary-soft { color: hsl(var(--primary-foreground) / 0.9); }
.on-primary-muted { color: hsl(var(--primary-foreground) / 0.8); }

/* --------------------------------------------------------------------------
   Trust badges
   -------------------------------------------------------------------------- */

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.trust-item__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8rem;
  height: 7rem;
  padding: 1rem;
  border-radius: 1rem;
  background-color: #fff;
  transition: var(--transition-smooth);
}

.trust-item:hover .trust-item__frame { box-shadow: var(--shadow-glow); }

.trust-item__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */

.quote {
  font-style: italic;
  line-height: 1.7;
  color: hsl(var(--muted-foreground));
}

.quote--dark { color: hsl(var(--foreground)); }

.testimonial-footer {
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-person img {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid hsl(var(--border));
}

.avatar-stack { display: flex; }
.avatar-stack img {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid hsl(var(--background));
}
.avatar-stack img + img { margin-left: -0.75rem; }

/* --------------------------------------------------------------------------
   Accordion
   -------------------------------------------------------------------------- */

.accordion { display: flex; flex-direction: column; gap: 1rem; }

.accordion--flush { gap: 0; }

.accordion__item {
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background-color: hsl(var(--background));
  box-shadow: var(--shadow-sm);
  padding-inline: 1.5rem;
  transition: box-shadow 0.3s ease;
}

.accordion__item:hover { box-shadow: var(--shadow-elegant); }

.accordion--flush .accordion__item {
  border-width: 0 0 1px 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding-inline: 0;
}

.accordion--flush .accordion__item:hover { box-shadow: none; }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.accordion__trigger:hover { color: hsl(var(--primary)); }

.accordion__trigger svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.accordion__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease-out;
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
}

.accordion__panel > div { overflow: hidden; }
.accordion__panel[data-open="true"] { grid-template-rows: 1fr; }
.accordion__panel[data-open="true"] > div { padding-bottom: 1.5rem; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 1.5rem; }

.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }

.field { display: flex; flex-direction: column; gap: 0.5rem; }

.field__label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
}

.field__control {
  display: flex;
  width: 100%;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--input));
  border-radius: 0.375rem;
  background-color: hsl(var(--background));
  font-size: 0.875rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.field__control--tall { height: 3rem; }
.field__control--textarea { min-height: 120px; height: auto; resize: vertical; }
.field__control::placeholder { color: hsl(var(--muted-foreground)); }

.field__control:focus-visible {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring) / 0.4);
}

.field__control[aria-invalid="true"] { border-color: hsl(var(--destructive)); }

.field__error {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--destructive));
}

.field__error:empty { display: none; }

.radio-row { display: flex; align-items: center; gap: 1rem; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.radio-option input { accent-color: hsl(var(--primary)); width: 1rem; height: 1rem; }

.password-wrap { position: relative; }

.password-wrap .field__control { padding-right: 3rem; }

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-inline: 0.75rem;
  background: none;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  border-radius: 0.375rem;
}

.password-toggle:hover { color: hsl(var(--foreground)); }
.password-toggle svg { width: 1.25rem; height: 1.25rem; }

.form-actions { display: flex; gap: 0.75rem; }
.form-actions .btn { flex: 1; }

/* Toast notifications */
.toast-region {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(22rem, calc(100vw - 2rem));
}

.toast {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background-color: hsl(var(--card));
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  animation: fade-in 0.25s ease-out;
}

.toast--success { border-left: 4px solid hsl(var(--success)); }
.toast--error { border-left: 4px solid hsl(var(--destructive)); }

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

.site-footer {
  background-color: hsl(var(--foreground));
  color: hsl(var(--background));
}

.site-footer__inner { padding-block: 2rem; }

.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: 56rem;
  margin-inline: auto;
}

.site-footer p { color: hsl(var(--background) / 0.8); font-size: 0.875rem; }

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--background) / 0.8);
}

.site-footer__links a:hover { color: hsl(var(--background)); }

.site-footer__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  font-size: 1.125rem;
}

.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--background) / 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.site-footer__bottom p { color: hsl(var(--background) / 0.6); }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
}

.site-footer__legal a {
  color: hsl(var(--background) / 0.8);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__legal a:hover { color: hsl(var(--background)); }

.site-footer__badge {
  height: auto;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.site-footer__badge:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Page-specific odds and ends
   -------------------------------------------------------------------------- */
.space-y-6>:not([hidden])~:not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1.5rem * var(--tw-space-y-reverse))
}

.bg-muted {
    background-color: hsl(var(--muted))
}

.overflow-hidden {
    overflow: hidden
}

.aspect-video {
    aspect-ratio: 16 / 9
}

.w-full {
    width: 100%
}

.h-full {
    height: 100%
}

.rounded-lg {
    border-radius: var(--radius)
}

.aspect-video img, .aspect-video video {
    max-width: 100%;
    height: auto
}

.prose-float img {
  width: 100%;
  margin-bottom: 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
}

.prose-float p + p { margin-top: 1rem; }

.guarantee { display: flex; align-items: flex-start; gap: 1rem; }

.guarantee__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: hsl(var(--accent) / 0.2);
  color: hsl(var(--accent));
}

.guarantee__icon svg { width: 1.5rem; height: 1.5rem; }

.bio-grid { display: grid; gap: 2rem; align-items: start; }
.bio-grid img { border-radius: 0.5rem; box-shadow: var(--shadow-lg); max-width: 300px; margin-inline: auto; }

.news-row { display: grid; gap: 1.5rem; align-items: center; }
.news-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

.meta-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.meta-date svg { width: 1rem; height: 1rem; }

.news-amount { text-align: right; }
.news-amount__value { font-weight: 700; font-size: 1.125rem; color: hsl(var(--primary)); }
.news-amount__type { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }

.newsletter-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  margin-inline: auto;
  border-radius: 9999px;
  background-color: hsl(var(--primary-foreground) / 0.2);
}

.newsletter-icon svg { width: 2.5rem; height: 2.5rem; }

.button-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.button-row--center { align-items: center; }

/* The 404 page shares the site header and footer, so it needs the header offset
   rather than a full-viewport box. */
.not-found {
  display: flex;
  min-height: 70vh;
  padding-top: var(--header-height);
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--muted));
  text-align: center;
}

.not-found h1 { font-size: 2.25rem; margin-bottom: 1rem; }
.not-found a { color: hsl(var(--primary)); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Legal pages (privacy policy, terms)
   -------------------------------------------------------------------------- */

.legal {
  line-height: 1.75;
  color: hsl(var(--muted-foreground));
}

.legal > p { margin-bottom: 1rem; }

.legal h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: hsl(var(--foreground));
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.legal > h2:first-child { margin-top: 0; }

.legal h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.legal ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.legal ul li + li { margin-top: 0.5rem; }

.legal a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.legal a:hover { color: hsl(var(--primary-glow)); }

/* Table of contents */
.legal-toc {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.legal-toc a {
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}

.legal-toc a:hover {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Contact block */
.legal-address {
  display: flex;
  flex-direction: column;
  font-style: normal;
  margin-bottom: 1.5rem;
}

.legal-contact {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0;
  font-size: 0.9375rem;
}

.legal-contact dt {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.legal-contact dd { margin: 0; }

@media (min-width: 768px) {
  .legal-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: none; }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: none; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px hsl(var(--primary) / 0.1); }
  50% { box-shadow: 0 0 40px hsl(var(--primary) / 0.2); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in { animation: fade-in 0.6s ease-out both; }
.animate-fade-in-up { animation: fade-in-up 0.8s ease-out both; }
.animate-scale-in { animation: scale-in 0.4s ease-out both; }

/* Cards that animate in as they scroll into view. JS adds .is-visible. */
.reveal { opacity: 0; transform: translateY(40px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-fade-in,
  .animate-fade-in-up,
  .animate-scale-in,
  .hero-badge,
  .hero-badge__dot { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .brand__name { font-size: 1.125rem; }
  .button-row { flex-direction: row; }
  .button-row--center { justify-content: center; }
  .mobile-nav__panel { width: min(400px, 85vw); }
}

@media (min-width: 768px) {
  :root { --header-height: 5rem; }

  .container { padding-inline: 1.5rem; }
  .section { padding-block: 6rem; }
  /*
  .section--top,
  .section--hero { padding-top: calc(var(--header-height) + 4rem); }
  */
  .title-xl { font-size: 3rem; }
  .title-lg { font-size: 2.25rem; }

  .grid--2,
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bio-grid { grid-template-columns: 300px 1fr; }

  .prose-float img {
    float: right;
    width: 60%;
    margin-left: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }

  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--split.grid--align-center { align-items: center; }

  .news-row { grid-template-columns: 3fr 1fr; }
  .news-row__action { display: flex; justify-content: flex-end; }

  .prose-float img { width: 50%; }
}

@media (min-width: 1280px) {
  .title-xl { font-size: 3.75rem; }
}
