/*
 * Vitality 8080 visual theme for the 8081 Adapt CMS component contract.
 * Base component geometry comes from the local 8081 component library.
 */

:root {
  --white: #ffffff;
  --off-white: #f7f8fa;
  --light-gray: #e8ecf2;
  --mid-gray: #718096;
  --dark-gray: #0b0d12;
  --blue: #c6a86d;
  --blue-hover: #b79759;
  --blue-light: #f2eadb;
  --blue-pale: #faf7f1;
  --navy: #1b2d4b;
  --deep-navy: #142441;
  --slate: #59677b;
  --gradient-start: #e9edf3;
  --gradient-end: #f8f9fb;
  --accent-teal: #c6a86d;
  --link-blue: #1b2d4b;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --template-shadow: 0 24px 70px rgba(20, 36, 65, 0.10);
  --template-border: rgba(27, 45, 75, 0.13);
}

html {
  scroll-padding-top: 92px;
}

body.apple-template {
  margin: 0;
  color: var(--dark-gray);
  background: #fff;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.apple-template *,
.apple-template *::before,
.apple-template *::after {
  box-sizing: border-box;
}

.apple-template h1,
.apple-template h2,
.apple-template h3,
.apple-template h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.apple-template h1 em,
.apple-template h2 em,
.apple-template h3 em,
.apple-template .gradient-text {
  color: var(--blue) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  font-style: normal;
}

.apple-template p,
.apple-template a,
.apple-template button,
.apple-template input,
.apple-template select,
.apple-template textarea {
  font-family: var(--font-body);
}

.apple-template a:focus-visible,
.apple-template button:focus-visible,
.apple-template input:focus-visible,
.apple-template select:focus-visible,
.apple-template textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.template-nav {
  position: sticky;
  top: 0;
  z-index: 3000;
  min-height: 78px;
  padding: 12px clamp(18px, 4vw, 58px);
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr minmax(220px, 300px) auto;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--template-border);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.template-brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.template-brand img {
  width: auto;
  height: 44px;
  object-fit: contain;
}

.template-nav__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 24px;
  border-left: 1px solid var(--template-border);
}

.template-nav__title span,
.template-picker label {
  color: var(--mid-gray);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.template-nav__title strong {
  color: var(--deep-navy);
  font-size: 0.9rem;
  font-weight: 600;
}

.template-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.template-picker select {
  width: 100%;
  min-height: 38px;
  padding: 7px 34px 7px 11px;
  color: var(--deep-navy);
  background: #f7f8fa;
  border: 1px solid var(--template-border);
  border-radius: 0;
  font-size: 0.78rem;
}

.template-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  color: #fff;
  background: var(--deep-navy);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 600;
}

.template-nav__link:hover {
  background: var(--navy);
}

.apple-template-main {
  padding-top: 0;
  overflow: clip;
}

.template-intro {
  position: relative;
  min-height: 620px;
  padding: clamp(110px, 14vw, 180px) clamp(24px, 7vw, 110px) 90px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(198, 168, 109, 0.24), transparent 31%),
    linear-gradient(115deg, #142441 0%, #1b2d4b 62%, #263b5d 100%);
}

.template-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 49.9%, rgba(255,255,255,0.04) 50%, transparent 50.1%);
}

.template-intro__rule {
  width: 40px;
  height: 1px;
  margin-bottom: 22px;
  background: var(--blue);
}

.template-intro__eyebrow {
  margin: 0 0 24px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.template-intro h1 {
  max-width: 820px;
  margin: 0;
  color: #fff;
  font-size: clamp(3.8rem, 8vw, 7.5rem);
  line-height: 0.9;
}

.template-intro > p:not(.template-intro__eyebrow) {
  max-width: 650px;
  margin: 38px 0 0;
  color: rgba(255, 255, 255, 0.70);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.75;
}

.template-intro__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 70px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.74rem;
}

.template-intro__facts span {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.template-intro__facts strong {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
}

.template-component-label {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 14px;
  color: var(--mid-gray);
  border-bottom: 1px solid var(--template-border);
  background: #fff;
}

.template-component-label span {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.template-component-label code {
  color: var(--deep-navy);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.template-component {
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.template-component--visible,
.template-component:first-of-type {
  opacity: 1;
  transform: none;
}

.apple-template--page .template-component {
  opacity: 1;
  transform: none;
}

.apple-template .section-container,
.apple-template .container,
.apple-template .container-wide {
  width: min(1280px, calc(100% - 48px));
  max-width: 1280px;
  margin-inline: auto;
}

.apple-template .section-overline,
.apple-template [class$="-overline"] {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.apple-template .section-title {
  color: var(--deep-navy);
  font-size: clamp(2.7rem, 5vw, 5.2rem);
  font-weight: 600;
  line-height: 0.98;
}

.apple-template .section-subtitle {
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.75;
}

.apple-template .btn-primary,
.apple-template .btn-secondary,
.apple-template .btn-outline,
.apple-template .btn-ghost {
  min-height: 50px;
  padding: 14px 28px;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.apple-template .btn-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.apple-template .btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
}

/* Hero components */
.apple-template .hero {
  min-height: min(860px, calc(100vh - 78px));
  color: #fff;
  background-color: var(--deep-navy);
  background-position: center;
}

.apple-template .hero-gradient {
  background: linear-gradient(102deg, rgba(20,36,65,0.94) 0%, rgba(20,36,65,0.78) 53%, rgba(20,36,65,0.34) 100%);
}

.apple-template .hero-text {
  min-height: min(860px, calc(100vh - 78px));
  max-width: 1280px;
  padding: clamp(100px, 13vw, 180px) 48px 100px;
}

.apple-template .hero h1 {
  max-width: 720px;
  margin-bottom: 28px;
  color: #fff;
  font-size: clamp(4rem, 7vw, 7.4rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.apple-template .hero-overline {
  color: var(--blue);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

.apple-template .hero-sub {
  max-width: 610px;
  color: rgba(255,255,255,0.74);
  font-size: 1.05rem;
  line-height: 1.8;
}

.apple-template .hero .btn-secondary {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.44);
}

/* Statistical proof */
.apple-template .stat-strip {
  color: #fff;
  background: var(--deep-navy);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.apple-template .stat-number,
.apple-template .stat-value {
  color: var(--blue);
  font-family: var(--font-heading);
  font-weight: 600;
}

/* Service Grid: 8081 data inside the 8080 image-led composition */
.apple-template .service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 54px;
}

.apple-template .service-card {
  border: 1px solid var(--template-border);
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

.apple-template .service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--template-shadow);
}

.apple-template .service-card.card--has-photo {
  position: relative;
  min-height: 430px;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: #fff;
  background: var(--deep-navy);
  border: 0;
}

.apple-template .service-card.card--has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20,36,65,0.96) 0%, rgba(20,36,65,0.58) 52%, rgba(20,36,65,0.05) 100%);
}

.apple-template .service-card .card-photo {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
}

.apple-template .service-card .card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.apple-template .service-card:hover .card-photo img {
  transform: scale(1.055);
}

.apple-template .service-card.card--has-photo .card-eyebrow,
.apple-template .service-card.card--has-photo .card-title,
.apple-template .service-card.card--has-photo .card-subtitle,
.apple-template .service-card.card--has-photo .card-link {
  position: relative;
  z-index: 2;
}

.apple-template .service-card .card-eyebrow {
  margin-bottom: 13px;
  color: var(--blue) !important;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.apple-template .service-card .card-title {
  margin: 0 0 12px;
  color: inherit;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1;
}

.apple-template .service-card .card-subtitle {
  max-width: 540px;
  color: rgba(255,255,255,0.70);
  line-height: 1.65;
}

.apple-template .service-card .card-link {
  width: fit-content;
  margin-top: 24px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.apple-template .service-card:not(.card--has-photo) {
  min-height: 330px;
  padding: 40px;
  background: #fff;
}

/* Why Choose carousel: editorial cards with image-led lower panels */
.apple-template .why-section {
  padding: clamp(90px, 10vw, 150px) 0;
  background: #f7f8fa;
}

.apple-template .why-header {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto 54px;
  align-items: flex-end;
}

.apple-template .why-header h2 {
  max-width: 820px;
  color: var(--deep-navy);
  font-size: clamp(3.1rem, 6vw, 6.2rem);
  font-weight: 600;
  line-height: 0.92;
}

.apple-template .why-header > a {
  color: var(--deep-navy);
  border-bottom: 1px solid var(--blue);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
}

.apple-template .why-carousel-wrapper {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.apple-template .why-carousel-track {
  gap: 20px;
  padding: 0 0 24px;
  scroll-snap-type: x mandatory;
}

.apple-template .why-card {
  min-height: 520px;
  padding: 38px 38px 0;
  display: flex;
  flex-direction: column;
  flex: 0 0 min(390px, calc(88vw - 32px));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--template-border);
  border-radius: 0;
  box-shadow: none;
  scroll-snap-align: start;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

.apple-template .why-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--template-shadow);
}

.apple-template .why-card-eyebrow {
  color: var(--blue);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.apple-template .why-card-title {
  color: var(--deep-navy);
  font-size: 2.45rem;
  line-height: 1;
}

.apple-template .why-card-desc {
  color: var(--slate);
  font-size: 0.9rem;
  line-height: 1.7;
}

.apple-template .why-card-visual {
  position: relative;
  min-height: 215px;
  margin: auto -38px 0;
  color: var(--blue);
  background: var(--deep-navy);
  border-radius: 0;
}

.apple-template .why-card-visual:has(.why-card-photo) {
  min-height: 235px;
}

.apple-template .why-card-photo {
  width: 100%;
  height: 235px;
  object-fit: cover;
  filter: saturate(0.84) contrast(1.04);
}

.apple-template .why-card-plus {
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 50%;
  font-size: 1.55rem;
}

.apple-template .why-card:hover .why-card-plus {
  color: #fff;
  background: var(--blue-hover);
  transform: rotate(90deg);
}

.apple-template .why-nav {
  width: min(1280px, calc(100% - 48px));
  margin: 22px auto 0;
}

.apple-template .why-arrow {
  width: 48px;
  height: 48px;
  color: var(--deep-navy);
  background: transparent;
  border: 1px solid rgba(27,45,75,0.26);
  border-radius: 0;
}

.apple-template .why-arrow:hover {
  color: #fff;
  background: var(--deep-navy);
  border-color: var(--deep-navy);
}

/* Shared cards, carousels and editorial surfaces */
.apple-template :is(
  .quick-tile,
  .info-card,
  .testimonial-card,
  .tab-panel,
  .accordion-item,
  .comparison-table,
  .gd-group,
  .article-card,
  .feature-card,
  .filter-card
) {
  border-radius: 0;
  border-color: var(--template-border);
  box-shadow: none;
}

.apple-template :is(.quick-tile, .info-card, .testimonial-card, .article-card, .feature-card):hover {
  box-shadow: var(--template-shadow);
}

.apple-template .dark-cinematic,
.apple-template .dark-showcase,
.apple-template .cta-banner {
  background-color: var(--deep-navy);
}

.apple-template .testimonial-quote,
.apple-template blockquote {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
}

.apple-template .marquee-bar {
  color: #fff;
  background: var(--deep-navy);
}

.apple-template .breadcrumb {
  background: #f7f8fa;
  border-color: var(--template-border);
}

.apple-template .contact-form-card,
.apple-template .gd-group {
  border: 1px solid var(--template-border);
  border-radius: 0;
  box-shadow: none;
}

.apple-template .form-group input,
.apple-template .form-group select,
.apple-template .form-group textarea,
.apple-template .cg-search {
  border-radius: 0;
  background: #fff;
}

.template-form-placeholder {
  min-height: 270px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--slate);
  background: #f7f8fa;
  border: 1px dashed rgba(27,45,75,0.26);
  text-align: center;
}

.template-form-placeholder strong {
  color: var(--deep-navy);
  font-family: var(--font-heading);
  font-size: 2rem;
}

.template-empty {
  min-height: 65vh;
  padding: 120px 24px;
  text-align: center;
}

.template-empty h1 {
  color: var(--deep-navy);
  font-size: clamp(3rem, 7vw, 6rem);
}

.template-empty p {
  margin: 18px 0 28px;
  color: var(--slate);
}

.template-empty a {
  color: var(--blue-hover);
  font-weight: 600;
}

.template-footer {
  min-height: 94px;
  padding: 28px clamp(24px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255,255,255,0.56);
  background: #101d33;
  border-top: 1px solid rgba(255,255,255,0.09);
  font-size: 0.72rem;
}

.template-footer span:first-child {
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .template-nav {
    grid-template-columns: auto 1fr auto;
  }

  .template-nav__title,
  .template-nav__link {
    display: none;
  }

  .apple-template .service-grid {
    grid-template-columns: 1fr;
  }

  .apple-template .service-card.card--has-photo {
    min-height: 390px;
  }
}

@media (max-width: 680px) {
  .template-nav {
    min-height: 68px;
    padding: 10px 16px;
    gap: 14px;
  }

  .template-brand img {
    height: 36px;
    max-width: 150px;
  }

  .template-picker label {
    display: none;
  }

  .template-picker select {
    max-width: 180px;
  }

  .template-intro {
    min-height: 590px;
    padding: 100px 24px 64px;
  }

  .template-intro h1 {
    font-size: clamp(3.4rem, 16vw, 5.2rem);
  }

  .template-intro__facts {
    gap: 20px;
    margin-top: 48px;
  }

  .template-intro__facts span {
    width: 100%;
  }

  .template-component-label,
  .apple-template .section-container,
  .apple-template .container,
  .apple-template .container-wide,
  .apple-template .why-header,
  .apple-template .why-nav {
    width: min(100% - 32px, 1280px);
  }

  .template-component-label {
    padding-top: 22px;
  }

  .apple-template .hero,
  .apple-template .hero-text {
    min-height: 720px;
  }

  .apple-template .hero-text {
    padding: 100px 22px 70px;
  }

  .apple-template .hero h1 {
    font-size: clamp(3.7rem, 17vw, 5.5rem);
  }

  .apple-template .service-card.card--has-photo {
    min-height: 360px;
    padding: 30px;
  }

  .apple-template .service-card:not(.card--has-photo) {
    min-height: 280px;
    padding: 28px;
  }

  .apple-template .why-section {
    padding: 82px 0;
  }

  .apple-template .why-header {
    display: block;
  }

  .apple-template .why-header h2 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .apple-template .why-header > a {
    display: inline-flex;
    margin-top: 24px;
  }

  .apple-template .why-carousel-wrapper {
    padding: 0 16px;
  }

  .apple-template .why-card {
    min-height: 490px;
    padding: 30px 28px 0;
  }

  .apple-template .why-card-visual {
    margin-inline: -28px;
  }

  .template-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .template-component,
  .apple-template .service-card,
  .apple-template .service-card img,
  .apple-template .why-card,
  .apple-template .why-card-plus {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}
