/* ============================================================
   Anna Filipowska-Kot — Portfolio
   Design tokens extracted 1:1 from Figma (file: Portfolio)
   ============================================================ */

:root{
  --black: #1d1d1d;
  --white: #ffffff;
  --gray: #606060;
  --subs-gray: #858585;
  --text-body: #5c5c5c;
  --bg-soft: #f5f5f5;

  --font-display: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: Georgia, "Times New Roman", serif;

  --page-max: 1440px;
  --pad-x: 80px;

  --dur: .25s;
  --ease: cubic-bezier(.4,0,.2,1);
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.wrap{
  max-width: var(--page-max);
  margin: 0 auto;
  position: relative;
}

/* ---------------- Typography ---------------- */

.eyebrow{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  line-height: 100%;
  letter-spacing: .06em; /* 0.72px @ 12px */
  color: var(--subs-gray);
  text-transform: uppercase;
  margin: 0;
}

.h1{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 120px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--black);
  margin: 0;
}

.h2{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--black);
  margin: 0;
}

.h3{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--black);
  margin: 0;
}

.body1{
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.35;
  color: var(--black);
  margin: 0;
}

.body1--muted{
  color: var(--text-body);
}

.body2{
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: .02em; /* 0.32px */
  color: var(--black);
  margin: 0;
}

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

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 10px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 20px;
  letter-spacing: .02em;
  border: 1px solid var(--black);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.btn-primary{
  background: var(--black);
  color: var(--white);
}
.btn-primary:hover,
.btn-primary:focus-visible{
  background: var(--white);
  color: var(--black);
  transform: translateY(-2px);
}

.btn-secondary{
  background: transparent;
  color: var(--black);
}
.btn-secondary:hover,
.btn-secondary:focus-visible{
  background: var(--black);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-secondary svg,
.btn-secondary img{ transition: transform var(--dur) var(--ease); }
.btn-secondary:hover svg,
.btn-secondary:hover img{ transform: translateX(4px); }

.buttons-row{
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}

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

.nav{
  display: flex;
  justify-content: flex-end;
  padding: 40px var(--pad-x) 0;
  position: relative;
  z-index: 5;
}

.nav__panel{
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Hamburger toggle — mobile landing only (44px touch target). */
.nav__toggle{
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--black);
  cursor: pointer;
}

.nav__link{
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 20px;
  letter-spacing: .02em;
  padding: 10px;
  color: var(--black);
  position: relative;
  transition: color var(--dur) var(--ease);
}

.nav__link::after{
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav__link:hover::after,
.nav__link:focus-visible::after{
  transform: scaleX(1);
}

/* ---------------- Hero (landing) ---------------- */

.hero{
  position: relative;
  padding: 40px 0 160px; /* 80px base + 80px gap to Selected Projects (Ania's review) */
  display: flex;
  flex-direction: column;
  gap: 80px;
  /* Figma: radial white glow from top center over white
     (ellipse 1297x740 at (720,0) in the 1440 frame, #fff -> #eaeaea
     at 50% opacity). Pure CSS, so it spans any viewport width. */
  background:
    radial-gradient(ellipse 90% 740px at 50% 0,
      rgba(255,255,255,.5), rgba(234,234,234,.5)),
    var(--white);
}

/* Content is capped at the design width and centered on wider
   screens; the gradient and shelf stay full-bleed. */
.hero .nav,
.hero__main{
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.hero__main{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Scales continuously beside the photo circle; reaches the design's
   120px exactly at the 1440px reference width. */
.hero__content .h1{ font-size: clamp(48px, 8.35vw, 120px); }

/* Seated cutout photo (transparent bg) floats directly on the
   hero gradient — no circle, natural aspect ratio. */
.hero__photo{
  width: 300px;
  flex-shrink: 0;
}
.hero__photo img{ width: 100%; height: auto; }

.hero__content{
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: flex-start;
}

.hero__title-group{
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------------- Projects (landing) ---------------- */

.projects{
  padding: 80px var(--pad-x);
  background: linear-gradient(to bottom, var(--bg-soft), var(--white));
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.projects__grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 16px;
}

.project-card{
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--black);
}

.project-card__img{
  width: 100%;
  aspect-ratio: 416 / 646;
  overflow: hidden;
  background: var(--bg-soft);
}
.project-card__img img{
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform .5s var(--ease);
}
.project-card:hover .project-card__img img{ transform: scale(1.04); }

.project-card__title{
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.02em;
  margin: 0;
  transition: opacity var(--dur) var(--ease);
}
.project-card:hover .project-card__title{ opacity: .6; }

.project-card__meta{
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--subs-gray);
  margin: 2px 0 0;
}

/* ---------------- About (landing) ---------------- */

/* Grid, not flex: .about__photo's height must match .about__block's
   ("Long story short" + copy) exactly, dynamically — not the "About"
   heading, not the tags below. .about__main/.about__intro are
   flattened (display:contents) so h2/.about__block/.about__tags and
   .about__photo all become direct grid items; block+photo share a
   row and grid's default stretch makes the photo fill that row's
   height. */
.about{
  padding: 80px var(--pad-x);
  display: grid;
  /* Percentage/max-width on the photo ITEM against an auto-sized
     track has an indefinite basis and resolves unpredictably (0 in
     some engines) — size the TRACK itself instead, which is always
     well-defined. */
  grid-template-columns: 1fr min(376px, 40%);
  column-gap: 128px;
  row-gap: 64px;
  background: var(--white);
}
.about__main,
.about__intro{ display: contents; }

.about .h2{ grid-column: 1 / -1; grid-row: 1; }
.about__block{ grid-column: 1; grid-row: 2; }

.about__block{
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 848px;
}

.about__copy{
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about__copy p{ margin: 0; }

.about__tags{
  display: flex;
  flex-direction: column;
  gap: 32px;
  grid-column: 1 / -1;
  grid-row: 3;
  /* row-gap is a uniform 64px; the original gap before tags was 80px
     (.about__main's own gap) — the extra 16px makes up the difference. */
  margin-top: 16px;
}

.tag-row{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.tag{
  border-left: 1px solid var(--black);
  border-right: 1px solid var(--black);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 20px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.about__photo{
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  filter: drop-shadow(2.6px 3.5px 7.5px rgba(0,0,0,.15));
  overflow: hidden;
}
.about__photo img{ width: 100%; height: 100%; object-fit: cover; }

/* ---------------- Contact / footer (landing) ---------------- */

.contact{
  padding: 80px var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px;
  text-align: center;
  background: linear-gradient(to bottom, var(--white) 41%, var(--bg-soft));
  scroll-margin-top: 40px;
}

.contact__lead{
  font-family: var(--font-body);
  font-size: clamp(18px, 2.2vw, 24px); /* matches the hero .body1 scale */
  line-height: 1.3;
  color: var(--gray);
  max-width: 448px;
  margin: 0;
}

.contact__row{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 955px;
}

.contact__item{
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .02em;
}

.contact__item img{ width: 16px; height: 16px; }
.contact__item.location img{ width: 24px; height: 24px; }

.contact__item a{
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact__dot{ color: var(--black); }

/* ---------------- Project page: intro/hero ---------------- */

.project-hero{
  padding: 112px var(--pad-x) 0;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.project-intro{
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 734px;
}

.project-intro__title{
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Inter runs ~5% wider than Helvetica Neue at 120px; slightly tighter
   tracking keeps the project titles on one line in the 734px intro
   column, as before the font swap. */
.project-intro .h1{
  letter-spacing: -0.03em;
}

.project-hero__media{
  display: flex;
  justify-content: center;
}

.project-hero__media-frame{
  position: relative;
  width: 100%;
  max-width: 1058px;
  /* Matches the exported hero videos (1920x1080); Ania's decision
     2026-07-06 — do not keep the 1058/742 Figma frame ratio. */
  aspect-ratio: 16 / 9;
  border-radius: clamp(24px, 6vw, 82px);
  overflow: hidden;
}
.project-hero__media-frame img,
.project-hero__media-frame video{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Before playback the video/poster fills the frame (cover, inherited
   from the shared img/video rule above). Once the user starts playback
   (.has-played, set in main.js) it switches to contain so the full
   exported composition is shown uncropped. */
.project-hero__media-frame video.has-played{
  object-fit: contain;
}

/* Play/pause control, centered on the video (videos do not autoplay).
   z-index lifts it above the ::after tint overlay. While playing it
   fades out; hovering the frame or keyboard focus brings it back. */
.video-toggle{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  z-index: 1;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              opacity var(--dur) var(--ease);
}
.video-toggle:hover,
.video-toggle:focus-visible{
  background: var(--white);
  color: var(--black);
}
.video-toggle svg{ width: 24px; height: 24px; display: block; }
.video-toggle .icon-pause{ display: none; }
.video-toggle.is-playing .icon-play{ display: none; }
.video-toggle.is-playing .icon-pause{ display: block; }
.video-toggle.is-playing{ opacity: 0; }
.project-hero__media-frame:hover .video-toggle.is-playing,
.video-toggle.is-playing:focus-visible{ opacity: 1; }
.project-hero__media-frame::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--tint, rgba(0,0,0,0)) 58%, var(--tint-strong, rgba(0,0,0,.15)));
  pointer-events: none;
}

/* ---------------- Overview / Role-Tools-Scope ---------------- */

.project-details{
  padding: 80px var(--pad-x) 0;
  display: flex;
  gap: 64px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.project-details__main{
  display: flex;
  flex-direction: column;
  gap: 80px;
  flex: 1 1 600px;
  max-width: 733px;
}

.info-card{
  display: flex;
  flex-direction: column;
  gap: 32px;
  filter: drop-shadow(2px 2px 5px rgba(0,0,0,.1));
}

.info-card p{ margin: 0; }
.info-card .body1--muted p{ margin: 0 0 1em; }

.project-details__side{
  flex: 1 1 405px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 405px;
}

.side-card{
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  border-radius: 64px;
  background: var(--bg-soft);
}

.side-card__list{
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 20px;
  letter-spacing: .02em;
}
.side-card__list p{ margin: 0; }

/* ---------------- Mobile flows ---------------- */

.mobile-flows{
  padding: 80px var(--pad-x) 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Soft accent glow emerging from the right edge — contained to this
   section only, heavily feathered so it never reads as a hard cut
   against the sections above/below. */
.mobile-flows::before{
  content: "";
  position: absolute;
  top: 50%;
  right: -18%;
  width: 50%;
  aspect-ratio: 1 / 1;
  transform: translateY(-50%);
  background: radial-gradient(circle, var(--accent, transparent) 0%, transparent 70%);
  opacity: .22;
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
}

.mobile-flows__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.mobile-flows__grid img{
  width: 100%;
  height: auto;
  border-radius: 32px;
}

@media (max-width: 900px){
  .mobile-flows__grid{ grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 480px){
  .mobile-flows__grid{ grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}

.icon-arrow{
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ---------------- Project buttons row + next-project footer ---------------- */

.project-cta{
  padding: 40px var(--pad-x) 0;
  display: flex;
  justify-content: center;
}

.next-project{
  margin-top: 112px;
  padding: 80px var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.next-project__eyebrow{
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: .02em;
  color: var(--subs-gray);
  margin: 0 0 16px;
}

.next-project__title{
  font-family: var(--font-body);
  font-size: 24px;
  color: var(--gray);
  margin: 0;
}

.next-project__head{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------------- Case-study page overrides (applied via body.project-page) ---------------- */

/* Figma shows Role/Tools/Scope as plain text on the page background —
   no card surface. Padding is kept: text positions match the frame 1:1. */
.project-page .side-card{
  background: transparent;
  border-radius: 0;
}

/* Case-study pages: the first Figma frame carries a linear fill
   #F4F3F2 -> #FFFFFF (1946px tall on Athle-Restore); below it the page
   is white. */
.project-page{
  background: linear-gradient(180deg, #f4f3f2 0%, #ffffff 1946px);
}

/* Athle-Restore: same accent blob as the other case studies, but 10%
   more visible (.22 * 1.1). */
.page-athle .mobile-flows::before{
  opacity: .242;
}

/* ---------------- Utility / a11y ---------------- */

.visually-hidden{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

:focus-visible{
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1100px){
  :root{ --pad-x: 48px; }

  /* Stacked single column: h2, block, photo and tags each take the
     full row, one after another (photo no longer shares a row with
     block, so it reverts to its own aspect-ratio-driven height). */
  .about{ grid-template-columns: 1fr; row-gap: 64px; }
  .about__block{ grid-column: 1; grid-row: 2; }
  .about__photo{ grid-column: 1; grid-row: 3; width: 100%; max-width: 376px; }
  .about__tags{ grid-row: 4; }

  .projects__grid{ grid-template-columns: repeat(2, 1fr); }

  .project-details{ flex-direction: column; }
  .project-details__side{ max-width: 100%; width: 100%; }
  .side-card{ width: 100%; }
}

/* ---------------- Tablet — landing page (per Figma tablet mockup) ----------------
   Range-scoped so desktop (>1100) and mobile (<=720) stay untouched.
   Selectors are landing-only (.hero .nav, .projects, .about, .contact__row). */
@media (min-width: 721px) and (max-width: 1100px){
  .hero .nav{ justify-content: center; }

  .hero{ gap: 40px; }

  .hero__content .body1{ max-width: 420px; }

  /* Photo scales down at tablet. */
  .hero__photo{ width: 240px; }

  .projects > .h2{ text-align: center; }

  /* 2-column grid (inherited); the third card gets its own centered row. */
  .projects__grid .project-card:last-child{
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 16px) / 2);
  }

  /* About keeps two columns at tablet (the generic <=1100 rule stacks them).
     Photo height/top now come for free from the base grid (block and
     photo share a row, so the photo naturally matches .about__block's
     height and top — no manual offset needed). Selected Projects ->
     About gap reduced to 80px (Ania's review): .projects keeps its
     80px bottom padding, .about's top padding removed. Reinstates the
     2-column grid the generic <=1100 rule stacked back to 1. */
  .about{
    grid-template-columns: 1fr 33%;
    column-gap: 128px;
    padding-top: 0;
  }
  .about__block{ grid-column: 1; grid-row: 2; }
  .about__photo{ grid-column: 2; grid-row: 2; }
  .about__tags{ grid-row: 3; }

  /* "About" heading is page-centered in the mockup while living inside
     the narrower text column — widen it to the content width. */
  .about__intro > .h2{
    width: calc(100vw - 2 * var(--pad-x));
    text-align: center;
  }

  .contact__row{ justify-content: space-between; }
}

/* ---------------- Tablet — Athle-Restore (per Figma tablet mockup) ----------------
   Scoped to .project-page so Zielone Konie / Volonteurope keep their
   current behavior until their tablet mockups are approved. */
@media (min-width: 721px) and (max-width: 1100px){
  .project-page > .nav{ justify-content: center; }

  .project-page .project-intro{
    align-self: center;
    text-align: center;
  }

  /* Desktop's flex-basis (600px) becomes height in the stacked column
     layout and inflated the gap below Overview; exactly 64px instead. */
  .project-page .project-details{ gap: 64px; }
  .project-page .project-details__main{
    flex: 0 0 auto;
    max-width: none;
    text-align: center;
  }

  /* Role / Tools / Scope become three equal centered columns.
     flex-basis:auto — the desktop 405px basis would act as height here
     and inflate the gap to the next section (Ania: exactly 80px, which
     is the section's own padding-top). */
  .project-page .project-details__side{
    flex: 0 0 auto;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
  }
  .project-page .side-card{
    flex: 1;
    padding: 0;
    text-align: center;
  }
  .project-page .side-card .tag-row{
    flex-direction: column;
    align-items: center;
  }

  .project-page .mobile-flows > .h2{ text-align: center; }

  /* Gap between the Role/Tools/Scope columns and "Key mobile flows":
     120px per Ania's review (section padding 80 + 40). */
  .project-page .mobile-flows{ padding-top: 120px; }

  /* Gap between the CTA buttons and "Next project": 80px per Ania's
     review (the footer's own padding; its 112px margin removed). */
  .project-page .next-project{ margin-top: 0; }

  /* Carousel: horizontal scroll-snap strip bleeding to the right
     viewport edge. Two full phones per view; at every snapped step 30%
     of the previous phone peeks on the left and 30% of the next on the
     right (0.6w + 2w + 3*24px = 100vw - 48px -> w = 38.46vw - 46.2px;
     scroll-padding-left = 0.3w + 24px reserves the left peek). No
     scrollbar, native touch scrolling, keyboard-scrollable via
     tabindex on the strip. */
  .project-page .mobile-flows__grid{
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-right: calc(-1 * var(--pad-x));
    padding-right: var(--pad-x);
    scroll-padding-left: calc(11.54vw + 10.2px);
    scrollbar-width: none;
  }
  .project-page .mobile-flows__grid::-webkit-scrollbar{ display: none; }
  .project-page .mobile-flows__grid img{
    flex: 0 0 calc(38.46vw - 46.2px);
    width: calc(38.46vw - 46.2px);
    scroll-snap-align: start;
  }
}

@media (max-width: 720px){
  :root{ --pad-x: 24px; }

  .nav{ justify-content: center; padding-top: 24px; }
  .nav__panel{ gap: 4px; flex-wrap: wrap; justify-content: center; }

  .hero{ padding-top: 24px; padding-bottom: 56px; gap: 40px; }

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

  .contact__row{ flex-direction: column; gap: 16px; }
  .contact__dot{ display: none; }

  .buttons-row{ flex-direction: column; width: 100%; }
  .btn{ width: 100%; }

  .about{ padding-top: 56px; padding-bottom: 56px; }

  /* --- Landing mobile (per Figma mobile mockup); .hero/.about scope
     keeps the case-study pages' mobile behavior unchanged. --- */

  /* Nav collapses to a hamburger; links stack below when open. */
  .hero .nav{ justify-content: flex-end; flex-wrap: wrap; }
  .hero .nav__toggle{ display: flex; }
  .hero .nav__panel{ display: none; }
  .hero .nav.is-open .nav__panel{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    gap: 4px;
    padding-top: 8px;
  }

  /* Hero: left-aligned content, inline buttons (not full width).
     Text and buttons come first; the seated photo stacks below
     them, 20% smaller than desktop (Ania's review). */
  .hero .buttons-row{ flex-direction: row; width: auto; }
  .hero .btn{ width: auto; }
  .hero__main{
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
  .hero__photo{ width: 240px; }

  .about__intro > .h2{ text-align: left; }
  .about__photo{ width: 53vw; margin: 0 auto; }
}

/* ---------------- Mobile — Athle-Restore (per Figma mobile mockup) ----------------
   Scoped to .project-page so the other case studies keep their current
   mobile behaviour until their own mockups are approved. */
@media (max-width: 720px){
  /* Nav collapses to a hamburger (same pattern as the landing nav). */
  .project-page > .nav{ justify-content: flex-end; flex-wrap: wrap; }
  .project-page .nav__toggle{ display: flex; }
  .project-page > .nav .nav__panel{ display: none; }
  .project-page > .nav.is-open .nav__panel{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    gap: 4px;
    padding-top: 8px;
  }

  /* Hero intro stays left-aligned (desktop); trimmed top padding. */
  .project-page .project-hero{ padding-top: 24px; gap: 40px; }

  /* Overview + Role/Tools/Scope centered and stacked in one column;
     Overview -> Scope columns gap: 64px per Ania's review. flex-basis
     (600px) must be neutralized here too — same bug as tablet, where
     it acts as a phantom height in the stacked column layout. */
  .project-page .project-details{ gap: 64px; }
  .project-page .project-details__main{
    flex: 0 0 auto;
    max-width: none;
    text-align: center;
  }
  .project-page .side-card{ padding: 0; text-align: center; }
  .project-page .side-card .tag-row{ flex-direction: column; align-items: center; }

  .project-page .mobile-flows > .h2{ text-align: center; }

  /* CTA buttons -> "Next project" footer: 64px per Ania's review
     (base margin-top:112 removed; the remaining gap is padding-top). */
  .project-page .next-project{ margin-top: 0; padding-top: 64px; }

  /* Key mobile flows → single-phone carousel with a peek of the next
     (tablet carousel mechanics; wider slide so ~one phone shows). */
  .project-page .mobile-flows__grid{
    display: flex;
    gap: 24px;
    max-width: none;
    margin: 0 calc(-1 * var(--pad-x)) 0 0;
    padding-right: var(--pad-x);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .project-page .mobile-flows__grid::-webkit-scrollbar{ display: none; }
  .project-page .mobile-flows__grid img{
    flex: 0 0 68vw;
    width: 68vw;
    scroll-snap-align: start;
  }
}

/* ---------------- Mobile — case-study pages, left-aligned content ----------------
   Overview, Role/Tools/Scope and "Key mobile flows" are left-aligned
   (overriding the centered rules in the shared block above), and the
   Scope tags wrap in a row instead of stacking one per line. Applied
   to all three case studies via .project-page (approved on Athle-
   Restore's updated mockup, then extended to Zielone Konie and
   Volonteurope to match). */
@media (max-width: 720px){
  .project-page .project-details__main{ text-align: left; }
  .project-page .side-card{ text-align: left; }
  .project-page .side-card .tag-row{
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .project-page .mobile-flows > .h2{ text-align: left; }
}
