/* ==========================================================================
   ALEXANDAR PAVLOV PORTFOLIO - STYLES
   Design System + Components + Animations + Accessibility
   ========================================================================== */

/* ==========================================================================
   0. SELF-HOSTED FONTS
   ========================================================================== */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
  color-scheme: light;

  /* Colors - Primary */
  --color-background: #f4f9fa;
  --color-text: #29303d;
  --color-accent: #0066ff;
  --color-white: #ffffff;

  /* Colors - Secondary */
  --color-border: #c2c9d6;
  --color-text-muted: rgba(41, 48, 61, 0.8);
  --color-text-light: rgba(41, 48, 61, 0.5);

  /* Colors - Semantic */
  --color-success: #34c759;
  --color-error: #ff3b30;
  --color-warning: #ff9500;

  /* Typography - Fonts */
  --font-display: "Manrope", sans-serif;
  --font-body: "Manrope", sans-serif;

  /* Typography - Sizes */
  --text-hero:    clamp(40px, calc(2.5vw + 32px), 96px);
  --text-section: clamp(36px, calc(2.25vw + 28.8px), 88px);
  --text-service: clamp(24px, calc(1vw + 20.8px), 48px);
  --text-project: 32px;
  --text-body-lg: 24px;
  --text-body: 20px;
  --text-button: 24px;
  --text-button-sm: 20px;

  /* Typography - Line Heights */
  --leading-tight: 1.2;
  --leading-normal: 1.5;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --page-width: 1200px;
  --content-width: 1600px;
  --side-margin: 64px;
  --section-gap: 200px;

  /* Components */
  --card-padding: 32px;
  --card-gap: 28px;
  --button-padding: 20px 40px;
  --input-padding: 20px;
  --border-radius: 16px;
  --border-radius-button: 9999px;

  /* Animations */
  --duration-fast: 274ms;
  --duration-normal: var(--motion-tempo-primary);
  --duration-slow: 692ms;
  --ease-out: var(--motion-ease-primary);
  --ease-in-out: var(--motion-ease-accent);
  --motion-tempo-primary: 436ms;
  --motion-ease-primary: cubic-bezier(0.33, 0.06, 0.12, 0.97);
  --motion-ease-accent: cubic-bezier(0.38, 0.10, 0.16, 0.98);
  --motion-exit-ratio: 0.63;

  /* Glassmorphism */
  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.45) 100%);
  --glass-bg-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.55) 100%);
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-blur: blur(3rem);
  --glass-shadow: 0 16px 40px rgba(0, 30, 80, 0.1), inset 0 2px 4px rgba(255, 255, 255, 1);
}

/* ==========================================================================
   2. BASE STYLES (Reset & Typography)
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--motion-tempo-primary);
  animation-timing-function: var(--motion-ease-primary);
}

::view-transition-old(root) {
  animation-name: page-fade-out;
}

::view-transition-new(root) {
  animation-name: page-fade-in;
}

@keyframes page-fade-out {
  to {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(3px);
  }
}

@keyframes page-fade-in {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================================
   3. LAYOUT UTILITIES
   ========================================================================== */

.container {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius);
  transition: all var(--duration-normal) var(--ease-out);
}

.glass-panel:hover {
  background: var(--glass-bg-hover);
  box-shadow: 0 16px 48px rgba(0, 102, 255, 0.08); /* slightly stronger shadow */
}

/* Ambient Background Animations */
.ambient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background-color: var(--color-background);
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float-orb 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 60vw;
  height: 60vw;
  background: rgba(0, 102, 255, 0.15); /* Accent Blue */
  top: -10vw;
  left: -10vw;
  animation-duration: 25s;
}

.orb-2 {
  width: 50vw;
  height: 50vw;
  background: rgba(52, 199, 89, 0.1); /* Soft Green */
  bottom: -20vw;
  right: -10vw;
  animation-duration: 22s;
  animation-delay: -5s;
}

.orb-3 {
  width: 40vw;
  height: 40vw;
  background: rgba(0, 200, 255, 0.1); /* Cyan */
  top: 40%;
  left: 30%;
  animation-duration: 30s;
  animation-delay: -10s;
}

@keyframes float-orb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(5%, 5%) scale(1.05);
  }
  66% {
    transform: translate(-5%, 8%) scale(0.95);
  }
  100% {
    transform: translate(2%, -5%) scale(1.1);
  }
}

/* ==========================================================================
   4. ACCESSIBILITY
   ========================================================================== */



/* Focus States */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

button:focus-visible,
.button-primary:focus-visible {
  outline-offset: 6px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.24);
}

/* Screen Reader Only */
.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;
}

/* ==========================================================================
   5. COMPONENTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   5.1 Buttons
   -------------------------------------------------------------------------- */

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--button-padding);
  border-radius: var(--border-radius-button);
  font-family: var(--font-body);
  font-size: var(--text-button);
  font-weight: 600;
  letter-spacing: 0.24px;
  line-height: var(--leading-normal);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.button-primary::before,
.button-secondary::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.04) 100%);
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}

.button-primary {
  background:
    linear-gradient(160deg, rgba(0, 102, 255, 1) 0%, rgba(0, 94, 236, 0.98) 52%, rgba(0, 78, 198, 0.96) 100%);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 18px 38px rgba(0, 102, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button-primary:hover {
  transform: translateY(-2px)
  scale(1.02);
  box-shadow:
    0 22px 44px rgba(0, 102, 255, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.button-primary:active {
  transform: translateY(0);
}

/* Button Text Slide Animation */
.btn-content {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  z-index: 1;
}

.btn-text,
.btn-hover-text {
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn-text {
  display: block;
}

.btn-hover-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -100%;
}

.button-primary:hover .btn-text {
  transform: translateY(-100%);
}

.button-primary:hover .btn-hover-text {
  transform: translateY(-100%);
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: radial-gradient(98.12% 191.19% at 50% 50.72%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.34) 75.96%);
  box-shadow:
    0 14px 30px rgba(16, 24, 40, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: var(--color-white);
}

.button-secondary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 18px 36px rgba(16, 24, 40, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.button-secondary:active {
  transform: translateY(0);
}

.button-secondary:hover .btn-text {
  transform: translateY(-100%);
}

.button-secondary:hover .btn-hover-text {
  transform: translateY(-100%);
}

/* --------------------------------------------------------------------------
   5.2 Navigation
   -------------------------------------------------------------------------- */

.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 880px;
  max-width: calc(100% - 64px);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 9999px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  transition: transform var(--duration-normal) var(--ease-out);
}

.navbar--hidden {
  transform: translateX(-50%) translateY(calc(-100% - 42px));
}


.nav-logo {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: -0.2px;
}

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

.nav-link {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;
  position: relative;
  transition: color var(--duration-normal) var(--ease-out);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transform: translateX(-50%);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  font-size: var(--text-button-sm);
  padding: 12px 24px;
}

/* Mobile nav toggle button - hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) var(--ease-out);
}

.nav-toggle:hover {
  background: rgba(41, 48, 61, 0.06);
}

.nav-toggle-close {
  display: none;
}

.nav-toggle.is-open .nav-toggle-open {
  display: none;
}

.nav-toggle.is-open .nav-toggle-close {
  display: flex;
}

/* Mobile Navigation Overlay - lightweight fade + staggered reveal */
.mobile-nav {
  --mobile-nav-duration: var(--mobile-nav-close-duration, var(--duration-normal));
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(244, 249, 250, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-18px) scale(0.985);
  transform-origin: top center;
  visibility: hidden;
  transition:
    opacity var(--mobile-nav-duration) var(--ease-out),
    transform var(--mobile-nav-duration) var(--motion-ease-primary),
    visibility 0s linear var(--mobile-nav-duration);
  will-change: opacity, transform;
}

.mobile-nav.is-open {
  --mobile-nav-duration: var(--mobile-nav-open-duration, var(--duration-normal));
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
  transition-delay: 0ms;
}

.mobile-nav > * {
  position: relative;
  z-index: 1;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: clamp(40px, 10vw, 64px);
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.5px;
  opacity: 0;
  transform: translateY(18px);
  transition:
    color var(--duration-fast) var(--ease-out),
    opacity calc(var(--mobile-nav-duration) * 0.72) var(--motion-ease-primary),
    transform calc(var(--mobile-nav-duration) * 0.72) var(--motion-ease-primary);
  will-change: opacity, transform;
}

.mobile-nav.is-open .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav.is-open .mobile-nav-link:nth-child(1) {
  transition-delay: 48ms;
}

.mobile-nav.is-open .mobile-nav-link:nth-child(2) {
  transition-delay: 88ms;
}

.mobile-nav.is-open .mobile-nav-link:nth-child(3) {
  transition-delay: 128ms;
}

.mobile-nav.is-open .mobile-nav-link:nth-child(4) {
  transition-delay: 168ms;
}

.mobile-nav.is-open .mobile-nav-link:nth-child(5) {
  transition-delay: 208ms;
}

.mobile-nav-link:hover {
  color: var(--color-accent);
}

.mobile-nav-cta {
  margin-top: var(--space-8);
  color: var(--color-accent);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav,
  .mobile-nav-link {
    transition-duration: 1ms;
    transition-delay: 0ms;
  }

  .mobile-nav,
  .mobile-nav-link,
  .mobile-nav.is-open .mobile-nav-link {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   5.3 Form Elements
   -------------------------------------------------------------------------- */

.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-body);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-input {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--input-padding);
  font-family: var(--font-body);
  font-size: var(--text-body);
  background: var(--color-white);
  box-shadow:
    0 12px 28px rgba(0, 30, 80, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: var(--color-text);
  transition:
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.form-input::placeholder {
  color: var(--color-text-light);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2329303D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 50px;
}

.form-submit {
  width: 100%;
  margin-top: var(--space-4);
}

.form-helper {
  text-align: center;
  color: var(--color-text-light);
  font-size: 16px;
  margin-top: var(--space-4);
}

/* --------------------------------------------------------------------------
   5.4 Project Cards
   -------------------------------------------------------------------------- */

.project-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius);
  padding: var(--card-padding);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.project-card:hover {
  background: var(--glass-bg-hover);
  box-shadow: 0 16px 48px rgba(0, 102, 255, 0.08);
}

/* Project Card Link Wrapper */
.project-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-image-wrapper {
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: var(--space-6);
}

.project-image {
  width: 100%;
  aspect-ratio: 400 / 284;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

/* Placeholder gradient for images */
.project-image.placeholder,
.project-hero-image.placeholder,
.gallery-item .placeholder {
  background: linear-gradient(
    135deg,
    rgba(194, 201, 214, 0.3) 0%,
    rgba(41, 48, 61, 0.3) 50%,
    rgba(0, 102, 255, 0.15) 100%
  );
  object-fit: none;
}

.project-image.placeholder {
  aspect-ratio: 400 / 284;
  object-fit: cover;
}

.project-hero-image.placeholder {
  aspect-ratio: 16 / 9;
}

.gallery-item img.placeholder {
  aspect-ratio: 4 / 3;
  min-height: 300px;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.project-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-title {
  font-family: var(--font-body);
  font-size: var(--text-project);
  font-weight: 700;
  letter-spacing: 0;
}

/* Arrow Slide Animation Container */
.arrow-content {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  width: 28px;
  height: 20px;
  z-index: 1;
}

.project-arrow {
  width: 28px;
  height: 20px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.arrow-default {
  transform: translateX(0);
}

.arrow-hover {
  position: absolute;
  left: calc(-100% - 8px);
  top: 0;
  /* Accent color filter */
  filter: brightness(0) saturate(100%) invert(26%) sepia(98%) saturate(2097%) hue-rotate(210deg) brightness(102%) contrast(104%);
}

.project-card:hover .arrow-default {
  transform: translateX(calc(100% + 8px));
}

.project-card:hover .arrow-hover {
  transform: translateX(calc(100% + 8px));
}

.project-category {
  font-size: var(--text-body);
  color: var(--color-text-muted);
}

/* Upcoming Project Overlay */
.project-image-wrapper {
  position: relative;
}

.project-upcoming-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 2;
}

.project-upcoming-label {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
}

/* Disabled card (upcoming projects) */
.project-card--upcoming {
  cursor: default;
}

.project-card--upcoming:hover {
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
}

.project-card--upcoming:hover .project-image {
  transform: none;
}

.project-card-link--disabled {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   6. SECTIONS
   ========================================================================== */

/* --------------------------------------------------------------------------
   6.1 Hero Section
   -------------------------------------------------------------------------- */

.hero-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 120px;
  padding-bottom: var(--space-20);
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.hero-section--shader {
  isolation: isolate;
  background:
    radial-gradient(circle at 100% 18%, rgba(255, 255, 255, 0.94) 0%, rgba(204, 248, 255, 0.78) 20%, rgba(113, 225, 232, 0.3) 38%, rgba(244, 249, 250, 0) 58%),
    radial-gradient(circle at 18% 12%, rgba(185, 255, 229, 0.72) 0%, rgba(115, 237, 201, 0.28) 28%, rgba(244, 249, 250, 0) 56%),
    radial-gradient(circle at 74% 78%, rgba(205, 214, 255, 0.54) 0%, rgba(140, 174, 255, 0.22) 26%, rgba(244, 249, 250, 0) 52%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}

.hero-section--shader::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(244, 249, 250, 0.16) 0%, rgba(244, 249, 250, 0.08) 20%, rgba(244, 249, 250, 0) 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.18) 28%, rgba(244, 249, 250, 0.08) 100%);
}

.hero-shader {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 52%, rgba(117, 235, 215, 0.22) 0%, rgba(102, 216, 255, 0.14) 22%, rgba(187, 171, 255, 0.1) 36%, rgba(244, 249, 250, 0) 62%);
}

.hero-shader__canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity var(--duration-slow) var(--ease-out);
  mix-blend-mode: screen;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  z-index: 2;
  padding: 0 var(--space-6);
  max-width: 1160px;
}

.hero-stage-item {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity var(--motion-tempo-primary) var(--motion-ease-primary),
    transform var(--motion-tempo-primary) var(--motion-ease-primary);
}

body.is-loaded .hero-stage-item {
  opacity: 1;
  transform: translateY(0);
}

.hero-stage-item:nth-child(1) {
  transition-delay: 0ms;
}

.hero-stage-item:nth-child(2) {
  transition-delay: 74ms;
}

.hero-stage-item:nth-child(3) {
  transition-delay: 148ms;
}

.hero-stage-item:nth-child(4) {
  transition-delay: 222ms;
}

.hero-eyebrow {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-section--shader .hero-eyebrow {
  color: var(--color-accent);
  text-shadow: 0 8px 20px rgba(255, 255, 255, 0.52);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  letter-spacing: -1.6px;
  color: var(--color-text);
  text-align: center;
  margin-top: var(--space-4);
  max-width: 1280px;
}

.hero-section--shader .hero-title {
  color: var(--color-text);
  text-shadow: 0 16px 34px rgba(255, 255, 255, 0.7);
}

.hero-subtitle {
  font-size: var(--text-body-lg);
  color: var(--color-text-muted);
  letter-spacing: -0.24px;
  max-width: 512px;
  text-align: center;
  line-height: 1.6;
}

.hero-section--shader .hero-subtitle {
  color: var(--color-text-muted);
  text-shadow: 0 10px 22px rgba(255, 255, 255, 0.54);
  max-width: 560px;
}



.hero-cta {
  margin-top: var(--space-8);
}

/* --------------------------------------------------------------------------
   6.2 Work Section
   -------------------------------------------------------------------------- */

.work-section {
  padding-top: var(--space-24);
  padding-bottom: var(--section-gap);
}



.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.section-header-left {
  display: flex;
  flex-direction: column;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 400;
  letter-spacing: -0.72px;
  text-transform: uppercase;
}



.project-count {
  font-family: var(--font-body);
  font-size: var(--text-body-lg);
  color: var(--color-text-muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--card-gap);
}







/* --------------------------------------------------------------------------
   6.3 About Section
   -------------------------------------------------------------------------- */

.about-section {
  padding-bottom: var(--section-gap);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: stretch;
}

.about-text-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  justify-content: center;
}

.about-text-column .button-secondary {
  color: var(--color-text);
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about-bio {
  font-size: var(--text-body-lg);
  line-height: 1.6;
  color: var(--color-text-muted);
  letter-spacing: -0.24px;
  margin: 0;
}

.highlight-link {
  color: var(--color-accent);
  transition: opacity var(--duration-normal) var(--ease-out);
}

.highlight-link:hover {
  opacity: 0.8;
}

.about-image-column {
  position: relative;
}

.about-image-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: auto;
  height: 100%;
  max-height: 80vh;
  
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-image {
  width: auto;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-slow) var(--ease-out);
}

.about-image:hover {
  transform: scale(1.02);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .about-image-column {
    order: -1; 
  }
  
  .about-image-wrapper {
    /* Reset to relative flow for mobile */
    position: relative;
    height: auto;
    width: 100%;
  }

  .about-image {
    position: relative;
    height: auto;
    width: 100%;
  }
}



/* --------------------------------------------------------------------------
   6.4 Services Section
   -------------------------------------------------------------------------- */

.services-section {
  padding-bottom: var(--section-gap);
}

.section-title-display {
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 400;
  letter-spacing: -0.72px;
  margin-bottom: var(--space-16);
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  margin-bottom: var(--space-16);
}

.service-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(160px, 24%, 280px);
  grid-template-areas:
    "title icon"
    "description icon";
  align-items: stretch;
  column-gap: clamp(var(--space-6), 5vw, var(--space-16));
  row-gap: var(--space-4);
  flex: 1;
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius);
  padding: var(--space-8);
  overflow: hidden;
}

.service-title {
  grid-area: title;
  align-self: end;
  font-family: var(--font-body);
  font-size: var(--text-service);
  font-weight: 600;
  letter-spacing: -0.4px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.service-description {
  grid-area: description;
  align-self: start;
  font-size: var(--text-body);
  color: var(--color-text-muted);
  max-width: 100%;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.service-bg-icon {
  grid-area: icon;
  align-self: center;
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  height: var(--service-icon-height, auto);
  max-width: 100%;
  max-height: 100%;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.service-bg-icon-svg {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  overflow: visible;
}

.service-icon-shape {
  stroke: #464646;
  stroke-width: 32px;
  stroke-dasharray: 40 60;
  transition:
    stroke var(--duration-normal) var(--ease-out),
    stroke-width var(--duration-normal) var(--ease-out),
    stroke-dasharray var(--duration-normal) var(--ease-out);
}

.service-item.is-viewport-active .service-bg-icon {
  opacity: 1;
}

.service-item.is-viewport-active .service-icon-shape {
  stroke: #3b82f6;
  stroke-width: 40px;
  stroke-dasharray: 100 0;
}

.services-list.has-service-interaction .service-item .service-bg-icon {
  opacity: 0.5;
}

.services-list.has-service-interaction .service-item.is-interaction-active .service-bg-icon {
  opacity: 1;
}

.service-item:hover .service-icon-shape,
.service-item:focus-within .service-icon-shape {
  stroke: #3b82f6;
  stroke-width: 40px;
  stroke-dasharray: 100 0;
}

.services-cta {
  display: flex;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   6.5 Contact Section
   -------------------------------------------------------------------------- */

.contact-section {
  padding-top: var(--space-24);
  padding-bottom: var(--section-gap);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 522px;
  gap: var(--space-16);
  align-items: flex-start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.contact-title {
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 400;
  letter-spacing: -0.72px;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}

.contact-subtitle {
  font-size: var(--text-body);
  color: var(--color-text-muted);
}

.contact-email {
  margin-top: var(--space-16);
}

.email-label {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.email-link {
  font-size: var(--text-body);
  color: var(--color-accent);
  transition: opacity var(--duration-normal) var(--ease-out);
}

.email-link:hover {
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Availability Signal
   -------------------------------------------------------------------------- */

.availability-signal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-body);
  font-weight: 600;
  color: #34C759;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.availability-icon {
  flex-shrink: 0;
  display: block;
}

.contact-form {
  background: transparent;
}

/* --------------------------------------------------------------------------
   6.5.1 FAQ Section
   -------------------------------------------------------------------------- */

.faq-section {
  padding-bottom: var(--section-gap);
}

.faq-section .section-title-display {
  margin-bottom: var(--space-12);
  text-align: center;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.faq-item {
  transition:
    background var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.faq-item:hover {
  background: var(--glass-bg-hover);
}

.faq-item.is-open {
  background: var(--glass-bg-hover);
  border-color: var(--color-accent);
  box-shadow: 0 4px 24px rgba(0, 102, 255, 0.15);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-6);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-text);
  background: none;
  border: none;
  text-align: left;
  transition: color var(--duration-normal) var(--ease-out);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::marker {
  display: none;
  content: "";
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-item.is-open .faq-question {
  color: var(--color-accent);
}

/* FAQ Icon (+ to ×) with smooth rotation */
.faq-icon {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform var(--duration-normal) var(--ease-out);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out);
}

.faq-icon::before {
  width: 2px;
  height: 16px;
  top: 4px;
  left: 11px;
}

.faq-icon::after {
  width: 16px;
  height: 2px;
  top: 11px;
  left: 4px;
}

.faq-item.is-open .faq-icon::before {
  transform: rotate(90deg);
}

/* Answer container - smooth height animation using grid */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-normal) var(--ease-out);
  padding: 0 var(--space-6);
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
}

/* Text fade in with upward movement */
.faq-answer p {
  font-size: var(--text-body);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
  padding-bottom: var(--space-6);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity var(--duration-normal) var(--ease-out) 74ms,
              transform var(--duration-normal) var(--ease-out) 74ms;
}

.faq-item.is-open .faq-answer p {
  opacity: 1;
  transform: translateY(0);
}

/* FAQ Mobile Responsive */
@media (max-width: 768px) {
  .faq-section {
    padding-bottom: var(--space-16);
  }

  .faq-section .section-title-display {
    font-size: var(--text-section);
    margin-bottom: var(--space-8);
  }

  .faq-question {
    padding: var(--space-4) var(--space-5);
    font-size: 18px;
  }

  .faq-answer {
    padding: 0 var(--space-5);
  }

  .faq-answer p {
    font-size: 16px;
    padding-bottom: var(--space-5);
  }
}

@media (max-width: 480px) {
  .faq-question {
    padding: var(--space-4);
    font-size: 16px;
  }

  .faq-answer {
    padding: 0 var(--space-4);
  }

  .faq-answer p {
    font-size: 15px;
    padding-bottom: var(--space-4);
  }

  .faq-icon {
    width: 20px;
    height: 20px;
  }

  .faq-icon::before {
    height: 14px;
    top: 3px;
    left: 9px;
  }

  .faq-icon::after {
    width: 14px;
    top: 9px;
    left: 3px;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-question,
  .faq-icon,
  .faq-icon::before,
  .faq-icon::after,
  .faq-answer,
  .faq-answer p {
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   6.6 Footer
   -------------------------------------------------------------------------- */

/* --- Footer Base --- */
.footer-outer {
  position: relative;
  overflow: hidden;
  background: #3a3a3a;
}

.footer {
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
  background: radial-gradient(42.5% 39.06% at 11.71% 68.84%, rgba(89, 91, 94, 0.80) 0%, #3C3D3E 100%);
}

.footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

/* --- Footer Nav (large links at top) --- */
.footer-nav {
  display: flex;
  align-items: start;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  flex-wrap: wrap;
}

.footer-link {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: -0.5px;
  transition: color var(--duration-normal) var(--ease-out);
}

.footer-link:hover {
  color: var(--color-accent);
}

/* --- Divider --- */
.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

/* --- Footer Bottom Row (info + right) --- */
.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

/* Left side: avatar + info + CTAs */
.footer-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.footer-identity {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.footer-avatar {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  aspect-ratio: 1;
}

.footer-name-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0px;
  font-size: 16px;
  font-weight: 600;
  color: #34c759;
}

.footer-status-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.footer-tagline {
  font-size: 28px;
  color: var(--color-white);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.3px;
}

.footer-location {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.footer-ctas {
  display: flex;
  gap: var(--space-4);
}

.footer-cta-primary {
  font-size: 16px;
  padding: 12px 28px;
}

.footer-cta-secondary {
  font-size: 16px;
  padding: 12px 28px;
}

/* Right side: copyright + social stacked */
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-5);
}

.footer-copyright {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
  text-align: right;
  line-height: 1.5;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: none;
  z-index: 1;
  transition: background var(--duration-normal) var(--ease-out);
}

.social-icon {
  position: relative;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--duration-normal) var(--ease-out), transform var(--duration-slow) var(--ease-out);
  z-index: 3;
}

.footer-social-link:hover {
  background: var(--color-accent);
}

.footer-social-link:hover .social-icon {
  color: var(--color-white);
  transform: rotateY(360deg);
}

/* --------------------------------------------------------------------------
   6.7 Project Detail Page
   -------------------------------------------------------------------------- */

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-out);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb-sep {
  margin: 0 6px;
  opacity: 0.5;
}

/* Content stream reveal animation */
.content-text-block.reveal,
.content-image-block.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.content-text-block.reveal.visible,
.content-image-block.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .content-text-block.reveal,
  .content-image-block.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Back to Work link */
.back-to-work {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  transition: color var(--duration-normal) var(--ease-out);
}

.back-to-work:hover {
  color: var(--color-accent);
}

/* Project Hero */
.project-hero-section {
  padding-top: 160px;
  padding-bottom: var(--space-16);
}

.project-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: var(--space-6);
  margin-top: var(--space-16);
  margin-bottom: var(--space-8);
  max-width: 900px;
}

.project-eyebrow {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, var(--text-hero));
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--color-text);
}

/* Lead paragraph below the hero title */
.project-lead {
  margin: 0;
  max-width: 39rem;
  font-size: clamp(1rem, 1.85vw, var(--text-body-lg));
  line-height: 1.55;
  color: var(--color-text-muted);
}

.project-hero-image-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.project-hero-full-section {
  padding-bottom: var(--space-16);
}

/* Frame wrapper for relative positioning of the logo overlay */
.project-hero-image-frame {
  position: relative;
  display: block;
  line-height: 0; /* removes inline gap under img */
}

/* Centered glassmorphic logo pill */
.project-hero-logo-wrap {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 11.11vw;
  height: 11.11vw;
  padding: 2.5vw;
  background: radial-gradient(circle, rgba(224, 224, 224, 0) 30%, rgba(255, 255, 255, 1) 100%);
  backdrop-filter: blur(3rem);
  -webkit-backdrop-filter: blur(3rem);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  z-index: 4;
}

.project-hero-logo {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: contain;
}

.project-hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--border-radius);
  display: block;
}

@media (max-width: 768px) {
  .project-hero-image {
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .project-hero-image {
    border-radius: 8px;
  }
}



/* Inline colour swatch (used inside rich text next to hex codes) */
.inline-color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  vertical-align: middle;
  margin: 0 4px 1px 1px;
}

/* Rich Text Content */
.rich-text {
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-text-muted);
}

.rich-text p {
  margin-bottom: var(--space-4);
}

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

/* Project Content Sections (Challenge, Solution) */
.project-content-section {
  padding: var(--space-16) 0;
}

.project-section-title {
  font-family: var(--font-display);
  font-size: var(--text-service);
  font-weight: 400;
  letter-spacing: -0.4px;
  margin-bottom: var(--space-8);
  color: var(--color-text);
}

.project-content-section .rich-text {
  max-width: 800px;
}

/* Project Gallery */
.project-gallery-section {
  padding: var(--space-16) 0;
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--border-radius);
}

.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform var(--duration-slow) var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Project Brief & Concept Sections */
.project-brief-section,
.project-concept-section {
  padding: var(--space-24) 0;
}

.brief-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-16);
}

/* Meta Data Stylings */
.brief-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.brief-meta-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.meta-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: var(--text-body);
  color: var(--color-text);
  font-weight: 500;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.project-tag {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(0, 102, 255, 0.1);
  color: var(--color-accent);
  font-size: 14px;
  font-weight: 500;
  border-radius: 100px;
}

/* Live site circular CTA button */
.live-site-btn {
  width: clamp(130px, 14.58vw, 280px);
  height: clamp(130px, 14.58vw, 280px);
  border-radius: 50%;
  background:
    linear-gradient(160deg, rgba(0, 102, 255, 1) 0%, rgba(0, 94, 236, 0.98) 52%, rgba(0, 78, 198, 0.96) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(11px, 0.97vw, 16px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  text-align: center;
  box-shadow:
    0 18px 38px rgba(0, 102, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  will-change: transform;
  transition: box-shadow var(--duration-fast) var(--ease-out), filter var(--duration-fast) var(--ease-out);
}

.live-site-btn:hover {
  filter: brightness(1.08);
  box-shadow:
    0 22px 44px rgba(0, 102, 255, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.live-site-btn:active {
  filter: brightness(0.94);
}

.meta-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.project-palette {
  display: flex;
  gap: 5px;
}

.palette-swatch {
  flex: 1;
  height: 40px;
  border-radius: 8px;
}

/* Badge Styling */
.project-badges {
    display: flex;
    justify-content: flex-start;
    margin-bottom: var(--space-4);
}

.conceptual-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--color-accent);
    color: var(--color-white);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 100px;
}

/* Content Widths */
.brief-content,
.concept-content {
  max-width: 800px;
}

/* Single-column variant when the challenge text column is hidden (modern content mode) */
.brief-grid.brief-meta-only {
  grid-template-columns: 1fr;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius);
}

.testimonial-content {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius);
  padding: clamp(2rem, 5vw, 4rem);
}

.project-next-teaser-section {
  display: none !important; /* Hidden until more projects are added */
  padding: clamp(6rem, 12vw, 10rem) 0;
}

.project-next-teaser {
  display: grid;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
  overflow: visible;
  row-gap: clamp(1.5rem, 2.8vw, 2.5rem);
  color: var(--color-text);
  text-decoration: none;
}

.project-next-teaser__label {
  display: block;
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  justify-self: center;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.project-next-teaser__layout {
  display: grid;
  grid-template-columns: max-content clamp(180px, 18vw, 260px) max-content;
  position: relative;
  align-items: center;
  justify-content: center;
  column-gap: clamp(1rem, 2vw, 1.75rem);
}

.project-next-teaser__title {
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 5.8vw, 5.9rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.05em;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  color: var(--color-text);
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.project-next-teaser__title:empty {
  display: none;
}

.project-next-teaser__title--left {
  text-align: right;
}

.project-next-teaser__title--right {
  text-align: left;
}

.project-next-teaser__media {
  display: block;
  width: 100%;
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: rgba(41, 48, 61, 0.18);
  transform-origin: center center;
  transition: transform var(--duration-slow) var(--ease-out),
              box-shadow var(--duration-slow) var(--ease-out);
  will-change: transform;
}

.project-next-teaser__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .project-next-teaser:hover .project-next-teaser__media {
    transform: scale(1.5);
    box-shadow: 0 2rem 4rem rgba(18, 24, 38, 0.12);
  }

  .project-next-teaser:hover .project-next-teaser__image {
    opacity: 1;
  }

  .project-next-teaser:hover .project-next-teaser__title {
    opacity: 0.28;
  }

  .project-next-teaser:hover .project-next-teaser__label {
    opacity: 0.28;
  }

  .project-next-teaser:hover .project-next-teaser__title--left {
    transform: translateX(-0.8rem);
  }

  .project-next-teaser:hover .project-next-teaser__title--right {
    transform: translateX(0.8rem);
  }
}

.project-next-teaser:focus-visible .project-next-teaser__media {
  transform: scale(1.08);
}

.project-next-teaser:focus-visible .project-next-teaser__image {
  opacity: 1;
}

.project-next-teaser:focus-visible .project-next-teaser__title {
  opacity: 0.72;
}

.project-next-teaser:focus-visible .project-next-teaser__label {
  opacity: 0.72;
}

@media (min-width: 901px) {
  .brief-grid.brief-meta-only .brief-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-16);
  }
}

/* Responsive Grid */
@media (max-width: 900px) {
  .brief-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  .brief-meta {
    flex-direction: column-reverse;
  }

  .project-next-teaser__layout {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: var(--space-6);
    text-align: center;
  }

  .project-next-teaser__label {
    justify-self: center;
  }

  .project-next-teaser__title,
  .project-next-teaser__title--right {
    text-align: center;
    white-space: normal;
  }

  .project-next-teaser__media {
    width: min(100%, 320px);
  }
}




/* Project Navigation */
.project-navigation-section {
  padding: var(--space-16) 0;
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
}

.project-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  border-radius: var(--border-radius);
  transition: background var(--duration-normal) var(--ease-out);
}

.project-nav-link:hover {
  background: rgba(0, 102, 255, 0.05);
}

.project-nav-prev {
  align-items: flex-start;
}

.project-nav-next {
  align-items: flex-end;
  text-align: right;
}

.project-nav-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-nav-title {
  font-family: var(--font-display);
  font-size: var(--text-project);
  font-weight: 400;
  color: var(--color-text);
}

/* Project CTA */
.project-cta-section {
  padding: var(--space-24) 0;
  text-align: center;
  background-color: #e6e8eb;
}

.project-cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.project-cta-eyebrow {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-cta-title {
  font-family: var(--font-display);
  font-size: var(--text-section);
  font-weight: 400;
  letter-spacing: -0.72px;
  color: var(--color-text);
  max-width: 700px;
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   7. ANIMATIONS
   ========================================================================== */

/* Page Load Animation */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeSlideUp var(--duration-slow) var(--ease-out) both;
}

/* Stagger children */
/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger reveal for project cards */
.project-card.reveal:nth-child(1) {
  transition-delay: 0ms;
}
.project-card.reveal:nth-child(2) {
  transition-delay: 74ms;
}
.project-card.reveal:nth-child(3) {
  transition-delay: 148ms;
}
.project-card.reveal:nth-child(4) {
  transition-delay: 222ms;
}
.project-card.reveal:nth-child(5) {
  transition-delay: 296ms;
}
.project-card.reveal:nth-child(6) {
  transition-delay: 370ms;
}

/* ==========================================================================
   8. REDUCED MOTION
   ========================================================================== */

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   9. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1100px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-16);
  }

  .project-overview-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .project-sidebar {
    order: 2;
  }

  .project-overview-content {
    order: 1;
  }
}

@media (max-width: 900px) {
  :root {
    --section-gap: 120px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .service-item {
    grid-template-columns: minmax(0, 1fr) clamp(132px, 26%, 200px);
    min-height: 0;
    padding: var(--space-6);
  }

  .service-bg-icon {
    height: var(--service-icon-height, auto);
  }

  .hero-section {
    padding-top: 140px;
  }

  .navbar {
    width: calc(100% - 48px);
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .project-gallery-grid {
    grid-template-columns: 1fr;
  }

  .project-metrics {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .metric-value {
    font-size: 40px;
  }

  .project-nav-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .project-nav-next {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 600px) {
  :root {
    --text-body-lg: 20px;
    --text-body: 18px;
    
    /* Mobile Button Sizes */
    --text-button: 18px;
    --button-padding: 14px 24px;
    
    /* Spacing */
    --section-gap: 64px;
    --side-margin: 20px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-section {
    padding-top: 100px;
    padding-bottom: 80px;
    -webkit-mask-image: linear-gradient(to bottom, black 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 88%, transparent 100%);
  }

  .hero-section--shader .hero-title {
    text-shadow: 0 12px 24px rgba(255, 255, 255, 0.6);
  }

  .project-hero-section {
    padding-top: 120px;
  }

  .service-item {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "description"
      "icon";
    gap: var(--space-4);
  }

  .service-bg-icon {
    align-self: center;
    justify-self: center;
    justify-content: center;
    width: auto;
    height: var(--service-icon-height, auto);
    max-width: 100%;
  }

  .navbar {
    top: 20px;
    padding: 10px 14px;
  }

  .nav-cta {
    font-size: 16px;
    padding: 10px 16px;
  }

  .footer-nav {
    gap: var(--space-6);
  }

  .footer-ctas {
    flex-wrap: wrap;
  }
}

@media (max-width: 661px) {
  .footer-nav {
    flex-direction: column;
    gap: var(--space-3);
  }

  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-8);
  }
  
  .footer-right {
    align-items: flex-start;
  }

  .footer-copyright {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .footer-link {
    font-size: clamp(24px, 8vw, 56px);
  }

  .footer-nav {
    gap: clamp(var(--space-4), 3vw, var(--space-6));
  }
}

@media (max-width: 445px) {
  .footer-avatar {
    width: 14vw;
    height: 14vw;
    min-width: 48px;
  }

  .footer-tagline {
    font-size: clamp(18px, 5.5vw, 28px);
  }

  .footer-location {
    font-size: clamp(12px, 3.5vw, 16px);
  }

  .footer-status {
    font-size: clamp(12px, 3.5vw, 16px);
  }

  .footer-status-icon {
    width: clamp(28px, 8vw, 40px);
    height: clamp(28px, 8vw, 40px);
  }

  .footer-cta-primary,
  .footer-cta-secondary {
    font-size: clamp(13px, 3.5vw, 16px);
    padding: 10px 20px;
  }

  .footer-info {
    gap: var(--space-4);
  }
}
/* ==========================================================================
   MOBILE PROJECT CARDS OPTIMIZATION
   ========================================================================== */

@media (max-width: 768px) {
  /* Project Card - Reduced padding and spacing */
  .project-card {
    padding: 16px;
    border-radius: 12px;
  }

  .project-image-wrapper {
    border-radius: 6px;
    margin-bottom: var(--space-4);
  }

  .project-info {
    gap: var(--space-1);
  }

  .project-title {
    font-size: 20px;
  }

  .project-category {
    font-size: 16px;
  }

  /* Project Grid - Reduced gap */
  .project-grid {
    gap: var(--space-6);
  }

  /* Work Section - Reduced padding */
  .work-section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-24);
  }

  .hero-subtitle {
    max-width: 34rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  /* Contact title - inline on tablet/mobile */
  .contact-title {
    display: block;
  }

  .contact-title span {
    display: inline;
  }
}

@media (max-width: 480px) {
  /* Project Card - Even smaller padding for small mobile */
  .project-card {
    padding: 12px;
    border-radius: 10px;
  }

  .project-image-wrapper {
    border-radius: 4px;
    margin-bottom: var(--space-3);
  }

  .project-title {
    font-size: 18px;
  }

  .project-category {
    font-size: 14px;
  }

  /* Arrow - Smaller on mobile */
  .arrow-content {
    width: 24px;
    height: 16px;
  }

  .project-arrow {
    width: 24px;
    height: 16px;
  }

  /* Project Grid - Smallest gap */
  .project-grid {
    gap: var(--space-4);
  }

  /* Work Section - Minimal padding */
  .work-section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-16);
  }

  .section-title {
    font-size: 32px;
  }

  .project-count {
    font-size: 16px;
  }

  .hero-section {
    padding-bottom: var(--space-16);
  }

}

/* ==========================================================================
   4K / ULTRA-WIDE (≥ 1920px)
   ========================================================================== */

@media (min-width: 1920px) {
  .navbar {
    width: min(1400px, calc(100% - 80px));
  }

  .container {
    max-width: 1600px;
  }
}

/* ==========================================================================
   BUTTON INTERACTIVE STATES
   ========================================================================== */

/* Loading State */
.button-primary.loading {
  background: var(--color-white);
  color: #2563eb;
  cursor: wait;
  position: relative;
  border: 1px solid #2563eb;
  pointer-events: none;
}

/* Success State */
.button-primary.success {
  background: var(--color-white);
  color: #2563eb;
  border: 1px solid #2563eb;
  cursor: default;
  pointer-events: none;
}

/* Loading & Success Elements */
.loading-container {
  width: 36px;
  height: 36px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spinner-checkmark {
  width: 8px;
  height: 14px;
  border: solid #2563eb;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  margin-bottom: 3px;
  position: relative;
  z-index: 1;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}

.progress-ring__circle {
  stroke: #2563eb;
  fill: transparent;
  stroke-width: 3;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  animation: progress var(--duration-slow) var(--ease-out) forwards;
  stroke-linecap: round;
}

@keyframes progress {
  to {
    stroke-dashoffset: 0;
  }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Skip Link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: white;
  padding: 1rem 2rem;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  transition: top var(--duration-fast) var(--ease-out);
}

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

/* Focus States */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* Hide scrollbar for clean UI but keep functionality */
.hidden-scrollbar::-webkit-scrollbar {
  display: none;
}
.hidden-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
/* --------------------------------------------------------------------------
   8. PROJECT DETAIL: DYNAMIC LAYOUT SYSTEM
   Flexible content blocks for case studies
   -------------------------------------------------------------------------- */

.project-content-stream {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

/* Text block inside the content stream */
.content-text-block {
  max-width: 800px;
  margin: 0 auto;
}

/* Dynamic body section padding */
.project-dynamic-body-section {
  padding-bottom: 4rem;
}

.project-content-stream .rich-text > *:first-child {
  margin-top: 0;
}

.project-dynamic-body-section .rich-text h2,
.project-dynamic-body-section .rich-text h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-text);
  margin-top: var(--space-16);
  margin-bottom: var(--space-6);
  line-height: var(--leading-tight);
}

.project-dynamic-body-section .rich-text h2 {
  font-size: var(--text-project);
}

.project-dynamic-body-section .rich-text h3 {
  font-size: 64px;
}

/* Image Block Overrides */
.image-layout-block {
  margin: 0;
}

.image-layout-block img,
.image-layout-block video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--border-radius);
  display: block;
}

/* Device mockup screen video - override the generic rule above */
.image-layout-block .screen-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

/* Wide Video Block (.content-wide-video)
   Equivalent of the reference's device-nodevice section -
   full-width rounded video with a floating caption card */
.content-wide-video {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  border-radius: 1.4rem;
  overflow: hidden;
  box-shadow: 0 28px 56px rgba(20, 21, 23, 0.10);
  cursor: pointer;
  background: #0f1012;
}

.content-wide-video::before {
  content: "";
  display: block;
  padding-top: 56.5%; /* 16:9-ish, matches reference */
}

.content-wide-video .screen-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

/* Floating label card - bottom-right corner */
.wide-video-label {
  position: absolute;
  right: clamp(1.2rem, 4vw, 2.4rem);
  bottom: clamp(1.2rem, 4vw, 2.4rem);
  z-index: 2;
  width: min(18rem, 38%);
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(20, 21, 23, 0.08);
}

.wide-video-label__icon {
  display: block;
  width: 16px;
  height: 16px;
  opacity: 0.7;
  margin-bottom: 6px;
}

.wide-video-label__eyebrow {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.wide-video-label__heading {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

@media (max-width: 720px) {
  .wide-video-label {
    width: fit-content;
    right: 1rem;
    bottom: 1rem;
  }
}

/* Fullwidth Parallax Image (.content-fullwidth-parallax) */
.content-fullwidth-parallax {
  padding-top: 0;
  padding-bottom: 0;
  background: transparent;
  width: 100%;
}

.content-fullwidth-parallax .single-image {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--color-background);
}

/* No ::before spacer - image natural height drives the container */

.content-fullwidth-parallax .fp-parallax-wrap {
  position: relative;
  width: 100%;
}

.content-fullwidth-parallax .fp-parallax-wrap .overlay-image {
  width: 100%;
  height: auto;
  display: block;
}

.content-fullwidth-parallax .fp-parallax-wrap .dark-overlay {
  background: linear-gradient(
    45deg,
    #d4d4d4,
    #ffffff,
    #ececec,
    #ffffff,
    #dadada
  );
  mix-blend-mode: multiply;
  position: absolute;
  inset: 0;
}

.image-block-caption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  font-style: italic;
}

/* 1. Full-width (single image, contained) */
.layout-full_width {
  width: 100%;
  overflow: hidden;
}

.layout-single_centered {
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* Grid Layouts (Asymmetric, Equal, Triple) */
.layout-asymmetric_pair,
.layout-equal_pair,
.layout-triple_row {
  display: grid;
  gap: var(--space-6);
}

.layout-asymmetric_pair {
  grid-template-columns: 60% 1fr;
}

.layout-asymmetric_pair.is-reversed {
  grid-template-columns: 1fr 60%;
}

.layout-equal_pair {
  grid-template-columns: 1fr 1fr;
}

.layout-triple_row {
  grid-template-columns: repeat(3, 1fr);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .layout-triple_row {
    /* Optional: 2x1 stack for tablets */
    grid-template-columns: 1fr 1fr;
  }
  .layout-triple_row > div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .layout-asymmetric_pair,
  .layout-equal_pair,
  .layout-triple_row {
    grid-template-columns: 1fr !important;
  }
  .layout-single_centered {
    max-width: 100%;
  }
  .image-layout-block img,
  .image-layout-block video {
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  .image-layout-block img,
  .image-layout-block video {
    border-radius: 8px;
  }
}

/* ==========================================================================
   PARALLAX IMAGE COMPONENT (.parallax-img)
   Use as: <div class="parallax-img"><img srcset="..." data-scroll data-scroll-speed="-1" /></div>
   ========================================================================== */

.parallax-img {
  position: relative;
  overflow: hidden;
}

.parallax-img img {
  position: absolute;
  inset: -20%;
  width: 100%;
  height: 140%;
  object-fit: cover;
  will-change: transform;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .parallax-img img {
    position: relative;
    inset: auto;
    height: 100%;
    will-change: auto;
  }
}

/* ==========================================================================
   DEVICE MOCKUP COMPONENT
   Ported from forma-device-mockup.html reference
   Usage: add device_mockup: "macpro" to an image_block in projects.json
   ========================================================================== */

/* Base device wrapper */
.device {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 800px) {
  .device {
    max-width: 88%;
  }
  .content-image-block .device {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .device {
    max-width: 82%;
  }
  .content-image-block .device {
    max-width: 100%;
  }
}

/* The screen content area - video/image fills this */
.block-device .single-image,
.content-image-block .single-image {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  background: #000;
  z-index: 1;
}

.block-device .single-image::before,
.content-image-block .single-image::before {
  content: "";
  display: block;
  padding-top: 62.5%;
}

/* Video fills the screen area */
.screen-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #000;
  display: block;
}

/* The device frame image sits on top */
.overlay-device-image {
  width: 100%;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.overlay-device-image::before {
  content: "";
  display: block;
}

.overlay-device {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* MacBook Pro (Higher angle) variant */
.device-macprohigher .overlay-device-image::before {
  padding-top: 85.5%;
}

.device-macprohigher .single-image {
  width: 98.8%;
  top: 37%;
}

.device-macprohigher .overlay-device {
  background-image: url("images/Mockups/device-macpro-higher.png");
}

/* MacBook Pro 15 (no notch) variant */
.device-mbp15 {
  padding-inline: clamp(14px, 2vw, 26px);
}

.device-mbp15 .overlay-device-image::before {
  padding-top: 50.365%;
}

.device-mbp15 .single-image {
  width: 74.4%;
  left: 49.95%;
  top: 47.3%;
  border-radius: 5px 5px 0 0;
}

.device-mbp15 .overlay-device {
  background-image: url("images/Mockups/device-mbp-15-nonotch.png");
}

/* Frameless wide-card variant (device-nodevice) */
.block-device .device-nodevice .single-image {
  width: 100%;
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  border-radius: 1.4rem;
  overflow: hidden;
  box-shadow: 0 28px 56px rgba(20, 21, 23, 0.1);
}

.block-device .device-nodevice .single-image::before {
  padding-top: 56.5%;
}

.block-device .device-nodevice .overlay-device-image {
  display: none;
}

/* single-block layout helpers */
.single-block {
  margin-top: -1px;
  padding-top: 5rem;
  padding-bottom: 0;
}

.single-block.block-padding-bottom {
  padding-bottom: 5rem;
}

.single-block.block-device.block-padding-bottom {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

/* Full-width image block */
.block-fullwidth {
  padding-top: 0;
  padding-bottom: 0;
  background: transparent;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
}

.block-fullwidth .single-image {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.block-fullwidth .single-image::before {
  content: "";
  display: block;
  padding-top: 66%;
}

.block-fullwidth .overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.block-fullwidth img.overlay,
.block-fullwidth video.overlay {
  display: block;
  object-fit: cover;
}

.block-fullwidth .single-image .overlay-image {
  height: 120%;
  top: -10%;
  bottom: auto;
}

.block-fullwidth .dark-overlay {
  background: #141517;
}


.block-fullwidth .project-hero-logo-wrap {
  width: fit-content;
  height: fit-content;
  padding: 1vw;
}

.block-fullwidth-logo {
  width: clamp(120px, 13.89vw, 240px);
  height: auto;
}




/* Metrics section */
.project-metrics-section {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 88%);
  padding: 6rem 0;
  background: var(--color-white);
}

.project-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

/* Carousel controls */
.carousel-btn-track {
  position: absolute;
  left: max(0px, calc(50% - 550px));
  right: max(0px, calc(50% - 550px));
  top: 0;
  bottom: 0;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

@media (min-width: 1440px) {
  .carousel-btn-track {
    left: max(0px, calc(50% - 550px - 10vw));
    right: max(0px, calc(50% - 550px - 10vw));
    padding: 0 2.525vw;
  }
}

.carousel-btn {
  width: clamp(52px, 5.05vw, 194px);
  height: clamp(52px, 5.05vw, 194px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  background: radial-gradient(circle, rgba(224, 224, 224, 0) 30%, rgba(255, 255, 255, 1) 100%);
  box-shadow: 0 0 160px rgba(0, 0, 0, 0.10), 0 0 20px rgba(0, 0, 0, 0.08);
  transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
}

.carousel-btn svg {
  width: clamp(21px, 2.08vw, 80px);
  height: clamp(21px, 2.08vw, 80px);
  flex-shrink: 0;
}

.carousel-btn:hover {
  transform: scale(1.08);
  color: #111;
}

.carousel-btn:active {
  transform: scale(0.95);
}

@media (max-width: 540px) {
  .carousel-btn {
    width: clamp(32px, 8vw, 44px);
    height: clamp(32px, 8vw, 44px);
  }
  .carousel-btn svg {
    width: clamp(13px, 3.3vw, 18px);
    height: clamp(13px, 3.3vw, 18px);
  }
}

/* Responsive adjustments */
@media (max-width: 720px) {
  .device-macprohigher .single-image {
    width: 98.7%;
    top: 37%;
  }
}

/* video-toggle: pause/play on click (handled by existing JS) */
.video-toggle {
  cursor: pointer;
}

/* Mobile devices block */
.block-mobile-devices {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
}

.block-mobile-devices .mobile-devices-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  padding: 0 clamp(1.4em, 5vw, 5.25em);
}

.block-mobile-devices .mobile-col {
  width: 33.333%;
  padding-top: clamp(4.5em, 18vh, 11em);
  padding-bottom: clamp(4.5em, 18vh, 11em);
  display: flex;
  justify-content: center;
  position: relative;
}

.block-mobile-devices .mobile-device {
  width: 68%;
  position: relative;
  display: flex;
  justify-content: center;
}


.block-mobile-devices .mobile-screen {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 0.35em;
  background: var(--color-background);
  box-shadow: 0 22px 48px rgba(20, 21, 23, 0.08);
}

.block-mobile-devices .mobile-screen::before {
  content: "";
  display: block;
  padding-top: 203%;
}

.block-mobile-devices .mobile-screen--img::before {
  display: none;
}

.block-mobile-devices .mobile-screen-img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .block-mobile-devices .mobile-devices-row { padding: 0; }
  .block-mobile-devices .mobile-device { width: 76%; }
}

@media (max-width: 540px) {
  .block-mobile-devices .mobile-col {
    padding-top: 9vh;
    padding-bottom: 9vh;
  }
}