/* v8media.com static pages */

@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  /* Colors from the V8 Media logo */
  --black: #000;
  --ink: #161616;
  --muted: #5c5c5c;
  --line: #e4e4e4;
  --soft: #f5f5f3;
  --gold: #cc9933;
  --blue: #336699;
  --sky: #3399cc;
  --link: #1f5288;       /* darker logo blue, readable as text */
  --link-hover: #0076b2;
  --max: 1120px;
}

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

[hidden] { display: none !important; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

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

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; color: var(--black); }
h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 800; }

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.soft { background: var(--soft); border-top: 0; }

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 4px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--gold);
}

.lead { font-size: 1.2rem; color: var(--ink); max-width: 62ch; }
.muted { color: var(--muted); }
.narrow { max-width: 68ch; }



/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
}

.logo img { width: 92px; height: auto; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
}

.nav a:hover { color: var(--black); border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--black);
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; min-height: 76px; }
  .logo img { width: 70px; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 4px 0 16px;
  }
  .site-header.open .nav { display: flex; }
  .nav a { font-size: 1.15rem; padding: 8px 0; }
}



/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.btn {
  position: relative;
  isolation: isolate;   /* keeps the hover image behind the label */
  overflow: hidden;
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--black);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

.btn-dark { background: var(--black); color: #fff; }
.btn-light { background: #fff; color: var(--black); }

/* Hover: the button becomes a window onto one screen-sized image (site.js sets
   the image and its position). Nothing moves; only the image and label colors change. */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--btn-image, none);
  background-size: var(--bw, cover) var(--bh, auto);
  background-position: var(--bx, center) var(--by, center);
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.15s;
}

.btn:hover::before,
.btn:focus-visible::before,
.btn:active::before { opacity: 1; }

/* The label's caption box is always laid out, so showing it never shifts anything */
.btn-label {
  display: inline-block;
  padding: 1px 8px;
  margin: -1px -8px;
  border-radius: 999px;
  transition: background-color 0.15s, color 0.15s;
}

.btn:hover .btn-label,
.btn:focus-visible .btn-label,
.btn:active .btn-label {
  background: #ffcf33;   /* same gold caption as the Links page */
  color: var(--black);
}

.btn-dark:hover, .btn-dark:focus-visible, .btn-dark:active,
.btn-light:hover, .btn-light:focus-visible, .btn-light:active { color: var(--black); }

@media (prefers-reduced-motion: reduce) {
  .btn::before, .btn-label { transition: none; }
}



/* Home: intro */
.intro {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0 64px;
}

.intro h1 { margin-bottom: 16px; }
.intro .lead { font-size: 1.35rem; }

.intro-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}

@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
}



/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

a.card:hover { border-color: var(--black); color: var(--ink); transform: translateY(-2px); }

.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 20px; }
.card-body p { margin-bottom: 12px; }
.card .detail { font-size: 0.9rem; color: var(--muted); margin-top: auto; }
.card .go { font-weight: 600; color: var(--link); margin: 6px 0 0; }
a.card:hover .go { color: var(--link-hover); text-decoration: underline; }

/* Cards for sister studios (Blue Halide, Designing Realities) */
.card .tag {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--black);
  color: #fff;
}

@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.pointer {
  margin-top: 28px;
  padding: 14px 18px;
  border-left: 4px solid var(--blue);
  background: var(--soft);
}

.pointer p { margin: 0; }



/* Shop row */
.shop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.shop a {
  display: block;
  padding: 18px;
  border-top: 4px solid var(--gold);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.shop a:nth-child(2) { border-top-color: var(--blue); }
.shop a:nth-child(3) { border-top-color: var(--sky); }
.shop a:nth-child(4) { border-top-color: var(--black); }

.shop strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.shop span { color: var(--muted); font-size: 0.95rem; }
.shop a:hover strong { color: var(--link-hover); text-decoration: underline; }

@media (max-width: 860px) { .shop { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .shop { grid-template-columns: 1fr; } }



/* From the lab (latest Project Log posts) */
.lab {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.lab a { color: var(--ink); text-decoration: none; }
.lab img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: var(--soft); }
.lab h3 { margin: 12px 0 4px; font-size: 1.05rem; }
.lab img.no-image { object-fit: contain; padding: 18%; image-rendering: pixelated; }
.lab a:hover h3 { color: var(--link-hover); text-decoration: underline; }
.lab .meta { color: var(--muted); font-size: 0.88rem; }

@media (max-width: 760px) { .lab { grid-template-columns: 1fr; } }



/* About teaser */
.about-teaser {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: center;
}

.about-teaser img { border-radius: 4px; aspect-ratio: 1; object-fit: cover; }

@media (max-width: 640px) {
  .about-teaser { grid-template-columns: 1fr; }
  .about-teaser img { width: 180px; }
}



/* Inner pages */
.page-head { padding: 56px 0 24px; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.page-head .lead { margin-top: 8px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }

.list { padding-left: 1.1em; margin: 0 0 1em; }
.list li { margin-bottom: 8px; }
.list li strong { color: var(--black); }

.prices { display: grid; gap: 14px; margin: 20px 0; }

.price {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.price .amount { font-size: 1.4rem; font-weight: 800; color: var(--black); }
.price p { margin: 0; }

@media (max-width: 520px) { .price { grid-template-columns: 1fr; gap: 4px; } }

.callout {
  padding: 22px 24px;
  border-left: 4px solid var(--gold);
  background: var(--soft);
  margin: 24px 0;
}

.callout p:last-child { margin-bottom: 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.gallery a { display: block; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; transition: opacity 0.15s; }
.gallery a:hover img { opacity: 0.85; }

@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.samples { display: grid; gap: 14px; margin-top: 16px; }

.sample {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.sample strong { display: block; margin-bottom: 8px; }
.sample audio { width: 100%; }

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  margin: 24px 0;
}

.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.columns-list { columns: 2; column-gap: 40px; padding-left: 1.1em; }
.columns-list li { break-inside: avoid; margin-bottom: 4px; }
@media (max-width: 560px) { .columns-list { columns: 1; } }

.links-page { max-width: 560px; margin: 0 auto; }

.link-list { display: grid; gap: 14px; margin: 16px 0 36px; }

/* Links page: hovering a button reveals its piece of a single shared image
   (set with data-image on .link-wall; positions come from site.js).
   Nothing moves on hover: only the image and the text colors change. */
.link-wall a {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 14px 18px;
  border: 2px solid var(--black);
  border-radius: 10px;
  background: #fff;
  color: var(--black);
  text-decoration: none;
}

.link-wall a::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--wall-image, none);
  background-size: var(--wall-w, cover) var(--wall-h, auto);
  background-position: var(--x, 0) var(--y, 0);
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.15s;
}

/* The caption boxes are always there (just invisible), so revealing them
   changes only colors, never the layout */
.link-wall a strong,
.link-wall a span {
  position: relative;   /* above the image */
  display: block;
  width: fit-content;
  padding: 1px 8px;
  margin-left: -8px;
  border-radius: 6px;
  transition: background-color 0.15s, color 0.15s;
}

.link-wall a strong { font-size: 1.1rem; margin-bottom: 4px; }
.link-wall a span { color: var(--muted); font-size: 0.92rem; }

.link-wall a:hover::before,
.link-wall a:focus-visible::before,
.link-wall a:active::before { opacity: 1; }

.link-wall a:hover strong,
.link-wall a:focus-visible strong,
.link-wall a:active strong {
  background: #ffcf33;   /* brighter take on the logo gold */
  color: var(--black);
}

.link-wall a:hover span,
.link-wall a:focus-visible span,
.link-wall a:active span {
  background: var(--black);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .link-wall a::before, .link-wall a strong, .link-wall a span { transition: none; }
}

/* Lightbox for galleries */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
}

.lightbox img { max-width: 94vw; max-height: 92vh; }



/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 40px 0;
  background: var(--black);
  color: #ccc;
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer p { margin: 0; }
