/* Slightly smaller font for Marketing line */
.c-home_line[data-module-timeline="homeTitleThree"] {
  font-size: 0.85em !important;
}

/* Force title + desc to single line, allow visible overflow */
.c-projects_list_item_title,
.c-projects_list_item_header_inner .o-layout_item p.u-text-big {
  white-space: nowrap;
  overflow: visible;
}

/* Push the year/date 100px to the right so it doesn't crowd the description */
.c-projects_list_item_header_inner time.u-text-big {
  margin-left: 100px !important;
}

/* Align the project tags row under the (shifted) year column */
.c-projects_list_item_container .c-projects_list_item_description {
  margin-left: 100px !important;
}

/* Widen the projects list container so title sits further left + year further right.
   Applies only inside projects accordion rows (header + list header). */
.c-projects_list .c-projects_list_item_header_inner.o-container,
.c-projects_list .c-projects_list_item_container.o-container,
.c-projects_list_header .o-container {
  max-width: 100% !important;
  padding-left: 40px !important;
  padding-right: 40px !important;
}

/* Lock slider to 16:10 box + reserve a strip at the bottom for the pagination dots */
.c-projects_list_item_images_slider {
  position: relative !important;
  aspect-ratio: 16 / 10 !important;
  background: var(--brown, #674825) !important;
  overflow: hidden;
  padding-bottom: 36px !important;
  box-sizing: content-box !important;
}
.c-projects_list_item_images_slider .swiper {
  height: 100% !important;
}
.c-projects_list_item_images_slider .swiper-wrapper,
.c-projects_list_item_images_slider .swiper-slide {
  height: 100% !important;
}
.c-projects_list_item_images_slider .swiper-slide picture,
.c-projects_list_item_images_slider .swiper-slide img,
.c-projects_list_item_images_slider .swiper-slide video {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  background: var(--brown, #674825);
  display: block;
}
/* Pin pagination inside the reserved bottom strip — always BELOW the image, never over it */
.c-projects_list_item_images_slider .swiper-pagination {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 10px !important;
  text-align: center !important;
  height: 16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Swiper pagination dots — auto-contrast via mix-blend-mode */
.c-projects_list_item_images_slider .swiper-pagination {
  mix-blend-mode: difference;
  z-index: 5;
}
.c-projects_list_item_images_slider .swiper-pagination-bullet {
  background: #ffffff !important;
  opacity: 0.55 !important;
  width: 10px;
  height: 10px;
  border: none;
}
.c-projects_list_item_images_slider .swiper-pagination-bullet-active {
  background: #ffffff !important;
  opacity: 1 !important;
}

/* Click shield (overlay injected by /vendor/click-shield.js for 2s on load) */
#click-shield {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: transparent;
  pointer-events: auto;
}

/* Speed up the "Hello," loader fade-out — 1.2s + 0.6s delay → ~0.5s */
.c-loading,
.c-loading::before {
  transition-duration: 0.5s !important;
  transition-delay: 0s !important;
}

/* Footer reveal animations sometimes don't trigger — force visible */
.c-footer .u-anim {
  opacity: 1 !important;
  transform: none !important;
}

/* Hide projects not yet ready */
#project-george-fox,
#project-pro-esports,
#project-ottr,
#project-daily-dose,
#project-realm,
#project-metafy {
  display: none !important;
}

/* Push Content sup 150px to the right */
.c-home_line_sup:has([data-module-timeline="homeLabelThree"]) {
  transform: translateX(150px) !important;
}

/* Work rail — kill all column borders so there's no visible line between Rail tiles. */
#realisations.c-tagline .c-tagline_item,
#realisations.c-tagline .c-tagline_item:not(:nth-child(4)),
#realisations.c-tagline .c-tagline_item:nth-child(2) {
  border-right: 0 !important;
  border-left: 0 !important;
}

/* About tagline — collapse the 4-tile column-split design to a single full-width block.
   Default rules make each tile 25% wide with overflow:hidden + offset margin-left, so
   the same text appears split across 4 columns with visible seams. Hide tiles 2-4 and
   stretch tile #1 to fill the row so the text reads as one continuous block. */
#a-propos.c-tagline .c-tagline_item {
  border: 0 !important;
}
#a-propos.c-tagline .c-tagline_item:first-child {
  width: 100% !important;
  overflow: visible !important;
}
#a-propos.c-tagline .c-tagline_item:first-child .c-tagline_item_inner {
  width: 100% !important;
  margin-left: 0 !important;
}
#a-propos.c-tagline .c-tagline_item:nth-child(n+2) {
  display: none !important;
}

/* Footer contacts — 2 columns: email+location | Twitter+LinkedIn (150px apart) */
.c-footer_list {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 150px;
  row-gap: 0;
  align-items: start;
}
.c-footer_list > li:nth-child(1) { grid-column: 1; grid-row: 1; }
.c-footer_list > li:nth-child(2) { grid-column: 1; grid-row: 2; }
.c-footer_list > li:nth-child(3) { grid-column: 2; grid-row: 1; }
.c-footer_list > li:nth-child(4) { grid-column: 2; grid-row: 2; }

/* Top-right nav — 3 buttons (You / Work / Get in touch) evenly spaced.
   Targets the desktop nav half (2nd o-layout_item, u-none@to-medium). */
.c-menu > .o-layout > .o-layout_item:nth-child(2) > .o-layout > .o-layout_item {
  width: 33.3333% !important;
}

/* Make spaces in split-char nav labels visible — "Get in touch" had no gaps */
.c-menu_link_label .char-wrap {
  white-space: pre !important;
}


/* Disable scroll while page is loading (until vendor app.js adds .is-loaded to <html>) */
html:not(.is-loaded), html:not(.is-loaded) body {
  overflow: hidden !important;
  height: 100vh;
}

/* LOCALHOST PREVIEW: keep hero blinds closed permanently. */
.c-home_background_item .c-home_background_item_line::after,
.c-home_background_item.is-active .c-home_background_item_line::after,
.c-home_background_item.is-leaving .c-home_background_item_line::after {
  transform: scale3d(1, 1, 1) !important;
  transition: none !important;
}

/* Hero text lines: force LTR so Splitting.js char measurements are
   consistent across browsers. .c-home_lines parent inherits
   direction:rtl, which causes Chrome on Windows to mis-place the 2nd
   line's char-wrap origin — the per-char animation then no-ops and the
   text just appears. text-align is already explicit per line so this
   doesn't change layout. */
.c-home_line,
.c-home_line_wrap,
.c-home_line .char-wrap,
.c-home_line .word {
  direction: ltr;
}

/* Hero dividers: switch the reveal from scaleX (skipped on Chrome for
   Windows for the 2nd row) to clip-path. Also kill the wrap's own
   border-bottom + the vendor opacity fade-out on ::after, so the line
   is ONLY the animated pseudo — no double "instant appear then
   animate" stack. */
.c-home_line_wrap {
  border-bottom-color: transparent !important;
}
.c-home_line_wrap::after,
html.is-ready .c-home_line_wrap::after {
  transform: none !important;
  opacity: 1 !important;
}
.c-home_line_wrap::after {
  clip-path: inset(0 100% 0 0);
  -webkit-clip-path: inset(0 100% 0 0);
  transition: clip-path 1.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s,
              -webkit-clip-path 1.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s !important;
}
.c-home_line_wrap:nth-child(even)::after {
  clip-path: inset(0 0 0 100%);
  -webkit-clip-path: inset(0 0 0 100%);
}
html.is-ready .c-home_line_wrap::after {
  clip-path: inset(0 0 0 0) !important;
  -webkit-clip-path: inset(0 0 0 0) !important;
}

/* ========================================================================
   MOBILE — single breakpoint block matching the vendor's @media (max-width: 699px).
   Fixes:
   - horizontal scroll leak (overrides like translateX(150px) + 150px footer gap)
   - hero rendering as 4 huge vertical columns via vendor portrait fallback
   - footer 2-column grid that won't fit in 375px
   - About Stack label stacking on top of items
   - c-shapes 4 dividers crammed at 25% width each
   ======================================================================== */
@media (max-width: 699px) {
  /* 1. Lock horizontal scroll */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
  }

  /* 2. Hero — restore 4 stacked horizontal rows (override vendor portrait) */
  .c-home_lines {
    direction: rtl;
    text-align: center;
    margin: 0;
  }
  .c-home_line_wrap,
  .c-home_line_wrap.-right,
  .c-home_line_wrap.-no-overflow {
    display: block !important;
    width: 100% !important;
    height: 15vh !important;
    font-size: 12vw !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    padding: 0 1rem !important;
    border-left: 0 !important;
    border-right: 0 !important;
    /* Wrap border stays transparent; the animated ::after pseudo draws
       the visible divider (same mechanism as desktop). */
    border-bottom-color: transparent !important;
  }
  .c-home_line_wrap:last-child {
    display: none !important;
  }
  /* Re-enable the animated horizontal divider on mobile — same clip-path
     reveal as desktop. The wrap-level overrides earlier in this file
     already set up the clip-path transition + final state on is-ready. */
  .c-home_line_wrap::after,
  html.is-ready .c-home_line_wrap::after {
    border-bottom: 1px solid currentColor !important;
    border-right: 0 !important;
    border-left: 0 !important;
  }
  .c-home_line_sup {
    display: inline !important;
    font-size: 0.6rem !important;
    position: absolute !important;
    /* Pull sup labels off the top of the wrap and pin them just above
       the bottom divider line. */
    top: auto !important;
    bottom: 0.4rem !important;
  }
  /* "Content" sits under "Adam" on row 3 — move it to the right side of
     the row instead of the middle so it visually aligns under Adam. */
  .c-home_line_wrap:nth-child(3) .c-home_line_sup {
    left: auto !important;
    right: 1rem !important;
  }
  .c-home_line_sup:has([data-module-timeline="homeLabelThree"]) {
    transform: none !important;
  }

  /* 3. Footer — single-column stack, no 150px gap */
  .c-footer_list {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
    row-gap: 0.25rem !important;
  }
  .c-footer_list > li:nth-child(1),
  .c-footer_list > li:nth-child(2),
  .c-footer_list > li:nth-child(3),
  .c-footer_list > li:nth-child(4) {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  /* 4. About → Stack: label + items side by side. Keep a single full-width
     line above + below the Stack row; suppress the short underline that
     vendor draws under the "Stack" label column. */
  .c-about {
    border-top: 0 !important;
  }
  .c-about_knowledge {
    border-top: 1px solid currentColor !important;
    border-bottom: 1px solid currentColor !important;
  }
  .c-about_knowledge_col:first-child,
  .c-about_knowledge_col {
    border-bottom: 0 !important;
    border-top: 0 !important;
  }
  .c-about_knowledge .o-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 0.75rem !important;
  }
  .c-about_knowledge_col {
    width: auto !important;
    flex: 0 0 auto !important;
  }
  .c-about_knowledge_col:last-child {
    flex: 1 1 auto !important;
    min-width: 0;
  }
  .c-about_knowledge_col:first-child p {
    font-size: 0.85rem !important;
  }
  .c-about_knowledge .o-layout {
    gap: 0.4rem !important;
  }
  .c-knowledge_item,
  .c-knowledge_item p,
  .c-knowledge_item p.u-text-huge {
    font-size: 3.4vw !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
  }

  /* 5. c-shapes — keep items 1 + 3 only */
  .c-shapes_item:nth-child(2),
  .c-shapes_item:nth-child(4) {
    display: none !important;
  }
  .c-shapes_item:nth-child(1),
  .c-shapes_item:nth-child(3) {
    width: 50% !important;
  }

  /* #vous tagline ("Want to grow your reputation..." paragraphs) renders
     as a 4-tile column split. On mobile the tiles wrap to 2 rows × 2
     columns and the vendor's border-right on odd tiles draws a vertical
     line down the middle of the section. Kill it. */
  #vous.c-tagline .c-tagline_item {
    border-right: 0 !important;
    border-left: 0 !important;
  }

  /* Decorative .c-lines overlay inside the you-details section draws a
     vertical column divider that bisects the paragraphs on a narrow
     viewport. Hide just that one — keep the other .c-lines decorations
     used in the Work section. */
  .c-about_you_details .c-lines {
    display: none !important;
  }

  /* "Work Work Work …" rail marquee. Vendor drives it from scroll
     progress, which iOS Safari throttles during momentum scroll. On
     mobile we replace the vendor rail with a manual marquee:
     layout.tsx's inline script duplicates the <h2> 8× into a single
     track and adds .js-mobile-marquee on the rail; this CSS just
     animates the track horizontally on a continuous loop. */
  .js-mobile-marquee {
    overflow: hidden !important;
    width: 100% !important;
  }
  .js-mobile-marquee-track {
    display: inline-flex;
    white-space: nowrap;
    animation: workMobileMarquee 24s linear infinite;
    will-change: transform;
  }
  .js-mobile-marquee-track > h2 {
    display: inline-block;
    padding-right: 0.4em;
    flex: 0 0 auto;
  }
  @keyframes workMobileMarquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
  }

  /* 6. Reverse desktop-only overflow leaks */
  .c-projects_list .c-projects_list_item_header_inner.o-container,
  .c-projects_list .c-projects_list_item_container.o-container,
  .c-projects_list_header .o-container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .c-projects_list_item_header_inner time.u-text-big {
    margin-left: 0 !important;
  }
  .c-projects_list_item_container .c-projects_list_item_description {
    margin-left: 0 !important;
  }
}
