/* ==========================================================================
   Layout & base typography
   ========================================================================== */

html,
body {
  background-color: var(--color-background);
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-16);
  line-height: var(--line-height-base);
  color: var(--color-text);
  overflow-x: hidden;
}

/* Section wrapper */
section {
  padding: clamp(72px, 6vw, 104px) clamp(24px, 3vw, 40px);
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Headings — use Varela Round for display */
h1,
h2,
h3 {
  font-family: var(--font-family-display);
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
}

h1 {
  font-size: var(--font-size-48);
  font-weight: var(--font-weight-regular);
}

h2 {
  font-size: var(--font-size-32);
  font-weight: var(--font-weight-regular);
}

h3 {
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-default);
}

p {
  color: var(--color-text-secondary);
}

/* Section header (title + lead) */
.section-header {
  max-width: 760px;
  margin: 0 auto clamp(44px, 4vw, 72px);
  text-align: center;
}

.section-header__lead {
  margin-top: var(--spacing-400);
  font-size: var(--font-size-20);
  color: var(--color-text-secondary);
}

/* Video wrapper (16:9) */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--color-background-neutral);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* "Why ColdTrace" testimonials */
.why-section {
  padding-top: clamp(82px, 7vw, 112px);
}

.why-section__header {
  margin-bottom: clamp(28px, 3vw, 48px);
}

.why-section__header h2 {
  margin-bottom: 18px;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.why-section__subtitle {
  max-width: 1620px;
  font-size: clamp(22px, 1.95vw, 32px);
  line-height: 1.24;
  color: rgba(30, 30, 30, 0.62);
}

.why-grid {
  display: grid;
  gap: clamp(22px, 1.8vw, 34px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.why-card {
  min-height: 258px;
  padding: 18px 24px 22px;
  background-color: var(--color-surface);
  border: 1px solid transparent;
  border-radius: 30px;
  box-shadow: 0 14px 34px rgba(30, 30, 30, 0.11);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.32s ease,
    background 0.32s ease,
    border-color 0.32s ease;
}

.why-card__quote-mark {
  align-self: flex-start;
  margin-bottom: 4px;
  font-family: var(--font-family-display);
  font-size: 72px;
  line-height: 0.7;
  color: #a9baf5;
  transition: color 0.28s ease;
}

.why-card__quote {
  max-width: 540px;
  min-height: 48px;
  margin: 0 0 14px;
  font-family: var(--font-family-display);
  font-size: clamp(20px, 1.35vw, 26px);
  line-height: 1.18;
  color: rgba(30, 30, 30, 0.72);
  transition: color 0.28s ease;
}

.why-card__avatar {
  width: 92px;
  height: 92px;
  margin-bottom: 10px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: inset 0 0 0 1px rgba(30, 30, 30, 0.04);
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease;
}

.why-card__role {
  margin: 0 0 8px;
  font-size: clamp(15px, 0.94vw, 18px);
  line-height: 1.2;
  color: rgba(30, 30, 30, 0.55);
  transition: color 0.28s ease;
}

.why-card__name {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: clamp(22px, 1.5vw, 30px);
  line-height: 1.14;
  color: #9fb4ef;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 10px;
  transition: color 0.28s ease;
}

.why-section__header--motion,
.why-card--motion {
  opacity: 0;
  will-change: transform, opacity;
  transition:
    opacity 0.68s ease,
    transform 0.76s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.32s ease,
    background 0.32s ease,
    border-color 0.32s ease;
}

.why-section__header--motion {
  transform: translate3d(0, 34px, 0);
}

.why-card--motion {
  transform: translate3d(0, 38px, 0) scale(0.975);
}

.why-grid .why-card--motion:nth-child(1) { transition-delay: 0.04s; }
.why-grid .why-card--motion:nth-child(2) { transition-delay: 0.1s; }
.why-grid .why-card--motion:nth-child(3) { transition-delay: 0.16s; }
.why-grid .why-card--motion:nth-child(4) { transition-delay: 0.22s; }
.why-grid .why-card--motion:nth-child(5) { transition-delay: 0.28s; }
.why-grid .why-card--motion:nth-child(6) { transition-delay: 0.34s; }

.why-section__header--visible,
.why-card--visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.why-card:hover,
.why-card:focus-within {
  transform: translateY(-12px);
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border-color: rgba(159, 180, 239, 0.34);
  box-shadow:
    0 18px 36px rgba(30, 30, 30, 0.11),
    0 26px 52px rgba(104, 126, 187, 0.12);
}

.why-card:hover .why-card__quote-mark,
.why-card:focus-within .why-card__quote-mark {
  color: #7d96ea;
}

.why-card:hover .why-card__quote,
.why-card:focus-within .why-card__quote {
  color: rgba(30, 30, 30, 0.82);
}

.why-card:hover .why-card__role,
.why-card:focus-within .why-card__role {
  color: rgba(30, 30, 30, 0.62);
}

.why-card:hover .why-card__name,
.why-card:focus-within .why-card__name {
  color: #6e8aef;
}

.why-card:hover .why-card__avatar,
.why-card:focus-within .why-card__avatar {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 6px rgba(159, 180, 239, 0.2),
    0 14px 28px rgba(30, 30, 30, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .why-section__header--motion,
  .why-card--motion {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .why-card,
  .why-card__quote-mark,
  .why-card__quote,
  .why-card__avatar,
  .why-card__role,
  .why-card__name {
    transition: none;
  }
}

/* Contact form */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: var(--spacing-400);
}

.form-row {
  display: grid;
  gap: var(--spacing-200);
}

.form-row label {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: var(--spacing-300) var(--spacing-400);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-family: inherit;
  font-size: var(--font-size-16);
  color: var(--color-text-default);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(27, 89, 248, 0.15);
}

.contact-form .btn {
  justify-self: start;
}
