/* ==========================================================================
 Sections and service cards
 Shared section layout, plus the card styles used in Services.
 ========================================================================== */

.section {
  padding-block: 64px;
  scroll-margin-top: 48px;
}
@media (min-width: 768px) {
  .section {
    padding-block: 84px;
  }
}
/* Below 1024px the header has a second row of links (css/header.css) */
@media (max-width: 1023px) {
  .section {
    scroll-margin-top: 72px;
  }
}
.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: 36px;
}
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: 7fr 5fr;
    align-items: end;
    gap: 40px;
    margin-bottom: 48px;
  }
}
.section-head h2 {
  font-size: clamp(42px, 6vw, 76px);
  margin-top: 16px;
}
/* Beside the title on wide screens, the description hangs from a fine red line */
@media (min-width: 900px) {
  .section-head .lead {
    padding-inline-start: 24px;
    border-inline-start: 2px solid rgba(200, 50, 43, 0.55);
  }
}
/* The light "showroom" background: a cool ice-blue floor (owner, 2026-11-07: no reddish backgrounds) with a cyan light
   from one corner, a deeper blue in the other and fine grain, in the colours of the Smoke below. Used for Contact, the
   page tops, FAQs and every other gallery group */
.tint-bg {
  background:
    var(--grain), radial-gradient(70% 60% at 88% 0%, rgba(90, 210, 244, 0.2), transparent 62%),
    radial-gradient(55% 60% at 0% 100%, rgba(27, 108, 168, 0.1), transparent 60%),
    radial-gradient(45% 50% at 40% 40%, rgba(255, 255, 255, 0.55), transparent 70%),
    linear-gradient(180deg, #eef6fa 0%, #e5f0f6 100%);
}

/* Services: a cream page. Each chapter brings its own soft colour behind it (css/service-chapters.css), so the long
   page changes colour gently as it scrolls. clip keeps those colours from widening the page */
.services-section {
  overflow: hidden;
  overflow: clip;
  background:
    radial-gradient(55% 22% at 100% 0%, rgba(90, 190, 235, 0.14), transparent 62%),
    radial-gradient(45% 18% at 0% 6%, rgba(27, 108, 168, 0.06), transparent 60%),
    radial-gradient(40% 14% at 100% 55%, rgba(90, 160, 230, 0.07), transparent 70%),
    linear-gradient(180deg, var(--cream) 0%, #f4f7fb 100%);
}
/* Group titles (Exterior, Seats and interior…): a red italic number, the name in spaced capitals, and a fine line
   that fades out. The numbers are decoration, so screen readers skip them */
.services-section .wrap {
  counter-reset: service-group;
}
.group-title {
  counter-increment: service-group;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 56px 0 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.group-title::before {
  content: counter(service-group, decimal-leading-zero);
  content: counter(service-group, decimal-leading-zero) / '';
  flex: none;
  font:
    italic 400 26px/1 'Instrument Serif',
    serif;
  letter-spacing: 0;
  color: var(--red);
}
.group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(110, 50, 40, 0.2), rgba(110, 50, 40, 0));
}
.group-title:first-of-type {
  margin-top: 0;
}

/* Card grids */
.grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 640px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 760px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .grid {
    gap: 24px;
  }
}

/* Standard photo card: warm cream with a blush at its foot, a fine warm edge and a soft shadow. Under the photo the
   signature red line opens the text */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 100% 100%, rgba(90, 190, 235, 0.12), transparent 70%),
    radial-gradient(70% 50% at 0% 100%, rgba(27, 108, 168, 0.05), transparent 70%), var(--surface-card);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.35s var(--ease-spring),
    box-shadow 0.35s var(--ease-spring);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}
.card:active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px 22px;
  flex: 1;
  /* languages.css moves the line to the right for Arabic */
  background: var(--accent-line) no-repeat left 24px top 0 / 56px 3px;
}
.card :is(h3, h4) {
  font:
    400 30px/1.08 'Instrument Serif',
    serif;
  letter-spacing: -0.02em;
}
.card p {
  color: var(--muted);
  font-size: 15px;
}
/* The title's link stretches over the whole card, which opens the service page. The WhatsApp link sits above it. */
.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card:has(.card-link:focus-visible) {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}
.card-link:focus-visible {
  outline: none;
}
/* The card's foot, under a fine rule: "View service" with an arrow that nudges forward on hover, and the WhatsApp
   question as a soft green pill */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(110, 50, 40, 0.1);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-ink);
}
.card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-more::after {
  content: '→';
  content: '→' / '';
  display: inline-block;
  transition: transform 0.35s var(--ease-spring);
}
.card:hover .card-more {
  color: var(--link-hover);
}
.card:hover .card-more::after {
  transform: translateX(4px);
}
.card .card-cta {
  position: relative;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--whatsapp-text);
  background: var(--whatsapp-soft);
  box-shadow: inset 0 0 0 1px rgba(18, 140, 74, 0.2);
  transition:
    transform 0.2s var(--ease-spring),
    box-shadow 0.2s var(--ease-spring),
    background-color 0.2s ease;
}
.card .card-cta:hover {
  background: #d8efe2;
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(18, 140, 74, 0.34),
    0 6px 14px rgba(18, 140, 74, 0.16);
}
.card .card-cta:active {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(18, 140, 74, 0.34);
}
.card .card-cta:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}
.img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--champagne);
}
.img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-spring);
}
.card:hover .img-wrap img {
  transform: scale(1.05);
}
.img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 20, 35, 0.35), transparent 45%);
  pointer-events: none;
}

/* Horizontal card: photo beside the text */
.card.card-horizontal {
  flex-direction: row;
  align-items: stretch;
}
.card.card-horizontal .img-wrap {
  flex: 0 0 38%;
  aspect-ratio: auto;
  min-height: 168px;
}
.card.card-horizontal .card-body {
  padding: 20px 22px;
}
.card.card-horizontal :is(h3, h4) {
  font-size: 26px;
}
@media (max-width: 420px) {
  .card.card-horizontal .img-wrap {
    flex-basis: 36%;
    min-height: 150px;
  }
  .card.card-horizontal :is(h3, h4) {
    font-size: 23px;
  }
}

/* Seat cards: both photos fill the same square frame edge to edge, so save them square */
.card.card-horizontal.card-seat-photo {
  align-items: center;
}
.card.card-horizontal.card-seat-photo .img-wrap {
  flex: 0 0 42%;
  align-self: center;
  aspect-ratio: 1;
  min-height: 0;
  margin: 12px 0 12px 12px;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(80% 60% at 50% 100%, rgba(90, 190, 235, 0.16), transparent 70%),
    linear-gradient(160deg, var(--rose-50), var(--champagne));
}
.card.card-horizontal.card-seat-photo .img-wrap::after {
  display: none;
}
.card.card-horizontal.card-seat-photo .card-body {
  align-self: stretch;
  justify-content: center;
  padding: 24px;
}
/* Phones: stack, with the same square frame centred above the text */
@media (max-width: 639px) {
  .card.card-horizontal.card-seat-photo {
    flex-direction: column;
  }
  .card.card-horizontal.card-seat-photo .img-wrap {
    flex: none;
    width: calc(100% - 24px);
    max-width: 340px;
    margin: 12px auto 0;
  }
  .card.card-horizontal.card-seat-photo .card-body {
    padding: 20px 22px 24px;
  }
}

/* Text cards with an icon, for services without a photo: a rose light in the corner, and the icon in a lit
   crimson badge */
.card.card-icon {
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  background: radial-gradient(70% 60% at 100% 0%, rgba(90, 190, 235, 0.16), transparent 62%), var(--surface-card);
}
.card.card-icon .icon-ring {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(150deg, #c8443a 0%, var(--crimson) 50%, var(--wine) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 20px rgba(163, 38, 31, 0.3);
  transition: transform 0.35s var(--ease-spring);
}
.card.card-icon:hover .icon-ring {
  transform: translateY(-2px) rotate(-4deg);
}
/* The text column beside the icon is narrow, so its two links always stack, and every card in the row matches */
.card.card-icon .card-actions {
  flex-direction: column;
  align-items: flex-start;
}
.card.card-icon > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: stretch;
}
.card.card-icon :is(h3, h4) {
  font-size: 26px;
}
.grid + .grid {
  margin-top: 20px;
}
@media (min-width: 1024px) {
  .grid + .grid {
    margin-top: 24px;
  }
}

/* ==========================================================================
 Window tinting packages
 Shared by the homepage (Services and prices) and the window tinting page. The package with a warranty is the
 featured one: a carbon card raised above the others, with its warranty in a small red-lit pill. The heat bar is an
 SVG whose fill is as long as the heat rejection figure; it grows in when its chapter arrives on screen.
 ========================================================================== */
.packages {
  display: grid;
  gap: 20px;
  align-items: stretch;
}
@media (min-width: 720px) {
  .packages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .packages {
    gap: 24px;
  }
}
.package {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 26px 26px;
  border-radius: var(--radius-md);
  background:
    var(--accent-line) no-repeat left 26px top 0 / 56px 3px,
    radial-gradient(80% 50% at 100% 0%, rgba(90, 190, 235, 0.16), transparent 62%),
    radial-gradient(70% 45% at 0% 100%, rgba(27, 108, 168, 0.06), transparent 70%),
    var(--surface-card);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.35s var(--ease-spring),
    box-shadow 0.35s var(--ease-spring);
}
.package:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}
.package-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 12px;
}
.package-name {
  font:
    400 30px/1.08 'Instrument Serif',
    serif;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.package-warranty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--red-dark);
  background: rgba(200, 50, 43, 0.08);
  box-shadow: inset 0 0 0 1px rgba(200, 50, 43, 0.28);
}
.package-warranty svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.package-price {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--muted);
}
.package-price b {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.package-heat {
  padding-top: 16px;
  border-top: 1px solid rgba(110, 50, 40, 0.1);
}
.package-heat p {
  font-size: 14px;
  color: var(--ink-2);
}
.package-heat b {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-ink);
}
.package-meter {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
}
.package-meter-track {
  fill: rgba(110, 50, 40, 0.1);
}
/* The heat kept out, as a bar that warms from amber to the logo red. Its gradient is drawn in each bar's own SVG
   (renderPackages in templates/parts.mjs), so no fill is set here */
.package-meter-fill {
  transform-box: fill-box;
  transform-origin: left center;
  transition: transform 1.4s var(--ease-spring) 0.35s;
}
.reveal-ready [data-reveal]:not(.is-revealed) .package-meter-fill {
  transform: scaleX(0);
}
.package-note {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
/* The WhatsApp question, at the foot of every card */
.package-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  margin-top: auto;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--whatsapp-text);
  background: var(--whatsapp-soft);
  box-shadow: inset 0 0 0 1px rgba(18, 140, 74, 0.22);
  transition:
    transform 0.2s var(--ease-spring),
    box-shadow 0.2s var(--ease-spring),
    background-color 0.2s ease;
}
.package-cta svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.package-cta:hover {
  background: #d8efe2;
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgba(18, 140, 74, 0.34),
    0 8px 18px rgba(18, 140, 74, 0.16);
}
.package-cta:active {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(18, 140, 74, 0.34);
}
.package-cta:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}

/* The featured package: carbon, lit in deep wine from one corner, sitting a little above the others on wide screens */
.package.is-featured {
  color: #fff;
  background:
    var(--accent-line-dark) no-repeat left 26px top 0 / 56px 3px,
    var(--grain-dark),
    radial-gradient(90% 60% at 100% 0%, rgba(179, 48, 42, 0.42), transparent 62%),
    radial-gradient(70% 50% at 0% 100%, rgba(233, 162, 59, 0.12), transparent 60%),
    linear-gradient(160deg, var(--carbon-2) 0%, var(--carbon) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 44px rgba(11, 17, 25, 0.28),
    0 40px 80px -36px rgba(163, 38, 31, 0.5);
}
.package.is-featured :is(.package-name, .package-price b) {
  color: #fff;
}
.package.is-featured .package-price {
  color: rgba(255, 255, 255, 0.66);
}
.package.is-featured .package-heat {
  border-top-color: rgba(255, 255, 255, 0.12);
}
.package.is-featured .package-heat p {
  color: rgba(255, 255, 255, 0.78);
}
.package.is-featured .package-heat b {
  color: var(--accent-ink-dark);
}
.package.is-featured .package-meter-track {
  fill: rgba(255, 255, 255, 0.12);
}
.package.is-featured .package-note {
  color: rgba(255, 255, 255, 0.7);
}
.package.is-featured .package-warranty {
  color: var(--red-light);
  background: rgba(240, 122, 112, 0.12);
  box-shadow: inset 0 0 0 1px rgba(240, 122, 112, 0.4);
}
.package.is-featured .package-cta {
  color: #fff;
  background: var(--whatsapp-text);
  box-shadow: 0 8px 22px rgba(18, 140, 74, 0.3);
}
.package.is-featured .package-cta:hover {
  background: #0b6334;
  box-shadow: 0 12px 28px rgba(18, 140, 74, 0.38);
}
.package.is-featured .package-cta:focus-visible {
  outline-color: var(--accent-ink-dark);
}
@media (min-width: 720px) {
  .package.is-featured {
    transform: translateY(-10px);
  }
  .package.is-featured:hover {
    transform: translateY(-16px);
  }
}
.packages-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 46em;
  margin-top: 22px;
  font-size: 14.5px;
  color: var(--muted);
}
.packages-note::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 0 4px rgba(163, 38, 31, 0.12);
}

/* On the window tinting page: its own section straight after the page hero */
.page-packages {
  background: radial-gradient(50% 40% at 100% 0%, rgba(90, 190, 235, 0.16), transparent 62%), var(--surface-card);
}
.page-packages .page-section-title {
  margin-bottom: 14px;
}
.page-packages-lead {
  margin-bottom: 36px;
}

/* The Services and Contact titles in blue (owner, 2026-11-07): deep blue words with the accent words in a brighter
   blue italic */
:is(#services-title, #contact-title) {
  color: var(--heading-blue);
}
:is(#services-title, #contact-title) em {
  color: var(--heading-blue-accent);
}
