/* ==========================================
   HIG WEBSITE — PREMIUM EXPERIENCE LAYER v18
   Subtle motion, trust signals, photo polish,
   premium CTAs, navigation indicator, mobile polish
========================================== */

/* Page transitions */
body {
  transition: opacity .22s ease, transform .22s ease;
}
body.premium-loaded main {
  animation: higPageIn .42s ease both;
}
body.page-leaving {
  opacity: .88;
  transform: translateY(3px);
}
@keyframes higPageIn {
  from { opacity: .92; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
[data-hig-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .62s cubic-bezier(.22,.61,.36,1),
    transform .62s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--hig-reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-hig-reveal="left"] { transform: translateX(-18px); }
[data-hig-reveal="right"] { transform: translateX(18px); }
[data-hig-reveal].is-revealed {
  opacity: 1;
  transform: translate(0,0);
}

/* Active navigation indicator */
@media (min-width: 1021px) {
  .main-nav { position: relative; }
  .main-nav a::after { display: none; }
  .nav-active-indicator {
    position: absolute;
    left: 0;
    bottom: 31px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
    box-shadow: 0 2px 8px rgba(205,160,108,.28);
    transform: translateX(0);
    transition: transform .28s ease, width .28s ease, opacity .22s ease;
    pointer-events: none;
    opacity: .96;
  }
}

/* Photo hover polish */
.premium-photo-hover {
  transition: transform .42s cubic-bezier(.22,.61,.36,1),
              box-shadow .42s ease,
              border-color .42s ease,
              filter .42s ease;
  transform-origin: center;
}
@media (hover: hover) and (pointer: fine) {
  .premium-photo-hover:hover {
    transform: scale(1.035);
    box-shadow: 0 24px 56px rgba(24,50,74,.16), 0 0 0 1px rgba(205,160,108,.42);
    filter: saturate(1.025) contrast(1.015);
  }
  .service-pillar:hover,
  .training-area-card:hover,
  .expertise-item:hover,
  .philosophy-item:hover {
    border-color: rgba(205,160,108,.78);
  }
  .service-pillar:hover::before,
  .training-area-card:hover::before,
  .expertise-item:hover::before {
    transform: scale(1.045);
  }
}

/* Homepage trust signals — deliberately no fabricated metrics */
.home-trust {
  position: relative;
  overflow: hidden;
  padding: 34px 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(205,160,108,.09), transparent 25%),
    linear-gradient(180deg, #FCF9F5 0%, #F8F2EB 100%);
  border-top: 1px solid rgba(205,160,108,.20);
  border-bottom: 1px solid rgba(205,160,108,.22);
}
.home-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0;
}
.home-trust-item {
  position: relative;
  z-index: 1;
  min-height: 132px;
  padding: 16px 34px 20px;
  border-radius: 14px;
  transition: transform .3s ease, background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.home-trust-item + .home-trust-item {
  border-left: 1px solid rgba(173,143,108,.24);
}
.home-trust-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.home-trust-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 28px;
  padding: 3px 11px;
  border: 1px solid rgba(205,160,108,.46);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,251,246,.96), rgba(205,160,108,.10));
  color: var(--gold-dark);
  box-shadow: 0 4px 14px rgba(88,66,40,.035);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 1.05px;
  text-transform: uppercase;
  white-space: nowrap;
}
.home-trust-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(205,160,108,.20);
  border-radius: 50%;
  background: rgba(255,255,255,.42);
  color: rgba(173,143,108,.88);
  transition: transform .3s ease, background-color .3s ease, color .3s ease;
}
.home-trust-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-trust-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
}
.home-trust-item p {
  max-width: 390px;
  min-height: 42px;
  margin: 0;
  color: var(--grey);
  font-size: 14px;
  line-height: 1.58;
}
.home-trust-item::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: 0;
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transform: scaleX(.62);
  transform-origin: left;
  opacity: .82;
  transition: transform .35s ease, width .35s ease, opacity .35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .home-trust-item:hover {
    z-index: 2;
    transform: translateY(-3px);
    background: rgba(255,255,255,.36);
    box-shadow: 0 12px 30px rgba(24,50,74,.075);
  }
  .home-trust-item:hover .home-trust-icon {
    transform: translateY(-1px) rotate(-2deg);
    background: rgba(205,160,108,.11);
    color: var(--gold-dark);
  }
  .home-trust-item:hover::after {
    transform: scaleX(1);
    width: 82px;
    opacity: 1;
  }
}

/* Animated process line — Assess → Design → Implement → Monitor → Improve */
.about-process-row {
  --process-progress: 0;
  grid-template-columns: repeat(5, minmax(0,1fr));
}
.about-process-row::before {
  background: rgba(205,160,108,.24) !important;
  height: 2px !important;
}
.about-process-row::after {
  content: "";
  position: absolute;
  left: 7%;
  top: 46px;
  width: calc(86% * var(--process-progress));
  height: 2px;
  z-index: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #AD8F6C 0%, #CDA06C 58%, #DFC3A3 100%);
  box-shadow: 0 0 12px rgba(205,160,108,.26);
  transition: width .12s linear;
}
.about-process-item.process-passed .about-process-circle {
  border-color: #FFF;
  box-shadow: 0 0 0 2px #CDA06C, 0 14px 30px rgba(24,50,74,.16);
}

/* Premium photographic CTAs — unique, previously unused assets */
.about-page-cta,
.services-page-cta {
  isolation: isolate;
}
.about-page-cta::before,
.services-page-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}
.about-page-cta::after,
.services-page-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12,27,39,.95) 0%, rgba(24,50,74,.88) 56%, rgba(24,50,74,.68) 100%),
    radial-gradient(circle at 82% 26%, rgba(205,160,108,.18), transparent 28%);
}
.about-page-cta::before { background-image: url("assets/training-final-2.webp"); background-position: center 58%; }
.services-page-cta::before { background-image: url("assets/training-final-3.webp"); background-position: center 44%; }
.about-page-cta,
.services-page-cta {
  background: #12222E !important;
  border-top: 3px solid #CDA06C;
}
.about-page-cta span,
.services-page-cta span { color: #DFC3A3 !important; }
.about-page-cta h2,
.services-page-cta h2 { color: #FFFFFF !important; text-shadow: 0 2px 24px rgba(0,0,0,.18); }
.about-page-cta .about-page-cta-inner,
.services-page-cta .services-page-cta-inner { position: relative; z-index: 2; }

/* Mobile polish: 390px–430px and adjacent widths */
@media (max-width: 760px) {
  [data-hig-reveal="left"],
  [data-hig-reveal="right"] { transform: translateY(14px); }

  .home-trust { padding: 18px 0; }
  .home-trust-grid { grid-template-columns: 1fr; }
  .home-trust-item {
    min-height: 0;
    padding: 18px 6px 22px;
    border-radius: 10px;
  }
  .home-trust-item + .home-trust-item {
    border-left: 0;
    border-top: 1px solid rgba(173,143,108,.20);
  }
  .home-trust-top { margin-bottom: 9px; }
  .home-trust-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .home-trust-mark { font-size: 11px; }
  .home-trust-item strong { font-size: 21px; }
  .home-trust-item p { min-height: 0; font-size: 14px; line-height: 1.55; }
  .home-trust-item::after { left: 6px; }

  .about-process-row { grid-template-columns: 1fr; }
  .about-process-row::before,
  .about-process-row::after { display: none; }

  .about-page-cta::after,
  .services-page-cta::after {
    background: linear-gradient(90deg, rgba(12,27,39,.96), rgba(24,50,74,.82));
  }
}

@media (min-width: 390px) and (max-width: 430px) {
  .container { width: min(90%, var(--container)); }
  .header-content { min-height: 82px; gap: 12px; }
  .logo { width: min(270px, 74vw); }
  .mobile-menu-btn { flex: 0 0 auto; }
  .hero-content { padding-left: 5vw; padding-right: 5vw; }
  .hero-buttons { gap: 10px; }
  .btn { min-height: 48px; padding-left: 18px; padding-right: 18px; }
  .service-pillar,
  .training-area-card { border-radius: 14px; }
  .expertise-item { border-radius: 14px; }
  .about-page-cta,
  .services-page-cta,
  .training-page-cta { padding-left: 0; padding-right: 0; }
}

@media (max-width: 389px) {
  .header-content { min-height: 78px; }
  .logo { width: min(244px, 72vw); }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body,
  body.premium-loaded main,
  [data-hig-reveal],
  .nav-active-indicator,
  .premium-photo-hover,
  .about-process-row::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  [data-hig-reveal] { opacity: 1 !important; }
}

/* Tablet process layout: keep the animated connector only on a single row. */
@media (min-width: 761px) and (max-width: 850px) {
  .about-process-row { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px 18px; }
  .about-process-row::before,
  .about-process-row::after { display: none; }
}

/* ==========================================
   v17 — MOBILE SERVICE CARD POLISH
   Cleaner hierarchy for 390–430px phones:
   smaller headings, tighter rhythm, no orphan
   separator dots, translation-safe tag rows.
========================================== */
@media (max-width: 430px) {
  .service-pillar {
    padding: 128px 22px 22px;
    border-radius: 16px;
  }

  .service-pillar::before {
    height: 114px;
  }

  .service-pillar::after {
    top: 111px;
    left: 22px;
    width: 42px;
  }

  .service-pillar-top {
    margin-bottom: 14px;
  }

  .service-pillar-icon {
    width: 50px;
    height: 50px;
    box-shadow: 0 8px 18px rgba(24,50,74,.13);
  }

  .service-pillar-icon svg {
    width: 23px;
    height: 23px;
  }

  .service-pillar h3 {
    max-width: none;
    margin-bottom: 10px;
    font-size: clamp(21px, 5.8vw, 23px);
    line-height: 1.18;
    letter-spacing: -.15px;
  }

  .service-pillar > p {
    margin-bottom: 16px;
    font-size: 14.5px;
    line-height: 1.58;
  }

  .service-tags {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 2px;
    padding-top: 12px;
  }

  .service-tags span {
    display: block;
    position: relative;
    margin: 0;
    padding: 7px 0 7px 16px;
    border-bottom: 1px solid rgba(173,143,108,.13);
    font-size: 14.5px !important;
    font-weight: 750;
    line-height: 1.38;
  }

  .service-tags span::after {
    display: none;
  }

  .service-tags span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #CDA06C;
    box-shadow: 0 0 0 3px rgba(205,160,108,.10);
  }

  .service-tags span:last-child {
    border-bottom: 0;
    padding-bottom: 3px;
  }

  html[dir="rtl"] .service-tags span {
    margin: 0;
    padding: 7px 16px 7px 0;
  }

  html[dir="rtl"] .service-tags span::before {
    left: auto;
    right: 0;
  }

  /* Training title is the longest of the four core pillars. */
  .service-pillar--training h3 {
    font-size: clamp(20.5px, 5.55vw, 22.5px);
  }
}

@media (max-width: 370px) {
  .service-pillar {
    padding-left: 19px;
    padding-right: 19px;
  }

  .service-pillar h3,
  .service-pillar--training h3 {
    font-size: 20px;
  }

  .service-pillar > p,
  .service-tags span {
    font-size: 14px !important;
  }
}



/* ==========================================
   v18 — PRODUCTION / ACCESSIBILITY POLISH
========================================== */
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(205,160,108,.78);
  outline-offset: 3px;
}

@media (max-width: 1020px) {
  body.mobile-menu-open { overflow: hidden; }
  .mobile-menu-btn[aria-expanded="true"] {
    border-color: rgba(205,160,108,.72);
    box-shadow: 0 10px 28px rgba(24,50,74,.15), 0 0 0 1px rgba(205,160,108,.14);
  }
}

@media (max-width: 430px) {
  /* Prevent translated content from forcing horizontal overflow. */
  .service-pillar,
  .training-area-card,
  .expertise-item,
  .contact-form-wrapper,
  .contact-side,
  .detail-value-card {
    min-width: 0;
  }

  .service-pillar h3,
  .service-pillar > p,
  .service-tags span,
  .training-area-card h3,
  .expertise-item h3 {
    overflow-wrap: anywhere;
  }
}


/* ==========================================
   v24 — TRUST SECTION PREMIUM UPLIFT
========================================== */
.home-trust {
  padding: 38px 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(205,160,108,.11), transparent 24%),
    radial-gradient(circle at 88% 86%, rgba(205,160,108,.07), transparent 20%),
    linear-gradient(180deg, #FDFBF8 0%, #F7F0E7 100%);
}

.home-trust-grid {
  gap: 18px;
}

.home-trust-item {
  min-height: 172px;
  padding: 24px 26px 22px;
  border: 1px solid rgba(205,160,108,.16);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,252,248,.82));
  box-shadow: 0 10px 26px rgba(24,50,74,.05);
  overflow: hidden;
}

.home-trust-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(205,160,108,.08), transparent 42%);
  opacity: .78;
  pointer-events: none;
}

.home-trust-item + .home-trust-item {
  border-left: 1px solid rgba(205,160,108,.16);
}

.home-trust-top {
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.home-trust-icon {
  order: 0;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(205,160,108,.30);
  background: linear-gradient(180deg, rgba(255,253,250,.98), rgba(205,160,108,.16));
  color: var(--gold-dark);
  box-shadow: 0 10px 22px rgba(205,160,108,.16);
}

.home-trust-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.65;
}

.home-trust-mark {
  order: 1;
  min-width: 0;
  min-height: 30px;
  padding: 5px 12px;
  border-color: rgba(205,160,108,.34);
  background: rgba(255,251,246,.92);
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.15px;
}

.home-trust-item strong {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-size: 22.5px;
  font-weight: 500;
  letter-spacing: -.01em;
}

.home-trust-item p {
  position: relative;
  z-index: 1;
  max-width: 100%;
  min-height: 48px;
  color: #556273;
  font-size: 14px;
  line-height: 1.68;
}

.home-trust-item::after {
  left: 26px;
  bottom: 0;
  width: 50px;
  height: 3px;
  transform: scaleX(.72);
  background: linear-gradient(90deg, #c69355 0%, #dfbb8d 100%);
  box-shadow: 0 0 16px rgba(205,160,108,.18);
}

@media (hover: hover) and (pointer: fine) {
  .home-trust-item:hover {
    transform: translateY(-5px);
    background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(250,244,236,.94));
    box-shadow: 0 18px 34px rgba(24,50,74,.095);
    border-color: rgba(205,160,108,.28);
  }

  .home-trust-item:hover .home-trust-icon {
    transform: translateY(-1px) scale(1.04);
    background: linear-gradient(180deg, rgba(255,253,250,1), rgba(205,160,108,.22));
    box-shadow: 0 12px 24px rgba(205,160,108,.22);
  }

  .home-trust-item:hover .home-trust-mark {
    background: rgba(205,160,108,.10);
    border-color: rgba(205,160,108,.46);
  }

  .home-trust-item:hover::after {
    width: 92px;
  }
}

html[dir="rtl"] .home-trust-top {
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .home-trust-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-trust-item + .home-trust-item {
    border-left: 1px solid rgba(205,160,108,.16);
  }
}

@media (max-width: 430px) {
  .home-trust {
    padding: 24px 0;
  }

  .home-trust-item {
    min-height: 0;
    padding: 18px 18px 18px;
    border-radius: 18px;
  }

  .home-trust-top {
    gap: 10px;
    margin-bottom: 12px;
  }

  .home-trust-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .home-trust-icon svg {
    width: 20px;
    height: 20px;
  }

  .home-trust-mark {
    font-size: 10.5px;
    padding: 5px 11px;
  }

  .home-trust-item strong {
    font-size: 21px;
  }

  .home-trust-item p {
    min-height: 0;
    font-size: 14px;
    line-height: 1.62;
  }

  .home-trust-item::after {
    left: 18px;
  }
}


/* ==========================================
   v28 — CUSTOM 404 PAGE
========================================== */
.error-main {
  min-height: 58vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(205,160,108,.13), transparent 24%),
    linear-gradient(180deg, #FCF9F5 0%, #F7F0E7 100%);
}

.error-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 118px) 0;
  border-top: 1px solid rgba(205,160,108,.18);
  border-bottom: 1px solid rgba(205,160,108,.22);
}

.error-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  align-items: center;
  gap: clamp(42px, 7vw, 96px);
}

.error-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.error-eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.8px;
}

.error-number {
  position: absolute;
  top: -74px;
  left: -12px;
  z-index: -1;
  color: rgba(205,160,108,.095);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(132px, 16vw, 250px);
  line-height: .9;
  letter-spacing: -.06em;
  user-select: none;
}

.error-copy h1 {
  max-width: 650px;
  margin: 0 0 18px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.025em;
}

.error-copy p {
  max-width: 650px;
  margin: 0;
  color: #5B6673;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.72;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 30px;
}

.error-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  text-decoration: none;
}

.error-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(205,160,108,.72);
  transition: color .25s ease, border-color .25s ease, transform .25s ease;
}

.error-secondary:hover {
  color: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateX(3px);
}

.error-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
}

.error-visual::before,
.error-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(205,160,108,.26);
}

.error-visual::before {
  width: 286px;
  height: 286px;
}

.error-visual::after {
  width: 220px;
  height: 220px;
  background: rgba(255,255,255,.45);
  box-shadow: 0 24px 60px rgba(24,50,74,.08);
}

.error-mark {
  position: relative;
  z-index: 2;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 66px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.error-visual span {
  position: absolute;
  z-index: 3;
  width: 158px;
  height: 3px;
  transform: rotate(-10deg);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold-dark) 18%, var(--gold-light) 82%, transparent);
  box-shadow: 0 2px 12px rgba(205,160,108,.22);
}

html[dir="rtl"] .error-number {
  left: auto;
  right: -12px;
}

html[dir="rtl"] .error-secondary:hover {
  transform: translateX(-3px);
}

@media (max-width: 860px) {
  .error-shell {
    grid-template-columns: 1fr;
  }

  .error-visual {
    display: none;
  }

  .error-hero {
    padding: 72px 0 78px;
  }
}

@media (max-width: 430px) {
  .error-hero {
    padding: 58px 0 64px;
  }

  .error-number {
    top: -44px;
    font-size: 126px;
  }

  .error-copy h1 {
    font-size: 38px;
  }

  .error-copy p {
    font-size: 15px;
  }

  .error-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .error-primary,
  .error-secondary {
    width: 100%;
    justify-content: center;
  }
}
