/* ==========================================================================
   style.css — Centrum Ubezpieczeń Anna Kowalska
   Edit :root design tokens to restyle the entire site.
   ========================================================================== */

/* ==========================================================================
   1. Design Tokens
   ========================================================================== */

:root {
  /* --- Brand Colors --- */
  --c-primary:       #0d5ea6;   /* Deep trust blue */
  --c-primary-dark:  #0a4d8a;
  --c-primary-light: #3a8fd9;
  --c-primary-bg:    #edf5ff;
  --c-accent:        #f74e4e;   /* Warm gold — use sparingly */
  --c-accent-dark:   #d13131;
  --c-green:         #0d9e6a;   /* Success / checkmarks */

  /* --- Text Colors --- */
  --c-text:          #1a2d3e;
  --c-text-muted:    #526a7e;
  --c-text-light:    #8da3b5;
  --c-white:         #ffffff;

  /* --- Background Colors --- */
  --c-bg:            #ffffff;
  --c-bg-alt:        #f0f7ff;
  --c-bg-dark:       #091c30;
  --c-bg-dark-2:     #0e2844;

  /* --- Border Colors --- */
  --c-border:        #c8ddf0;
  --c-border-light:  #e4eff9;

  /* --- Typography --- */
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs:   0.75rem;     /* 12px */
  --fs-sm:   0.875rem;    /* 14px */
  --fs-base: 1rem;        /* 16px */
  --fs-lg:   1.125rem;    /* 18px */
  --fs-xl:   1.25rem;     /* 20px */
  --fs-2xl:  1.5rem;      /* 24px */
  --fs-3xl:  2rem;        /* 32px */
  --fs-4xl:  2.625rem;    /* 42px */
  --fs-5xl:  3.25rem;     /* 52px */

  /* --- Spacing --- */
  --sp-1:   0.25rem;
  --sp-2:   0.5rem;
  --sp-3:   0.75rem;
  --sp-4:   1rem;
  --sp-5:   1.25rem;
  --sp-6:   1.5rem;
  --sp-8:   2rem;
  --sp-10:  2.5rem;
  --sp-12:  3rem;
  --sp-16:  4rem;
  --sp-20:  5rem;

  /* --- Layout --- */
  --max-w:   1200px;
  --pad-x:   clamp(1rem, 4vw, 2rem);
  --nav-h:   72px;
  --sec-py:  clamp(3.5rem, 8vw, 6rem);

  /* --- Border Radius --- */
  --r-sm:   4px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* --- Shadows --- */
  --sh-sm:  0 1px 4px rgba(13,94,166,.07);
  --sh-md:  0 4px 20px rgba(13,94,166,.11);
  --sh-lg:  0 12px 40px rgba(13,94,166,.16);
  --sh-xl:  0 20px 64px rgba(13,94,166,.22);

  /* --- Animation --- */
  --dur:      0.25s;
  --dur-slow: 0.45s;
  --ease:     cubic-bezier(.4, 0, .2, 1);
}

/* ==========================================================================
   2. Base Reset & Typography
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.02em;
}

p { max-width: 68ch; }

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover { color: var(--c-primary-dark); }

img, svg {
  display: block;
  max-width: 100%;
}

ul { list-style: none; }

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

input, select, textarea {
  width: 100%;
}

fieldset { border: 0; }

::selection {
  background: rgba(13,94,166,.18);
  text-shadow: none;
}

/* ==========================================================================
   3. Accessibility
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 9999;
  padding: var(--sp-2) var(--sp-6);
  background: var(--c-primary);
  color: var(--c-white);
  border-radius: var(--r-md);
  font-weight: 600;
  transition: top var(--dur);
}

.skip-link:focus {
  top: var(--sp-4);
}

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

*:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ==========================================================================
   4. Layout Utilities
   ========================================================================== */

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section {
  padding-block: var(--sec-py);
}

.section--alt {
  background-color: var(--c-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.section-kicker {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-primary);
  background: var(--c-primary-bg);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-4);
}

.section-title {
  font-size: clamp(var(--fs-3xl), 4vw, var(--fs-4xl));
  margin-bottom: var(--sp-4);
  max-width: 20ch;
  margin-inline: auto;
}

.section-subtitle {
  font-size: var(--fs-lg);
  color: var(--c-text-muted);
  max-width: 55ch;
  margin-inline: auto;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75em 1.75em;
  border-radius: var(--r-full);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--c-primary);
  color: var(--c-white);
  box-shadow: 0 4px 14px rgba(13,94,166,.35);
}

.btn--primary:hover {
  background: var(--c-primary-dark);
  color: var(--c-white);
  box-shadow: 0 6px 20px rgba(13,94,166,.45);
}

.btn--accent {
  background: var(--c-accent);
  color: var(--c-text);
  box-shadow: 0 4px 14px rgba(245,166,35,.35);
}

.btn--accent:hover {
  background: var(--c-accent-dark);
  color: var(--c-text);
  box-shadow: 0 6px 20px rgb(245 84 35 / 0.45);
}

.btn--outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}

.btn--outline:hover {
  background: var(--c-primary);
  color: var(--c-white);
}

.btn--outline-white {
  background: transparent;
  color: var(--c-white);
  border-color: rgba(255,255,255,.7);
}

.btn--outline-white:hover {
  background: rgba(255,255,255,.15);
  color: var(--c-white);
  border-color: var(--c-white);
}

.btn--ghost {
  background: transparent;
  color: var(--c-primary);
  padding-inline: 0;
  border: none;
}

.btn--ghost:hover {
  color: var(--c-primary-dark);
  transform: none;
}

.btn--lg {
  padding: 0.875em 2.25em;
  font-size: var(--fs-lg);
}

.btn--full { width: 100%; }

/* ==========================================================================
   6. Site Header & Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 900;
  height: var(--nav-h);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--sh-sm);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-text);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
  flex-shrink: 0;
}

.nav__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--c-primary);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav__logo-icon svg {
  color: var(--c-white);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin-left: auto;
}

.nav__link {
  display: block;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  border-radius: var(--r-full);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  text-decoration: none;
}

.nav__link:hover {
  color: var(--c-primary);
  background: var(--c-primary-bg);
}

.nav__link--cta {
  font-weight: 600;
  border: 1px solid var(--c-primary);
  background: var(--c-primary) !important;
  color: var(--c-white) !important;
}

.nav__link--cta:hover {
  background: var(--c-accent) !important;
  border-color: var(--c-accent) !important;
}

.nav__phone-item {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--c-border);
  margin-left: var(--sp-3);
  padding-left: var(--sp-3);
}

.nav__phone {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
  border-radius: var(--r-full);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav__phone:hover {
  background: var(--c-primary-bg);
}

.nav__phone-icon {
  flex-shrink: 0;
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--c-text);
  margin-left: auto;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav__toggle:hover {
  background: rgba(255,255,255,.15);
}

.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

/* ==========================================================================
   7. Hero Section
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--c-white);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(9,28,48,.90) 0%,
    rgba(13,78,160,.75) 55%,
    rgba(13,94,166,.60) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-20);
  padding-top: calc(var(--nav-h) + var(--sp-20));
}

.hero__inner {
  max-width: 680px;
}

.hero__pretitle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp-5);
}

.hero__pretitle::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--c-accent);
}

.hero__title {
  font-size: clamp(var(--fs-4xl), 6vw, var(--fs-5xl));
  font-weight: 800;
  line-height: 1.1;
  color: var(--c-white);
  margin-bottom: var(--sp-6);
  letter-spacing: -0.03em;
}

.hero__title span {
  color: var(--c-accent);
}

.hero__subtitle {
  font-size: clamp(var(--fs-base), 2.5vw, var(--fs-xl));
  color: rgba(255,255,255,.82);
  margin-bottom: var(--sp-10);
  max-width: 52ch;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-12);
}

.hero__partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}

.hero__partners-label {
  color: rgba(255,255,255,.6);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.hero__partners-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.hero__partners-list span {
  padding: var(--sp-1) var(--sp-3);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,.85);
}

/* Scroll arrow */
.hero__scroll {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,.5);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2.4s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ==========================================================================
   8. Stats Bar
   ========================================================================== */

.stats {
  background: var(--c-bg-dark);
  padding-block: var(--sp-12);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-8);
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  transition: background var(--dur) var(--ease);
}

.stat:hover {
  background: rgba(255,255,255,.06);
}

.stat__value {
  font-size: clamp(var(--fs-3xl), 4vw, var(--fs-4xl));
  font-weight: 800;
  color: var(--c-accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.65);
  max-width: 16ch;
  text-align: center;
}

/* ==========================================================================
   9. About Section
   ========================================================================== */

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--sp-12), 6vw, var(--sp-20));
  align-items: center;
}

.about__img-wrap {
  position: relative;
  max-width: 460px;
}

.about__img-deco {
  position: absolute;
  inset: 0;
  background: var(--c-primary-bg);
  border-radius: var(--r-xl);
  transform: translate(20px, 20px);
}

.about__img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-xl);
  display: block;
}

.about__badge {
  position: absolute;
  bottom: -1.25rem;
  right: -1.25rem;
  background: var(--c-primary);
  color: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  text-align: center;
  box-shadow: var(--sh-lg);
  min-width: 110px;
}

.about__badge-value {
  display: block;
  font-size: var(--fs-4xl);
  font-weight: 800;
  line-height: 1;
}

.about__badge-label {
  display: block;
  font-size: var(--fs-xs);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--sp-1);
}

.about__kicker {
  margin-bottom: var(--sp-4);
}

.about__title {
  font-size: clamp(var(--fs-3xl), 3.5vw, var(--fs-4xl));
  margin-bottom: var(--sp-6);
}

.about__desc {
  color: var(--c-text-muted);
  font-size: var(--fs-lg);
  line-height: 1.75;
  margin-bottom: var(--sp-8);
}

.about__credentials {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.about__credentials li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-base);
  font-weight: 500;
}

.about__credentials li svg {
  flex-shrink: 0;
  color: var(--c-green);
}

/* ==========================================================================
   10. Offerings / Product Cards
   ========================================================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--sp-6);
}

/* Perspective container */
.product-card {
  perspective: 1200px;
  height: 380px;
  cursor: pointer;
}

/* Rotating inner element */
.product-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(.4,.2,.2,1);
  border-radius: var(--r-xl);
}

/* Flip on hover (desktop) or JS .is-flipped class (touch/keyboard) */
.product-card:hover .product-card__inner,
.product-card__inner.is-flipped {
  transform: rotateY(180deg);
}

/* Both faces */
.product-card__front,
.product-card__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--r-xl);
  overflow: hidden;
}

/* --- Front face --- */
.product-card__front {
  box-shadow: var(--sh-sm);
  border: 1px solid var(--c-border-light);
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card__img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9,28,48,.72) 0%, rgba(9,28,48,.10) 55%, transparent 100%);
}

.product-card__icon {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-white);
  border: 1px solid rgba(255,255,255,0.28);
}

.product-card__front .product-card__title {
  position: absolute;
  bottom: var(--sp-5);
  left: var(--sp-5);
  right: var(--sp-5);
  margin: 0;
  color: var(--c-white);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
}

/* --- Back face --- */
.product-card__back {
  transform: rotateY(180deg);
  background: var(--c-primary);
  box-shadow: var(--sh-md);
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
}

.product-card__back .product-card__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: var(--sp-3);
}

.product-card__desc {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  margin-bottom: var(--sp-4);
}

.product-card__features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
  margin-bottom: var(--sp-5);
}

.product-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.80);
}

.product-card__features li::before {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background-color: rgba(255,255,255,0.9);
  border-radius: var(--r-full);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / 70%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / 70%;
}

.product-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-primary);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-white);
  border-radius: var(--r-full);
  align-self: flex-start;
  transition:
    background var(--dur) var(--ease),
    gap var(--dur) var(--ease);
}

.product-card__cta:hover {
  background: rgba(255,255,255,0.88);
  gap: var(--sp-3);
}

/* ==========================================================================
   11. Why Us / Features
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--sp-8);
}

.feature {
  padding: var(--sp-8);
  border-radius: var(--r-xl);
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.feature:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-3px);
}

.feature__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: var(--c-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  margin-bottom: var(--sp-5);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.feature:hover .feature__icon {
  background: var(--c-primary);
  color: var(--c-white);
}

.feature__title {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-3);
}

.feature__desc {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.65;
  max-width: none;
}

/* ==========================================================================
   11b. Partners Marquee
   ========================================================================== */

.partners-marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-4);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.partners-track {
  display: flex;
  width: max-content;
  gap: var(--sp-12);
  animation: marquee var(--marquee-duration, 24s) linear infinite;
}

.partner-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo img {
  height: 72px;
  max-width: 210px;
  width: auto;
  object-fit: contain;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   12. Testimonials
   ========================================================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--sp-6);
}

.testimonial {
  background: var(--c-bg);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  box-shadow: var(--sh-sm);
  border: 1px solid var(--c-border-light);
  display: flex;
  flex-direction: column;
}

.testimonial__stars {
  display: flex;
  gap: 2px;
  color: var(--c-accent);
  margin-bottom: var(--sp-5);
}

.testimonial__quote {
  font-size: var(--fs-base);
  color: var(--c-text-muted);
  line-height: 1.75;
  font-style: italic;
  flex: 1;
  margin-bottom: var(--sp-6);
}

.testimonial__quote p::before { content: '\201E'; }
.testimonial__quote p::after  { content: '\201D'; }

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.testimonial__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: var(--c-primary-bg);
  color: var(--c-primary);
  font-weight: 700;
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.testimonial__name {
  display: block;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--c-text);
}

.testimonial__role {
  font-size: var(--fs-xs);
  color: var(--c-text-light);
  max-width: none;
}

/* ==========================================================================
   13. Trust CTA Banner
   ========================================================================== */

.trust-banner {
  background: linear-gradient(135deg, var(--c-bg-dark) 0%, var(--c-bg-dark-2) 100%);
  padding-block: var(--sec-py);
  text-align: center;
  color: var(--c-white);
}

.trust-banner__title {
  font-size: clamp(var(--fs-3xl), 4vw, var(--fs-4xl));
  color: var(--c-white);
  margin-bottom: var(--sp-4);
}

.trust-banner__subtitle {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,.7);
  margin-bottom: var(--sp-10);
  margin-inline: auto;
}

.trust-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: center;
}

/* ==========================================================================
   14. Contact Section
   ========================================================================== */

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(var(--sp-12), 6vw, var(--sp-20));
}

.contact__map-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-lg);
  min-height: 480px;
  height: 100%;
}

.contact__map {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact__map-wrap:not(.is-active) .contact__map {
  pointer-events: none;
}

.contact__map-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  background: rgba(9, 28, 48, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: var(--c-white);
  font-size: var(--fs-base);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.contact__map-wrap:not(.is-active):hover .contact__map-overlay,
.contact__map-wrap:not(.is-active) .contact__map-overlay:focus-visible {
  opacity: 1;
}

.contact__map-wrap.is-active .contact__map-overlay {
  display: none;
}

.contact__info-title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-4);
}

.contact__info-desc {
  font-size: var(--fs-base);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-8);
  line-height: 1.7;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin-bottom: var(--sp-10);
}

.contact__detail {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}

.contact__detail-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--c-primary-bg);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
}

.contact__detail-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-light);
  display: block;
  margin-bottom: 2px;
}

.contact__detail-value {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--c-text);
}

.contact__detail-value a {
  color: var(--c-text);
  text-decoration: none;
}

.contact__detail-value a:hover {
  color: var(--c-primary);
}

.contact__hours {
  padding: var(--sp-5) var(--sp-6);
  background: var(--c-primary-bg);
  border-radius: var(--r-lg);
  border-left: 4px solid var(--c-primary);
}

.contact__hours-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-primary);
  margin-bottom: var(--sp-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact__hours-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  padding-block: var(--sp-1);
}

/* ==========================================================================
   15. Footer
   ========================================================================== */

.footer {
  background: var(--c-bg-dark);
  color: rgba(255,255,255,.75);
  padding-top: var(--sp-16);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: var(--sp-16);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: var(--sp-4);
}

.footer__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--c-primary);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__desc {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  margin-bottom: var(--sp-6);
  max-width: 32ch;
}

.footer__social {
  display: flex;
  gap: var(--sp-3);
}

.footer__social a {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.65);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.footer__social a:hover {
  background: var(--c-primary);
  color: var(--c-white);
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.footer__nav-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-white);
  margin-bottom: var(--sp-5);
}

.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer__nav a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.footer__nav a:hover {
  color: var(--c-white);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  padding-block: var(--sp-6);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.4);
}

/* ==========================================================================
   16. Scroll Reveal Animation
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay for sibling elements */
.reveal-group > *:nth-child(1) { transition-delay: 0ms; }
.reveal-group > *:nth-child(2) { transition-delay: 80ms; }
.reveal-group > *:nth-child(3) { transition-delay: 160ms; }
.reveal-group > *:nth-child(4) { transition-delay: 240ms; }
.reveal-group > *:nth-child(5) { transition-delay: 320ms; }
.reveal-group > *:nth-child(6) { transition-delay: 400ms; }

/* ==========================================================================
   17. Responsive — Mobile First
   ========================================================================== */

/* --- Tablet (< 1024px) --- */
@media (max-width: 1023px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-12);
  }

  .about__img-wrap {
    max-width: 380px;
    margin-inline: auto;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }

  .footer__nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Mobile (< 900px) --- */
@media (max-width: 900px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    inset-inline: 0;
    background: var(--c-white);
    padding: var(--sp-4) var(--sp-4) var(--sp-8);
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-1);
    box-shadow: var(--sh-lg);
    border-top: 1px solid var(--c-border-light);
    z-index: 899;
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__link {
    color: var(--c-text-muted) !important;
    padding: var(--sp-4);
    border-radius: var(--r-md);
    font-size: var(--fs-base) !important;
  }

  .nav__link:hover {
    color: var(--c-primary) !important;
    background: var(--c-primary-bg) !important;
  }

  .nav__link--cta {
    text-align: center;
    background: var(--c-primary) !important;
    color: var(--c-white) !important;
    border-color: var(--c-primary) !important;
    margin-top: var(--sp-2);
  }

  .nav__phone-item {
    display: block;
    border-left: none;
    border-top: 1px solid var(--c-border-light);
    margin-left: 0;
    padding-left: 0;
    margin-top: var(--sp-3);
    padding-top: var(--sp-2);
  }

  .nav__phone {
    justify-content: center;
    width: 100%;
    color: var(--c-primary) !important;
    padding: var(--sp-4) !important;
    border-radius: var(--r-md) !important;
    font-size: var(--fs-base) !important;
    font-weight: 600;
    gap: var(--sp-3) !important;
  }

  .nav__phone:hover {
    background: var(--c-primary-bg) !important;
  }

  .nav__phone-icon {
    width: 20px;
    height: 20px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer__nav {
    grid-template-columns: 1fr 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Small Mobile (< 480px) --- */
@media (max-width: 479px) {
  .stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
  }

  .footer__nav {
    grid-template-columns: 1fr;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html { scroll-behavior: auto; }
}
