/* ============================================================================
   Mobile Touch & Selection Polish
   ============================================================================ */

/* Remove blue tap highlight on mobile Chrome (Android) */
a,
button,
[role="button"],
input,
textarea,
select,
summary,
label {
  -webkit-tap-highlight-color: transparent;
}

/* Theme-matched text selection */
::selection{
  background: rgba(31,63,191,.25);
  color: #0b1224;
}
::-moz-selection{
  background: rgba(31,63,191,.25);
  color: #0b1224;
}

/* Prevent long-press callout on images */
img{
  -webkit-touch-callout: none;
}


/* ============================================================================
   CSS Custom Properties (Design Tokens)
   ============================================================================ */
:root{
  /* Brand Colors */
  --blue: #1f3fbf;
  --blue2: #0b2fa6;

  /* Background Colors */
  --paper: #eef2f8;
  --paper2: #e8eef7;

  /* Text Colors */
  --ink: #0b1224;
  --muted: rgba(11,18,36,.74);

  /* Border Colors */
  --border: rgba(11,18,36,.12);

  /* Shadow & Geometry */
  --shadow: 0 18px 70px rgba(2,6,23,.12);

  /* Spacing */
  --section-gap: 48px;

  /* Border Radius */
  --radius-sm: 12px;
  --radius: 18px;
  --radius2: 26px;

  /* Layout */
  --max: 1040px;
  --scroll-pad: 92px;

  /* Typography */
  --font-body: "Inter", "InterFallback", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --font-head: "Manrope", "ManropeFallback", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* ============================================================================
   Font Fallbacks
   ============================================================================ */
/* Custom font fallbacks with size and metric adjustments to match web fonts
   during loading, preventing layout shift (FOUT/FOIT). */
@font-face{
  font-family: "InterFallback";
  src: local("Segoe UI"), local("Helvetica Neue"), local("Arial");
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 107%;
}

@font-face{
  font-family: "ManropeFallback";
  src: local("Segoe UI Semibold"), local("Segoe UI"), local("Helvetica Neue"), local("Arial");
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 105%;
}

/* ============================================================================
   Base Styles
   ============================================================================ */
*{ box-sizing:border-box; }

/* Scroll behavior: auto prevents smooth scrolling on anchor links.
   Scroll padding accounts for sticky header height (set via JS). */
html{ scroll-behavior: auto; scroll-padding-top: var(--scroll-pad); }

body{
  margin:0;
  overflow-x:hidden;
  font-family: var(--font-body);
  color: var(--ink);
  position: relative;

  /* Layered background gradients for depth */
  background:
    radial-gradient(1200px 700px at 18% -12%, rgba(31,63,191,.22), transparent 60%),
    radial-gradient(900px 560px at 92% 8%, rgba(31,63,191,.14), transparent 62%),
    linear-gradient(180deg, #eef3fb 0%, #e8eff9 100%);
}

/* Subtle decorative strata bands overlay */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events:none;
  z-index: 0;
  opacity: .08;
  background:
    linear-gradient(115deg,
      rgba(11,18,36,.18) 0%,
      transparent 18%,
      rgba(11,18,36,.14) 32%,
      transparent 52%,
      rgba(11,18,36,.10) 70%,
      transparent 100%);
  filter: blur(0.2px);
}

/* Topography SVG overlay */
.topo-bg{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.20;
  filter: blur(0.15px);
  mix-blend-mode: multiply;
}

/* Keep SVG stroke consistent across sizes */
.topo-bg path{
  stroke: #1f3fbf;
  stroke-opacity: 0.55;
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

body > *{ position: relative; z-index: 1; }

img{ max-width:100%; display:block; }
a{ color: inherit; }
.icon{ width: 18px; height: 18px; flex: 0 0 auto; }

/* ============================================================================
   Utility Classes
   ============================================================================ */

/* Screen reader only: visually hidden but accessible to assistive tech */
.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Container: centered content with max-width */
.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* Anchor point for "back to top" navigation */
.top-anchor{ position:absolute; top:0; left:0; }

/* Skip link: hidden until focused for keyboard navigation */
.skip-link{
  position:absolute;
  left:-9999px;
  top:10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(11,18,36,.18);
  box-shadow: 0 18px 50px rgba(2,6,23,.16);
  z-index: 9999;
}
.skip-link:focus{ left: 14px; }

:where(a, button, input, textarea, select, [tabindex]):focus-visible{
  outline: 3px solid rgba(31,63,191,.46);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(31,63,191,.12);
}

:where(.btn, .nav-cta, .cbtn, .iconbtn, .dot, .footer-contact, .backtop):focus-visible{
  background: rgba(31,63,191,.10);
}

/* ============================================================================
   Header
   ============================================================================ */
.header{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(238,242,248,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(11,18,36,.10);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 10px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  min-width: 0;
}

.brand-logo{
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(2,6,23,.14));
}

.brand-name{
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: rgba(11,18,36,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
}

.nav{ display:flex; align-items:center; gap: 12px; }

.nav-cta{
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(31,63,191,.22);
  background: rgba(31,63,191,.10);
  color: rgba(11,47,166,.94);
  font-weight: 800;
  cursor: pointer;
}

.header-accent{
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--blue) 18%, rgba(31,63,191,.45) 55%, transparent 100%);
}

/* ============================================================================
   Hero Section
   ============================================================================ */
.hero{
  padding: calc(var(--section-gap) + 8px) 0 var(--section-gap);
  position: relative;
}

.hero::after{
  content:"";
  position:absolute;
  inset: -40px 0 0 0;
  pointer-events:none;
  background: radial-gradient(900px 360px at 40% 10%, rgba(255,255,255,.68), transparent 70%);
  opacity: .55;
  z-index: 0;
}

.hero-inner{
  position: relative;
  z-index: 1;
  display:grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: center;
}

.hero-mark{
  display:flex;
  justify-content: center;
  align-items: center;
}

.hero-logo{
  width: min(380px, 90%);
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 22px 46px rgba(2,6,23,.18));
}

.hero-content{
  padding: 22px;
  border-radius: var(--radius2);
  background:
    radial-gradient(900px 420px at 18% 0%, rgba(31,63,191,.16), transparent 60%),
    rgba(255,255,255,.76);

  /* replace border with inset "border" */
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(11,18,36,.10) inset;

  min-width: 0;

  /* reduce 1px seam on transform */
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

@media (hover:hover) and (pointer:fine){
  .hero-content:hover{
    transform: translateY(-2px);
    box-shadow:
      0 22px 80px rgba(2,6,23,.14),
      0 0 0 1px rgba(31,63,191,.20) inset;
  }
}

.title{
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.title::after{
  content:"";
  display:block;
  width: 104px;
  height: 4px;
  border-radius: 999px;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--blue), rgba(31,63,191,.20));
}

.lede{
  margin: 0;
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.66;
  max-width: 72ch;
}

/* Chips */
.hero-chips{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.chip{
  display:inline-flex;
  align-items:center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(11,18,36,.12);
  background: rgba(255,255,255,.62);
  color: rgba(11,18,36,.74);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Experience card */
.hero-card{
  margin-top: 16px;
  background:
    radial-gradient(700px 260px at 12% 0%, rgba(31,63,191,.14), transparent 58%),
    rgba(255,255,255,.86);
  border: 1px solid rgba(11,18,36,.12);
  border-radius: 20px;
  padding: 16px;
}

.eyebrow{
  margin: 0 0 12px;
  color: rgba(11,18,36,.88);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  display:flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.eyebrow-badge{
  display:inline-flex;
  align-items:center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(31,63,191,.10);
  border: 1px solid rgba(31,63,191,.22);
  color: rgba(11,47,166,.95);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.clean-list{
  margin: 0;
  padding-left: 18px;
  color: rgba(11,18,36,.76);
}
.clean-list li{ margin: 8px 0; }

/* ============================================================================
   Sections
   ============================================================================ */
.section{ padding: var(--section-gap) 0; }

.section + .section{
  border-top: 1px solid rgba(11,18,36,.08);
}

.section + .section.section-alt{
  border-top: 0;
}

.section-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

h2{
  margin: 0;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.rule{
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(31,63,191,.55), rgba(31,63,191,.14), transparent);
  margin-left: 14px;
  transform: translateY(-3px);
  mask-image: linear-gradient(90deg, black 0%, black 75%, transparent 100%);
}

/* ============================================================================
   Services Section
   ============================================================================ */
.services-grid{
  display:grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 14px;
}

.services-grid > .service-card:first-child{ grid-row: span 2; }

.service-card{
  position: relative;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(11,18,36,.12);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 12px 38px rgba(2,6,23,.09);
}

.service-card::before{
  content:"";
  position:absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(31,63,191,.55), rgba(31,63,191,.10));
  opacity: .65;
}

.service-card h3{
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.service-card ul{
  margin: 0;
  padding-left: 18px;
  color: rgba(11,18,36,.74);
  line-height: 1.62;
}
.service-card li{ margin: 8px 0; }

/* ============================================================================
   Gallery Section
   ============================================================================ */
/* Full-width treatment (no inset card) */
.section.section-alt{
  position: relative;
  background: transparent;
  border-top: 0;
}

/* Soft full-width panel behind Gallery content */
.section.section-alt::before{
  content:"";
  position:absolute;
  inset: 0;
  background: rgba(255,255,255,.14);
  mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 88%, transparent 100%);
  pointer-events:none;
  z-index: 0;
}

/* Keep content above the panel */
.section.section-alt .container{
  position: relative;
  z-index: 1;
}

/* ============================================================================
   Carousel
   ============================================================================ */
/* Main carousel container */
.carousel{
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(11,18,36,.12);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow: hidden;
  outline: 1px solid rgba(31,63,191,.10);
}

.carousel-frame{
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, rgba(11,18,36,.12), rgba(11,18,36,.03));
  border-bottom: 1px solid rgba(11,18,36,.10);

  border-radius: calc(var(--radius2) - 1px) calc(var(--radius2) - 1px) 0 0;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  touch-action: pan-y;
}

.carousel-track{
  height: 100%;
  display:flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar{ display:none; }

.carousel-track:focus-visible {
  outline: 3px solid rgba(31,63,191,.5);
  outline-offset: 4px;
}

.slide{
  flex: 0 0 100%;
  min-width: 100%;
  margin: 0;
  position: relative;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.slide img{ width: 100%; height: 100%; object-fit: cover; }

.carousel-overlay{
  position:absolute;
  inset: 0;
  pointer-events:none;
  background:
    radial-gradient(700px 260px at 30% 10%, rgba(255,255,255,.08), transparent 65%),
    radial-gradient(900px 380px at 60% 120%, rgba(0,0,0,.22), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.00) 55%, rgba(0,0,0,.32) 100%);
}

.slide figcaption{
  position: absolute;
  left: 16px;
  bottom: 14px;
  margin: 0;
  display: inline-block;
  width: fit-content;
  max-width: min(72ch, calc(100% - 32px));
  color: rgba(255,255,255,.94);
  font-size: 13px;
  line-height: 1.35;
  text-shadow: 0 8px 26px rgba(0,0,0,.45);
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(6px);
}

.carousel-ui{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 14px 10px;
  background: rgba(255,255,255,.56);
}

.cbtn{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(31,63,191,.22);
  background: rgba(31,63,191,.06);
  color: var(--blue);
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.cbtn.ghost{
  width: 84px;
  height: 44px;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
  border-radius: 16px;
  color: rgba(11,18,36,.78);
  border-color: rgba(11,18,36,.14);
  background: rgba(255,255,255,.58);
}

.cbtn.ghost[data-toggle] {
  cursor: pointer;
  transition:
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.cbtn.ghost[data-toggle]:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.85),
    0 0 0 4px rgba(0, 0, 0, 0.35);
}

/* Only apply hover + active feedback on devices that support hover */
@media (hover: hover) and (pointer: fine) {
  .cbtn.ghost[data-toggle]:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }

  .cbtn.ghost[data-toggle]:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  }
}

.dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 6px;
  flex: 1;
  flex-wrap: nowrap;
  padding: 0;
}

.dot{
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;

  display: grid;
  place-items: center;
}

.dot::after{
  content:"";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(11,18,36,.18);
  background: rgba(255,255,255,.60);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.dot[aria-current="true"]::after{
  background: var(--blue);
  border-color: rgba(31,63,191,.35);
  transform: scale(1.12);
}

.progress{ height: 3px; background: rgba(31,63,191,.10); }
.progress-bar{ height: 100%; width: 0%; background: linear-gradient(90deg, var(--blue), rgba(31,63,191,.55)); }

/* ============================================================================
   Buttons
   ============================================================================ */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(31,63,191,.22);
  background: rgba(31,63,191,.10);
  color: rgba(11,47,166,.94);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: normal;
  text-align: center;
}

.btn.btn-ghost{
  background: rgba(255,255,255,.70);
  border-color: rgba(11,18,36,.14);
  color: rgba(11,18,36,.78);
}

.btn.btn-primary{
  background: rgba(31,63,191,.16);
  border-color: rgba(31,63,191,.26);
  color: rgba(11,47,166,.96);
}

/* ============================================================================
   Footer
   ============================================================================ */
.footer{
  border-top: 1px solid rgba(11,18,36,.10);
  padding: 18px 0 20px;
  margin: 0;
  color: rgba(11,18,36,.62);
  font-size: 13px;
  background: rgba(255,255,255,.52);
  backdrop-filter: blur(6px);
}

.footer-inner{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-actions{
  display:flex;
  gap: 14px;
  align-items: center;
}

.footer-contact{
  font: inherit;
  cursor: pointer;
  padding: 0;
  background: transparent;
  border: 0;
  color: rgba(11,18,36,.72);
  border-bottom: 1px solid rgba(11,18,36,.22);
}

.footer-contact:hover{
  color: var(--blue2);
  border-bottom-color: rgba(31,63,191,.45);
}

.backtop{
  text-decoration:none;
  color: rgba(11,18,36,.72);
  border-bottom: 1px solid rgba(11,18,36,.22);
}
.backtop:hover{
  color: var(--blue2);
  border-bottom-color: rgba(31,63,191,.45);
}

/* ============================================================================
   Modal Dialogs
   ============================================================================ */
/* Prevent body scroll when modal is open */
body.modal-open{ overflow: hidden; }

.modal{
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal[hidden]{ display:none; }

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(8px);
}

.modal-panel{
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 28px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;

  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(900px 420px at 20% 0%, rgba(31,63,191,.20), transparent 60%),
    rgba(255,255,255,.95);
  box-shadow: 0 34px 110px rgba(2,6,23,.48);
}

.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(11,18,36,.10);
}

.modal-kicker{
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(11,18,36,.58);
}

.modal-title{
  margin: 0;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.iconbtn{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(11,18,36,.18);
  background: rgba(255,255,255,.80);
  color: rgba(11,18,36,.74);
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  box-shadow: 0 10px 26px rgba(2,6,23,.10);
  transition: background 160ms ease, transform 160ms ease, box-shadow 180ms ease, border-color 160ms ease;
}
.iconbtn:hover{
  background: rgba(31,63,191,.10);
  border-color: rgba(31,63,191,.26);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(2,6,23,.14);
}
.iconbtn:active{ transform: translateY(0px); }

.modal-body{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px 18px 18px;
}

.modal-primary,
.modal-details{
  background: rgba(255,255,255,.80);
  border: 1px solid rgba(11,18,36,.10);
  border-radius: 22px;
  padding: 14px;
}

.modal-primary .btn{
  width: 100%;
  justify-content: center;
}
.modal-primary .btn + .btn{ margin-top: 10px; }

.modal-status{
  margin: 10px 0 0;
  min-height: 18px;
  color: rgba(11,18,36,.62);
  font-size: 13px;
}

.detail-row{
  display:grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 10px 0;
}
.detail-row + .detail-row{ border-top: 1px solid rgba(11,18,36,.08); }

.detail-label{
  color: rgba(11,18,36,.72);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.detail-link{
  color: var(--blue2);
  text-decoration: none;
  border-bottom: 1px solid rgba(31,63,191,.25);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.detail-link:hover{ border-bottom-color: rgba(31,63,191,.55); }

.modal-foot{
  padding: 10px 18px 16px;
  border-top: 1px solid rgba(11,18,36,.10);
  background: rgba(255,255,255,.70);
}

.modal-hint{
  color: rgba(11,18,36,.62);
  font-size: 13px;
}

/* Image viewer modal: single column layout */
.image-modal-body{
  grid-template-columns: 1fr;
}

.image-modal-primary{
  padding: 12px;
}

.image-modal-toolbar{
  display:flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.image-modal-media{
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(11,18,36,.10);
  background: rgba(255,255,255,.75);
}

.image-modal-media img{
  width: 100%;
  height: auto;
  display: block;
}

.image-modal-caption{
  margin: 0 0 8px;
  color: rgba(11,18,36,.78);
  line-height: 1.55;
}

.hint-mobile{ display: none; }

/* ============================================================================
   Hover Effects
   ============================================================================ */
/* Only apply hover effects on devices that support hover */
@media (hover:hover) and (pointer:fine){
  .btn,
  .nav-cta{ transition: background 140ms ease, box-shadow 160ms ease; }

  .btn:hover{ background: rgba(31,63,191,.14); box-shadow: 0 10px 26px rgba(2,6,23,.09); }
  .btn.btn-ghost:hover{ background: rgba(255,255,255,.86); }
  .btn.btn-primary:hover{ background: rgba(31,63,191,.20); }

  .nav-cta:hover{
    background: rgba(31,63,191,.14);
    box-shadow: 0 10px 26px rgba(2,6,23,.09);
  }

  .cbtn{ transition: background 140ms ease; }
  .cbtn:hover{ background: rgba(31,63,191,.12); }
  .cbtn.ghost:hover{ background: rgba(255,255,255,.70); }

  .carousel-frame{ cursor: grab; }
  .carousel-frame:active{ cursor: grabbing; }

  .hero-content,
  .service-card,
  .carousel,
  .modal-primary,
  .modal-details{
    transition: transform 160ms ease, box-shadow 200ms ease, background 160ms ease, border-color 160ms ease;
  }

  .service-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 22px 80px rgba(2,6,23,.14);
    border-color: rgba(31,63,191,.20);
  }

  .hero-content:hover{
    transform: translateY(-2px);
    box-shadow:
      0 22px 80px rgba(2,6,23,.14),
      0 0 0 1px rgba(31,63,191,.20) inset;
  }

  .carousel:hover{
    transform: translateY(-1px);
    box-shadow: 0 24px 90px rgba(2,6,23,.16);
    border-color: rgba(31,63,191,.18);
  }
}

/* ============================================================================
   Responsive Breakpoints
   ============================================================================ */
@media (max-width: 980px){
  .services-grid{ grid-template-columns: 1fr; }
  .services-grid > .service-card:first-child{ grid-row: auto; }

  .hero-inner{ grid-template-columns: 1fr; align-items: start; }
  .hero-mark{ justify-content: center; }
  .hero-logo{ width: min(360px, 92%); }

  .modal-body{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .hint-desktop{ display: none; }
  .hint-mobile{ display: inline; }
}

@media (max-width: 560px){
  .brand-name{ max-width: 56vw; }
  .brand-logo{ height: 40px; }

  .carousel-ui{ gap: 8px; padding: 10px 12px 10px; }
  .cbtn{ width: 42px; height: 42px; border-radius: 14px; }
  .cbtn.ghost{ width: 78px; }
  .dot::after{ width: 10px; height: 10px; }
  .slide figcaption{ left: 12px; bottom: 12px; padding: 9px 10px; border-radius: 14px; }

  .dots{ display: none; }
}

@media (max-width: 420px){
  .modal{ padding: 12px; }
  .modal-panel{ border-radius: 22px; max-height: calc(100vh - 18px); }
  .modal-head{ padding: 16px 14px 10px; }
  .modal-body{ padding: 12px 14px 14px; gap: 12px; }

  .detail-row{
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .detail-label{
    font-size: 12px;
    opacity: .9;
  }
}

/* ============================================================================
   Accessibility: Reduced Motion
   ============================================================================ */
@media (prefers-reduced-motion: reduce){
  .carousel-track{ scroll-behavior: auto; }
}

/* ============================================================================
   Carousel: Crossfade Stack (JavaScript-Controlled)
   ============================================================================ */
/* These styles override the default scroll-based carousel behavior.
   JavaScript manages crossfade transitions by toggling .is-active class. */

.carousel-track{
  /* Disable scrolling behavior for the carousel area */
  overflow: hidden !important;
  overflow-x: hidden !important;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  -webkit-overflow-scrolling: auto !important;

  /* Crossfade stack: all slides positioned absolutely, only active one visible */
  position: relative;
  height: 100% !important;
}

.slide{
  position: absolute !important;
  inset: 0;
  margin: 0 !important;
  min-width: 100% !important;
  height: 100% !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}

.slide.is-active{
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce){
  .slide{ transition: none; }
}
