/* Hand-written styles for mehocatic.com.
   Loaded after the Webflow export CSS, so rules here win on equal specificity.
   Keep overrides of the exported design in this file, not in the Webflow CSS. */

/* Works card titles use .heading-style-h4, which capitalises every word.
   A brand spelled with a lowercase first letter (ePraksa) opts out with
   .is-as-written, so the other card titles keep their capitalisation. */
.heading-style-h4.is-as-written {
  text-transform: none;
}

/* Timeline on the ePraksa case study: four Webflow w-col columns in two w-row pairs.
   w-col is a float, so each card is only as tall as its own text and the divider lines
   end at different heights. Turning each pair into a flex row makes the columns, and
   the cards inside them, equally tall. Wrapping keeps w-col-tiny-12 stacking at 479px. */
.about-history-block > .w-row {
  display: flex;
  flex-wrap: wrap;
}

.about-history-block > .w-row > .w-col {
  display: flex;
  float: none;
}

/* Hero marquee with a long title (My Own Piazza).
   The shared Webflow "Marquee loop" moves each .loop-text by its own width in 14s, so a
   wider title runs faster: "My Own Piazza" is about 1.6 times wider than the other
   heroes and moved 1.6 times faster. This animation takes precedence over the inline
   transform that the Webflow interaction writes, and 22s gives the same px/s as the
   other pages. Use .is-slow only on a strip whose text is that much wider. */
@keyframes marquee-slow {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

.hero-loop-strip.is-slow .loop-text {
  animation: marquee-slow 22s linear infinite;
}

/* Services list on the home page (.work-list-item rows).
   On desktop a Webflow IX2 hover interaction flips the row image in and moves it with
   the cursor. Below 768px the layout already reserves space for the image under each
   row, but IX2 keeps it hidden (inline opacity 0, rotated, scaled) until a tap.
   Show the images permanently on phones. !important is needed to beat the inline
   styles IX2 writes; desktop behaviour is unchanged. */
@media screen and (max-width: 767px) {
  .list-image-height {
    opacity: 1 !important;
    transform: none !important;
  }

  .list-image-height .image-fill {
    transform: none !important;
  }
}

/* Testimonial credit on the home page. The photos were removed, so the credit block
   is only the name and the role; centre them under the quote. */
.home-banner_credit {
  text-align: center;
}

/* Keep the project screenshots intact and crop only their presentation margins.
   Percentages map the original 1200 x 900 assets into their browser windows. */
.skill-project-visual {
  background-color: #edf0f2;
}

.skill-project-screen {
  position: absolute;
  top: 50%;
  left: 6%;
  width: 88%;
  aspect-ratio: 1060 / 760;
  overflow: hidden;
  border-radius: .5rem;
  box-shadow: 0 .75rem 2rem #0b0c0f14;
  transform: translateY(-50%);
}

.skill-project-source {
  position: absolute;
  top: -9.210526%;
  left: -6.603774%;
  width: 113.207548%;
  max-width: none;
  height: auto;
}

.skill-project-visual--frontend .skill-project-screen {
  aspect-ratio: 1060 / 553;
}

.skill-project-visual--frontend .skill-project-source {
  top: -31.464738%;
}

/* Horizontal overflow. The marquee wrapper .hero-loop-text is width: 100vw, which
   includes the vertical scrollbar, so every page that has one (about, works, contact,
   thanks and the case studies) scrolls sideways by the scrollbar width. Clip that off.
   overflow: clip is deliberate: unlike hidden it does not create a scroll container, so
   the sticky timeline on About and the sticky case study images keep working. The rule
   needs body as well: in Chrome overflow-x: clip on html alone still leaves the viewport
   scrollable by those 15px, body is what actually clips. */
html,
body {
  overflow-x: clip;
}

/* Download CV in the hamburger menu. The button in the navbar carries
   hide-mobile-portrait, so below 480px the CV was only reachable from the About page.
   This menu item is the exact mirror of that: hidden everywhere the button shows, shown
   only where it hides, so the two never appear at once. Above 480px it also stays out of
   the way of .navbar_link-wrapper, whose grid is four columns wide on desktop. The gap
   and the top line set it apart from Home, About, Work and Contact: it opens a PDF
   rather than going to a page. */
.navbar_cv-item {
  display: none;
}

@media screen and (max-width: 479px) {
  .navbar_cv-item {
    display: block;
    margin-top: .75rem;
  }

  .navbar_cv-item .navbar_link {
    border-top: 1px solid var(--outline-light);
  }
}
