/* ==========================================================================
   TUNE — sections.css
   Stats, why, testimonials, clients, CTA band, contact/form, footer,
   scroll-reveal system
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Stats band
   -------------------------------------------------------------------------- */
.stats {
  padding-block: clamp(56px, 8vw, 100px);
  background: var(--ink);
  color: var(--paper);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 36px 24px;
}

.stat-value {
  font-size: clamp(2.5rem, 5vw, 3.7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

/* --------------------------------------------------------------------------
   2. Why TUNE
   -------------------------------------------------------------------------- */
.why-grid {
  display: grid;
  gap: clamp(48px, 6vw, 90px);
}

@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: minmax(320px, 420px) 1fr;
    align-items: start;
  }

  .why-intro {
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }
}

.benefit {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  padding-block: 30px;
  border-top: 1px solid var(--line);
}

.benefit:last-child {
  border-bottom: 1px solid var(--line);
}

.benefit-num {
  padding-top: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--grey-400);
  font-variant-numeric: tabular-nums;
}

.benefit h3 {
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.benefit p {
  margin-top: 8px;
  max-width: 58ch;
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--grey-500);
}

/* --------------------------------------------------------------------------
   3. Testimonials
   -------------------------------------------------------------------------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: 22px;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.4vw, 38px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.t-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.stars {
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: var(--ink);
}

.result-chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--grey-700);
}

.testimonial-card blockquote p {
  font-size: 1.02rem;
  line-height: 1.68;
  color: var(--grey-700);
}

.testimonial-card figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 28px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.testimonial-card cite {
  display: block;
  font-style: normal;
  font-size: 0.95rem;
  font-weight: 650;
}

.t-role {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--grey-500);
}

/* --------------------------------------------------------------------------
   4. Clients
   -------------------------------------------------------------------------- */
.clients .container {
  text-align: center;
}

.clients-title {
  margin-bottom: clamp(32px, 5vw, 52px);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-400);
}

.client-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px clamp(36px, 6vw, 84px);
}

.client-logo {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--grey-500);
  transition: color 0.25s var(--ease);
}

.client-logo:hover {
  color: var(--ink);
}

.logo-wide {
  font-weight: 500;
  letter-spacing: 0.42em;
}

.logo-bold {
  font-weight: 800;
  letter-spacing: 0.06em;
}

.logo-lower {
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: -0.03em;
}

.logo-spaced {
  font-weight: 400;
  letter-spacing: 0.3em;
}

.logo-serif {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
}

.logo-mark {
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   5. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  padding-block: clamp(72px, 10vw, 130px);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-band .lede {
  max-width: 480px;
  color: var(--on-dark-muted);
}

.cta-band .btn {
  margin-top: 40px;
}

/* --------------------------------------------------------------------------
   6. Contact & inquiry form
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: clamp(48px, 6vw, 96px);
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: minmax(320px, 5fr) 7fr;
  }
}

.contact-list {
  display: grid;
  gap: 0;
  margin-top: 36px;
}

.contact-item {
  padding-block: 20px;
  border-top: 1px solid var(--line);
}

.contact-item dt {
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-400);
}

.contact-item dd {
  font-weight: 600;
  line-height: 1.55;
}

.contact-item a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s var(--ease);
}

.contact-item a:hover {
  text-decoration-color: var(--ink);
}

.form-wrap {
  position: relative;
}

.inquiry-form {
  padding: clamp(26px, 4vw, 44px);
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.form-title {
  margin-bottom: 26px;
  font-size: 1.3rem;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 16px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.req {
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 132px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--grey-400);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.12);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.field select:invalid,
.field select option[value=""] {
  color: var(--grey-400);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger);
}

.field.is-invalid input:focus,
.field.is-invalid select:focus,
.field.is-invalid textarea:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.field-error {
  display: block;
  min-height: 0;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 26px;
}

.form-note {
  font-size: 0.8rem;
  color: var(--grey-500);
}

.form-submit {
  position: relative;
  min-width: 170px;
}

.form-submit .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.form-submit.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

.form-submit.is-loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-alert {
  margin-top: 18px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--danger);
}

.form-success {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: clamp(32px, 5vw, 56px);
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.form-success h3 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.form-success p {
  max-width: 46ch;
  color: var(--grey-700);
}

.form-success .btn {
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-block: clamp(56px, 7vw, 84px) 32px;
  background: var(--ink);
  color: var(--on-dark-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 44px 32px;
}

.footer-brand {
  grid-column: span 1;
}

.footer-brand p {
  max-width: 300px;
  margin-top: 18px;
  font-size: 0.92rem;
  line-height: 1.65;
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--on-dark-line);
  border-radius: 50%;
  color: #d4d4d8;
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.socials a:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
  transform: translateY(-2px);
}

.footer-col h3 {
  margin-bottom: 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}

.footer-col li {
  padding-block: 5px;
}

.footer-col a {
  font-size: 0.92rem;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--paper);
}

.footer-col ul li:last-child,
.footer-col li:has(a[href^="tel"]) {
  color: inherit;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(44px, 6vw, 64px);
  padding-top: 26px;
  border-top: 1px solid var(--on-dark-line);
  font-size: 0.82rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.legal-links a:hover {
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   8. Scroll-reveal system (progressive enhancement — active only with JS)
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

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

.js [data-reveal][data-reveal-delay="1"] {
  transition-delay: 0.08s;
}

.js [data-reveal][data-reveal-delay="2"] {
  transition-delay: 0.16s;
}

.js [data-reveal][data-reveal-delay="3"] {
  transition-delay: 0.24s;
}

.js [data-reveal][data-reveal-delay="4"] {
  transition-delay: 0.32s;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
