/* ============================================================
   Cherry Pit Studios — shared styles
   Grimey collage / desktop-OS aesthetic
   ============================================================ */

:root {
  --red: #a80606;
  --red-dark: #7a0202;
  --pink: #ff2fd1;
  --pink-hot: #ff14c8;
  --lime: #c2f600;
  --lime-soft: #c8f53d;
  --purple-bg: #6f63b8;
  --ink: #0c0c0c;

  --display: "Anton", "Arial Narrow", sans-serif;
  --label: "Archivo Black", "Arial Black", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: var(--body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

/* Film-grain overlay applied site-wide for the grimey texture */
.grain::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.10;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- Lime caption / text blocks ---------------- */
.lime-block {
  display: inline-block;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--label);
  padding: 4px 10px;
  line-height: 1.05;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}
.lime-label {
  display: inline-block;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 3px 7px;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}

/* ---------------- Shared top nav (inner pages) ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 18px;
  background: var(--red);
  border-bottom: 2px solid var(--red-dark);
}
.topbar__logo { height: 30px; width: auto; }
.topbar__logo img { height: 100%; width: auto; }
.topbar__nav {
  display: flex;
  gap: 22px;
  font-family: var(--display);
  font-size: clamp(18px, 2.4vw, 30px);
  letter-spacing: 0.01em;
}
.topbar__nav a {
  color: var(--pink);
  text-decoration: none;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
  transition: color 0.15s ease, transform 0.15s ease;
}
.topbar__nav a:hover { color: #fff; transform: translateY(-1px); }
.topbar__nav a {
  white-space: nowrap;
}
.topbar__nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Mobile: dock the inner-page nav to the bottom of the screen, with the
   logo above a full-width, evenly-spaced nav so the links sit on one row. */
@media (max-width: 640px) {
  .topbar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 7px 14px 8px;
    border-bottom: none;
    border-top: 2px solid var(--red-dark);
  }
  .topbar__logo { height: 26px; align-self: flex-start; }
  .topbar__nav {
    justify-content: space-between;
    gap: 10px;
    font-size: 16px;
  }
  /* Reserve room so the fixed bottom bar never covers page content. */
  .page { padding-bottom: 82px; }
}

/* ---------------- Inner-page shell ---------------- */
.page {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page--work,
.page--approach,
.page--talk {
  background-image: url("../assets/shared/bg.png");
  background-image: image-set(
    url("../assets/shared/bg.webp") type("image/webp"),
    url("../assets/shared/bg.png") type("image/png")
  );
}

.page__title {
  text-align: center;
  font-family: var(--label);
  color: var(--lime);
  font-size: clamp(12px, 1.6vw, 18px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 18px 12px 6px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* ---------------- Work / Play collage ---------------- */
.collage {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px 80px;
  min-height: 1320px;
}
.tile {
  position: absolute;
  width: var(--w, 280px);
  transform: rotate(var(--rot, 0deg));
  filter: drop-shadow(4px 6px 8px rgba(0, 0, 0, 0.4));
}
a.tile {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, filter 0.15s ease;
}
a.tile:hover {
  transform: rotate(var(--rot, 0deg)) scale(1.03);
  filter: drop-shadow(6px 8px 12px rgba(0, 0, 0, 0.5));
}
.tile img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(0, 0, 0, 0.25);
}
.tile .lime-label {
  position: absolute;
  bottom: -10px;
  left: 10px;
  font-size: 10px;
  white-space: nowrap;
}
.tile--pink .lime-label { background: var(--pink); color: #fff; }

.placeholder-tile__box {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: repeating-linear-gradient(45deg, var(--pink), var(--pink) 14px, var(--red) 14px, var(--red) 28px);
  color: #fff;
  font-family: var(--label);
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

/* Mobile: collapse the absolute collage into a flowing column */
@media (max-width: 760px) {
  .collage { display: flex; flex-direction: column; gap: 26px; padding-bottom: 60px; min-height: 0; }
  .tile {
    position: static;
    width: 100% !important;
    margin: 0;
    transform: none !important;
  }
  .tile .lime-label { position: static; display: inline-block; margin-top: 6px; white-space: normal; }
}

/* ---------------- Approach text blocks ---------------- */
.stack {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 22px 80px;
  position: relative;
  min-height: 80vh;
}
.block {
  background: var(--lime);
  color: var(--ink);
  font-family: var(--label);
  padding: 18px 20px;
  max-width: 460px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  line-height: 1.25;
}
.block p { margin: 0; font-size: 15px; }
.block ul { margin: 0; padding-left: 0; list-style: none; }
.block li { font-size: 17px; padding: 2px 0; }
.block--quote { max-width: 620px; font-size: 14px; }
.section-tag {
  display: inline-block;
  margin-bottom: 8px;
}

.stack__item { position: absolute; }
.stack__who { left: 1%; top: 70px; max-width: 380px; }
.stack__services { left: 40%; top: 230px; }
.stack__quote { left: 12%; bottom: 50px; }

@media (max-width: 760px) {
  .stack { min-height: 0; padding-bottom: 60px; }
  .stack__item { position: static; max-width: 100%; margin-bottom: 28px; }
  .block { max-width: 100%; }
}

/* ---------------- Let's Talk contact ---------------- */
.contact { max-width: 760px; margin: 0 auto; padding: 60px 22px 120px; }
.contact__bars { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 28px; }
.contact__bars a {
  background: var(--lime);
  color: var(--ink);
  font-family: var(--label);
  font-size: clamp(16px, 2.6vw, 26px);
  padding: 6px 14px;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease;
}
.contact__bars a:hover { transform: translate(-2px, -2px); }

/* ============================================================
   Home page — desktop interface
   ============================================================ */
.home {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--red);
}
.home__band {
  position: relative;
  flex: 0 0 30%;
  min-height: 130px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  z-index: 3;
}
.home__logo-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px clamp(18px, 3vw, 40px);
}
.home__logo {
  width: min(1040px, 86vw);
  height: auto;
  max-height: 100%;
  object-fit: contain;
}
.home__cherries {
  position: absolute;
  top: 10px;
  left: 0;
  height: 118%;
  width: auto;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.4));
}

.desktop {
  position: relative;
  flex: 1 1 auto;
  background: url("../assets/home/cover.png") center / cover no-repeat;
  background-image: image-set(
    url("../assets/home/cover.webp") type("image/webp"),
    url("../assets/home/cover.png") type("image/png")
  );
  overflow: hidden;
}
/* Full-bleed background video (the cover image acts as the poster/fallback
   behind it, so there's no double-exposure ghosting). */
.desktop__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.desktop__hint {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 10px;
  margin: 0;
  font-family: var(--label);
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 8px;
  letter-spacing: 0.02em;
}

.folder {
  position: absolute;
  width: 66px;
  text-align: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  z-index: 10;
}
.folder:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.folder__icon {
  display: block;
  width: 60px;
  height: 86px;
  margin: 0 auto 6px;
  background: url("../assets/home/folders.png") no-repeat;
  background-image: image-set(
    url("../assets/home/folders.webp") type("image/webp"),
    url("../assets/home/folders.png") type("image/png")
  );
  background-position: -2px -12px;
  background-size: 420px 167px;
  filter: drop-shadow(3px 4px 5px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
.folder__label { font-size: 11px; pointer-events: none; }

/* Bottom marquee */
.marquee {
  flex: 0 0 auto;
  background: var(--lime);
  overflow: hidden;
  white-space: nowrap;
  border-top: 2px solid rgba(0, 0, 0, 0.3);
  z-index: 3;
}
.marquee__track {
  display: inline-flex;
  font-family: var(--label);
  font-size: clamp(14px, 1.7vw, 22px);
  color: var(--ink);
  padding: 7px 0;
  animation: marquee 26s linear infinite;
}
.marquee__track span { padding-right: 1ch; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Mobile home: shrink folders, keep them tappable */
@media (max-width: 640px) {
  .home__band { flex-basis: 22%; }
  .folder { width: 60px; }
  .folder__icon { width: 54px; height: 77px; background-position: -2px -11px; background-size: 378px 150px; }
  .desktop__hint { font-size: 9px; }
  /* The action in the hero sits on the right; anchor the crop there so it
     isn't cut off when the viewport narrows. */
  .desktop { background-position: 78% center; }
  .desktop__video { object-position: 78% center; }
}
