/* Illustrated service cards, scoped to the homepage notebook. */
.nb-home #services {
  grid-template-columns: minmax(225px, .69fr) minmax(0, 2fr);
  gap: 19px clamp(24px, 2.8vw, 42px);
  align-items: start;
}
.nb-home #services > .nb-section-head { margin-bottom: 0; }
.nb-home #services .nb-script {
  position: relative;
  transform: rotate(-5deg);
  margin-block: 4px 19px !important;
}
.nb-home #services .nb-script::after {
  content: '';
  position: absolute;
  width: 52px;
  height: 35px;
  left: calc(100% + 4px);
  bottom: -14px;
  background: url('/assets/notebook/elements/arrow-pencil-right.svg') center / contain no-repeat;
  transform: rotate(9deg);
  opacity: .77;
  pointer-events: none;
}
.nb-home #services .nb-section-head h2 {
  font-size: clamp(37px, 3.65vw, 55px);
  line-height: 1.07;
  letter-spacing: -.04em;
}
.nb-home #services .nb-section-head h2 em {
  padding-block-end: .13em;
  background: var(--graphite-rule) center bottom / 100% 8px no-repeat;
}
.nb-home #services .win-subheading {
  margin-top: 19px;
  font-size: 15px;
  line-height: 1.6;
}

.service-illustration {
  width: min(100%, 325px);
  aspect-ratio: 1.14;
  margin-top: 28px;
  isolation: isolate;
}
.service-illustration .service-wireframe {
  top: 1%;
  left: -4%;
  width: 94%;
  transform: rotate(-4deg);
  filter: drop-shadow(1px 3px 3px #5a473523);
}
.service-illustration .service-pencil {
  top: 78%;
  left: 19%;
  width: 72%;
  transform: rotate(13deg);
  z-index: 2;
}
.service-checklist {
  position: absolute;
  top: 39%;
  inset-inline-end: 0;
  width: 43%;
  aspect-ratio: 1.10;
  transform: rotate(-8deg);
  filter: drop-shadow(1px 3px 2px #5b433044);
}
.service-checklist::before,
.service-checklist::after {
  content: '';
  position: absolute;
  inset: 0;
}
.service-checklist::before {
  border: 15px solid transparent;
  border-image: var(--deckled-paper) var(--deckled-slice) fill / 15px stretch;
}
.service-checklist::after {
  inset: 16% 7% 10% 14%;
  background: url('/assets/notebook/elements/pencil-checklist.svg') center / contain no-repeat;
}

.nb-home #services .services-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 17px;
  align-items: start;
}
.nb-home #services .service-card {
  --service-illustration-width: 30%;
  display: grid;
  grid-template-columns: minmax(0, var(--service-illustration-width)) minmax(0, 1fr);
  align-items: center;
  gap: 8px 11px;
  min-height: 179px;
  padding: 17px 15px 15px 12px;
  border-bottom: 0;
}
.nb-home #services .service-card-wide {
  grid-column: 1 / -1;
  --service-illustration-width: clamp(111px, 17%, 164px);
  column-gap: clamp(14px, 2.2vw, 30px);
}
[data-theme="dark"] .service-checklist::before { filter: brightness(.40) saturate(.48); }
[data-theme="dark"] .service-checklist::after { filter: brightness(1.9); }

.nb-home #services .service-card-illustration {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: contain;
  align-self: start;
  margin-block-start: 7px;
}
.nb-home #services .service-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  align-content: start;
  column-gap: 8px;
}
.nb-home #services .service-content > h3,
.nb-home #services .service-content > p { grid-column: 1 / -1; }
.nb-home #services .service-content > h3 {
  font-size: clamp(18px, 1.63vw, 23px);
  line-height: 1.12;
}
.nb-home #services .service-content > p {
  margin-block: 8px 6px;
  color: var(--muted);
  line-height: 1.46;
  overflow-wrap: anywhere;
}
.nb-home #services .service-card-wide .service-content > p { max-width: 70ch; }
.nb-home #services .service-content details { grid-column: 1; grid-row: 3; margin: 0; min-width: 0; }
.nb-home #services .service-content details[open] { grid-column: 1 / -1; }
.nb-home #services .service-content details[open] ul { margin: 6px 0; padding-inline-start: 18px; }
.nb-home #services .service-content details[open] li { margin-block: 3px; }
.nb-home #services .service-content > .service-meta { display: contents; }
.nb-home #services .service-timeline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  grid-column: 1 / -1;
  grid-row: 4;
  font-size: 12px;
  color: var(--muted);
}
.nb-home #services .service-timeline img { width: 13px; height: 13px; }
.nb-home #services .service-content summary {
  list-style: none;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
}
.nb-home #services .service-content summary::-webkit-details-marker { display: none; }
.nb-home #services .service-content summary::before {
  content: '';
  flex: 0 0 12px;
  height: 12px;
  background: currentColor;
  mask: url('/assets/notebook/icons/chevron.svg') center / contain no-repeat;
  transform: rotate(-90deg);
}
.nb-home #services .service-content details[open] summary::before { transform: none; }
.nb-home #services .service-price {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
}
.nb-home #services .service-content details[open] ~ .service-meta .service-timeline { grid-column: 1; align-self: center; }
.nb-home #services .service-content details[open] ~ .service-meta .service-price { grid-row: 4; }
.nb-home #services .service-content :is(summary, .service-price) {
  padding-block: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.nb-home #services .service-price:hover,
.nb-home #services .service-content summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.nb-home #services > .nb-text-link {
  margin-top: 1px;
  justify-self: center;
  padding: 11px 21px;
  border-color: transparent;
  background: var(--control-outline) center / 100% 100% no-repeat;
}
[data-theme="dark"] .nb-home #services > .nb-text-link {
  background: var(--surface);
  border-color: var(--border);
}

@media (max-width: 1120px) {
  .nb-home #services { display: grid; grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .nb-home #services > .nb-section-head {
    display: grid;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(155px, .55fr);
    column-gap: 20px;
  }
  .nb-home #services .nb-section-head > :not(.service-illustration) { grid-column: 1; }
  .nb-home #services .nb-script { justify-self: start; }
  .service-illustration {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    margin: 0;
    width: min(100%, 218px);
  }
  .nb-home #services > .nb-text-link { grid-column: 1; }
}

@media (max-width: 670px) {
  .nb-home #services > .nb-section-head {
    grid-template-columns: minmax(0, 1fr) minmax(85px, .42fr);
    column-gap: 8px;
    padding-bottom: 3px;
  }
  .nb-home #services .nb-script { align-self: start; font-size: 20px; margin: 0 0 11px !important; }
  .nb-home #services .nb-script::after { width: 31px; height: 22px; left: 88%; bottom: -13px; }
  .nb-home #services .nb-section-head h2 { font-size: clamp(29px, 7.1vw, 40px); }
  .nb-home #services .win-subheading { margin-top: 12px; font-size: 14px; }
  .service-illustration { width: 100%; align-self: end; margin-bottom: 8px; }
  .nb-home #services .services-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .nb-home #services .service-card {
    --service-illustration-width: 26%;
    min-height: 0;
    padding: 15px 13px 14px 11px;
  }
  .nb-home #services .service-card-wide { --service-illustration-width: 26%; column-gap: 11px; }
  .nb-home #services .service-content > h3 { font-size: clamp(18px, 4.8vw, 22px); }
  .nb-home #services .service-content > p { margin-block: 6px 4px; }
  .nb-home #services .service-content :is(summary, .service-price) { padding-block: 9px; }
}

@media (max-width: 390px) {
  .nb-home #services .service-content details { grid-column: 1 / -1; }
  .nb-home #services .service-content .service-timeline { grid-column: 1; align-self: center; }
  .nb-home #services .service-content .service-price { grid-row: 4; }
}
