/*
  Hand-written overrides for issues not addressed by the Webstudio export.
  Loaded after the generated stylesheet so these rules win without !important
  (the generated styles live inside @layer presets, so even unlayered rules
  here win regardless of selector order).

  IMPORTANT - this site is a React app that gets server-rendered then
  hydrated client-side (see assets/chunks/*.js for the hydrateRoot() call).
  Editing the exported HTML's classes/elements directly does NOT work: React
  detects the mismatch between the server HTML and what its bundled render
  function expects, and silently reverts the DOM to match the bundle a
  couple seconds after load (logs React errors #418/#423 in the console).
  So every rule below targets ONLY attributes/classes/structure that are
  already part of the original Webstudio-generated markup (IDs, href
  values, original class names) - never a class or element added by hand -
  so there is nothing for hydration to revert. The <link> tag pulling in
  this stylesheet is the one safe HTML edit, since it lives in <head>,
  outside the React-hydrated body root.

  If the site is re-exported from Webstudio, re-check these selectors still
  match the new generated markup.
*/

/* --size-fluid-5/6 (section padding-top/padding-bottom, used on every page's
   top section and footer) had floors that only start scaling down below a
   ~1143-1280px viewport, unlike every other token in the fluid scale, which
   scales from ~800px. Below that they were pinned at a flat 64px/80px on
   every phone, tablet and small-laptop width. Lower the floors (keeping the
   original desktop ceilings) so padding actually shrinks on small screens. */
:root {
  --size-fluid-5: clamp(2rem, 5vw, 5rem);
  --size-fluid-6: clamp(2.5rem, 7vw, 7.5rem);
}

/* Home "Latest work" thumbnails: source images have inconsistent intrinsic
   aspect ratios (one is 1100x683 vs the others' 790x661), so cards rendered
   at different heights. Force a shared aspect ratio and crop to fill it.
   Targeted via each card's stable href rather than a hand-added class. */
#work a[href^="/project-"] > div > div:first-child {
  aspect-ratio: 790 / 661;
  overflow: hidden;
}

#work a[href^="/project-"] > div > div:first-child img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Services icons: the grid container had a max-width:767px override that
   switched it from display:grid (3 columns) to display:flex;column (stacked),
   collapsing the 3 cards into a single column on mobile. Keep it a 3-column
   grid at every width instead, scoped to #services only (the shared classes
   behind that override are also used by the hero section, where stacking on
   mobile is intentional and should stay untouched). */
@media (max-width: 767px) {
  #services > [data-ani-children] {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Home header nav links (Services/Work/Contact): on mobile these are
   redundant with scrolling the single page, and Contact is duplicated by
   the hero CTA button and the footer form, so hide them below 767px rather
   than letting them crowd the logo. Scoped to the home page's nav via its
   own original class (style-guide has an unrelated in-page nav that should
   stay visible). */
@media (max-width: 767px) {
  nav.c6hjwpc > div {
    display: none;
  }
}

/* Drop the "UX | UI | Product Design" kicker above the home hero heading,
   at the owner's request, at all breakpoints. */
.w-text.c160atll {
  display: none;
}
