/* TGD v13 — approved folded-card styling.
   Presentation only: V12 assets, source disclosures, routes, and gallery logic remain intact.
   Upright text and real links sit on a subtly angled surface; no transformed text or images. */

.services-section {
  background: radial-gradient(ellipse at 88% 48%, #ebe8e133 0, transparent 53%),
              linear-gradient(122deg, #fff 24%, #f8f7f4 100%);
}
.service-grid { gap: 36px 28px; }
.service-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0 0 3px;
  transition: transform 240ms ease;
}
.service-card:nth-child(n) { transform: none; margin-top: 0; }
.service-card::before {
  content: "";
  position: absolute;
  inset: 14px 0 0;
  z-index: -1;
  border: 1px solid #fff;
  border-radius: 18px;
  background: linear-gradient(146deg, #fff 63%, #f7f6f2);
  box-shadow: 0 16px 30px -16px #20272b55, 0 5px 14px -8px #20272b24;
  transform: skewX(-3deg);
  transition: box-shadow 240ms ease, border-color 240ms ease;
  pointer-events: none;
}
.service-card::after {
  content: "";
  position: absolute;
  inset: 54px -6px 31px 16px;
  z-index: -2;
  border-radius: 17px;
  background: linear-gradient(155deg, #c8c9c36b, #ecece744 65%, transparent);
  transform: skewX(-3deg);
  pointer-events: none;
}
.service-card .photo-slot,
.service-card:nth-child(even) .photo-slot {
  height: 236px;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 18px 19px 18px 12px;
  clip-path: polygon(3.5% 0, 100% 0, 96% 100%, 33% 84%, 0 58%);
}
.service-card .photo-slot figcaption {
  top: 12px;
  bottom: auto;
  left: 19px;
  right: 17px;
  font-size: 8px;
  letter-spacing: .06em;
}
.service-card .photo-kind,
.service-card .image-count {
  background: #182329df;
  border-color: #ffffff30;
  padding: 3px 6px;
}
.service-card .service-card-copy {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  position: relative;
  z-index: 4;
  min-height: 0;
  margin: -50px 0 0;
  padding: 0 21px 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.service-card-meta { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; min-height: 53px; }
.service-card-meta .service-number { margin: 0; font-size: 9px; line-height: 1.2; letter-spacing: .12em; }
.service-symbol { display: block; color: #59666c; height: 28px; }
.service-symbol svg { display: block; width: 28px; height: 28px; }
.service-card h3 { font-size: 20px; line-height: 1.2; margin: 0; }
.service-card h3 a { display: inline; }
.service-card h3 a:hover { color: #755631; }
.service-card p { margin-top: 10px; font-size: 13px; line-height: 1.7; color: #596269; }
.service-chips { margin: 12px 0 9px; gap: 3px 12px; }
.service-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-bottom: 0;
  color: #6e5a43;
  font-size: 10px;
  text-decoration: underline;
  text-decoration-color: #c9b69d;
  text-underline-offset: 4px;
}
.service-chips a:hover { text-decoration-color: currentColor; }
.service-learn-more {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  justify-content: flex-end;
  gap: 14px;
  min-height: 44px;
  min-width: 116px;
  padding: 8px 0 4px 8px;
  margin: auto 0 0;
  color: #78572f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: .015em;
}
.service-learn-more svg { width: 18px; height: 18px; transition: transform 200ms ease; }
.service-learn-more:hover { color: #49311b; text-decoration: underline; text-underline-offset: 5px; }
.service-learn-more:hover svg { transform: translateX(4px); }
.service-card:focus-within::before { border-color: #b19672; box-shadow: 0 20px 40px -18px #20272b55; }
@media (hover: hover) and (pointer: fine) {
  .service-card:hover { transform: translateY(-5px); }
  .service-card:hover::before { box-shadow: 0 24px 38px -18px #20272b55, 0 8px 18px -10px #20272b33; }
}

/* The installation service stays a wider seventh feature, not another narrow box. */
.installation-card .photo-slot,
.installation-card:nth-child(even) .photo-slot {
  height: 236px;
  clip-path: polygon(2% 0, 100% 0, 98% 100%, 20% 83%, 0 59%);
}
.installation-card .service-card-copy { margin: -50px 0 0; padding: 0 25px 13px; min-height: 0; }
.installation-card h3 { font-size: 23px; max-width: none; }
.installation-card p { max-width: 440px; }
.installation-card .photo-slot .photo-frame { object-position: 36% 42%; }
.installation-seal {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 2;
  width: 28%;
  padding: 52px 17px 26px 27px;
  background: linear-gradient(104deg, #20272bf2, #20272b);
  color: #c6a477;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 12px;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
}
.installation-seal svg { width: 31px; height: 31px; }
.installation-seal strong { font-size: 10px; line-height: 1.4; text-transform: uppercase; letter-spacing: .13em; }
.installation-seal span { max-width: 110px; color: #c8d0d3; font-size: 9px; line-height: 1.65; letter-spacing: .025em; }

/* Echo the folded corner more quietly in the existing customer-gallery links. */
.project-link {
  position: relative;
  overflow: hidden;
  border-radius: 16px 6px 18px 6px;
  border: 1px solid #ebe8e1;
  background: linear-gradient(125deg, #fff, #f2eee6);
  box-shadow: 0 10px 24px -18px #20272b55;
}
.project-link::before {
  content: "";
  width: 33px;
  height: 33px;
  position: absolute;
  right: 0;
  top: 0;
  background: linear-gradient(225deg, #ded5c7 48%, #fff 50%, #fff 53%, transparent 55%);
  pointer-events: none;
}
.project-link:hover { box-shadow: 0 16px 28px -18px #20272b66; }
.quote-aside { border-radius: 20px 7px 20px 7px; box-shadow: 0 10px 26px -22px #20272b66; }

@media (max-width: 1180px) and (min-width: 1001px) {
  .service-grid { gap: 31px 20px; }
  .service-card .photo-slot, .service-card:nth-child(even) .photo-slot { height: 208px; }
  .service-card .service-card-copy { padding-inline: 17px; margin-top: -43px; }
  .service-card h3 { font-size: 18px; }
  .service-card p { font-size: 12px; }
  .service-card-meta { min-height: 49px; }
  .installation-card .service-card-copy { padding-inline: 22px; }
  .installation-card h3 { font-size: 21px; }
}
@media (max-width: 1000px) {
  .service-grid { gap: 34px 27px; }
  .service-card .photo-slot, .service-card:nth-child(even) .photo-slot { height: 280px; }
  .service-card .service-card-copy { padding: 0 25px 16px; margin-top: -53px; }
  .service-card-meta { min-height: 57px; }
  .service-card h3 { font-size: 23px; }
  .service-card p { font-size: 14px; }
  .service-chips a { font-size: 11px; min-height: 27px; }
  .service-learn-more { font-size: 13px; }
  .installation-card .photo-slot { height: 280px; }
  .installation-card h3 { font-size: 25px; }
  .installation-seal { padding-bottom: 40px; }
}
@media (max-width: 650px) {
  .service-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
  .service-card, .installation-card { grid-column: auto; margin: 0 !important; }
  .service-card::before { transform: skewX(-1.6deg); border-radius: 18px; }
  .service-card::after { transform: skewX(-1.6deg); inset-inline: 13px -1px; }
  .service-card .photo-slot, .service-card:nth-child(even) .photo-slot { height: clamp(233px, 65vw, 310px); clip-path: polygon(2% 0, 100% 0, 98% 100%, 31% 84%, 0 60%); }
  .service-card .service-card-copy { margin: -53px 0 0; padding: 0 24px 15px; }
  .service-card-meta { min-height: 58px; }
  .service-card h3 { font-size: 23px; }
  .service-card p { font-size: 14px; line-height: 1.75; }
  .service-chips { gap: 4px 16px; margin-top: 11px; }
  .service-chips a { min-height: 30px; }
  .installation-card h3 { font-size: 22px; line-height: 1.25; }
  .installation-seal { display: none; }
  .project-link { border-radius: 16px 6px 18px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .service-card, .service-card::before, .service-learn-more svg { transition: none; }
  .service-card:hover, .service-learn-more:hover svg { transform: none !important; }
}
@media print {
  .service-card::after { display: none; }
  .service-card::before { transform: none; box-shadow: none; border-color: #ddd; }
  .service-card, .service-learn-more svg { transform: none !important; }
  .project-link, .quote-aside { box-shadow: none; }
}

/* Fit the existing header on narrow 320px phones without horizontal scrolling. */
@media (max-width: 360px) {
  .brand { flex-basis: 145px; width: 145px; }
  .brand img { width: 145px; }
}
