:root{
  --bg:#F3F2EF;
  --text:#111;
  --muted:#333;
  --hl:#F1FF1A; /* close to your highlight yellow */
  --max: 1120px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  background:rgba(243,242,239,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.topbar__inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.kicker{
  font-size: 14px;
  letter-spacing:.02em;
  color: var(--muted);
}

.icon-btn{
  width:40px;height:40px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(255,255,255,.55);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#111;
  margin-left:8px;
  transition: transform .2s ease, background .2s ease;
}
.icon-btn:hover{ transform: translateY(-1px); background:rgba(255,255,255,.8); }
.icon{font-weight:700; font-family: Space Grotesk, Inter, sans-serif;}

.page{ padding: 10px 0 70px; }

.project{
  max-width: var(--max);
  margin: 0 auto;
  padding: 46px 18px 78px;
}

.project__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom: 18px;
}

.title-block{ text-align:right; }
.project__title{
  margin:0;
  font-family: Space Grotesk, Inter, sans-serif;
  font-size: 32px;
  letter-spacing:-.02em;
  line-height:1.1;
}
.project__meta{
  margin-top:6px;
  font-size: 12px;
  color: rgba(0,0,0,.55);
  letter-spacing:.06em;
  text-transform: lowercase;
}

.project__grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items:start;
}

.project__grid--wide{
  grid-template-columns: 1.25fr .75fr;
}

.media{
  margin:0;
  border-radius: 18px;
  overflow:hidden;
  background: transparent;
}
.media img{
  width:100%;
  height:auto;
  display:block;
}

.copy{
  font-size: 16px;
  line-height:1.6;
  color: rgba(0,0,0,.85);
}
.copy p{ margin: 0 0 18px; }

.footer{
  border-top:1px solid rgba(0,0,0,.06);
}
.footer__inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 18px;
  color: rgba(0,0,0,.55);
  font-size: 12px;
}

/* --- Badge (circle draw) --- */
.badge{
  position:relative;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
}
.badge__svg{
  width:100%;
  height:100%;
  display:block;
}
.badge__ring{
  fill: none;
  stroke: rgba(0,0,0,.75);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}
.badge__num{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family: Space Grotesk, Inter, sans-serif;
  font-size: 30px;
}

/* --- Highlight bar (grows in) --- */
.hl{
  position:relative;
  display:inline-block;
  padding: 0 .08em;
}
.hl::before{
  content:"";
  position:absolute;
  left:-.08em;
  right:-.08em;
  bottom:.18em;
  height:.34em;
  background: var(--hl);
  transform: scaleX(0);
  transform-origin:left center;
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
  z-index:-1;
}

/* --- Reveal defaults --- */
.reveal{
  opacity:0;
  transform: translateY(10px);
  transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.reveal.in-view{
  opacity:1;
  transform: translateY(0);
}

/* When highlight enters view */
.hl.reveal.in-view::before{
  transform: scaleX(1);
}

/* When circle enters view */
.badge.reveal.in-view .badge__ring{
  transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1);
  stroke-dashoffset: 0;
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce){
  .reveal{ transition:none; transform:none; opacity:1; }
  .hl::before{ transition:none; transform:scaleX(1); }
  .badge__ring{ transition:none; stroke-dashoffset:0; }
}

/* Responsive */
@media (max-width: 900px){
  .project__grid, .project__grid--wide{ grid-template-columns: 1fr; }
  .title-block{ text-align:left; }
  .project__header{ align-items:center; }
}


/* --- Top-left logo --- */
.topbar__logo{
  height: 34px;
  width: auto;
  display:block;
}
@media (max-width: 900px){
  .topbar__logo{ height: 28px; }
}

/* --- Media collage & galleries (separate images) --- */
.media{ margin:0; }
.media-collage{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 34px;
  gap: 14px;
  position: relative;
  padding: 8px 0 18px;
}
.media-collage img{
  width:100%;
  height:100%;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
}
.media-gallery{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.media-gallery img{
  width:100%;
  height:auto;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
}

/* Reason masonry */
.media-masonry{
  column-count: 2;
  column-gap: 14px;
}
.media-masonry img{
  width:100%;
  height:auto;
  display:block;
  margin: 0 0 14px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
  break-inside: avoid;
}

@media (max-width: 900px){
  .media-collage{
    grid-auto-rows: 28px;
    gap: 12px;
  }
  .media-gallery{ grid-template-columns: 1fr; }
  .media-masonry{ column-count: 1; }
  .media-collage img{ border-radius: 16px; }
  .media-gallery img{ border-radius: 16px; }
  .media-masonry img{ border-radius: 16px; }
}

/* Make collage items more flexible on small screens */
@media (max-width: 620px){
  .media-collage{
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 26px;
  }
  .collage--fitmate img:nth-child(1){ grid-column:1 / span 6 !important; grid-row:auto / span 6 !important; }
  .collage--fitmate img:nth-child(2){ grid-column:1 / span 6 !important; grid-row:auto / span 6 !important; }
  .collage--fitmate img:nth-child(3){ grid-column:1 / span 6 !important; grid-row:auto / span 6 !important; }
  .collage--fitmate img:nth-child(4){ grid-column:1 / span 6 !important; grid-row:auto / span 6 !important; }
}


/* --- Video section --- */
.video-section{
  padding: 90px 0 110px;
}
.video-section__inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.video-section__title{
  font-size: 44px;
  line-height: 1.05;
  margin: 0 0 10px;
}
.video-section__subtitle{
  margin: 0 0 26px;
  opacity: .75;
  max-width: 60ch;
}
.video-wrap{
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.14);
  background: rgba(255,255,255,.35);
}
.video{
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 900px){
  .video-section{ padding: 70px 0 90px; }
  .video-section__title{ font-size: 34px; }
}


/* --- Video sizing tweaks (50% on desktop) --- */
.video-wrap{
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 1100px){
  .video-wrap{ width: 70%; }
}
@media (max-width: 700px){
  .video-wrap{ width: 100%; }
}


/* Safety: if JS fails for any reason, don't keep content hidden */
.no-js .reveal{ opacity:1; transform:none; }
