/* =========================================================
   Spirezen — Consolidated CSS (class-only)
   - 90vw fluid up to 1100px cap
   - Clean Mission/Vision alignment
   - iPad-safe grids, no overflow, consistent box-sizing
   ========================================================= */

/* ==============
   Global & utils
   ============== */
.page {

  color: #f5f7fb;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  box-sizing: border-box;
}

.container {
  width: 90%;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
  box-sizing: border-box;
}

.section {
  padding-block: clamp(20px, 4vw, 48px);
  box-sizing: border-box;
}

.text-accent {
  color: #e8aa56;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  opacity: .85;
  margin-bottom: .25rem;
}

/* =========
   Typography
   ========= */
.h1 {
  font-size: clamp(2rem, 2.2rem + 1.8vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 .6rem;
}

.h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  line-height: 1.12;
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1rem, .95rem + .4vw, 1.125rem);
  max-width: 700px;
  opacity: .9;
  margin: 0 0 1rem;
}

.body {
  font-size: 1rem;
  line-height: 1.65;
  opacity: .95;
}

.signature {
  font-weight: 700;
  margin-top: .5rem;
}

/* ====
   HERO
   ==== */
.section-hero .hero-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  box-sizing: border-box;
}

.section-hero .hero-image {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border-radius: 20px;
  padding: clamp(12px, 2vw, 18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.section-hero .hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  max-width: 100%;
}

.section-hero .hero-text {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(232, 170, 86, .25);
  border-radius: 20px;
  padding: clamp(16px, 3vw, 24px);
  backdrop-filter: blur(6px);
  box-sizing: border-box;
}

/* ========
   SERVICES
   ======== */
.section-services {
  padding-block: clamp(20px, 4vw, 40px);
}

.section-services .service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
  align-items: stretch;
}

.section-services .card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  min-height: clamp(260px, 30vw, 300px);
  padding: clamp(16px, 2.5vw, 22px);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  text-decoration: none;
  color: #f5f7fb;
  overflow: hidden;
  isolation: isolate;
}

/* --- FIXED LOGO ALIGNMENT AREA --- */
.section-services .card-logo {
  width: clamp(90px, 9vw, 120px);
  height: clamp(90px, 9vw, 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.section-services .card-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Hover State */
@media (hover:hover) {

  .section-services .card:hover,
  .section-services .card:focus-visible {
    border-color: rgba(232, 170, 86, .45);
  }

  .section-services .card:hover::before,
  .section-services .card:focus-visible::before {
    box-shadow: inset 0 0 0 1px rgba(232, 170, 86, .45), inset 0 -26px 38px rgba(0, 0, 0, 0.25);
  }
}

.section-services .card-title {
  font-size: clamp(1.05rem, .95rem + .35vw, 1.25rem);
  margin: .2rem 0;
  color: #fff;
}

.section-services .card-text {
  font-size: .95rem;
  line-height: 1.55;
  opacity: .95;
  color: #dfe3ec;
}

@media(max-width: 768px) {
  .section-services .service-grid {
    grid-template-columns: 1fr;
  }
}


/* ============
   MISSION/VISION
   ============ */
.section-mission,
.section-vision {
  width: 90%;
  margin-inline: auto;
  padding-block: clamp(24px, 4vw, 40px);
  box-sizing: border-box;
}

.mission-container,
.vision-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  align-items: stretch;
  /* equal column height */
  width: 100%;
  box-sizing: border-box;
}

.mission-image,
.vision-image {
  overflow: hidden;
  border-radius: 12px;
  min-width: 0;
}

.mission-image img,
.vision-image img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.mission-text,
.vision-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: clamp(16px, 2.4vw, 24px);
  min-width: 0;
}

.mission-title,
.vision-title {
  font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem);
  line-height: 1.15;
  margin: 0 0 .4rem;
  color: #fff;
}

.mission-title::before,
.vision-title::before {
  content: attr(data-eyebrow);
  display: block;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #e8aa56;
  margin-bottom: .3rem;
}

.section-mission p,
.section-vision p {
  margin: 0;
  color: #dfe3ec;
  font-size: clamp(.96rem, .92rem + .25vw, 1.06rem);
  line-height: 1.6;
  max-width: 60ch;
}

.section-vision {
  margin-top: 0 !important;
}

/* ===========
   TEAM slider
   =========== */
.section-team {
  padding-top: clamp(18px, 3.5vw, 36px);
  padding-bottom: clamp(18px, 3.5vw, 36px);
  margin-top: -6px;
}

.section-team .carousel {
  position: relative;
  margin-top: 8px;
}

.section-team .carousel-viewport {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.section-team .carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(220px, 45vw, 260px);
  gap: 14px;
  padding: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

.section-team .member {
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-align: center;
  padding: 14px 12px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .25);
  box-sizing: border-box;
}

.section-team .member-img {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 auto 8px;
}

.section-team .member-name {
  margin: 6px 0 2px;
  font-size: 1.05rem;
}

.section-team .member-role {
  margin: 0 0 8px;
  opacity: .9;
  font-size: .95rem;
}

.section-team .linkedin {
  display: inline-grid;
  place-items: center;
}

.section-team .linkedin-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.section-team .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: #ffffff;
  color: #0b0b0c;
  font-size: 1.5rem;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}

.section-team .btn-prev {
  left: -6px;
}

.section-team .btn-next {
  right: -6px;
}

.section-team .carousel-btn:hover,
.section-team .carousel-btn:focus-visible {
  background: #e8aa56;
  color: #ffffff;
  transform: translateY(-50%) scale(1.04);
}

/* ====================
   Responsive controls
   ==================== */

/* Hero returns to single column on mobile */
@media (max-width: 1100px) {
  .section-hero .hero-container {
    grid-template-columns: 1fr;
    max-width: 90vw;
  }
}

/* Services: 2-up mid, 1-up small */
@media (max-width: 900px) and (min-width: 600px) {
  .section-services .service-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 16px;
    row-gap: 22px;
  }
}

@media (max-width: 599px) {
  .section-services .service-grid {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  .section-services .card {
    min-height: 240px;
  }

  .section-services .card-img {
    width: 88px;
  }
}

/* Mission/Vision stacks cleanly on phones */
@media (max-width: 899px) {

  .mission-container,
  .vision-container {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
    width: 90%;
    margin-inline: auto;
  }

  .mission-image img,
  .vision-image img {
    height: auto;
    max-height: none;
  }

  .mission-image,
  .vision-image {
    order: -1;
  }

  /* image first when stacked */
}

/* iPad + small laptops: keep 2 columns */
@media (min-width: 900px) and (max-width: 1366px) {

  .mission-container,
  .vision-container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Small viewport gutters (safe) */
@media (max-width: 640px) {

  .container,
  .section,
  .section-hero .hero-container,
  .section-services,
  .section-mission,
  .section-vision,
  .section-team {
    width: calc(100% - 28px);
    max-width: none;
    padding-left: 14px;
    padding-right: 14px;
  }

  .section-team .carousel-track {
    grid-auto-columns: 82%;
  }

  .section-team .carousel-btn {
    font-size: 1.25rem;
    padding: 7px 9px;
  }

  .section-team .linkedin-icon {
    width: 28px;
    height: 28px;
  }
}

/* Defensive: ensure children don’t force overflow */
.container>*,
.section>*,
.section-hero .hero-container>*,
.section-services .service-grid>* {
  box-sizing: inherit;
  min-width: 0;
}

/* Defensive: images scale inside containers */
.section-hero .hero-image img,
.section-services .card-img,
.mission-image img,
.vision-image img,
.section-team .member-img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}

/* Defensive: remove accidental pseudo layout artifacts */
.container::before,
.container::after,
.section::before,
.section::after,
.page::before,
.page::after {
  content: none;
  display: none;
}

/* ===== Mobile alignment hot-fix (place last) ===== */
@media (max-width: 640px) {

  /* stop double gutters & any horizontal scroll */
  .page {
    overflow-x: hidden;
  }

  /* let sections be full width; keep padding only on .container */
  .section,
  .section-hero .hero-container,
  .section-services,
  .section-mission,
  .section-vision,
  .section-team {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  /* single source of truth for gutters */
  .container {
    width: 100%;
    max-width: none;
    padding-inline: 16px;
    /* 16px x 2 = 32px total gutter */
  }

  /* services grid: single column, no overflow */
  .section-services .service-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 0;
    /* remove any accidental centering offsets */
  }

  .section-services .card {
    width: 100%;
    min-width: 0;
  }

  /* carousel buttons shouldn’t stick outside viewport */
  .section-team .btn-prev {
    left: 6px;
  }

  .section-team .btn-next {
    right: 6px;
  }
}

/* extra safety: never let children force horizontal overflow */
.container>*,
.section>*,
.section-services .service-grid>* {
  min-width: 0;
}

/* optional: keep big shadows without creating scroll on some Android WebViews */
.section-services .card {
  will-change: transform;
  transform: translateZ(0);
}

/* === iPad fix: keep 3-up services grid (place LAST) === */
@media (min-width: 700px) and (max-width: 1100px) {
  .section-services .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    /* override older 2-col rule */
    column-gap: 14px;
    row-gap: 18px;
  }

  /* Slightly tighter card sizing for iPad so 3-up fits comfortably */
  .section-services .card {
    min-height: 240px;
  }

  .section-services .card-img {
    width: clamp(68px, 7vw, 90px);
  }

  .section-services .card-title {
    font-size: clamp(1rem, .9rem + .3vw, 1.1rem);
  }

  .section-services .card-text {
    font-size: .95rem;
  }
}

/* === iPad Fix: Keep Mission & Vision as 2-Column Layout === */
@media (min-width: 700px) and (max-width: 1100px) {

  .mission-container,
  .vision-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 90%;
    margin-inline: auto;
    gap: clamp(16px, 2.5vw, 28px) !important;
  }

  /* Match image + text heights visually */
  .mission-text,
  .vision-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Keep images nicely sized */
  .mission-image img,
  .vision-image img {
    height: clamp(240px, 32vw, 360px);
    object-fit: cover;
  }
}

/* ==== iPad fix: keep HERO 2-column, align heights ==== */
@media (min-width: 700px) and (max-width: 1100px) {
  .section-hero .hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr !important;
    /* override the 1-col rule */
    align-items: stretch;
    /* equal column heights */
    gap: clamp(14px, 3vw, 24px);
    width: 90%;
    margin-inline: auto;
  }

  /* make both panels fill the column height */
  .section-hero .hero-image,
  .section-hero .hero-text {
    height: 100%;
    min-width: 0;
  }

  /* vertically center copy inside the card */
  .section-hero .hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* image scales to column height without distortion */
  .section-hero .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}

/* ==== phones: actually stack ==== */
@media (max-width: 699px) {
  .section-hero .hero-container {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  .section-hero .hero-image {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* === Mobile Hero Width Fix === */
@media (max-width: 699px) {

  /* Let hero follow normal mobile container spacing */
  .section-hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .section-hero .hero-container {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  /* Image block: full width but not edge-to-edge */
  .section-hero .hero-image {
    width: 100%;
    max-width: 500px;
    /* controls clean mobile margin — the main fix */
    margin-inline: auto;
  }

  /* Image itself stays full inside its wrapper */
  .section-hero .hero-image img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: block;
  }

  /* Text block matches same width, centered */
  .section-hero .hero-text {
    width: 100%;
    max-width: 500px;
    /* matches the image width for perfect alignment */
    margin-inline: auto;
    text-align: left;
    /* or center → change if you prefer */
  }
}