/* ============================================
   Dra. Ana Matumoto — Serviços / Tratamentos
   Editorial ledger · numbered catalog
   Inherits tokens from hero.css
   ============================================ */

.services {
  position: relative;
  padding: clamp(120px, 16vh, 200px) clamp(20px, 4vw, 64px);
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.services::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 50% at 10% 12%,
      rgba(203, 163, 107, 0.045) 0%,
      transparent 60%),
    radial-gradient(ellipse 60% 45% at 90% 88%,
      rgba(203, 163, 107, 0.04) 0%,
      transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.services-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */
.services-head {
  text-align: center;
  max-width: 880px;
  margin: 0 auto clamp(72px, 10vh, 110px);
}

.services-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 8, 7, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: clamp(28px, 4vh, 40px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.services-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.services-eyebrow strong {
  color: var(--ink);
  font-weight: 600;
}

.services.is-revealed .services-eyebrow {
  opacity: 1; transform: translateY(0);
  transition-delay: 0.05s;
}

.services-title {
  font-family: var(--f-display);
  font-weight: 350;
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.024em;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 40;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}

.services-title em {
  font-style: italic;
  color: var(--accent-2);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.services-title .line-2 {
  display: block;
  margin-top: 0.04em;
  font-style: italic;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-size: 0.75em;
  letter-spacing: -0.012em;
}

.services-title .period {
  color: var(--accent);
  margin-left: -0.04em;
}

.services.is-revealed .services-title {
  opacity: 1; transform: translateY(0);
  transition-delay: 0.2s;
}

.services-lede {
  margin-top: clamp(24px, 3.5vh, 36px);
  font-family: var(--f-sans);
  font-size: clamp(15px, 1.05vw, 17.5px);
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.services-lede em {
  font-family: var(--f-display);
  font-style: italic;
  color: var(--ink);
  font-variation-settings: "opsz" 24, "SOFT" 100;
}

.services.is-revealed .services-lede {
  opacity: 1; transform: translateY(0);
  transition-delay: 0.35s;
}

/* ============================================
   CATALOG
   ============================================ */
.services-catalog {
  border-top: 1px solid var(--line);
}

/* ---------- Category divider ---------- */
.service-category {
  display: flex;
  align-items: baseline;
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(40px, 6vh, 64px) clamp(8px, 1.5vw, 18px) clamp(18px, 2.5vh, 28px);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
}

.services.is-revealed .service-category {
  opacity: 1; transform: translateY(0);
}

.service-category:nth-of-type(1) { transition-delay: 0.5s; }
.service-category:nth-of-type(2) { transition-delay: 0.5s; }

.category-marker {
  font-family: var(--f-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
  flex-shrink: 0;
}

.category-title {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 350;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1;
  letter-spacing: -0.018em;
  color: var(--ink);
  font-variation-settings: "opsz" 96, "SOFT" 80;
  flex-shrink: 0;
}

.category-title em {
  color: var(--accent-2);
  font-variation-settings: "opsz" 96, "SOFT" 100;
}

.category-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--accent) 0%, transparent 80%);
  align-self: center;
  margin-bottom: -8px;
}

/* ---------- Service row ---------- */
.service-row {
  display: grid;
  grid-template-columns: clamp(54px, 5.5vw, 78px) clamp(140px, 18vw, 200px) 1fr auto;
  gap: clamp(18px, 2.8vw, 40px);
  align-items: center;
  padding: clamp(22px, 3.2vh, 36px) clamp(8px, 1.5vw, 18px);
  border-bottom: 1px solid var(--line);
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.5s var(--ease), background 0.5s var(--ease);
  opacity: 0;
  transform: translateY(16px);
}

.services.is-revealed .service-row {
  opacity: 1; transform: translateY(0);
  transition:
    padding-left 0.5s var(--ease),
    background 0.5s var(--ease),
    opacity 1s var(--ease-out),
    transform 1s var(--ease-out);
}

.services.is-revealed .service-row:nth-of-type(1) { transition-delay: 0.6s, 0.6s, 0.6s, 0.6s; }
.services.is-revealed .service-row:nth-of-type(2) { transition-delay: 0.66s, 0.66s, 0.66s, 0.66s; }
.services.is-revealed .service-row:nth-of-type(3) { transition-delay: 0.72s, 0.72s, 0.72s, 0.72s; }
.services.is-revealed .service-row:nth-of-type(4) { transition-delay: 0.78s, 0.78s, 0.78s, 0.78s; }
.services.is-revealed .service-row:nth-of-type(5) { transition-delay: 0.84s, 0.84s, 0.84s, 0.84s; }
.services.is-revealed .service-row:nth-of-type(6) { transition-delay: 0.9s, 0.9s, 0.9s, 0.9s; }
.services.is-revealed .service-row:nth-of-type(7) { transition-delay: 0.96s, 0.96s, 0.96s, 0.96s; }

.service-row:hover {
  padding-left: clamp(14px, 1.6vw, 24px);
  background: rgba(203, 163, 107, 0.025);
}

.service-row:focus-visible {
  outline: none;
  background: rgba(203, 163, 107, 0.04);
}

.service-row:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  pointer-events: none;
}

/* Number cell */
.service-num {
  font-family: var(--f-sans);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--accent);
  align-self: start;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Thumb cell */
.service-thumb {
  position: relative;
  width: 100%;
  max-width: 200px;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow:
    0 1px 0 rgba(244, 238, 227, 0.05) inset,
    0 14px 30px -14px rgba(0, 0, 0, 0.7);
}

.service-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.02) saturate(0.95);
  transition: transform 0.7s var(--ease-out), filter 0.4s var(--ease);
  display: block;
}

/* antes/depois split hint */
.service-thumb::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(244, 238, 227, 0.35) 50%,
    transparent 100%);
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.4s var(--ease);
}

.service-row:hover .service-thumb img {
  transform: scale(1.04);
  filter: contrast(1.05) saturate(1);
}

.service-row:hover .service-thumb::after {
  opacity: 1;
}

/* Body cell */
.service-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.service-name {
  font-family: var(--f-display);
  font-weight: 350;
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.014em;
  color: var(--ink);
  font-variation-settings: "opsz" 72, "SOFT" 100;
  transition: color 0.4s var(--ease);
}

.service-row:hover .service-name {
  color: var(--accent-2);
}

.service-desc {
  font-family: var(--f-sans);
  font-size: clamp(13.5px, 1vw, 15px);
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 56ch;
}

.service-desc em {
  font-family: var(--f-display);
  font-style: italic;
  color: var(--ink);
  font-variation-settings: "opsz" 24, "SOFT" 100;
}

/* Arrow cell */
.service-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--ink-mute);
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
  flex-shrink: 0;
}

.service-arrow svg {
  width: 20px;
  height: 10px;
}

.service-row:hover .service-arrow {
  color: var(--accent-2);
  transform: translateX(4px);
}

/* ============================================
   FOOTER NOTE
   ============================================ */
.services-foot {
  margin: clamp(64px, 9vh, 100px) auto 0;
  max-width: 720px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
}

.services.is-revealed .services-foot {
  opacity: 1; transform: translateY(0);
  transition-delay: 1.1s;
}

.services-foot p {
  font-family: var(--f-display);
  font-weight: 350;
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.4;
  color: var(--ink-soft);
  margin-bottom: 22px;
  font-variation-settings: "opsz" 72, "SOFT" 80;
}

.services-foot em {
  color: var(--accent-2);
  font-variation-settings: "opsz" 72, "SOFT" 100;
}

.services-foot a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent);
  transition: gap 0.4s var(--ease), color 0.4s var(--ease);
}

.services-foot a svg {
  width: 18px;
  height: 9px;
  transition: transform 0.4s var(--ease);
}

.services-foot a:hover {
  color: var(--accent-2);
  gap: 14px;
}

.services-foot a:hover svg {
  transform: translateX(3px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 780px) {
  .services {
    padding: 80px 18px;
  }

  .service-category {
    flex-wrap: wrap;
    gap: 12px;
  }

  .category-line {
    flex-basis: 100%;
    margin-bottom: 0;
    margin-top: 4px;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 6px;
  }

  .service-num {
    order: 1;
    padding-top: 0;
  }

  .service-thumb {
    order: 2;
    max-width: 240px;
    aspect-ratio: 4 / 3;
  }

  .service-body {
    order: 3;
  }

  .service-arrow {
    display: none;
  }

  .service-row:hover {
    padding-left: 6px;
  }

  .services-title {
    font-size: clamp(36px, 9vw, 56px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .services *,
  .services *::before,
  .services *::after {
    transition: none !important;
    animation: none !important;
  }
  .services .services-eyebrow,
  .services .services-title,
  .services .services-lede,
  .services .service-category,
  .services .service-row,
  .services .services-foot {
    opacity: 1 !important;
    transform: none !important;
  }
}
