/*
  Neo‑Editorial Grid / Digital Black / Flat Pixel + 3D Illusions
  Constraint set: black base, solid colors only (no gradients / no opacity layers),
  sans‑serif typography (non‑RU origin), pixel accents + crisp geometric 3D.
*/

:root {
  --bg: #050505;
  --panel: #0B0B0B;
  --panel2: #101010;
  --ink: #F2F2F2;
  --muted: #B8B8B8;
  --grid: #141414;
  --line: #262626;
  --line2: #3A3A3A;

  --lime: #B7FF00;
  --cyan: #00D0FF;
  --magenta: #FF2D9E;
  --yellow: #FFD400;

  --wrap: 1180px;
  --g: clamp(16px, 3vw, 32px);
  --r: 18px;
  --b: 2px;
  --b2: 3px;

  --font-display: "Syne", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-pixel: "Press Start 2P", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
}

/* Solid SVG grid background (no transparency) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cpath d='M96 0H0V96' fill='none' stroke='%23141414' stroke-width='2'/%3E%3Cpath d='M48 0V96M0 48H96' fill='none' stroke='%23262626' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 96px 96px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  width: min(var(--wrap), calc(100% - (2 * var(--g))));
  margin: 0 auto;
}

.page {
  min-height: 100vh;
  position: relative;
}

.section {
  padding: clamp(64px, 7vw, 110px) 0;
}

.hero {
  padding: clamp(76px, 9vw, 132px) 0 clamp(56px, 6vw, 100px);
}

.hero--compact {
  padding: clamp(72px, 9vw, 128px) 0 clamp(56px, 6vw, 96px);
}

/* Neo‑editorial layout */
.hero__layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(18px, 4vw, 52px);
  align-items: start;
}

.hero__layout--single {
  grid-template-columns: 1fr;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border: var(--b) solid var(--line2);
  background: var(--panel);
  border-radius: 12px;
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.headline {
  margin: 18px 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.02em;
  font-size: clamp(44px, 5.4vw, 72px);
}

.accent {
  display: inline-block;
  padding: 0.06em 0.22em 0.1em;
  background: var(--lime);
  color: var(--bg);
  border: var(--b2) solid var(--bg);
  box-shadow: 8px 8px 0 var(--cyan);
}

.subhead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  max-width: 56ch;
}

.stats {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.stat {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 14px;
  background: var(--panel);
  border: var(--b) solid var(--line2);
  border-radius: var(--r);
  box-shadow: 10px 10px 0 var(--magenta);
}

.stat__badge {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--bg);
  border: var(--b2) solid var(--bg);
  border-radius: 14px;
  font-family: var(--font-pixel);
  font-size: 18px;
}

.stat__badge--alt {
  background: var(--cyan);
}

.stat__text strong {
  font-weight: 700;
  color: var(--ink);
}

.cta {
  margin-top: 26px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: var(--b2) solid var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--panel);
  color: var(--ink);
  transform: translate(0, 0);
  transition: transform 140ms linear;
  user-select: none;
}

.btn:hover {
  transform: translate(2px, 2px);
}

.btn--primary {
  background: var(--lime);
  color: var(--bg);
  border-color: var(--bg);
  box-shadow: 10px 10px 0 var(--cyan);
}

.btn--ghost {
  background: var(--panel);
  box-shadow: 10px 10px 0 var(--magenta);
}

.btn--pay {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--bg);
  box-shadow: 10px 10px 0 var(--yellow);
}

.btn:disabled {
  transform: translate(0, 0);
  background: var(--line);
  border-color: var(--line2);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* Hero board: pixel morphing + flat 3D */
.hero__panel {
  position: relative;
  padding-top: 4px;
}

.board {
  position: relative;
  background: var(--panel2);
  border: var(--b2) solid var(--ink);
  border-radius: calc(var(--r) + 8px);
  box-shadow: 12px 12px 0 var(--line2);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 520px;
}

.board__top,
.board__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-bottom: var(--b) solid var(--line);
}

.board__bottom {
  border-top: var(--b) solid var(--line);
  border-bottom: none;
}

.board__badge {
  width: 120px;
  height: 18px;
  background: var(--magenta);
  border: var(--b2) solid var(--bg);
  box-shadow: 8px 8px 0 var(--cyan);
}

.board__pixels {
  display: grid;
  grid-template-columns: repeat(8, 10px);
  gap: 6px;
}

.pix {
  width: 10px;
  height: 10px;
  background: var(--lime);
  image-rendering: pixelated;
}

.pix:nth-child(2),
.pix:nth-child(6) {
  background: var(--cyan);
}

.pix:nth-child(3),
.pix:nth-child(7) {
  background: var(--magenta);
}

.pix:nth-child(4),
.pix:nth-child(8) {
  background: var(--yellow);
}

.morph {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--bg);
  image-rendering: pixelated;
}

.chip {
  width: 110px;
  height: 22px;
  border: var(--b) solid var(--line2);
  background: var(--panel);
  position: relative;
}

.chip::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 10px;
  height: 6px;
  background: var(--lime);
  box-shadow: 16px 0 0 var(--cyan), 32px 0 0 var(--magenta), 48px 0 0 var(--yellow);
}

/* Flat 3D cube (isometric faces) */
.cube3d {
  width: 110px;
  height: 92px;
  position: relative;
  transform: rotate(-14deg);
  animation: cube-float 2.8s infinite linear;
}

@media (prefers-reduced-motion: reduce) {
  .cube3d {
    animation: none;
  }
}

@keyframes cube-float {
  0% {
    transform: rotate(-14deg) translateY(0);
  }

  50% {
    transform: rotate(-12deg) translateY(-8px);
  }

  100% {
    transform: rotate(-14deg) translateY(0);
  }
}

.cube3d__face {
  position: absolute;
  inset: 0;
  border: var(--b) solid var(--ink);
}

.cube3d__face--front {
  background: var(--panel);
  clip-path: polygon(14% 32%, 62% 32%, 62% 86%, 14% 86%);
  box-shadow: 10px 10px 0 var(--cyan);
}

.cube3d__face--right {
  background: #0E0E0E;
  clip-path: polygon(62% 32%, 86% 20%, 86% 74%, 62% 86%);
}

.cube3d__face--top {
  background: #141414;
  clip-path: polygon(14% 32%, 38% 20%, 86% 20%, 62% 32%);
}

/* Section heading */
.section__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.section__head--center {
  text-align: center;
}

.label {
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.05;
}

.h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
}

.h4 {
  margin: 0 0 6px;
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  margin: 0;
}

/* Intro grid */
.grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(18px, 4vw, 42px);
  align-items: start;
}

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

.lead {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 2.3vw, 24px);
  line-height: 1.22;
}

.accent-strong {
  background: var(--yellow);
  color: var(--bg);
  padding: 0.02em 0.14em;
  border: var(--b2) solid var(--bg);
  box-shadow: 6px 6px 0 var(--magenta);
}

.callout {
  position: relative;
  background: var(--panel);
  border: var(--b2) solid var(--ink);
  border-radius: calc(var(--r) + 10px);
  padding: 18px;
  box-shadow: 12px 12px 0 var(--lime);
}

.callout__frame {
  position: absolute;
  inset: 10px;
  border: var(--b) solid var(--line2);
  border-radius: calc(var(--r) + 2px);
  pointer-events: none;
}

/* Benefits */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

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

.benefit {
  background: var(--panel);
  border: var(--b2) solid var(--line2);
  border-radius: var(--r);
  padding: 16px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  box-shadow: 10px 10px 0 var(--line);
}

.benefit__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: var(--b2) solid var(--ink);
  border-radius: 14px;
  font-size: 20px;
}

/* Profile */
.profile {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: center;
}

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

.profile__media {
  position: relative;
  margin: 0;
  border-radius: calc(var(--r) + 10px);
  background: var(--panel);
  border: var(--b2) solid var(--ink);
  overflow: hidden;
  box-shadow: 12px 12px 0 var(--cyan);
}

.profile__photo {
  width: 100%;
  display: block;
  filter: grayscale(100%);
}

.frame {
  position: absolute;
  inset: 10px;
  border: var(--b) solid var(--line2);
  border-radius: calc(var(--r) + 2px);
  pointer-events: none;
}

/* Registration */
.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 26px 0 22px;
}

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

.detail {
  background: var(--panel);
  border: var(--b2) solid var(--line2);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: 10px 10px 0 var(--line);
}

.form {
  display: grid;
  gap: 14px;
  background: var(--panel);
  border: var(--b2) solid var(--ink);
  border-radius: calc(var(--r) + 10px);
  padding: 18px;
  box-shadow: 12px 12px 0 var(--magenta);
}

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.field__input {
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: var(--b2) solid var(--line2);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
}

.field__input:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.checkout {
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
}

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

.price {
  border: var(--b2) solid var(--line2);
  border-radius: var(--r);
  padding: 14px;
  background: var(--bg);
}

.price__label {
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.price__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price__amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
}

.price__cur {
  color: var(--muted);
}

.error {
  display: none;
  border: var(--b2) solid var(--magenta);
  background: var(--bg);
  border-radius: var(--r);
  padding: 12px 14px;
}

.error.is-visible {
  display: block;
}

/* Footer */
.footer {
  padding: 32px 0 40px;
  border-top: var(--b) solid var(--line);
  color: var(--muted);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 14px;
  align-items: center;
}

@media (max-width: 760px) {
  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__dot {
    display: none;
  }
}

.footer__link a {
  display: inline-flex;
  padding: 8px 10px;
  border: var(--b) solid var(--line2);
  border-radius: 12px;
  background: var(--panel);
}

.footer__link a:hover {
  transform: translate(2px, 2px);
}

/* Portfolio carousel */
.carousel-frame {
  position: relative;
  border: var(--b2) solid var(--ink);
  border-radius: calc(var(--r) + 10px);
  background: var(--panel2);
  overflow: hidden;
  box-shadow: 12px 12px 0 var(--line2);
}

.carousel-track {
  display: flex;
  width: 100%;
  transition: transform 260ms linear;
}

.carousel__item {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0;
}

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

.carousel__video {
  border-right: var(--b) solid var(--line);
  background: var(--bg);
}

@media (max-width: 980px) {
  .carousel__video {
    border-right: none;
    border-bottom: var(--b) solid var(--line);
  }
}

.carousel__video iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  display: block;
}

.carousel__content {
  padding: 18px;
}

.carousel__content h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
}

.carousel__content p {
  margin: 0;
  color: var(--muted);
}

.carousel-button {
  position: absolute;
  top: 12px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: var(--b2) solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 14px;
  cursor: pointer;
  box-shadow: 8px 8px 0 var(--cyan);
}

.carousel-button:hover {
  transform: translate(2px, 2px);
}

.carousel-button--left {
  left: 12px;
}

.carousel-button--right {
  right: 12px;
  box-shadow: 8px 8px 0 var(--magenta);
}

/* Page alt: keep black, shift accent shadows slightly */
.page--alt .accent {
  box-shadow: 8px 8px 0 var(--magenta);
}

/* =========================================
   PORTFOLIO STANDALONE PAGE (Cinematic Brutalism)
   ========================================= */

.portfolio-page {
  background: #000;
  color: #fff;
  font-family: var(--font-display);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

.portfolio-page::before {
  display: none;
  /* Remove grid bg from main site if needed, or keep it. Let's keep it for texture but maybe darken it. */
}

.p-header {
  padding: 24px 20px 40px;
  max-width: 1600px;
  margin: 0 auto;
}

.p-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 32px;
}

.p-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
  text-transform: uppercase;
}

.p-subtitle {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.p-tagline {
  font-size: 14px;
  color: var(--lime);
  font-family: var(--font-body);
  border-left: 2px solid var(--lime);
  padding-left: 12px;
  margin-top: 8px;
  max-width: 400px;
}

/* Video Grid - Bento/Dense */
.video-wall {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  /* 12 col grid for flexibility */
  gap: 4px;
  padding: 0 4px 4px;
  /* Minimal padding */
  max-width: 1920px;
  margin: 0 auto;
}

.v-block {
  position: relative;
  background: #111;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #222;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), z-index 0s;
}

/* Hover effects */
.v-block:hover {
  z-index: 10;
  transform: scale(1.02);
  border-color: var(--lime);
  box-shadow: 0 0 20px rgba(183, 255, 0, 0.15);
}

.v-block:hover .v-meta {
  opacity: 1;
  transform: translateY(0);
}

.v-block:hover .v-thumb {
  filter: grayscale(0%) contrast(1.1);
}

/* Specific Spanning */
/* Block 1: Highlight/Large */
.v-block--large {
  grid-column: span 8;
  grid-row: span 2;
}

/* Standard blocks */
.v-block--std {
  grid-column: span 4;
}

/* Mobile Layout */
@media (max-width: 768px) {
  .video-wall {
    grid-template-columns: 1fr 1fr;
    /* 2 columns strictly */
    gap: 2px;
  }

  .v-block--large,
  .v-block--std {
    grid-column: span 1;
    /* Reset to single cells, or span 2 for highlight? */
    grid-row: span 1;
  }

  /* Prompt: "Mobile (CRITICAL): Client requires seeing 4 blocks of video simultaneously on phone screen."
     So they need to be small. 1fr 1fr grid is correct.
     Grid 2 columns. 
  */

  .v-block--large {
    grid-column: span 1;
    /* Reset to single cells to ensure 4 blocks are visible */
  }
}

/* Video Content */
.v-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
  filter: grayscale(100%) contrast(1.2) brightness(0.9);
  /* Cinematic noir look */
}

.v-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(183, 255, 0, 0.9);
  /* Lime */
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.v-block:hover .v-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Facade / Embed */
.v-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  z-index: 20;
}

/* Badge (Finalist / Winner) */
.v-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--yellow);
  color: #000;
  padding: 8px 10px;
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  z-index: 30;
  box-shadow: 4px 4px 0 var(--magenta);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  /* Let clicks pass through to video */
  transform: translate(0, 0);
  animation: badge-bounce 2s infinite ease-in-out;
}

@keyframes badge-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.v-icon-crown {
  width: 14px;
  height: 14px;
  image-rendering: pixelated;
  /* Simple pixel crown via box-shadow or just generic shape? allow SVG in HTML */
}

@media (max-width: 768px) {
  .v-badge-text {
    display: none;
  }

  .v-badge {
    padding: 6px;
    /* Smaller padding for icon only */
  }
}

/* Metadata Overlay */
.v-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
  color: #fff;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;

  /* Mobile: overlay always visible or compact?
     Prompt: "Headers on mobile must be overlaid OR ultra-compact below"
  */
}

.v-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.v-role {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.v-note {
  font-family: var(--font-body);
  font-size: 10px;
  color: #ccc;
  display: none;
  /* Hide on mobile/grid by default, show on hover/desktop? */
}

@media (min-width: 769px) {
  .v-note {
    display: block;
  }
}

/* Footer Minimal */
.p-footer {
  padding: 40px 20px;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--muted);
  opacity: 0.5;
}