/* ==========================================================================
   Delphi Software — udelphi.com Conception
   Fixed left sidebar · Checkerboard 50/50 panels · Deep navy palette
   ========================================================================== */

/* --------------------------------------------------------------------------
   Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --navy:    #0b1d3a;
  --navy-2:  #0e2348;
  --blue:    #155ca4;
  --blue-lt: #2681de;
  --white:   #ffffff;
  --off:     #f5f6f8;
  --text:    #2c3a4a;
  --muted:   #6b7a8d;
  --rule:    #dde2ea;

  --sidebar: 140px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img    { display: block; max-width: 100%; }
a      { color: inherit; text-decoration: none; }
ul     { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 {
  font-family: 'Outfit', system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.1;
}


/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }


/* ============================================================
   SIDEBAR NAV  (fixed left column — matches udelphi.com)
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0 2rem;
  border-right: 1px solid var(--rule);
  background: var(--white);
}

.sidebar-logo {
  display: block;
  padding: 0 1rem;
  margin-bottom: auto;
}
.sidebar-logo img {
  width: 32px;
  height: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.sidebar-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  padding: 0.45rem 0.5rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.sidebar-link:hover,
.sidebar-link.active { color: var(--navy); font-weight: 600; }

.sidebar-socials {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0 0.5rem;
}
.sidebar-socials a img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.45);
  transition: filter 0.2s ease;
}
.sidebar-socials a:hover img { filter: grayscale(0) opacity(1); }


/* Mobile nav bar (hidden on desktop) */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}
.topbar-logo img { width: 28px; height: auto; }
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--navy);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-overlay {
  position: fixed; inset: 0; z-index: 299;
  background: rgba(11,29,58,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-overlay.visible { opacity: 1; pointer-events: auto; }
.mobile-drawer-inner {
  display: flex; flex-direction: column;
  height: 100%; padding: 1.5rem 2rem 2.5rem; gap: 2rem; overflow-y: auto;
}
.mobile-drawer-header { display: flex; align-items: center; justify-content: space-between; }
.drawer-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 2px; color: #fff;
  transition: background 0.2s ease;
}
.drawer-close:hover { background: rgba(255,255,255,0.1); }
.mobile-nav-links { display: flex; flex-direction: column; }
.mobile-nav-links li a {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 2rem; font-weight: 700;
  color: rgba(255,255,255,0.6);
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}
.mobile-nav-links li a:hover { color: #fff; }
.mobile-socials { display: flex; gap: 1rem; margin-top: auto; }
.mobile-socials a img { width: 22px; filter: brightness(0) invert(1) opacity(0.5); transition: opacity 0.2s ease; }
.mobile-socials a:hover img { opacity: 1; }


/* ============================================================
   PAGE SHELL — content offset by sidebar
   ============================================================ */
.page-content {
  margin-left: var(--sidebar);
}


/* ============================================================
   CHECKERBOARD CELL — base 50/50 split
   ============================================================ */
.cb-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
}

/* image fills its cell */
.cb-img {
  position: relative;
  overflow: hidden;
  min-height: 50vw;
}
.cb-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* text content cell */
.cb-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 7rem) clamp(2.5rem, 5vw, 6rem);
}

/* Navy dark cell */
.cb-navy { background: var(--navy); }
.cb-navy .cb-text { background: var(--navy); }
.cb-navy-2 { background: var(--navy-2); }
.cb-navy-2 .cb-text { background: var(--navy-2); }

/* White / off-white cell */
.cb-white .cb-text { background: var(--white); }
.cb-off .cb-text   { background: var(--off); }

/* Flipped: text left, image right — just swap order */
.cb-row.flipped .cb-text  { order: 1; }
.cb-row.flipped .cb-img   { order: 2; }


/* ============================================================
   HERO
   ============================================================ */
#home.hero-row {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-img-cell {
  position: relative;
  overflow: hidden;
}
.hero-img-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  animation: kb 14s ease-out forwards;
}
@keyframes kb {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

.hero-text-cell {
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(3rem, 6vw, 7rem) clamp(2.5rem, 5vw, 6rem);
  gap: 1.5rem;
}

.hero-logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.hero-logo-wrap img { width: 180px; height: auto; }
.hero-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  font-style: italic;
}

.hero-body {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  color: var(--text);
  line-height: 1.75;
  max-width: 42ch;
}


/* ============================================================
   ABOUT — "Shaping Digital Future" text cell + navy image
   ============================================================ */
.about-text-cell {
  background: var(--white) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 7rem) clamp(2.5rem, 5vw, 6rem);
  gap: 1.5rem;
}

.cell-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cell-headline {
  font-size: clamp(1.75rem, 3vw, 3rem);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.cell-body {
  font-size: clamp(0.9375rem, 1vw, 1.0625rem);
  color: var(--text);
  line-height: 1.8;
  max-width: 52ch;
}

/* Stat row inside text cell */
.cell-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}
.cell-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cell-stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.04em;
  line-height: 1;
}
.cell-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* navy image cell with blue overlay tint */
.navy-img-cell {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  min-height: 50vw;
}
.navy-img-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: luminosity;
  opacity: 0.55;
}
.navy-img-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(21,92,164,0.45) 0%, rgba(11,29,58,0.8) 100%);
  pointer-events: none;
}


/* ============================================================
   DARK CELL — "30 Years of Excellence" / "400+ Professionals"
   ============================================================ */
.dark-text-cell {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 7rem) clamp(2.5rem, 5vw, 6rem);
  gap: 1.5rem;
}
.dark-text-cell .cell-headline { color: #fff; }
.dark-text-cell .cell-body     { color: rgba(255,255,255,0.65); }
.dark-text-cell .cell-label    { color: rgba(255,255,255,0.4); }


/* ============================================================
   PARTNERS
   ============================================================ */
.partners-section {
  background: var(--white);
  border-top: 1px solid var(--rule);
  padding: clamp(4rem, 7vw, 8rem) clamp(2.5rem, 5vw, 6rem);
}

.partners-header {
  max-width: 620px;
  margin-bottom: 3.5rem;
}
.partners-header h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.75rem);
  font-weight: 800;
  color: var(--blue);
  margin: 0.5rem 0 1rem;
}
.partners-sub {
  font-size: clamp(0.9375rem, 1vw, 1.0625rem);
  color: var(--muted);
  line-height: 1.75;
}

/* Marquee */
.logo-ticker {
  overflow: hidden;
  padding: 0.5rem 0;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  display: flex; flex-direction: column; gap: 1.5rem;
}
.logo-ticker:hover .logo-row { animation-play-state: paused; }

@keyframes marquee-fwd  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes marquee-rev  { from { transform: translateX(-50%); } to { transform: translateX(0); }    }
@keyframes marquee-left { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes marquee-right{ from { transform: translateX(-50%); } to { transform: translateX(0); }    }

.logo-row {
  display: flex; gap: 3.5rem; align-items: center;
  padding: 0.5rem 0; width: max-content;
}
.logo-row--left  { animation: marquee-fwd  32s linear infinite; }
.logo-row--right { animation: marquee-rev  26s linear infinite; }
.logo-row .logo-item { flex-shrink: 0; }
.logo-row .logo-item img {
  height: 26px; width: auto; max-width: 120px;
  filter: grayscale(100%) opacity(0.35);
  transition: filter 0.3s ease; display: block;
}
.logo-row .logo-item:hover img { filter: grayscale(0%) opacity(1); }
.logo-grid { display: none; }


/* ============================================================
   STORIES — Horizontal scroll track
   ============================================================ */
.stories-wrapper {
  background: var(--white);
  border-top: 1px solid var(--rule);
}

.stories-intro {
  padding: clamp(4rem, 7vw, 8rem) clamp(2.5rem, 5vw, 6rem) clamp(1.5rem, 3vw, 3rem);
}
.stories-intro .section-eyebrow { margin-bottom: 0.5rem; }
.stories-intro h2 {
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-weight: 800; color: var(--navy); letter-spacing: -0.03em;
}

.section-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}

.stories-track-outer  { height: 600vh; position: relative; }
.stories-track-sticky {
  position: sticky; top: 0;
  height: 100dvh; overflow: hidden;
  border-top: 1px solid var(--rule);
}
.stories-track {
  display: flex; width: 600vw; height: 100%; will-change: transform;
}

/* Story panels mirror the checkerboard: image left + navy right, then flip */
.story-panel {
  width: 100vw; flex-shrink: 0; height: 100%;
  display: grid; grid-template-columns: 50fr 50fr;
}
.story-panel.story-flipped {
  grid-template-columns: 50fr 50fr;
  direction: rtl;
}
.story-panel.story-flipped > * { direction: ltr; }

.story-slider-panel {
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem; overflow: hidden;
}

.story-content-panel {
  background: var(--navy);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}

.story-panel-inner {
  position: relative; z-index: 1;
  padding: clamp(2.5rem, 4.5vw, 5.5rem);
  display: flex; flex-direction: column; gap: 1.25rem;
}

.panel-index {
  position: absolute; right: 2rem; bottom: -1rem;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(8rem, 15vw, 18rem);
  font-weight: 800;
  color: rgba(255,255,255,0.04);
  pointer-events: none; z-index: 0;
  letter-spacing: -0.04em; line-height: 1;
}
.story-panel-inner h2 {
  font-size: clamp(1.75rem, 2.5vw, 3rem);
  font-weight: 800; color: #fff;
  letter-spacing: -0.03em; line-height: 1.05;
}
.story-panel-inner p {
  font-size: clamp(0.9375rem, 1vw, 1.0625rem);
  color: rgba(255,255,255,0.6); line-height: 1.75; max-width: 42ch;
}

.stories-progress-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,0.1); z-index: 10;
}
.stories-progress-fill {
  height: 100%; background: var(--blue-lt); width: 0%;
  transition: width 0.1s linear;
}
.stories-category-ui {
  position: absolute; top: 1.5rem; left: 2rem; z-index: 10;
  display: flex; align-items: center; gap: 0.75rem;
}
.stories-current-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}


/* ============================================================
   SLIDER ENGINE
   ============================================================ */
.slider-container {
  width: 100%; max-width: 480px;
  overflow: hidden; position: relative;
}
.slides {
  display: flex;
  transition: transform 0.5s var(--ease-out);
  touch-action: pan-y pinch-zoom;
  user-select: none; -webkit-user-select: none;
}

.slide {
  min-width: 100%; flex-shrink: 0;
  background: var(--white);
  border-radius: 6px;
  border: 1px solid var(--rule);
  overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
  will-change: transform;
}
.slide:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(11,29,58,0.12);
}

.slide-image-container {
  position: relative; overflow: hidden; aspect-ratio: 3/2;
}
.slide-image-container > img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease; display: block;
}
.slide:hover .slide-image-container > img { transform: scale(1.04); }

.slide-image { width: 100%; height: 100%; position: relative; }
.slide-image::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(11,29,58,0.72);
  opacity: 0; transition: opacity 0.3s ease; z-index: 1;
}
.slide-image::after {
  content: url(../assets/read_more.svg);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.3s ease; z-index: 2;
  width: clamp(7rem, 8vw, 9rem);
}
.slide:hover .slide-image::before,
.slide:hover .slide-image::after { opacity: 1; }
.slide:hover .slide-image > img { filter: blur(2px); }

.slide-image-container span {
  position: absolute; bottom: 0.75rem; left: 1rem;
  color: #fff; font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; z-index: 2;
}

.slide-content {
  padding: 1.25rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1;
}
.slide-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.0625rem; font-weight: 700;
  color: var(--navy); letter-spacing: -0.02em; line-height: 1.25;
}
.slide-description {
  font-size: 0.875rem; color: var(--muted); line-height: 1.65;
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; overflow: hidden;
}
.slide-date {
  font-family: 'DM Sans', sans-serif; font-size: 0.6875rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue);
}

/* Nav dots */
.navigation {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding-top: 1.125rem;
}
.nav-dot {
  height: 5px; width: 5px; border-radius: 100px;
  background: var(--rule); cursor: pointer; flex-shrink: 0;
  transition: width 0.3s ease, background 0.3s ease;
}
.nav-dot.active { width: 20px; background: var(--blue); }


/* ============================================================
   NEWS
   ============================================================ */
.news-section {
  background: var(--white);
  border-top: 1px solid var(--rule);
  padding: clamp(4rem, 7vw, 8rem) clamp(2.5rem, 5vw, 6rem);
  display: flex; flex-direction: column; align-items: center; gap: 3.5rem;
}

.section-header { text-align: left; max-width: 640px; width: 100%; }
.section-header h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800; color: var(--navy);
  margin: 0.4rem 0 0.6rem; letter-spacing: -0.03em;
}
.section-sub { font-size: clamp(0.9375rem, 1vw, 1.0625rem); color: var(--muted); line-height: 1.7; }

.news-section .slider-container {
  max-width: clamp(480px, 60vw, 720px); width: 100%;
  border-top: 1px solid var(--rule);
}
.news-section .slide {
  flex-direction: row; cursor: default;
  border-radius: 0; border: none;
  border-bottom: 1px solid var(--rule);
  box-shadow: none; background: var(--white);
  padding: 1.75rem 0; align-items: flex-start; gap: 0;
}
.news-section .slide:hover { transform: none; box-shadow: none; }
.news-section .slide-image-container {
  width: 112px; height: 112px; flex-shrink: 0;
  aspect-ratio: unset; border-radius: 6px;
  overflow: hidden; margin-right: 1.25rem;
}
.news-section .slide-image-container > img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 6px;
}
.news-section .slide-content { padding: 0; gap: 0.35rem; }
.news-section .slide-title { font-size: 1.0625rem; color: var(--navy); }
.news-section .slide-description { -webkit-line-clamp: 4; color: var(--text); }
.news-section .slide-image::before,
.news-section .slide-image::after { display: none; }


/* ============================================================
   CAREERS
   ============================================================ */
.careers-section {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: clamp(4rem, 7vw, 8rem) clamp(2.5rem, 5vw, 6rem);
  display: flex; flex-direction: column; align-items: center; gap: 3.5rem;
}

.careers-section .section-header { width: 100%; }
.careers-section .section-header h2 { color: #fff; }
.careers-section .section-sub      { color: rgba(255,255,255,0.5); }
.careers-section .section-eyebrow  { color: rgba(255,255,255,0.35); }

.careers-section .slider-container { max-width: min(100%, 1200px); width: 100%; overflow: visible; }

.slides[data-multi-slide="true"] {
  display: flex; gap: 1rem; overflow: visible;
  transition: transform 0.5s var(--ease-out);
}
.slides[data-multi-slide="true"] .slide {
  flex: 0 0 auto; min-width: unset;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; box-shadow: none; cursor: pointer;
  position: relative;
  transition: background 0.2s ease, transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.slides[data-multi-slide="true"] .slide:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.slides[data-multi-slide="true"] .slide .slide-title       { color: #fff; }
.slides[data-multi-slide="true"] .slide .slide-description { color: rgba(255,255,255,0.5); }
.slides[data-multi-slide="true"] .slide::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(21,92,164,0.82); opacity: 0;
  transition: opacity 0.3s ease; z-index: 1; border-radius: 10px;
}
.slides[data-multi-slide="true"] .slide::after {
  content: url(../assets/read_more.svg);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.3s ease; z-index: 2;
  width: clamp(7rem, 8vw, 9rem);
}
.slides[data-multi-slide="true"] .slide:hover::before,
.slides[data-multi-slide="true"] .slide:hover::after { opacity: 1; }
.slides[data-multi-slide="true"] .slide .slide-content { transition: filter 0.3s ease; }
.slides[data-multi-slide="true"] .slide:hover .slide-content { filter: blur(2px); }
.careers-section .nav-dot { background: rgba(255,255,255,0.25); }
.careers-section .nav-dot.active { background: #fff; width: 20px; }


/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 400;
  background: var(--white); overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.modal.open { transform: translateY(0); }
body.modal-open { overflow: hidden; }

.modal-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--navy);
  padding: clamp(1.75rem, 2.5vw, 2.5rem) clamp(1.5rem, 3vw, 3rem); overflow: hidden;
}
.modal-header-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; max-width: 860px; margin: 0 auto;
}
.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.125rem, 1.75vw, 1.75rem);
  font-weight: 700; color: #fff; letter-spacing: -0.02em; line-height: 1.2;
}
.close-modal {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.25); border-radius: 2px; color: #fff;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, background 0.2s ease;
}
.modal.open .close-modal { opacity: 1; pointer-events: auto; }
.close-modal:hover { background: rgba(255,255,255,0.12); }

.modal-content { max-width: 860px; margin: 0 auto; padding: clamp(2rem, 3vw, 3.5rem) clamp(1.5rem, 3vw, 3rem); }
.modal-body {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}
.modal.open .modal-body { opacity: 1; transform: translateY(0); }
.modal-text p { font-size: 1rem; color: var(--text); line-height: 1.8; margin-bottom: 1rem; word-wrap: break-word; }
.modal-text ul { margin: 0.75rem 0 1rem 1.5rem; list-style: disc; }
.modal-text li { font-size: 1rem; color: var(--text); line-height: 1.65; margin-bottom: 0.375rem; }
.modal-text strong { color: var(--navy); }
.modal-text a { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--blue); font-size: 1rem; transition: opacity 0.2s ease; }
.modal-text a:hover { opacity: 0.75; }
.modal-text a img { width: 2rem; }
.modal-text .margin-2rem { margin-top: 2rem; }


/* --------------------------------------------------------------------------
   Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 2px; }


/* ============================================================
   RESPONSIVE — ≤ 1100px
   ============================================================ */
@media (max-width: 1100px) {
  :root { --sidebar: 110px; }

  /* Checkerboard: collapse to stacked */
  .cb-row {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .cb-row.flipped .cb-text,
  .cb-row.flipped .cb-img { order: unset; }
  .cb-img, .navy-img-cell { min-height: 55vw; }

  #home.hero-row { grid-template-columns: 1fr; min-height: auto; }
  .hero-img-cell { order: -1; min-height: 55vw; }

  .story-panel { grid-template-columns: 1fr; direction: ltr !important; }
  .story-panel.story-flipped { direction: ltr !important; }
  .story-panel .story-content-panel { order: -1; }
}


/* ============================================================
   RESPONSIVE — Mobile ≤ 768px
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .topbar  { display: flex; }
  .page-content { margin-left: 0; padding-top: 56px; }

  .hero-text-cell { padding: 2.5rem 1.5rem 3rem; }
  .hero-logo-wrap img { width: 150px; }
  .hero-body { font-size: 1rem; }

  .about-text-cell,
  .dark-text-cell,
  .cb-text { padding: 2.5rem 1.5rem; }

  .cell-headline { font-size: clamp(1.5rem, 6vw, 2.25rem); }

  .partners-section { padding: 3rem 1.5rem; }
  .partners-header  { margin-bottom: 2.5rem; }

  .stories-intro { padding: 3rem 1.5rem 1.5rem; }
  .stories-track-outer  { height: auto; }
  .stories-track-sticky { position: static; height: auto; overflow: visible; }
  .stories-track        { flex-direction: column; width: 100%; transform: none !important; }
  .story-panel          { width: 100%; height: auto; grid-template-columns: 1fr; direction: ltr !important; }
  .story-panel .story-content-panel { order: -1; }
  .story-panel .story-slider-panel  { padding: 1.5rem 1.25rem 2rem; }
  .story-panel-inner    { padding: 2rem 1.5rem; }
  .story-panel-inner h2 { font-size: clamp(1.375rem, 6vw, 2rem); }
  .panel-index          { display: none; }
  .stories-category-ui  { display: none; }
  .stories-progress-bar { display: none; }
  .slider-container     { max-width: 100%; }

  .news-section  { padding: 3rem 1.5rem; align-items: flex-start; }
  .section-header { max-width: none; }
  .news-section .slider-container { max-width: 100%; }
  .news-section .slide { flex-direction: column; padding: 1.5rem 0; }
  .news-section .slide-image-container {
    width: 100%; height: 180px; border-radius: 6px;
    margin-right: 0; margin-bottom: 1rem; aspect-ratio: unset;
  }

  .careers-section { padding: 3rem 1.5rem; align-items: flex-start; }
  .modal-header  { padding: 1.5rem 1.25rem; }
  .modal-content { padding: 1.5rem 1.25rem; }
}
