/* ============================================================================
   LapCabby base CSS — reset, typography, components.
   Mobile-first. Depends on tokens.css and fonts.css being loaded first.
   ============================================================================ */

/* -- Modern reset ---------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--brand-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--brand-primary-dark); }
ul, ol { list-style: none; }


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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: var(--leading-tight);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); font-weight: 600; }
h4 { font-size: var(--text-xl); font-weight: 600; }

p { line-height: var(--leading-relaxed); }
strong, b { font-weight: 700; }

::selection { background: var(--brand-primary); color: var(--text-inverse); }


/* -- Accessibility utilities ---------------------------------------- */

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--cta);
  color: var(--cta-text);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  z-index: var(--z-modal);
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}


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

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

section { padding-block: var(--space-7); }

@media (min-width: 768px) {
  .container { padding-inline: var(--padding-inline-desktop); }
  section { padding-block: var(--space-8); }
}


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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--cta);
  color: var(--cta-text);
}
.btn-primary:hover {
  background: var(--cta-hover);
  color: var(--cta-text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-outline:hover {
  background: var(--brand-primary);
  color: var(--text-inverse);
}

.btn-outline-light {
  background: transparent;
  color: var(--text-inverse);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-outline-light:hover {
  background: var(--text-inverse);
  color: var(--brand-primary);
  border-color: var(--text-inverse);
}

.btn-lg { padding: 18px 36px; font-size: var(--text-lg); }
.btn-sm { padding: 10px 18px; font-size: var(--text-sm); }


/* -- Eyebrow / tag --------------------------------------------------- */

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.eyebrow-light {
  color: var(--accent);
  background: rgba(255, 149, 0, 0.15);
}


/* -- Card ------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}


/* -- Section header -------------------------------------------------- */

.section-head {
  text-align: center;
  max-width: var(--max-width-narrow);
  margin-inline: auto;
  margin-bottom: var(--space-6);
}
.section-head h2 { margin-bottom: var(--space-3); }
.section-head p { font-size: var(--text-lg); color: var(--text-muted); }


/* -- Site header ----------------------------------------------------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-3);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(255, 255, 255, 0.96);
}
.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}
.site-header__logo img { height: 38px; width: auto; }


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

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: var(--text-inverse);
  padding-block: var(--space-7) var(--space-8);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(255, 149, 0, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.06) 0%, transparent 45%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}
.hero h1 { color: var(--text-inverse); margin-bottom: var(--space-3); }
.hero h1 .highlight { color: var(--accent); }
.hero__lead {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--space-5);
  max-width: 540px;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.78);
}
.hero__trust > * { display: flex; align-items: center; gap: var(--space-2); }
.hero__trust .check { color: var(--accent); font-weight: 700; }
.hero__image {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
}
.hero__image img {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius-lg);
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.15fr 1fr; gap: var(--space-7); }
  .hero__image img { max-width: 400px; }
}


/* -- Pain points grid ----------------------------------------------- */

.pain-points { background: var(--surface-alt); }
.pain-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.pain-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--accent);
}
.pain-card h3 {
  font-size: var(--text-lg);
  color: var(--brand-primary);
  margin-bottom: var(--space-2);
}
.pain-card p { font-size: var(--text-sm); }

@media (min-width: 600px) { .pain-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pain-grid { grid-template-columns: repeat(4, 1fr); } }


/* -- Products grid --------------------------------------------------- */

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
}
.product-card__image {
  background: #ffffff;
  height: 280px;
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card__image img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}
.product-card__body {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card__range {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: var(--space-1);
}
.product-card h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.product-card__features {
  margin-bottom: var(--space-4);
  flex: 1;
}
.product-card__features li {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: 3px 0;
}
.product-card__features li::before {
  content: "→ ";
  color: var(--accent);
  font-weight: 700;
}
.product-card__link {
  font-weight: 700;
  font-size: var(--text-sm);
  margin-top: auto;
}
.product-card__link::after { content: " →"; }

@media (min-width: 600px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }


/* -- Why us ---------------------------------------------------------- */

.why { background: var(--surface-alt); }
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.why-item { text-align: center; padding: var(--space-3); }
.why-item__number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.why-item h3 { font-size: var(--text-base); margin-bottom: var(--space-2); }
.why-item p { font-size: var(--text-sm); color: var(--text-muted); }

@media (min-width: 600px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }


/* -- Clients logos strip -------------------------------------------- */

.clients {
  padding-block: var(--space-6);
  border-block: 1px solid var(--border);
}
.clients__label {
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.clients__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4) var(--space-5);
}
.clients__logos img {
  width: auto;
  height: auto;
  max-width: 120px;
  max-height: 32px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.65);
  transition: filter var(--transition);
}
.clients__logos img:hover { filter: grayscale(0%) opacity(1); }


/* -- Testimonial ----------------------------------------------------- */

.testimonial {
  background: var(--cta);
  color: var(--text-inverse);
}
.testimonial__content { text-align: center; }
.testimonial blockquote {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 500;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}
.testimonial blockquote::before { content: "“"; opacity: 0.4; font-size: 1.4em; line-height: 0; }
.testimonial blockquote::after { content: "”"; opacity: 0.4; font-size: 1.4em; line-height: 0; }
.testimonial cite {
  font-style: normal;
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.78);
}
.testimonial cite strong { display: block; color: var(--accent); font-size: var(--text-lg); }


/* -- Final CTA ------------------------------------------------------- */

.final-cta { text-align: center; }
.final-cta__box {
  background: linear-gradient(135deg, var(--surface-alt) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-4);
}
.final-cta__box h2 { margin-bottom: var(--space-3); }
.final-cta__box p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}
.final-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

@media (min-width: 768px) {
  .final-cta__box { padding: var(--space-8) var(--space-6); }
}


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

.site-footer {
  background: var(--surface-dark);
  color: rgba(255, 255, 255, 0.7);
  padding-block: var(--space-6) var(--space-4);
  font-size: var(--text-sm);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
.site-footer h4 {
  font-size: var(--text-sm);
  color: var(--text-inverse);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.site-footer a { color: #fff; }
.site-footer a:hover,
.site-footer a:focus { color: #fff; }
.site-footer__iso {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.site-footer__iso img { height: 50px; background: var(--surface); padding: 4px; border-radius: var(--radius-sm); }
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-4);
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; gap: var(--space-6); }
}


/* -- Consent banner -------------------------------------------------- */

.consent-banner {
  position: fixed;
  bottom: var(--space-3);
  right: var(--space-3);
  left: var(--space-3);
  max-width: 380px;
  margin-inline: auto;
  background: var(--surface-dark);
  color: var(--text-inverse);
  padding: var(--space-4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-banner);
  font-size: var(--text-sm);
  display: none;
  animation: slide-up 0.3s ease;
}
.consent-banner[data-visible="true"] { display: block; }
.consent-banner p { margin-bottom: var(--space-3); line-height: var(--leading-normal); }
.consent-banner__buttons { display: flex; gap: var(--space-2); }
.consent-banner__buttons .btn { flex: 1; padding: 10px 16px; font-size: var(--text-sm); }
.consent-banner__buttons .btn-accept { background: var(--brand-primary); color: var(--text-inverse); }
.consent-banner__buttons .btn-accept:hover { background: var(--brand-primary-dark); }
.consent-banner__buttons .btn-decline {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.consent-banner__buttons .btn-decline:hover { background: rgba(255, 255, 255, 0.1); }

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 600px) {
  .consent-banner { left: auto; }
}


/* ── Legal modals (Privacy / Cookies) ─────────────────────────────────── */

/* Footer Legal triggers are <button>s — style them to match footer links. */
.legal-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.legal-link:hover,
.legal-link:focus { color: #fff; }

body.legal-modal-open { overflow: hidden; }

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 1000);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.legal-modal[hidden] { display: none; }

.legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 27, 39, 0.55);
}

.legal-modal__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  color: var(--text-body);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6) var(--space-5) var(--space-5);
}

.legal-modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: var(--radius);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.legal-modal__close:hover { color: var(--text-dark); background: var(--surface-alt); }

.legal-modal__title {
  font-family: var(--font-heading);
  color: var(--text-dark);
  margin: 0 0 var(--space-3);
}

.legal-modal__body { font-size: var(--text-sm); line-height: var(--leading-relaxed); }
.legal-modal__body p { margin: 0 0 var(--space-3); }
.legal-modal__body ul { margin: 0 0 var(--space-3); padding-left: var(--space-4); }
.legal-modal__body li { margin-bottom: var(--space-2); }
.legal-modal__body a { color: var(--brand-primary); }
