/* Home page only. */

.hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px;
  padding: clamp(20px, 3vw, 40px) 24px clamp(24px, 3vw, 40px) 76px;
}
.hero__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hero h1 { font-family: 'Poppins', sans-serif; font-weight: 300; }
.hero__small {
  display: block; margin-bottom: 8px; font-size: 15px; line-height: 1.2;
  letter-spacing: .14em; text-transform: uppercase; color: var(--grey);
}
.hero__big {
  display: block; font-size: clamp(30px, 4.2vw, 56px); line-height: 1.05;
  letter-spacing: .04em; text-transform: uppercase;
}
.hero__intro { font-size: clamp(16px, 1.3vw, 19px); max-width: 640px; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* Each section has a sticky icon in the 60px strip on the left. */
.home-section { display: flex; flex-wrap: wrap; align-items: flex-start; animation: rise-in .8s var(--ease) backwards; }
@supports (animation-timeline: view()) {
  #design, #video { animation: rise-in linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
}
.section-icon {
  flex: 0 0 60px; position: sticky; top: 60px; align-self: flex-start; z-index: 2;
  padding: 12px 0 8px; background: rgba(35, 35, 35, .85);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 13px; text-transform: uppercase;
}
.section-body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.section-link { display: flex; justify-content: flex-end; padding: 28px 24px; }

/* Photo gallery: 6 columns (4 on tablets, 2 on phones). Each column holds
   4 photos stacked; the top one wipes across to reveal the next.
   Hover or tap a column to pause and widen it to the photo's full shape. */
.gallery {
  --n: 6; --gh: clamp(340px, 40vw, 560px);
  position: relative; isolation: isolate; display: flex; height: var(--gh);
  background: #111; overflow: hidden;
}
.gallery__col {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0; cursor: pointer;
  flex: 0 1 calc(100% / var(--n));
  transition: flex-basis .75s var(--ease); outline-offset: -3px;
}
.gallery__col img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 28%; user-select: none;
  -webkit-clip-path: inset(0 100% 0 0); clip-path: inset(0 100% 0 0);
  will-change: clip-path; z-index: 0;
}
.gallery__col img.is-under { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); z-index: 1; }
.gallery__col img.is-top {
  -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); z-index: 2;
  transition: -webkit-clip-path 2.2s cubic-bezier(.65, 0, .25, 1), clip-path 2.2s cubic-bezier(.65, 0, .25, 1);
}
@media (max-width: 1100px) { .gallery { --n: 4; } .gallery__col:nth-child(n+5) { display: none; } }
@media (max-width: 700px) { .gallery { --n: 2; } .gallery__col:nth-child(n+3) { display: none; } }

/* Design tiles */
.design-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(max(240px, 30%), 100%), 1fr)); }
.design-grid a { position: relative; display: block; overflow: hidden; aspect-ratio: 688 / 540; background: #000; transition: filter .4s; }
.design-grid a:hover { filter: brightness(1.15); }
.design-grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.design-grid a:hover img { transform: scale(1.05); }

/* Video slider */
.video-window { position: relative; overflow: hidden; overscroll-behavior-x: contain; }
.video-track { --vn: 2; display: flex; transition: transform .9s cubic-bezier(.77, 0, .18, 1); }
.video-track.no-anim { transition: none; }
@media (max-width: 900px) { .video-track { --vn: 1; } }
.video-item { flex: 0 0 calc(100% / var(--vn)); padding: 0 4px; opacity: .45; transition: opacity .6s; }
.video-item.is-current, .video-item.is-playing, .video-item:has(.is-playing) { opacity: 1; }
.video-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 16 / 9; padding: clamp(16px, 2vw, 28px); overflow: hidden; color: var(--white);
}
/* The YouTube thumbnail sits behind the text, darkened so the words stay readable.
   YouTube's standard thumbnail is 4:3 with black bars; filling the 16:9 card crops them off. */
.video-card__thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.5) saturate(.85); transition: filter .4s, transform .6s;
}
.video-card:hover .video-card__thumb { filter: brightness(.65) saturate(1); transform: scale(1.03); }
.video-card__num {
  position: absolute; right: -.06em; bottom: -.22em; font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: clamp(120px, 16vw, 240px); line-height: 1; color: rgba(255, 255, 255, .07);
}
.video-card__top {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .7);
}
.video-card__bottom { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.video-card__title { max-width: 80%; font-size: clamp(20px, 2.2vw, 32px); font-weight: 300; line-height: 1.15; }
.video-card__play {
  flex: none; width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--white); transition: background-color .3s, color .3s;
}
.video-card:hover .video-card__play { background: var(--white); color: var(--charcoal); }
/* In-place video player (js/player.js) */
.video-card.is-playing { padding: 0; background: #000 !important; display: block; }
.vp { position: absolute; inset: 0; background: #000; color: var(--white); outline: none; }
.vp__stage, .vp__stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vp__stage { overflow: hidden; }
/* Crop YouTube's top title/channel bar and bottom subscribe/watermark strip outside the stage while keeping 16:9 video centered */
.vp__stage iframe { position: absolute; left: 0; top: -64px; width: 100%; height: calc(100% + 128px); border: 0; pointer-events: none; }
.vp__stage video { object-fit: contain; background: #000; }
.vp__surface { position: absolute; inset: 0 0 56px; width: 100%; background: transparent; border: 0; padding: 0; cursor: pointer; }
.vp__message { position: absolute; left: 0; right: 0; top: 40%; margin: 0; text-align: center; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.vp__message[hidden] { display: none; }
.vp[data-state="error"] .vp__message { pointer-events: auto; text-transform: none; letter-spacing: 0; padding: 0 24px; }
.vp__bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .78) 28%, rgba(0, 0, 0, .96));
  transition: opacity .3s; font-size: 13px; font-variant-numeric: tabular-nums;
}
.vp:not(.is-active) .vp__bar { opacity: 0; }
.vp:not(.is-active) { cursor: none; }
.vp__btn { flex: none; width: 36px; height: 36px; padding: 0; border: 0; background: none; color: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.vp__btn:hover { opacity: .75; }
.vp__btn:focus-visible, .vp__scrub:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.vp__scrub { --played: 0%; flex: 1 1 auto; min-width: 0; height: 18px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.vp__scrub::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, var(--white) var(--played), rgba(255, 255, 255, .3) var(--played)); }
.vp__scrub::-moz-range-track { height: 3px; background: rgba(255, 255, 255, .3); }
.vp__scrub::-moz-range-progress { height: 3px; background: var(--white); }
.vp__scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: var(--white); border: 0; }
.vp__scrub::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 0; }
.vp:fullscreen { background: #000; }
.vp:fullscreen .vp__surface { bottom: 56px; }
@media (max-width: 520px) { .vp__time { display: none; } .vp__bar { gap: 4px; padding: 4px 6px; } }
.video-timer { height: 2px; margin: 8px 4px 0; background: rgba(255, 255, 255, .18); }
.video-timer div { height: 100%; width: 0; background: var(--white); }
.video-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px 28px 4px; }
.video-buttons { display: flex; align-items: center; gap: 6px; }
.video-buttons button {
  height: 32px; padding: 0; border: 0; background: transparent; color: var(--white);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.video-arrow { width: 32px; }
.video-pip { width: 20px; }
.video-pip span { width: 7px; height: 7px; border-radius: 50%; background: #6A6A6A; transition: background-color .3s, transform .3s; }
.video-pip[aria-current="true"] span { background: var(--white); transform: scale(1.25); }
.video-buttons button:hover span { transform: scale(1.5); }

/* Clients */
.clients { padding: 56px 24px 24px 76px; display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.clients h2 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 24px; }
.clients__list { display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 18px; }
.clients__list a { display: inline-flex; align-items: center; min-height: 44px; transition: opacity .3s; }
.clients__list a:hover { opacity: .7; }

body.light .section-icon { background: rgba(248, 248, 246, .92); color: var(--charcoal); }
body.light .section-icon svg circle[fill="#FFFFFF"] { fill: var(--charcoal); }
body.light .section-icon #aperture { fill: #F8F8F6; stroke: #F8F8F6; }
body.light .section-icon svg[stroke="#FFFFFF"] { stroke: var(--charcoal); }
body.light .section-icon #pencil path[fill="#232323"] { fill: #F8F8F6; }
body.light .hero-nav { background: rgba(248, 248, 246, .88); }
body.light .vp__num { color: rgba(35, 35, 35, .06); }
body.light .vp__title { color: rgba(35, 35, 35, .7); }
body.light .video-timer { background: rgba(35, 35, 35, .14); }
body.light .video-timer div { background: var(--charcoal); }
body.light .video-buttons button { color: var(--charcoal); }
body.light .video-pip span { background: #B8B8B8; }
body.light .video-pip[aria-current="true"] span { background: var(--charcoal); }
