/* ==========================================================================
   components.css — Reusable UI components
   ========================================================================== */

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn--primary {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn--secondary {
  background-color: var(--brand-dark);
  color: var(--white);
  border-color: var(--brand-dark);
}

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

.btn--outline-dark {
  background-color: transparent;
  color: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn--accent {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  font-size: 16px;
  padding: 16px 36px;
  box-shadow: 0 8px 20px rgba(91, 181, 232, 0.35);
}

@media (hover: hover) {
  .btn--primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
  }

  .btn--secondary:hover {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
  }

  .btn--outline:hover {
    background-color: var(--white);
    color: var(--brand-dark);
  }

  .btn--outline-dark:hover {
    background-color: var(--brand-dark);
    color: var(--white);
  }

  .btn--accent:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(91, 181, 232, 0.45);
  }
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* --- Cards --- */

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
  }
}

.card:active {
  transform: scale(0.98);
}

.card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  color: var(--brand-blue);
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--brand-dark);
}

.card__text {
  color: var(--steel);
  line-height: 1.6;
}

/* --- Hero --- */

.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@supports (height: 100svh) {
  .hero {
    height: 100svh;
  }
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg picture {
  width: 100%;
  height: 100%;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(26, 37, 48, 0.7) 0%,
    rgba(26, 37, 48, 0.85) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding-inline: var(--container-pad);
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  font-size: clamp(2rem, 6vw, 3.75rem);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Sections --- */

.section {
  padding: 80px 0;
}

.section--dark {
  background-color: var(--dark-bg);
  color: var(--white);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--white);
}

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

.section__title {
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 24px;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--brand-blue);
  border-radius: 2px;
}

.section--dark .section__title::after {
  background-color: var(--accent);
}

.section__subtitle {
  text-align: center;
  color: var(--steel);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 48px;
  font-size: 1.1rem;
}

.section--dark .section__subtitle {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Product Grid --- */

.product-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* --- Tables --- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  position: relative;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.product-table thead {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--dark-bg) 100%);
}

.product-table thead tr {
  border-bottom: 3px solid var(--brand-blue);
}

.product-table th,
.product-table td {
  padding: 16px 20px;
  text-align: left;
  white-space: nowrap;
}

.product-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: none;
}

.product-table td {
  border-bottom: 1px solid rgba(222, 226, 230, 0.6);
}

.product-table td:first-child {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--brand-dark);
  letter-spacing: 0.01em;
}

.product-table tbody tr {
  border-left: 3px solid transparent;
  transition: background-color var(--transition-fast),
              border-left-color var(--transition-fast),
              transform var(--transition-fast);
}

.product-table tbody tr:nth-child(even) {
  background-color: rgba(91, 181, 232, 0.03);
}

@media (hover: hover) {
  .product-table tbody tr:hover {
    background-color: rgba(91, 181, 232, 0.08);
    border-left-color: var(--brand-blue);
  }
}

.product-table tbody tr:last-child td {
  border-bottom: none;
}

@keyframes tableRowIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-table tbody tr {
  animation: tableRowIn 0.4s ease-out both;
}

.product-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.product-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.product-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.product-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.product-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.product-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.product-table tbody tr:nth-child(n+7) { animation-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  .product-table tbody tr {
    animation: none;
  }
}

/* --- Forms --- */

.form__group {
  margin-bottom: 20px;
}

.form__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--brand-dark);
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(91, 181, 232, 0.2);
}

.form__textarea {
  min-height: 120px;
  resize: vertical;
}

.form__error {
  color: var(--error);
  font-size: 13px;
  margin-top: 4px;
}

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

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__question {
  width: 100%;
  text-align: left;
  padding: 20px 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.faq__question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--brand-blue);
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.faq__item.is-open .faq__question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq__item.is-open .faq__answer {
  max-height: 2000px;
}

.faq__answer-inner {
  padding-bottom: 20px;
  color: var(--steel);
  line-height: 1.7;
}

/* --- Dark section overrides: FAQ --- */

.section--dark .faq__question {
  color: var(--white);
}

.section--dark .faq__question::after {
  color: var(--brand-blue);
}

.section--dark .faq__answer-inner {
  color: rgba(255, 255, 255, 0.8);
}

.section--dark .faq__item {
  border-color: rgba(255, 255, 255, 0.15);
}

/* --- Dark section overrides: Forms --- */

.section--dark .form__label {
  color: rgba(255, 255, 255, 0.9);
}

.section--dark .form__input,
.section--dark .form__select,
.section--dark .form__textarea {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

/* --- SEO block --- */

.seo-block {
  padding: 48px 0;
  background-color: var(--light-bg);
}

.seo-block__content {
  max-width: 900px;
  margin: 0 auto;
}

.seo-block__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--brand-dark);
}

.seo-block p {
  color: var(--steel);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 12px;
}

/* --- Marquee --- */

.hero-marquee {
  overflow: hidden;
  white-space: nowrap;
  background-color: var(--brand-dark);
  color: var(--white);
  padding: 12px 0;
  display: flex;
}

.hero-marquee__inner {
  display: inline-flex;
  animation: hero-marquee-scroll 30s linear infinite;
}

.hero-marquee__text {
  font-family: var(--font-heading);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-right: 2rem;
  flex-shrink: 0;
}

@keyframes hero-marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

