﻿/**
 * Services page.
 *
 * @package Pacific_Atlas
 */

.services-shell {
  --sheet: #101315;
  --hairline: rgba(241, 240, 236, .12);
  --split: calc(100% * 5 / 11);
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}
.services-shell .nav { position: relative; z-index: 30; }

.services-shell::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: calc(100% * 6 / 11);
  background: var(--sheet);
  border-left: 1px solid var(--hairline);
  z-index: -1;
  pointer-events: none;
  animation: sheet 1.4s .25s both var(--ease-out);
}

.services {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

/* Intro column */
.services-intro {
  position: relative;
  padding: clamp(40px, 9vh, 112px) clamp(24px, 3vw, 56px) clamp(56px, 10vh, 120px) var(--gutter);
}
.services-intro-inner {
  position: sticky;
  top: clamp(32px, 6vh, 64px);
  max-width: 42rem;
}
body.admin-bar .services-intro-inner { top: calc(32px + clamp(32px, 6vh, 64px)); }
.services-intro .eyebrow { animation-delay: .4s; }

.services-copy h1 {
  font-stretch: 125%;
  font-size: clamp(32px, 3.15vw, 54px);
  font-weight: 300;
  line-height: .98;
  letter-spacing: -.015em;
  text-transform: uppercase;
  text-wrap: balance;
  animation: rise 1.2s .55s both var(--ease-out);
}
.services-copy h1 strong {
  display: block;
  font-weight: 800;
}
.services-copy > :not(h1) {
  animation: rise 1s .85s both var(--ease-out);
}
.services-copy p {
  max-width: 31rem;
  margin-top: clamp(22px, 3.4vh, 34px);
  color: var(--paper-dim);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.65;
}
.services-copy h1 + p {
  position: relative;
  padding-top: clamp(22px, 3.4vh, 34px);
}
.services-copy h1 + p::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 1px;
  background: var(--accent);
}

/* Sections sheet */
.services-body {
  position: relative;
  padding: clamp(40px, 9vh, 112px) clamp(28px, 5.5vw, 96px) clamp(56px, 10vh, 120px);
}
.services-body-inner {
  max-width: 46rem;
  counter-reset: services-item;
  animation: rise 1.1s 1s both var(--ease-out);
}

.services-item {
  position: relative;
  display: grid;
  grid-template-columns: clamp(52px, 5vw, 76px) minmax(0, 1fr);
  padding: clamp(28px, 4.6vh, 46px) 0;
  counter-increment: services-item;
}
.services-item::before {
  content: counter(services-item, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / span 2;
  padding-top: .35em;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  font-variant-numeric: tabular-nums;
}
.services-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--paper-faint);
  transform-origin: left;
}
.services-item:first-child { padding-top: 0; }
.services-item:first-child::after { display: none; }
.services-item-head,
.services-item-body { grid-column: 2; }

.services-item h2 {
  font-stretch: 125%;
  font-size: clamp(18px, 1.55vw, 24px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.services-item-body { margin-top: 14px; }
.services-item-body > * + * { margin-top: 14px; }
.services-item-body p,
.services-item-body li {
  max-width: 38rem;
  color: var(--paper-dim);
  font-size: 16px;
  line-height: 1.7;
}
.services-item-body ul,
.services-item-body ol { padding-left: 1.2em; }
.services-item-body h3 {
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
}
.services-copy a:not(.wp-block-button__link),
.services-item-body a:not(.wp-block-button__link) {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--paper-faint);
  text-underline-offset: 3px;
  transition: text-decoration-color .3s ease;
}
.services-copy a:not(.wp-block-button__link):hover,
.services-item-body a:not(.wp-block-button__link):hover { text-decoration-color: var(--paper); }
.services img { max-width: 100%; height: auto; }

/* Call to action */
.services-cta {
  position: relative;
  padding-top: clamp(32px, 5vh, 48px);
}
.services-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--paper-faint);
  transform-origin: left;
}
.services-cta .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}
.services-cta .wp-block-buttons + .wp-block-buttons { margin-top: 16px; }
.services .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 260px;
  min-height: 56px;
  padding: 0 26px;
  background: var(--paper);
  border: 1px solid var(--paper);
  border-radius: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.services .wp-block-button__link::after {
  content: "";
  width: 18px;
  height: 10px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10' fill='none'%3E%3Cpath d='M0 5h16M12 1l4 4-4 4' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10' fill='none'%3E%3Cpath d='M0 5h16M12 1l4 4-4 4' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .45s var(--ease-out);
}
.services .wp-block-button__link:hover { background: #fff; border-color: #fff; }
.services .wp-block-button__link:hover::after { transform: translateX(5px); }
.services .wp-block-button__link:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}
.services .is-style-outline .wp-block-button__link {
  background: transparent;
  border-color: var(--paper-faint);
  color: var(--paper);
}
.services .is-style-outline .wp-block-button__link:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .js .services-item > *,
  .js .services-item::before,
  .js .services-cta > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .9s ease, transform 1.1s var(--ease-out);
  }
  .js .services-item::after,
  .js .services-cta::after {
    transform: scaleX(0);
    transition: transform 1.4s var(--ease-out);
  }
  .js .services-item-head { transition-delay: .08s; }
  .js .services-item-body { transition-delay: .18s; }
  .js .services-item.is-in > *,
  .js .services-item.is-in::before,
  .js .services-cta.is-in > * {
    opacity: 1;
    transform: none;
  }
  .js .services-item.is-in::after,
  .js .services-cta.is-in::after { transform: scaleX(1); }
}

@keyframes sheet {
  from { clip-path: inset(0 0 0 100%); }
  to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .services-shell::before,
  .services-body-inner { animation: none; }
}

@media (max-width: 1080px) {
  .services-shell::before { display: none; }
  .services-body-inner { animation: fade 1s .35s both ease; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .services-intro {
    padding-right: var(--gutter);
    padding-top: clamp(32px, 7vh, 72px);
    padding-bottom: clamp(48px, 8vh, 80px);
  }
  .services-intro-inner { position: static; max-width: 40rem; }
  .services-copy h1 { font-size: clamp(32px, 6.4vw, 56px); }
  .services-body {
    padding: clamp(44px, 7vh, 72px) var(--gutter) clamp(52px, 8vh, 80px);
    background: var(--sheet);
    border-top: 1px solid var(--hairline);
  }
}

@media (max-width: 640px) {
  .services-intro { padding-top: 28px; }
  .services-copy h1 {
    font-stretch: 112%;
    font-size: clamp(27px, 8.2vw, 44px);
    line-height: 1.04;
  }
  .services-copy p { font-size: 16px; }
  .services-item {
    grid-template-columns: minmax(0, 1fr);
    padding: 30px 0;
  }
  .services-item::before {
    grid-row: auto;
    padding: 0 0 12px;
  }
  .services-item-head,
  .services-item-body { grid-column: 1; }
  .services-item h2 { font-size: 19px; }
  .services-item-body { margin-top: 12px; }
  .services-cta .wp-block-buttons,
  .services-cta .wp-block-button { width: 100%; }
  .services .wp-block-button__link {
    width: 100%;
    min-width: 0;
  }
}

