/* Inner pages: portfolio archive pages and blog. Uses tokens from styles.css. */

.nav a[aria-current="page"] { background: var(--pop); border-color: var(--ink); }

/* ---------- Page hero ---------- */
.page-hero { max-width: 1360px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) 24px; }
.page-hero h1 {
  font-size: clamp(38px, 11.5vw, 160px); font-weight: 900; font-stretch: 125%; overflow-wrap: anywhere;
  text-transform: uppercase; line-height: 0.88;
}
.page-hero h1 em {
  display: inline-block; background: var(--pop); color: var(--ink);
  padding: 0 0.1em; rotate: -2deg; box-shadow: 6px 6px 0 var(--ink);
}
.page-count { margin: 18px 0 0; display: inline-block; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); }

.page-body { max-width: 1360px; margin: 0 auto; padding: 16px var(--gutter) 40px; }
.sticky-filters {
  position: sticky; top: 72px; z-index: 10; padding: 12px 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px);
}
.chip-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 8px; padding: 0 6px;
  border-radius: 999px; background: var(--paper-2); color: var(--ink); font: 700 11px var(--font-mono);
}
.chip[aria-pressed="true"] .chip-count { background: var(--pop); }

/* ---------- Motion grid ---------- */
.motion-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  grid-auto-flow: dense; gap: 20px; margin-top: 18px;
}
.motion-card { display: block; width: 100%; padding: 0; text-align: left; font: inherit; color: inherit; }
.motion-card[hidden] { display: none; }
.motion-card.landscape { grid-column: span 2; }
.motion-card.landscape video { aspect-ratio: 16 / 9; }
.motion-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82)); color: #fff; pointer-events: none;
}
.motion-caption .reel-title { font-size: 14px; text-transform: capitalize; }

/* Theatre player (reuses .lightbox frame) */
.theatre video { display: block; max-height: 80vh; max-width: min(90vw, 460px); background: #000; }
.theatre.landscape video { max-width: min(90vw, 1000px); }
.theatre-caption { margin: 0; padding: 12px 16px; color: var(--pop); }

/* ---------- Creatives masonry ---------- */
.page-body .gallery { margin-top: 18px; }
.page-body .tile img { aspect-ratio: auto; height: auto; }

/* ---------- Bottom CTA ---------- */
.page-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px;
  max-width: 1360px; margin: 40px auto 48px; padding: clamp(32px, 5vw, 64px) var(--gutter);
  border-block: var(--border); background: var(--pop);
}
.page-cta h2 { flex: 1 1 100%; font-size: clamp(36px, 6vw, 80px); }
.page-cta h2 em { background: var(--ink); color: var(--pop); box-shadow: none; }

/* ---------- Blog ---------- */
.blog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.blog-card {
  display: grid; text-decoration: none; color: inherit; overflow: hidden;
  border: var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s;
}
.blog-card:nth-child(2) { rotate: 1deg; }
.blog-card:hover { transform: translate(-4px, -4px) rotate(-1deg); box-shadow: var(--shadow-lg); }
.blog-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: var(--border); }
.blog-card-body { display: grid; gap: 10px; padding: 22px; }
.blog-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--ink-soft); }
.blog-meta .pill { background: var(--pop); color: var(--ink); }
.blog-card h3 { font-size: 24px; font-weight: 900; line-height: 1.1; letter-spacing: -0.01em; font-stretch: 105%; }
.blog-card p { margin: 0; color: var(--ink-soft); }
.blog-read { font-weight: 800; color: var(--accent); }

.post { max-width: 820px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 40px; }
.post h1 { font-size: clamp(36px, 5.6vw, 72px); font-weight: 900; line-height: 0.98; text-transform: none; font-stretch: 110%; margin: 14px 0 24px; }
.post-cover { display: block; width: 100%; height: auto; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); margin: 10px 0 40px; }
.post-body { font-size: 19px; line-height: 1.7; }
.post-body h2 { font-size: clamp(26px, 3vw, 36px); margin: 44px 0 14px; text-transform: none; line-height: 1.1; }
.post-body h3 { font-size: 24px; margin: 32px 0 10px; }
.post-body ul, .post-body ol { padding-left: 1.2em; }
.post-body li { margin: 8px 0; }
.post-body strong { background: linear-gradient(transparent 60%, var(--pop) 60%); }
.post-body a { color: var(--accent); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; padding: 0; list-style: none; }
.post-back { display: inline-block; margin-bottom: 8px; font-weight: 700; text-decoration: none; }
.post-back:hover { color: var(--accent); }

/* ---------- Home: "see everything" links ---------- */
.see-all { margin: 26px 0 0; }

/* ---------- Home: web services (browser-window cards) ---------- */
.web-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.web-badges .pill { background: var(--ink); color: var(--pop); border-color: var(--ink); }
.web-grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.web-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}
.web-card:nth-child(3n + 2) { rotate: 1deg; }
.web-card:nth-child(3n) { rotate: -1deg; }
.web-card:hover { rotate: 0deg; transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.web-card-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--ink); color: #bbb5ab; }
.dots { width: 46px; height: 12px; background: radial-gradient(circle, var(--mad) 5px, transparent 6px) 0 0 / 16px 12px repeat-x; }
.web-tag { margin-left: auto; padding: 3px 8px; border-radius: 6px; background: var(--pop); color: var(--ink); font-size: 10px; font-weight: 700; }
.web-card:first-child .web-tag { background: var(--mad); color: #fff; }
.web-card-body { display: grid; gap: 12px; padding: 22px; flex: 1; }
.web-card h3 { font-size: 26px; font-weight: 900; text-transform: uppercase; line-height: 1; }
.web-card p { margin: 0; color: var(--ink-soft); }
.web-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.web-card li { padding-left: 24px; position: relative; font-weight: 600; }
.web-card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }
.web-card-cta { align-self: end; justify-self: start; margin-top: 6px; font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--pop); }
.web-card-cta:hover { background: var(--pop); }
.web-cta {
  margin-top: 40px; padding: clamp(28px, 4vw, 48px); border: var(--border); border-radius: var(--radius);
  background: var(--logic); color: #fff; box-shadow: var(--shadow-lg); rotate: -0.5deg;
}
.web-cta .mono { margin: 0 0 8px; color: var(--pop); }
.web-cta h3 { font-size: clamp(30px, 4vw, 52px); font-weight: 900; text-transform: uppercase; }
.web-cta p { max-width: 560px; }
.web-cta .btn { background: var(--pop); color: var(--ink); }

/* ---------- Home: founder story ---------- */
.story { columns: 2 320px; column-gap: 40px; margin-top: 52px; font-size: 19px; }
.story p { margin: 0 0 16px; break-inside: avoid; }
.story p:first-child::first-letter { float: left; font: 900 72px/0.8 var(--font-display); margin: 6px 10px 0 0; color: var(--accent); }

/* ---------- Footer links ---------- */
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-decoration: none; border-bottom: 2px solid var(--pop); }
.footer-links a:hover { background: var(--pop); }

@media (max-width: 640px) {
  .sticky-filters { top: 64px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .sticky-filters .chip { flex: none; }
  .motion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .motion-card .reel-cat { display: none; }
  .motion-caption { padding: 30px 8px 8px; }
  .motion-caption .reel-title { font-size: 12px; }
  .post-body { font-size: 17px; }
}

/* ---------- Contact form (enquiries) ---------- */
.brief[hidden], .form-success[hidden] { display: none; }
.brief .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.form-actions .btn-ghost { background: transparent; color: var(--paper); border-color: var(--paper); box-shadow: none; }
.form-success {
  max-width: 900px; padding: 28px; border: 3px solid var(--pop); border-radius: 18px;
  background: #1f1d1b; animation: bubble 0.5s var(--ease-out);
}
.form-success-title { margin: 0 0 8px; font-size: clamp(28px, 4vw, 44px); font-weight: 900; color: var(--pop); }
.form-success p { margin: 0; }

/* ---------- Instagram "Mad Feed" ---------- */
.insta-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; }
.insta-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.insta-tile {
  display: block; overflow: hidden; border: var(--border); border-radius: 12px; background: var(--paper-2);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s;
}
.insta-tile:nth-child(odd) { rotate: -1deg; }
.insta-tile:nth-child(even) { rotate: 1deg; }
.insta-tile:hover { rotate: 0deg; transform: translateY(-4px) scale(1.03); box-shadow: var(--shadow); }
.insta-tile img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- Footer meta + draft label ---------- */
.footer-meta { display: grid; gap: 4px; }
.footer-credit { color: var(--ink-soft); }
.draft-pill { display: inline-block; background: var(--mad); color: #fff; margin-bottom: 12px; }

@media (max-width: 900px) {
  .insta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
