 
/* Custom fonts for the manuscript section */
@font-face {
    font-family: 'EkaHandwritten';
    src: url('fonts/eka.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Zaza';
    src: url('fonts/zaza.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Site navigation drawer */
body.menu-open {
  overflow: hidden;
}

.menu-layer {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 0.45s;
}

.menu-layer[hidden] {
  display: none;
}

.menu-layer.is-open {
  visibility: visible;
  transition-delay: 0s;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(2, 4, 8, 0.68);
  opacity: 0;
  cursor: default;
  transition: opacity 0.35s ease;
}

.menu-layer.is-open .menu-backdrop {
  opacity: 1;
}

.menu-panel {
  position: relative;
  width: min(32rem, 42vw);
  min-width: 25rem;
  height: 100%;
  max-height: 100%;
  padding: max(1.5rem, env(safe-area-inset-top)) clamp(1.5rem, 4vw, 3rem) max(1.75rem, calc(env(safe-area-inset-bottom) + 0.5rem));
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.09), transparent 30%),
    rgba(9, 11, 17, 0.97);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -2rem 0 5rem rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .menu-panel {
    background-color: rgba(9, 11, 17, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }
}

.menu-layer.is-open .menu-panel {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.menu-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu-logo {
  display: none;
  position: fixed;
  top: var(--site-header-top-padding);
  left: max(var(--site-header-inline-padding), env(safe-area-inset-left));
  z-index: 1;
  width: var(--site-header-logo-width);
  height: auto;
  aspect-ratio: 240 / 64;
  transform: translate(-33.85%, -11%);
}

.menu-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.menu-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(4deg);
}

.menu-languages {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: #a5a5ab;
}

.menu-languages a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: #a5a5ab;
  text-decoration: none;
}

.menu-languages span[aria-hidden="true"] {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  font-size: 0;
}

.menu-languages a[aria-current="true"] {
  color: #fff;
}

.menu-nav {
  padding-block: 0.75rem 0;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

.menu-link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: clamp(0.7rem, 1.8vh, 1.05rem);
  color: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Sylfaen', serif;
  font-size: clamp(1.12rem, 2.4vw, 1.6rem);
  line-height: 1.25;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.25s ease;
}

.menu-link:hover {
  padding-left: 0.4rem;
  color: #fff;
}

.menu-link:last-child {
  border-bottom: 0;
}

.menu-contact {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.35rem;
  margin-top: auto;
  padding-top: clamp(1rem, 2.5dvh, 1.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.menu-contact p {
  width: 100%;
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
}

.menu-contact a {
  color: #fff;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.menu-contact a:hover {
  color: #fff;
  text-decoration: underline;
}

.menu-toggle:focus-visible,
.menu-close:focus-visible,
.menu-link:focus-visible,
.menu-contact a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 47.99rem) {
  .menu-panel {
    width: 100%;
    min-width: 0;
    border-left: 0;
    padding-top: var(--site-header-top-padding);
    padding-inline: max(var(--site-header-inline-padding), env(safe-area-inset-left)) max(var(--site-header-inline-padding), env(safe-area-inset-right));
  }

  .menu-logo {
    display: block;
  }

  .menu-backdrop {
    display: none;
  }

  .menu-link {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }
}

@media (min-width: 48rem) {
  html {
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  html:has(body.menu-open) {
    overflow-y: hidden;
  }

  .menu-languages {
    position: absolute;
    top: max(1.5rem, env(safe-area-inset-top));
    left: clamp(1.5rem, 4vw, 3rem);
    height: 44px;
  }

  body.menu-open .header .nav-icons {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header::before,
  .menu-layer,
  .menu-backdrop,
  .menu-panel,
  .menu-close,
  .menu-link {
    transition-duration: 0.01ms;
  }
}
 

.mesh-section {
  position: relative;
  z-index: 3;
  background: transparent !important;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 992px) {
  .container {
    padding: 0 1.875rem;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    flex-direction: column;
    gap: 2.5rem;
  }
}

/* Process Section Layout Container */
.process-container {
  width: 100%;
  max-width: var(--max-section-width);
  margin-inline: auto;
  padding-inline: var(--fluid-padding);
  padding-block: clamp(2rem, 4vw, 3rem); 
  display: flex;
  flex-direction: column;
  gap: 0rem; 
  box-sizing: border-box;

  --step-gap-text-to-graphic: 0rem; 
  --step-gap-between-steps: 3.5rem;  
}

.process-intro {
  text-align: center;
  max-width: var(--max-content-width);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--step-gap-between-steps);
}

.section-main-title {
  font-family: 'AkolkhetiH', -apple-system, sans-serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.process-step {
  width: 100%;
  max-width: var(--max-content-width);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--step-gap-between-steps);
}

.step-graphic {
  width: 100%;
  max-width: var(--step-graphic-size, var(--graphic-max-width));
  aspect-ratio: var(--graphic-aspect-ratio, 1 / 1);
  margin-top: var(--step-gap-text-to-graphic);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible; 
}

.step-graphic canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  --color-graphic-stroke: rgba(255, 255, 255, 0.75); 
  --color-graphic-dim: rgba(255, 255, 255, 0.15);
  --color-satellite: #d40000; 
}

.step-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.step-title {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: #e2e2e2;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.description {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.6;
  color: #ededed;
  margin: 0;
  text-align: center; 
  word-break: break-word;
}

@media (min-width: 768px) {
  .description {
    text-align: center;
  }
}

.step-graphic canvas.radialspinner { 
  --color-graphic-stroke: #38bdf8; 
  --color-graphic-dim: #334155;    
}

.process-intro {
  --step-gap-text-to-graphic: -1rem;
  --step-gap-between-steps: 1rem;
}

#step-1 {
  --step-gap-between-steps: 1.5rem;
}

#step-2 {
  --step-gap-between-steps: 1.5rem;
}

#step-4 {
  --step-gap-text-to-graphic: -1.5rem;
  --step-gap-between-steps: 0.0rem;
}

/* =========================================
   TORN PAPER THEME CONTAINER (Last Section)
   ========================================= */
.paper-theme-wrapper {
  --paper-max-width: 43.125rem; /* Scalable 690px Equivalent */
  --paper-mobile-gap: 1.625rem; 
  --paper-padding-inline: clamp(1.25rem, 5vw, 2.5rem);

  background-image: url("../assets/paper/paper.avif");
  background-size: cover;
  background-position: center;
  background-repeat: repeat-y;
  position: relative;
  
  width: calc(100% - (var(--paper-mobile-gap) * 2));
  max-width: var(--paper-max-width);
  margin-inline: auto; 
  
  z-index: 222;
  padding-block-start: clamp(0.75rem, 2vw, 1.5rem);
  padding-block-end: 0; 
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  box-sizing: border-box;
  margin-block-start: clamp(1rem, 4vw, 2.5rem); 

clip-path: polygon(
  0% -10%, 
  100% -10%, 
  99.6% 20%, 
  100.1% 38%, 
  99.5% 56%, 
  100.05% 74%, 
  99.7% 88%, 
  100% 110%, 
  0% 110%, 
  0.4% 86%, 
  -0.1% 68%, 
  0.5% 50%, 
  -0.05% 32%, 
  0.3% 16%
);
}

.paper-edge-top {
  position: absolute;
  top: -2.4375rem; 
  left: 0;
  width: 100%; 
  height: 5rem; 
  transform: rotate(180deg);
  background-image: url("../assets/paper/paper.avif");
  background-size: cover;
  background-position: center top;

  -webkit-mask-image: url("../assets/paper/tornpaper.svg");
  mask-image: url("../assets/paper/tornpaper.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;

  filter: drop-shadow(0px 8px 6px rgba(0, 0, 0, 0.25));
  z-index: 100;
  pointer-events: none;
}

.paper-edge-bottom {
  position: absolute;
  left: 0;
  width: 100%; 
  top: 100%;
  margin-top: -2.4375rem; 
  height: 5rem; 
  background-image: url("../assets/paper/paper.avif");
  background-size: cover;
  background-position: center bottom;

  -webkit-mask-image: url("../assets/paper/tornpaper.svg");
  mask-image: url("../assets/paper/tornpaper.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center top;
  mask-position: center top;

  filter: drop-shadow(0px 8px 10px rgba(0, 0, 0, 0.3));
  z-index: 101;
  pointer-events: none;
}

/* Proportional scaling photo attachment wrapper */
.photo-attachment {
  position: relative;
  margin-block-start: clamp(1.6rem, 1.5vw, 2rem);
  margin-block-end: clamp(0.75rem, 2vw, 1.25rem);
  width: 85%;
  max-width: 30rem; 
  z-index: 110; 
  transform: rotate(-2deg);
  margin-inline: auto;
}

.photo-frame {
  background: #ffffff;
  padding: clamp(0.5rem, 2vw, 0.75rem); 
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow:
    2px 10px 25px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.05);
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 3 / 2; 
  object-fit: cover; 
  object-position: center; 
  display: block;
}

.paper-clip {
  position: absolute;
  width: 10%;      
  height: auto;
  object-fit: contain; 
  top: -12%;       
  right: 4%;       
  z-index: 11;
  mix-blend-mode: multiply;
  filter: drop-shadow(2px 3px 2px rgba(0, 0, 0, 0.15));
  pointer-events: none;
}

/* Manuscript Section Typographics */
.manuscript-section {
  width: 100%;
  box-sizing: border-box;
  position: relative;  
  z-index: 105;    
}

.manuscript-body {
  font-family: "EkaHandwritten", cursive, sans-serif;
  font-size: clamp(1.1rem, 4.5vw, 1.8rem);
  color: #1a2533;
  line-height: 1.3; 
  max-width: 100%; 
  margin-inline: auto;
  text-align: left;
  padding-inline: var(--paper-padding-inline); 
  box-sizing: border-box;
}

.manuscript-body p {
  margin-block-end: clamp(0.75rem, 2.5vw, 1.25rem);
  text-indent: clamp(1.2rem, 3vw, 1.8rem);
}

.motivation-text {
    font-family: 'EkaHandwritten', sans-serif;
}

.manuscript-body .headline {
  text-align: center;
  text-indent: 0;
  font-family: "EkaHandwritten", cursive, sans-serif;
  font-size: clamp(1.35rem, 5vw, 2.2rem);
  margin-block-end: clamp(0.5rem, 1.5vw, 0.85rem);
  font-weight: 700;
}

.manuscript-body .readmore {
  font-family: "Zaza", sans-serif;
  font-size: clamp(1.3rem, 4.5vw, 2.2rem);
  text-align: right;
  text-indent: 0 !important; 
  color: #c40000;
  margin-block-start: clamp(-0.75rem, -2vw, -0.25rem);
  margin-block-end: clamp(1.0rem, 3vw, 0.5rem); 
}

/* ==========================================================================
   PERFORMANCE & IMAGE LAZY LOADING ADAPTATIONS
   ========================================================================== */
 
/* Styles transformed <img> tags in scrolly background stack */
.bg-stack .bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* Changed from 'center bottom' to 'center top' */
    opacity: 0;
    transition: opacity 0.5s ease;
}
.bg-stack .bg-image.active {
    opacity: 1;
}

 
/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */
.main-footer {
    background-color: var(--footer-bg);
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 200;
    padding-top: 4rem;
    flex-shrink: 0;
}

/* =========================================
   FOOTER GRID & CENTERING REFINEMENTS
   ========================================= */

.footer-container {
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    /* Responsive side padding that scales down smoothly */
    padding-inline: clamp(1.25rem, 4vw, 3rem); 
    display: flex;
    flex-direction: column;
    gap: 3.2rem;
    align-items: center; 
}

/* Base Mobile View: 2 Columns top, 1 centered row below */
.footer-grid {
    --footer-gap: clamp(1.5rem, 5vw, 3.5rem);
    width: 100%;
    max-width: 42rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem var(--footer-gap);
    justify-items: center; /* Center the column blocks in their grid tracks */
}

/* Each column stays left-aligned internally for clean vertical icon alignment */
.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: fit-content; /* Shrinks container so justify-items: center positions it accurately */
}

/* Column 3 (Social) spans both columns and sits centered on smaller screens */
.footer-column:nth-child(3) {
    grid-column: 1 / -1;
}

.footer-column-title {
    color: var(--footer-white);
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 1.2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.92;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
    margin: 0;
    padding: 0;
}

/* Desktop View: Only collapses when screen is physically smaller than 3 columns (~576px/36rem) */
@media (min-width: 32rem) {
    .footer-grid {
        max-width: none;
        width: fit-content;
        grid-template-columns: repeat(3, max-content);
        gap: 0; /* Standard gap reset */
        justify-items: start;
    }

    /* 1. RESET Column 3 so it stays on the SAME row as Col 1 & 2 */
    .footer-column:nth-child(3) {
        grid-column: auto; /* <--- THIS IS THE MISSING PIECE */
    }

    /* 2. Custom spacing after Column 1 */
    .footer-column:nth-child(1) {
        margin-right: var(--gap-col1-to-col2);
    }

    /* 3. Custom spacing after Column 2 */
    .footer-column:nth-child(2) {
        margin-right: var(--gap-col2-to-col3);
    }
}
/* Link Styles */
.footer-link {
    display: inline-flex;
    align-items: center;
    color: var(--footer-white);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-link:hover {
    opacity: 1;
    transform: translateX(2px);
    text-decoration: underline;
}

.footer-link .icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-right: 0.6rem;
    flex-shrink: 0;
}

.footer-link svg {
    width: 100%;
    height: 100%;
    fill: var(--footer-white);
}
/* Email Obfuscation Styles */
.lazy-email-link {
    cursor: pointer;
}

.lazy-email-text {
    display: inline-block;
    min-width: 6.5rem; /* Prevents text layout shift while hidden */ 
}

.lazy-email-text.is-loaded {
    opacity: 1;
}

.footer-ocean {
    height: 260px;
    width: 100%;
    pointer-events: none;
    position: relative;
    margin-top: 2rem;
}

#footer_wave {
    position: absolute;
    inset: 0;
}

#footer_wave canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}
