/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 8px 16px;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: var(--text-sm);
  z-index: 10000;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: clip;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ===== CUSTOM PROPERTIES ===== */
:root {
  /* Colors */
  --color-bg: #1a1a1a;
  --color-bg-elevated: #242424;
  --color-text: #ffffff;
  --color-text-muted: #999999;
  --color-text-subtle: #666666;
  --color-border: rgba(255, 255, 255, 0.1);

  /* Brand Colors */
  --color-vanguard: #CF002C;
  --color-vanguard-dark: #a01830;
  --color-xero: #2196F3;
  --color-xero-dark: #1976D2;

  /* Typography */
  --font-display: 'Fragment', serif;
  --font-body: 'Montreal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --container-max: 1200px;
  --container-padding: var(--space-md);
  --grid-gap: var(--space-lg);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 800ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-font: 600ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);

  /* Z-index */
  --z-header: 100;
  --z-modal: 200;
}

/* ===== TYPOGRAPHY ===== */
@font-face {
  font-family: 'Fragment';
  src: url('../fonts/fragweb.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
    font-family: 'Montreal';
    src: url('../fonts/PPNeueMontreal-Book.woff2') format('woff2'),
        url('../fonts/PPNeueMontreal-Book.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Montreal';
    src: url('../fonts/PPNeueMontreal-Italic.woff2') format('woff2'),
        url('../fonts/PPNeueMontreal-Italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Montreal';
    src: url('../fonts/PPNeueMontreal-Medium.woff2') format('woff2'),
        url('../fonts/PPNeueMontreal-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  font-variation-settings: 'wght' 200, 'SRFF' 100, 'ital' 0;
}

/* ===== LAYOUT & GRID ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-header);
}

.header__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  transition: padding var(--transition-base);
}

.header__inner {
  position: relative;
  display: block;
  width: 100%;
  padding: 20px 0;
  border-radius: 48px;
  background-color: transparent;
  transition: background-color var(--transition-base), padding var(--transition-base);
}

.header__spacer {
  display: none;
}

.header--sticky .header__container {
  padding: var(--space-sm) var(--container-padding);
}

.header--sticky .header__inner {
  background-color: rgba(26, 26, 26, 0.88);
  padding: 12px 20px;
}

.header--sticky .header__nav {
  right: 20px;
}

.header__name {
  flex-shrink: 0;
  overflow: hidden;
  opacity: 0;
  animation: pageLoad 600ms ease forwards;
}

.header__name-text {
  display: block;
  transform-origin: left top;
  transition: transform var(--transition-base);
}

.header__nav {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.header__link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.header__link:hover {
  color: var(--color-text);
}

.header__link-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}
.header__link-dot::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: white 0px 0px 4px;
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.header__link:hover .header__link-dot::before {
  opacity: 1;
}

.header__link--desktop {
  display: none;
}


/* Main content offset for fixed header */
main {
  padding-top: var(--header-height, 72px);
}

/* ===== INTRO ===== */
.intro {
  padding-bottom: var(--space-md);
}

.intro__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.intro__title, .intro__subtitle, .header__name  {
  font-size: clamp(var(--text-4xl), 8vw, var(--text-5xl));
  margin-bottom: 0;
  line-height: 1.2;
}

.header__name {
  font-size: var(--text-2xl);
}

.intro__subtitle {
  /* font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl));
  color: var(--color-text); */
  margin-bottom: var(--space-lg);
  /* line-height: 1.1; */
}

.intro__title {
  opacity: 0;
  animation: pageLoad 600ms ease 150ms forwards;
}

.intro__subtitle {
  opacity: 0;
  animation: pageLoad 600ms ease 300ms forwards;
}

.intro__tagline {
  font-size: var(--text-lg);
  color: var(--color-text);
  max-width: 500px;
  line-height: 1.6;
}


/* ===== PASSWORD GATE ===== */
.password-gate {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* min-height: 400px; */
  padding: 0px var(--container-padding);
  /* overflow: hidden; */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.password-gate.is-page-visible {
  opacity: 1;
  transform: none;
}

/* Blurred preview background */
.password-gate__preview {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: var(--container-max);
  padding: 0 var(--container-padding);
  filter: blur(10px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  opacity: 0.2;
}

.password-gate__preview-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: var(--space-xl);
  min-height: 200px;
}

.password-gate__preview-bg {
  position: absolute;
  inset: 0;
  background-color: var(--color-vanguard);
  background-image: url('../images/case-studies/vbg2.svg');
  background-size: cover;
  background-position: center top;
}

.password-gate__preview-title {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 10vw, var(--text-6xl));
  font-variation-settings: 'wght' 300, 'SRFF' 0, 'ital' 0;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.password-gate__preview-phone {
  position: absolute;
  bottom: -20px;
  right: var(--space-xl);
  width: 100px;
}

.password-gate__preview-phone img {
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .password-gate__preview-card {
    min-height: 240px;
  }

  .password-gate__preview-phone {
    width: 140px;
    right: 10%;
  }
}

.password-gate__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 400px;
  padding-top:30px;
}
.password-gate__content::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 60%;
  background-color: #FFF;
  filter: blur(60px);
  opacity: 0.15;
  left: 0;
  top:40px;
  border-radius: 50%;
  z-index: -1;
}

.password-gate__text {
  font-size: 1.125rem;
  color: var(--color-text);
  margin-bottom: 24px;
}

.password-gate__form {
  /* display: flex; */
  /* gap: 12px; */
  /* justify-content: center; */
  position: relative;
  /* border: 1px solid var(--color-border); */
}

.password-gate__input {
  padding: 12px 120px 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 25px;
  background: var(--color-bg-elevated);
  color: var(--color-text);
  width: 100%;
  transition: border-color 0.2s;
}

.password-gate__input:focus {
  outline: none;
  border-color: var(--color-text-muted);
}

.password-gate__input.has-error {
  border-color: #ef4444;
  animation: shake 0.4s ease;
}

.password-gate__button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: opacity 0.2s;

  position: absolute;
  right: 4px;
  top: 4px;
}

.password-gate__button:hover {
  opacity: 0.8;
}

.password-gate__button svg {
  stroke: var(--color-bg);
  flex-shrink: 0;
}

.password-gate__error-outer {
  min-height: 33px;
  padding-top: 12px;
}

.password-gate__error {
  color: #ef4444;
  font-size: var(--text-sm);
}

.password-gate__checkbox-label, .password-gate__error {
  letter-spacing: 0.02em;
}

/* Show password checkbox */
.password-gate__show-password {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px;
  cursor: pointer;
}

.password-gate__show-password input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.password-gate__checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid var(--color-text-muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s, border-color 0.2s;
  padding-left: 1px;
}

.password-gate__checkbox::after {
  content: '';
  width: 10px;
  height: 6px;
  border: 2px solid var(--color-bg);
  border-top: none;
  border-right: none;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
  transition: opacity 0.2s;
}

.password-gate__show-password input:checked + .password-gate__checkbox {
  background: var(--color-text);
  border-color: var(--color-text);
}

.password-gate__show-password input:checked + .password-gate__checkbox::after {
  opacity: 1;
}

.password-gate__show-password input:focus-visible + .password-gate__checkbox {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.password-gate__checkbox-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  user-select: none;
}

/* Loading Spinner */
.password-gate__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.password-gate__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ===== PAGE LOAD SEQUENCE ===== */
@keyframes pageLoad {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.case-study {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.case-study.is-page-visible,
.about.is-page-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .case-study {
    transform: none;
    transition: opacity 200ms ease;
  }
  @keyframes pageLoad {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ===== CASE STUDIES ===== */
.case-studies {
  display: flex;
  flex-direction: column;
  gap: 0; /* No gap - we use negative margins for overlap */
  width: 100%;
}

/* ===== CASE STUDY CARDS ===== */
.case-study {
  position: relative;
  width: 100%;
}

/* Case study stacking */
.case-study:nth-child(2) {
  margin-top: 20px;
  z-index: 1;
}

.case-study:nth-child(3) {
  margin-top: 20px;
  z-index: 2;
}

.case-study.is-expanded:nth-child(1) {
  z-index: 3;
}

.case-study.is-expanded:nth-child(2) {
  z-index: 3;
}

.case-study__card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: visible;
  cursor: pointer;
  /* padding-top: 60px; Space for phone overflow */
  /* cm */
  padding-top: 0px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.case-study__card-bg {
  position: absolute;
  /* top: 60px; */
  /* cm */
  top: 0px;
  left: var(--container-padding);
  right: var(--container-padding);
  bottom: 0;
  border-radius: var(--radius-xl);
  transition: transform var(--transition-base);
}
/* 
.case-study--vanguard .case-study__card-bg {
  background:
    url('../images/case-studies/vbg1.svg') center top / 100% auto no-repeat,
    #CF002C;
} */

.case-study--xero .case-study__card-bg {
  /* background: linear-gradient(135deg, var(--color-xero) 0%, var(--color-xero-dark) 100%); */
  background: linear-gradient(-45deg, #0052B1 0%, #26b1fd 100%);
}

/* Custom animated cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s ease;
}

.custom-cursor svg {
  display: block;
  transition: transform var(--transition-base);
}

.custom-cursor.is-visible {
  opacity: 1;
}

.custom-cursor.is-close svg {
  transform: rotate(45deg);
}

/* Hover effect - desktop only */
@media (hover: hover) {
  .case-study__card:hover .case-study__card-bg {
    transform: scale(1.02);
  }

  .case-study__card {
    cursor: none;
  }
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  .custom-cursor {
    display: none;
  }
}

.case-study__card-content {
  position: relative;
  z-index: 1;
  padding: var(--space-lg);
  padding-top: 0;

  min-height: 180px;
  overflow: hidden;
}
.is-expanded .case-study__card-content {
  overflow: visible;
}

.case-study__header {
  position: relative;
  padding-right: 0px;
  padding-top: var(--space-xl);
  display: grid;
  grid-template-rows: 1fr;
}

/* Xero: phone on left side */
.case-study--xero .case-study__header {
  padding-right: 0;
  /* padding-left: 120px; */
}
.case-study--xero .case-study__title-group {
  /* text-align: right; */
  justify-self: end;
}
.case-study__title-group {
  width: 100%;
}
.case-study__title {
  display: inline-block;
  position: relative;
  padding-bottom: 8px;

}
.case-study__title::after {
  content: '2023–current';
  position: absolute;
  bottom: -20px;
  width: 100%;
  left: 0px;
  font-size: var(--text-base);
  color: var(--color-text);
  font-family: var(--font-body);
  text-align: left;
  letter-spacing: 0;
  padding-right: 2px;
  opacity: 0.7;
}
.case-study--xero .case-study__title::after {
  content: '2021–2023';
  text-align: left;
}
.case-study--xero .case-study__title {
  padding-bottom: 0px;
}



.case-study__title {
  font-size: clamp(var(--text-4xl), 10vw, var(--text-6xl));
  font-variation-settings: 'wght' 300, 'SRFF' 0, 'ital' 0;
  transition: font-variation-settings var(--transition-font);
  line-height: 1;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.03em;
}

/* Variable font animations for expanded state */
.case-study--vanguard.is-expanded .case-study__title {
  font-variation-settings: 'wght' 400, 'SRFF' 100, 'ital' 0;
}

.case-study--xero.is-expanded .case-study__title {
  font-variation-settings: 'wght' 900, 'SRFF' 0, 'ital' 0;
}

.case-study__date {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
}

/* ===== PHONE MOCKUP ===== */
.case-study__phones {
  position: absolute;
  bottom: -35px;
  right: 0;
  width: 100px;
  transition: width var(--transition-slow);
}
.case-study--third .case-study__phones {
  width: 140px;
  border-radius: 0px 0px var(--radius-xl) 0px;
  bottom:0px;
  overflow: hidden;
}

/* Expanded state - larger phone */
.case-study.is-expanded .case-study__phones {
  width: 180px;
}
.case-study.case-study--third.is-expanded .case-study__phones {
  width: 280px;
  bottom:0px;
}
.case-study--third .case-study__highlights {
  margin-bottom: 200px;
}


/* Xero phone on left side */
.case-study--xero .case-study__phones {
  /* right: auto;
  left: 0; */
  bottom: -85px;
}

@media (max-width: 767px) {
  .case-study--xero .case-study__phones {
    bottom: -32px;
    right: 10px;
  }

  .case-study--xero .case-study__highlights {
    margin-bottom: 300px;
  }
}

/* Phone image */
.case-study__phone-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Placeholder styling for empty images */
.case-study__phones:not(:has(img[src]:not([src=""]))) {
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  aspect-ratio: 9 / 19.5;
  border-radius: 16px;
}

/* ===== CASE STUDY TOGGLE ===== */
.case-study__toggle {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--color-text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bg);
  z-index: 10;
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-md);
}
.is-expanded .case-study__toggle {
  position: sticky;
  bottom: 20px;
}

.case-study--vanguard.is-expanded,
.case-study--third.is-expanded {
  margin-bottom: 60px;
}

.case-study.is-expanded .case-study__toggle {
  transform: translateX(-50%) rotate(45deg);
}

.case-study__toggle:hover {
  transform: translateX(-50%) scale(0.92);
}

.case-study.is-expanded .case-study__toggle:hover {
  transform: translateX(-50%) rotate(45deg) scale(0.92);
}

/* Hide toggle button on desktop */
@media (hover: hover) {
  .case-study__toggle {
    display: none;
  }
  .is-expanded .case-study__toggle {
    display: flex;
  }
}

/* ===== CASE STUDY PREVIEW (Expanded card content) ===== */
.case-study__preview {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows var(--transition-slower) ,
    opacity var(--transition-slow) .2s;
  margin-top: var(--space-xl);
}

.case-study__preview > * {
  overflow: hidden;
}


.case-study:nth-child(2) .case-study__preview-inner {
  justify-self: end;
}

.case-study.is-expanded .case-study__preview {
  grid-template-rows: 1fr;
  opacity: 1;
}
.is-collapsing .case-study__preview  {
  transition:
    grid-template-rows var(--transition-slower) ,
    opacity var(--transition-base) 0s;
}

.case-study__subtitle {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  margin-bottom: var(--space-lg);
  line-height: 1.3;
}

.case-study--vanguard .case-study__subtitle {
  font-variation-settings: 'wght' 300, 'SRFF' 70, 'ital' 0;
}

.case-study__highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: 260px;
}

.case-study__highlights li {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.9);
  padding-left: var(--space-md);
  position: relative;
}

.case-study__highlights li::before {
  content: '✴︎';
  position: absolute;
  left: 0;
}

/* ===== CASE STUDY CONTENT (Expanded sections) ===== */
.case-study__content {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows var(--transition-slower),
    opacity var(--transition-slow);
}

.case-study__content > * {
  overflow: hidden;
}

.case-study__section:has(.case-study__carousel) {
  overflow: visible;
}

.case-study__content-inner {
  background: var(--color-bg);
  width: 100%;
}

.case-study.is-expanded .case-study__content {
  grid-template-rows: 1fr;
  opacity: 1;
}

.case-study__section {
  margin-bottom: var(--space-2xl);
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  box-sizing: border-box;
}

.case-study__section:first-child {
  margin-top: var(--space-3xl);
}

.case-study__section:last-child {
  margin-bottom: var(--space-3xl);
}

.case-study__section-title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.case-study__section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
  .case-study__section-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.case-study__section-intro p {
  font-size: var(--text-2xl);
  font-family: var(--font-display);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}
.case-study--vanguard .case-study__section-intro p {
  font-variation-settings: 'wght' 300, 'SRFF' 70, 'ital' 0;
}
.case-study--xero .case-study__section-intro p {
  font-variation-settings: 'wght' 600, 'SRFF' 0, 'ital' 0;
}


.case-study__section-intro p:last-child {
  margin-bottom: 0;
}

.case-study__section-bullets {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.case-study__section-bullets li {
  font-size: var(--text-base);
  color: var(--color-text);
  padding-left: var(--space-lg);
  position: relative;
  line-height: 1.5;
}

.case-study__section-bullets li::before {
  content: '✴︎';
  position: absolute;
  left: 0;
  color: var(--color-text-subtle);
}

/* Figure / Image Placeholders */
.case-study__figure {
  margin-top: var(--space-xl);
}

.case-study__figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

.case-study__figure figcaption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

.case-study__image-placeholder,
.case-study__diagram-placeholder {
  background: var(--color-bg-elevated);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-subtle);
  font-size: var(--text-sm);
}

.case-study__caption {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  margin-top: var(--space-sm);
}

/* ===== LEGACY GRID ===== */
.legacy-grid {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.legacy-grid__item {
  display: flex;
  justify-content: center;
}

.legacy-grid__item--image img {
  max-width: 100px;
  height: auto;
  border-radius: var(--radius-sm);
}

.legacy-grid__item--review {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.legacy-review {
  padding: var(--space-sm);
}

.legacy-review__stars {
  font-family: sans-serif;
  font-size: var(--text-base);
  margin-bottom: var(--space-sm);
}

.legacy-review__stars .star--filled {
  color: var(--color-text);
}

.legacy-review__stars .star--empty {
  color: var(--color-text-subtle);
}

.legacy-review__text {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.4;
}

/* Large mobile: Rows with image and text side by side, alternating */
@media (min-width: 480px) and (max-width: 767px) {
  .legacy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    align-items: center;
  }
  .legacy-grid__item:nth-child(n+3){
    margin-top:-60px;
  }
  .legacy-grid__item--image {
    padding: 20px 20px 0px;
  }
  .legacy-grid__item--image img {
    max-width: 200px;
    width: 100%;
  }
  .legacy-review {
    padding: 0px;
  }

  .legacy-grid__item--review {
    text-align: left;
    justify-content: flex-start;
  }

  /* Default: image left, review right */
  /* Swap for odd pairs (1st, 3rd, 5th): review left, image right */

  /* Pair 1: review left, image right */
  .legacy-grid__item:nth-child(1) { grid-column: 1; grid-row: 1; }
  .legacy-grid__item:nth-child(2) { grid-column: 2; grid-row: 1; }

  /* Pair 2: image left, review right */
  .legacy-grid__item:nth-child(3) { grid-column: 2; grid-row: 2; text-align: left; }
  .legacy-grid__item:nth-child(3) .legacy-review { text-align: left; }
  .legacy-grid__item:nth-child(4) { grid-column: 1; grid-row: 2; }

  /* Pair 3: review left, image right */
  .legacy-grid__item:nth-child(5) { grid-column: 1; grid-row: 3; }
  .legacy-grid__item:nth-child(6) { grid-column: 2; grid-row: 3; }

  /* Pair 4: image left, review right */
  .legacy-grid__item:nth-child(7) { grid-column: 2; grid-row: 4; }
  .legacy-grid__item:nth-child(7) .legacy-review { text-align: left; }
  .legacy-grid__item:nth-child(8) { grid-column: 1; grid-row: 4; }

  /* Pair 5: review left, image right */
  .legacy-grid__item:nth-child(9) { grid-column: 1; grid-row: 5; }
  .legacy-grid__item:nth-child(10) { grid-column: 2; grid-row: 5; }
}

/* Desktop: 5-column grid with overlap */
@media (min-width: 768px) {
  .legacy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto auto;
    row-gap: 0px;
    column-gap: 0px;
    align-items: center;
    padding: 0 var(--space-xl);
    overflow: hidden;
  }

  .legacy-grid__item--image {
    padding: 0 40px;
  }
  .legacy-grid__item--image img {
    max-width: 100%;
    width: 100%;
  }
  

  .legacy-grid__item--review {
    text-align: left;
    justify-content: flex-start;
  }

  /* Row 1 items */
  .legacy-grid__item:nth-child(1) { grid-column: 1; grid-row: 1; }
  .legacy-grid__item:nth-child(2) { grid-column: 2; grid-row: 1; }
  .legacy-grid__item:nth-child(3) { grid-column: 3; grid-row: 1; }
  .legacy-grid__item:nth-child(4) { grid-column: 4; grid-row: 1; }
  .legacy-grid__item:nth-child(5) { grid-column: 5; grid-row: 1; }

  /* Row 2 items */
  .legacy-grid__item:nth-child(6) { grid-column: 1; grid-row: 2; }
  .legacy-grid__item:nth-child(7) { grid-column: 2; grid-row: 2; }
  .legacy-grid__item:nth-child(8) { grid-column: 3; grid-row: 2; }
  .legacy-grid__item:nth-child(9) { grid-column: 4; grid-row: 2; }
  .legacy-grid__item:nth-child(10) { grid-column: 5; grid-row: 2; }

  /* Negative margin for overlap effect */
  .legacy-grid__item:nth-child(-n+5) {
    margin-top: -40px;
  }
  .legacy-grid__item:nth-child(n+6) {
    margin-top: -20px;
    margin-bottom: -20px;
  }

  .legacy-review {
    width: 100%;
    padding: var(--space-md) 0;
    text-align: center;
  }

  .legacy-review__text {
    font-size: var(--text-base);
  }
}

/* ===== CAROUSEL ===== */
.case-study__carousel {
  margin-top: var(--space-xl);
  /* Break out of section padding to full width */
  width: 100vw;
  margin-left: calc(-1 * var(--container-padding));
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  position: relative;
}

/* On larger screens, account for max-width centering */
@media (min-width: 1248px) {
  .case-study__carousel {
    margin-left: calc(-50vw + var(--container-max) / 2);
    left: 0;
    transform: none;
  }
}

.swiper {
  width: 100%;
  overflow: visible;
}

.swiper-slide {
  width: auto;
}

.carousel-slide-placeholder {
  background: var(--color-bg-elevated);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  width: 300px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-subtle);
  font-size: var(--text-sm);
}

@media (min-width: 768px) {
  .carousel-slide-placeholder {
    width: 400px;
    height: 500px;
  }
}

.swiper-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.swiper-pagination {
  position: relative !important;
  margin-top: 0;
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-pagination-bullets.swiper-pagination-horizontal {
  width: auto;
  bottom: auto;
}

.swiper-pagination-bullet {
  background: var(--color-text-muted);
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  background: var(--color-text);
  opacity: 1;
}

.swiper-button-prev,
.swiper-button-next {
  position: static !important;
  margin: 0;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 10px !important;
  font-weight: 700;
  color: var(--color-text);
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: var(--color-surface-raised);
  border-color: var(--color-text-muted);
  transform: scale(0.95);
}

.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.swiper-slide__caption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  max-width: 100%;
}

/* ===== METRICS ===== */
.case-study__metrics {
  margin: var(--space-2xl) 0;
}

.case-study__metric {
  display: flex;
  align-items: start;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.case-study__metric-value {
  font-family: var(--font-display);
  /* font-size: clamp(var(--text-5xl), 15vw, 8rem); */
  font-size: var(--text-5xl);
  line-height: 1;
}
.case-study--vanguard .case-study__metric-value .metric {
  font-variation-settings: 'wght' 400, 'SRFF' 100, 'ital' 0;
  letter-spacing: -0.02em;;
}

.case-study__metric-value--old {
  color: var(--color-text-muted);
}

.case-study__metric-value--new {
  color: var(--color-text);
}

.case-study__metric-arrow {
  font-size: var(--text-3xl);
  color: var(--color-text-subtle);
  margin-top: 10px;
}

.case-study__metric-stars {
  display: flex;
  gap: var(--space-2xl);
}

.stars {
  display: flex;
  gap: 2px;
  padding: var(--space-sm) 0px var(--space-lg);
}

.star {
  font-size: var(--text-sm);
  color: transparent;
}

.star--filled {
  color: var(--color-text);
}

.case-study__metric-value--old .star--filled {
  color: var(--color-text-muted);
}

.case-study__metric-value--old .star--old--partial {
  background: linear-gradient(90deg, var(--color-text-muted) 40%, transparent 40%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.star--new--partial {
  background: linear-gradient(90deg, var(--color-text) 70%, transparent 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric_phone {
  width: 70px;
}
.metric_phone-image {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== PROCESS DIAGRAM ===== */

.diagram-desktop {
  display: none;
}
.diagram-mobile {
  display: block;
  /* width: 100%; */
  display: flex;
  justify-content: center;
}

.process .process-label{
  padding-left: 116px;
}
.items {
  width: 100%;
  display: flex;
  flex-flow: row nowrap;
  align-items:center;
} 
.item {
  position: relative;
  overflow: hidden;
  flex-grow: 1;
  flex-basis:0;
  border-radius: 20px;
  background: #575757;
}
.item::after {
  content: "";
  position: absolute;
  left:0;
  top: auto;
  bottom:0;
  background: #575757;
  background: linear-gradient(180deg, #57575700 0%, #575757 50%);
  width: 100%;
  height: 70%;
  z-index: 1;
}
.item:nth-child(4n)::after {
  bottom: auto;
  top:0;
  background: linear-gradient(180deg, #575757 60%, #57575700 90%);
}
.item::before {
  content: "";
  display: block;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.99) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 0) 90%);
  height: 300px;
  width: 100px;
  transform: translate(0);
  position: absolute;
  animation: rotate 6s linear forwards infinite;
  z-index: 0;
  top: 50%;
  left: 50%;
  margin-left: -50px;
  transform-origin: top center;
}
.item:nth-child(4n)::before{
  animation: rotate 6s linear reverse infinite;
}
.inner {
  position: relative;
  z-index: 2;
  padding: 20px 20px;
  background: #323232;
  color: #FFF;
  border-radius: 20px;
  margin: 1px;
}
.hide {
  display:none;
}
.dot {
  position:relative;
  width:8px;
  height:8px;
  background:#1B1B1B;
  border-radius:50%;
  outline: 3px solid #1b1b1b;
  outline-offset: 0px;
  z-index:3;
  flex-grow: 0;
  flex-shrink: 0;
}
.dot::before {
  content:'';
  display:block;
  width:100%;
  height:100%;
  border-radius:50%;
  background:#FFF;
  animation: fade 6s linear normal infinite;
}
.dot::after {
  content:'';
  position:absolute;
  top:0;
  left:0;
  z-index:-1;
  display:block;
  width:100%;
  height:100%;
/*   background: red; */
  border-radius: 4px;
  box-shadow: 0px 0px 5px 3px rgba(255,255,255,0.9);
  animation: fade 6s linear normal infinite;
}
.dot:first-of-type {
  margin-right:-4px;
}
.dot:last-of-type {
  margin-left:-4px;
}
.dot:nth-of-type(odd)::after, .dot:nth-of-type(odd)::before {
  animation-delay:-3.7s;
}
.dot:nth-of-type(even)::after, .dot:nth-of-type(even)::before {
  animation-delay:-0.7s;
}
.process {
  overflow: hidden;
}
.row1 {
  position:relative;
}
.row2 {
  margin-top:32px;
}
.row2 .item::before {
  animation: rotate 6s linear reverse infinite;
}
.row2 .item:nth-child(4n)::before {
  animation: rotate 6s linear forwards infinite;
}
.row {
  position: relative;
  display: flex;
  flex-flow: row nowrap;
  padding: 0px 96px;
}
.arrow {
  position: absolute;
  top:50%;
  width:90px;
  height:100px;
}
.arrow::before {
  content:'';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid #FFF;
  border-width: 2px 2px 2px 0px;
  border-radius: 0px 50% 50% 0px;
}
.arrow::after {
  content:'';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,rgba(27, 27, 27, .7) 0%, rgba(27, 27, 27, 0) 100%);
}
.arrow svg {
  position: absolute;
  left:-1px;
  bottom:-6.5px;
}
.arrow1 {
  left:0;
  top:-100%;
  transform: scale(-1,1);
  z-index: 3;
}
.arrow1::after {
  background: linear-gradient(180deg, rgb(27 27 27 / 100%) 65%, rgb(27 27 27 / 0%) 100%);
}
.arrow2 {
  right:0;
  left: auto;
}
.arrow3 {
  top: auto;
  left: 0px;
  transform: scale(-1, -1);
  bottom: 50%;
}
.arrow3::after {
  background: linear-gradient(180deg, rgb(27 27 27 / 0%) 0%, rgb(27 27 27 / 100%) 100%);
}
.row2 .dot:nth-of-type(odd)::after, .row2 .dot:nth-of-type(odd)::before {
  animation-delay: -0.7s;
}
.row2 .dot:nth-of-type(even)::after, .row2 .dot:nth-of-type(even)::before {
  animation-delay: -3.7s;
}
.long-term {
  padding: 30px 96px 0px;
  color: #FFF;
}
.process-label {
  padding-left: 20px;
  padding-bottom: 20px;
  color: #FFF;
  font-size: 18px;
}
.long-term .items {
  padding:0px 8px;
}
.long-item {
  flex-grow: 1;
  flex-basis:0;
  position: relative;
  padding: 20px 20px;
  border-radius: 20px;
  min-height: 100px;
  background: #323232;
  background: radial-gradient(circle at 20% -50%, rgba(69, 69, 69, 1) 0%, #323232 100%);
}
.long-item:not(:first-child):not(:last-child) {
  margin:0px 8px;
}
.long-item::before {
  content:'';
  position: absolute;
  height:54px;
  width:2px;
  top:-64px;
  left:50%;
  background-image: linear-gradient(to top, #fff 40%, transparent 30%);
  background-size: 1px 5px;
  background-repeat: repeat-y;
  animation: bg 10s linear infinite;
}
.long-item .dot {
  position: absolute;
  top:-4px;
  left:50%;
}
.long-item .dot::before {
  animation: none;
  
}
.long-item .dot::after {
  animation:none;
  opacity: 0.5;
}
@keyframes rotate {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}
@keyframes fade {
  0% {
    opacity: 0.4;
  }
  80% {
    opacity: 0.4;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}
@keyframes bg {
  from { background-position: 0 0; }
  to { background-position: 0 100%; }
}

/* ===== ABOUT ===== */
.about {
  padding: var(--space-xl) var(--container-padding);
  padding-top: var(--space-xl);
  max-width: var(--container-max);
  margin: 0 auto;
  margin-top: var(--space-xl);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease, transform 500ms ease;
}

@media (min-width: 768px) {
  .about {
    padding-top: var(--space-3xl);
  }
}

.about__title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.about__single-col {
  width: 100%;
}

@media (min-width: 768px) {
  .about__single-col {
    max-width: calc(50% - var(--space-xl) / 2);
    margin: 0 auto;
  }
}

.about__intro p {
  font-size: var(--text-2xl);
  font-family: var(--font-display);
  font-variation-settings: 'wght' 300, 'SRFF' 70, 'ital' 0;
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

.about__intro p:last-child {
  margin-bottom: 0;
}

.about__body {
  margin-top: 16px;
}

@media (min-width: 768px) {
  .about__body {
    margin-top: 24px;
  }
}

.about__body p {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.about__body p:last-child {
  margin-bottom: 0;
}

.about__contact {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.about__photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.about__contact-label {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: var(--space-xs);
}

.about__contact-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.about__contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.about__contact-link:hover {
  color: var(--color-text);
}

.about__contact-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  flex-shrink: 0;
}

.about__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
  .about__content {
    grid-template-columns: 1fr 1fr;
  }
}

.about__bio p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.about__bio p:last-child {
  margin-bottom: 0;
}

.about__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
}

.about__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about__list li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.about__list strong {
  color: var(--color-text);
  font-weight: 500;
}

/* AI Section */
.about__ai {
  margin-top: var(--space-3xl);
  position: relative;
}

.about__ai-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-variation-settings: 'wght' 300, 'SRFF' 70, 'ital' 0;
  color: var(--color-text);
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.about__ai-title-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg);
  padding: 0 var(--space-md) 0 var(--space-sm);
}

.about__ai-title svg {
  flex-shrink: 0;
}

.about__ai-container {
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  padding-bottom: var(--space-lg);
  margin-top: -0.9em;
  padding-top: calc(24px + 0.9em);
}

.about__ai-intro {
  text-align: left;
  color: var(--color-text);
  font-size: var(--text-lg);
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
}

.about__ai-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  margin-bottom: var(--space-xl);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.about__ai-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .about__ai-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about__ai-tool {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  flex-direction: column;
}

.about__ai-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.about__ai-tool-content {
  flex: 1;
}

.about__ai-tool-title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.about__ai-tool-desc {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.3;
}

.about__contact {
  padding-top: 0;
}

.about__links {
  display: flex;
  gap: var(--space-xl);
}

.about__link {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.about__link:hover {
  color: var(--color-text);
}

/* THIRD CASE STUDY BACKGROUND */
.case-study--third .case-study__card-bg {
  background: linear-gradient(135deg, #EAD1EF 0%, #C5AAD3 100%);
}

.case-study--third .case-study__title::after {
  content: '2016–2021';
}

.case-study--third.is-expanded .case-study__title {
  font-variation-settings: 'wght' 400, 'SRFF' 50, 'ital' 0;
}

.case-study--third .case-study__section-intro p {
  font-variation-settings: 'wght' 300, 'SRFF' 50, 'ital' 0;
}
.case-study--third .case-study__card-content, .case-study--third .case-study__highlights li, .case-study--third .case-study__title::after {
  color: #563F66;
}

/* VANGUARD BACKGROUND */
.case-study--vanguard .case-study__card-bg{
  overflow: hidden;
  background-color: var(--color-vanguard);
}
.case-study--vanguard .case-study__card-bg::before {
  content:'';
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    url('../images/case-studies/vbg2.svg') center top / 100% auto no-repeat;
  background-size: cover;
  z-index: 1;
}
.case-study--vanguard .case-study__card-bg::after {
  content:'';
  position: absolute;
  /* Define multiple subtle colors for the gradient */
  /* background: linear-gradient(-45deg, #CF002C, #950021, #CF002C); */
  /* background-image: repeating-linear-gradient(
    45deg,
    #CF002C 0%,
    #950021 50%,
    #CF002C 100%
  );
  background-size: 200% 200%; 
  animation: gradient-animation 5s linear infinite;
  width: 100%;
  height: 100%; */

  width: 100%;
  height: 100%;

  background-image:
    linear-gradient(
      -45deg,
      #950021, transparent, #950021, transparent, #950021
    );
  background-size: 200% 200%;
  animation: diagonal_move 10s linear infinite;
}

@keyframes diagonal_move {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}
/* @keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes gradient-animation {
  0% {
    background-position: -50% 50%;
  }
  100% {
    background-position: 120% 50%;
  }
} */

/* XERO BACKGROUND */
.gallery-bg-xero .shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0.2;
  /* z-index: -1; */
}
.gallery-bg-xero .shapes .shape svg {
  width: 100%;
  height: auto;
}
.gallery-bg-xero .shapes .shape {
  position: absolute;
  display: block;
  width: 20vw;
  height: 20vw;
/*  background: rgba(96, 183, 199, 0.1); */
  animation: xero-animate 30s linear infinite;
/*  bottom: calc(-150px - 40vh); */
  bottom: -22vw;
  transform-origin: center;
}
/* Circle */
.gallery-bg-xero .shapes .shape:nth-child(1) {
  left: 5vw;
  /*bottom: -10vw;*/
  animation-delay: 2s;
  animation-duration: 45s;
}
/* Squiggle */
.gallery-bg-xero .shapes .shape:nth-child(2) {
  left: 25vw;
  animation-delay: 8s;
  animation-duration: 45s;
}
/* Plus */
.gallery-bg-xero .shapes .shape:nth-child(3) {
  left: 30vw;
  animation-delay: 32s;
  animation-duration: 45s;
}
/* Arc */
.gallery-bg-xero .shapes .shape:nth-child(4) {
  right: 5vw;
  animation-delay: 20s;
  animation-duration: 45s;
}
/* Line */
.gallery-bg-xero .shapes .shape:nth-child(5) {
  right: 10vw;
/*   bottom: -20vw; */
  animation-delay: 0s;
  animation-duration: 45s;
}
/* START SHAPES */
.gallery-bg-xero .shapes .shape:nth-child(6) {
  left: 20vw;
  animation: xero-animate-two 10s linear 1;
  animation-delay: 0s;
  animation-duration: 40s;
  opacity: 0;
  bottom: 2vw;
}
.gallery-bg-xero .shapes .shape:nth-child(7) {
  right: 0vw;
  animation: xero-animate-two 10s linear 1;
  animation-delay: 0.5s;
  animation-duration: 30s;
  opacity: 0;
  bottom: 2vw;
}
/* Stroke */
.squiggle path, .circle circle {
  stroke: #fff;
}
/* Fill */
.circle path, .plus path, .arc path, .line path, .plus path {
  fill: #fff;
}


@keyframes xero-animate {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  40% {
    transform: translateY(-60vh) rotate(100deg);
    opacity: 1;
  }
  80% {
    transform: translateY(-120vh) rotate(200deg);
    opacity: 0;
  }
  100% {
    transform: translateY(-120vh) rotate(200deg);
    opacity: 0;
  }
}
@keyframes xero-animate-two {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  5% {
    transform: translateY(-5vh) rotate(10deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(200deg);
    opacity: 1;
  }
}




/* ===== UTILITIES ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* Override hidden for animated elements */
.case-study__preview:not([hidden]),
.case-study__content:not([hidden]) {
  display: grid;
}

/* Keep elements visible during collapse animation even with hidden attribute */
.case-study.is-collapsing .case-study__preview[hidden],
.case-study.is-collapsing .case-study__content[hidden] {
  display: grid !important;
}




/* ===== MEDIA QUERIES ===== */

/* Mobile First - Base styles are mobile */

/* Tablet and up */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-xl);
  }

  .header__link--desktop {
    display: flex;
  }

  /* .intro {
    padding: 0px 0px;
  } */
  .intro {
    padding-bottom: var(--space-xl);
  }

  .password-gate {
    overflow: hidden;
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-3xl);
  }
  .password-gate::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 250px;
    /* background: red; */
    background: linear-gradient(0deg,rgba(26, 26, 26, 1) 0%, rgba(26, 26, 26, 0) 100%);
    bottom: 0px;
  }
  .password-gate__preview {
    opacity: 0.7;
    filter: blur(20px);
  }
  .password-gate__content::after {
    top: 20px;
  }


  .case-study:nth-child(2), .case-study:nth-child(3) {
    margin-top: 0px;
  }

  .case-study__card {
    padding-top: 100px;
  }

  .case-study__card-bg {
    top: 100px;
  }


  .case-study__header {
    padding-right: 0;
    padding-left: 0;
    /* min-height: 190px; */
  }
  .case-study__card-content {
    overflow: visible;
    min-height: 200px;
  }
  .case-study__card {
    padding-top: 20px;
    overflow: hidden;
  }
  .is-expanded .case-study__card {
    overflow: visible;
  }

  .case-study__card {
    padding-bottom: 40px;
  }
  .case-study__card-bg {
    top:20px;
  }

  .case-study__title {
    padding-bottom: 0px;
  }  

  .case-study__title::after {
    bottom: -20px;
    font-size: var(--text-lg);
    text-align: right;
    letter-spacing: 0;
    padding-right: 2px;
  }
  
  .case-study--xero .case-study__title::after {
    text-align: left;
  }


  .case-study__phones, .case-study--third .case-study__phones {
    width: 140px;
    bottom: -65px;
    right: 10%;
  }
  .case-study--third .case-study__phones {
    width: 320px;
    right: 1%;
    border-radius: 0px;
    bottom: -40px;
  }
  .case-study--xero .case-study__phones {
    left: 10%;
  }
 
  .case-study__highlights {
    margin-bottom: 60px;
  }
  .case-study__preview-inner, .case-study__title-group {
    max-width: 530px;
  }

  .case-study__metric-value {
    font-size: 8rem;
  }

  .case-study.is-expanded .case-study__phones {
    width: 220px;
  }
  .case-study.case-study--third.is-expanded .case-study__phones {
    width: 440px;
    bottom: -40px;
  }

  .case-study__section-intro p,
  .about__intro p {
    font-size: var(--text-3xl);
  }

  .case-study__section-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-lg);
  }

  .case-study__section-bullets li,
  .about__body p {
    font-size: var(--text-lg);
  }

  .star {
    font-size: var(--text-3xl);
  }

  .metric_phone {
    width: 110px;
  }

  .case-study__metric-arrow {
    margin-top: 18px;
    font-size: 5rem;
  }
  .case-study__metric {
    gap: var(--space-xl);
  }

  /* Header */
  .header__name {
    height: 4.2rem;
    transition: height var(--transition-base);
  }
  .header--sticky .header__container {
    padding: var(--space-sm) 10rem;
  }
  .header--sticky .header__name {
    height: 1.8rem;
  }
  .header--sticky .header__name-text {
    transform: scale(0.4286);
  }

  .intro__title, .intro__subtitle, .header__name {
    font-size: var(--text-5xl);
  }

  /* Process diagram */

  .diagram-desktop {
    display: block;
  }
  .diagram-mobile {
    display: none;
  }
  .process .inner {
    min-height: 112px;
  }
  .long-item {
    min-height: 112px;
  }
  .process .process-label {
    padding-left: 82px;
  }
  .arrow {
    height: 148px;
    width: 50px;
  }
  .row {
    padding: 0px 56px;
  }
  .arrow::before {
    border-radius: 0px 40px 40px 0px;
  }
  .arrow1 {
    top: -80%;
  }
  .long-term {
    padding: 30px 56px 0px;
  }
  .process-label {
    padding-left: 26px;
  }

  .about__ai-title {
    font-size: var(--text-3xl);
  }
  .about__ai-container {
    padding: var(--space-2xl) var(--space-3xl) var(--space-3xl);
  }
  .about__ai-intro {
    text-align: center;
  }
  .about__ai-subtitle {
    text-align: center;
    padding-top: var(--space-xl);
    margin-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
  }
  .about__ai-tool {
    align-items: center;
    flex-direction: row;
  }
  .about__ai-grid {
    gap: 32px;
  }
  


}

/* Desktop */
@media (min-width: 1024px) {
  :root {
    --container-padding: var(--space-2xl);
  }

  .header--sticky .header__container {
    padding: var(--space-sm) 18rem;
  }

  .case-study:nth-child(2), .case-study:nth-child(3) {
    margin-top: 10px;
  }

  .case-study__phones {
    width: 160px;
  }
  .case-study--third .case-study__phones {
    width: 360px;
  }

  .case-study.is-expanded .case-study__phones {
    width: 260px;
  }
  .case-study.case-study--third.is-expanded .case-study__phones {
    width: 600px;
  }
 

  



  /* Process diagram */
  .process .inner, .process .long-item {
    min-height: auto;
  }
  .process .process-label {
    padding-left: 116px;
  }
  .arrow {
    height: 100px;
    width: 90px;
  }
  .row {
    padding: 0px 96px;
  }
  .arrow::before {
    border-radius: 0px 50% 50% 0px;
  }
  .arrow1 {
    top: -100%;
  }
  .long-term {
    padding: 30px 96px 0px;
  }
  .process-label {
    padding-left: 20px;
  }

}

/* ===== PLYR VIDEO PLAYER ===== */
.carousel-slide-video {
  height: 400px;
  aspect-ratio: 16 / 9;
  --plyr-color-main: #000;
  --plyr-video-progress-buffered-background: rgba(255, 255, 255, 0.15);
  --plyr-video-control-background-hover: rgba(255, 255, 255, 0.15);
  --plyr-video-control-color-hover: #fff;
}

.carousel-slide-video .plyr {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.carousel-slide-image {
  height: 400px;
  width: auto;
  border-radius: var(--radius-md);
  display: block;
  cursor: pointer;
}

@media (max-width: 767px) {
  .swiper-slide {
    max-width: 85vw;
  }

  .carousel-slide-image {
    width: 100%;
    height: auto;
  }

  .carousel-slide-video {
    width: 100%;
    height: auto;
  }

  .case-study__section {
    margin-bottom: var(--space-2xl);
  }

  .case-study__section-grid {
    margin-bottom: var(--space-2xl);
  }
}

@media (min-width: 768px) {
  .carousel-slide-video {
    height: 600px;
  }

  .carousel-slide-image {
    height: 600px;
  }
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.lightbox.is-open .lightbox__backdrop {
  opacity: 1;
}

.lightbox.is-closing .lightbox__backdrop {
  opacity: 0;
}

.lightbox__img {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  transform-origin: center center;
  transition: transform var(--transition-base);
}

.lightbox.is-open .lightbox__img {
  transform: none;
}

/* Hide bottom controls on initial load — user must press center play button */
.plyr.plyr--stopped .plyr__controls {
  display: none;
}

/* Center play button — match close button size (40px) */
.plyr .plyr__control--overlaid {
  background: #fff;
  box-shadow: 0px 2px 12px 2px rgba(0, 0, 0, 0.16);
  padding: 11px;
}

.plyr__control.plyr__control--overlaid svg {
  fill: rgba(0, 0, 0, 0.6);
  width: 18px;
  height: 18px;
  transition: fill 0.3s;
}

.plyr.plyr--video .plyr__control--overlaid:hover {
  background: #fff;
  transform: translate(-50%, -50%) scale(0.95);
}

.plyr.plyr--video .plyr__control--overlaid:hover svg {
  fill: rgba(0, 0, 0, 0.8);
}

@media (min-width: 480px) {
  .plyr--video .plyr__controls {
    padding: 0;
    margin: 15px;
    background: rgb(0 0 0 / 23%);
    border-radius: 18px;
    padding: 4px 6px;
  }
}

@media (min-width: 1248px) {
  .header--sticky .header__container {
    padding: var(--space-sm) 24rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
