/* ============================================
   BREGO HOME — TUNNEL
   ============================================ */

.brego-home {
  --bg: #0a0807;
  --ink: #f5f1ea;
  --acc: #ff5b1f;
  --dim: rgba(245, 241, 234, 0.5);
  --line: rgba(245, 241, 234, 0.12);
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
}

.brego-home * { box-sizing: border-box; }

.brego-home::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.08;
  mix-blend-mode: overlay;
}

.brego-maxw { max-width: 1400px; margin: 0 auto; padding: 0 48px; }

/* ===== HERO TUNNEL ===== */
.brego-hero {
  position: relative;
  height: 100vh; min-height: 720px;
  overflow: hidden;
  perspective: 800px;
  background: radial-gradient(ellipse at center, #1a0f0a 0%, #0a0807 60%, #000 100%);
}

.brego-tunnel {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  display: flex; align-items: center; justify-content: center;
}

.brego-ring {
  position: absolute;
  width: 80vmin; height: 80vmin;
  border: 1px solid var(--acc);
  border-radius: 50%;
  animation: brego-zoom 8s linear infinite;
  opacity: 0;
}
.brego-ring.alt { border-color: var(--ink); border-style: dashed; }
.brego-ring.square { border-radius: 0; border-color: var(--dim); }

@keyframes brego-zoom {
  0% { transform: translateZ(-2000px) scale(0.1); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateZ(400px) scale(2.5); opacity: 0; }
}

.brego-streaks { position: absolute; inset: 0; pointer-events: none; }
.brego-streak {
  position: absolute; top: 50%; left: 50%;
  width: 2px; height: 50vh;
  background: linear-gradient(to bottom, transparent, var(--acc), transparent);
  transform-origin: top center;
  transform: translate(-50%, 0) rotate(var(--rot));
  opacity: 0.3;
  animation: brego-streak 6s linear infinite;
}
@keyframes brego-streak {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.6; }
}

.brego-core {
  position: absolute; top: 50%; left: 50%;
  width: 180px; height: 180px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--acc) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  animation: brego-pulse 3s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes brego-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

.brego-cross {
  position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px;
  transform: translate(-50%, -50%);
}
.brego-cross::before, .brego-cross::after {
  content: ''; position: absolute; background: var(--ink); opacity: 0.6;
}
.brego-cross::before { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.brego-cross::after { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }

.brego-title-wrap {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; z-index: 10;
  mix-blend-mode: difference;
}
.brego-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(80px, 18vw, 280px);
  line-height: 0.85; margin: 0;
  color: var(--ink);
  letter-spacing: -0.04em;
}
.brego-title .semi { color: var(--acc); }
.brego-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.3em;
  margin-top: 16px;
  color: var(--ink);
}

.brego-hud {
  position: absolute; z-index: 20;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.15em;
  color: var(--ink);
}
.brego-hud.tl { top: 32px; left: 32px; }
.brego-hud.tr { top: 32px; right: 32px; text-align: right; }
.brego-hud.bl { bottom: 80px; left: 32px; }
.brego-hud.br { bottom: 80px; right: 32px; text-align: right; }
.brego-hud .acc { color: var(--acc); }
.brego-hud .big {
  display: block;
  font-family: 'Archivo Black', sans-serif;
  font-size: 32px; letter-spacing: 0;
  margin-top: 4px;
}
.brego-tc { color: var(--acc); margin-top: 4px; }

.brego-strip {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 32px;
  background: var(--acc); color: #000;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em;
  border-top: 1px solid rgba(0,0,0,0.2);
}
.brego-strip .acc { color: #000; }
.brego-strip-words {
  flex: 1;
  white-space: nowrap; overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

/* ===== TAGLINE ===== */
.brego-deep {
  padding: 160px 48px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.brego-deep-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95; margin: 0;
  letter-spacing: -0.03em;
  max-width: 1200px; margin: 0 auto;
}
.brego-deep-title em {
  font-style: italic;
  font-family: Georgia, serif;
  color: var(--acc);
  font-weight: normal;
}
.brego-deep-title .stroke {
  -webkit-text-stroke: 2px var(--ink);
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-family: Georgia, serif;
}

/* ===== SECTIONS ===== */
.brego-section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.brego-section-head h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(56px, 8vw, 120px);
  line-height: 0.85; margin: 0;
  letter-spacing: -0.03em;
}
.brego-section-head h2 em {
  font-style: italic; font-family: Georgia, serif;
  color: var(--acc); font-weight: normal;
}
.brego-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--dim);
}

/* ===== SHOWREEL ===== */
.brego-showreel { padding: 0 0 120px; }
.brego-reel-frame {
  position: relative;
  aspect-ratio: 21/9;
  background: #1a0f0a;
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform 0.4s ease;
}
.brego-reel-frame::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.6) 100%);
}
.brego-reel-frame:hover { transform: scale(1.005); }
.brego-play {
  position: relative; z-index: 2;
  background: var(--acc); color: #000; border: 0;
  width: 140px; height: 140px;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; font-weight: 600;
  transition: transform 0.3s ease;
}
.brego-play:hover { transform: scale(1.1); }
.brego-play .arrow {
  width: 0; height: 0;
  border-left: 18px solid #000;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 4px;
}
.brego-tape {
  position: absolute; top: 24px; left: 24px; z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.rec-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--acc); border-radius: 50%;
  animation: brego-pulse-dot 1.5s infinite;
}
@keyframes brego-pulse-dot { 50% { opacity: 0.3; } }

/* ===== MODAL ===== */
.brego-modal {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.95);
  display: none; align-items: center; justify-content: center;
  padding: 40px;
}
.brego-modal.open { display: flex; }
.brego-modal-content {
  width: 100%; max-width: 1400px;
  aspect-ratio: 16/9;
}
.brego-modal-content iframe,
.brego-modal-content video {
  width: 100%; height: 100%; border: 0;
}
.brego-modal-close {
  position: absolute; top: 24px; right: 32px;
  background: transparent; color: var(--ink); border: 0;
  font-size: 48px; cursor: pointer; line-height: 1;
}

/* ===== SERVICIOS ===== */
.brego-services { padding: 0 0 120px; }
.brego-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.brego-service {
  background: var(--bg);
  padding: 48px 32px;
  position: relative;
  min-height: 280px;
  display: flex; flex-direction: column;
  transition: background 0.3s ease;
  cursor: pointer;
}
.brego-service:hover { background: #14100d; }
.brego-service .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--acc);
  margin-bottom: 32px;
}
.brego-service h3 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 36px;
  margin: 0 0 16px; letter-spacing: -0.02em;
  line-height: 1;
}
.brego-service p {
  font-size: 14px; line-height: 1.5;
  color: var(--dim);
  margin: 0;
}
.brego-service .arrow {
  position: absolute;
  top: 32px; right: 32px;
  font-size: 24px;
  color: var(--ink);
  transition: transform 0.3s ease;
}
.brego-service:hover .arrow { transform: translate(4px, -4px); color: var(--acc); }

/* ===== PROYECTOS ===== */
.brego-projects { padding: 0 0 120px; }
.brego-projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.brego-proj {
  position: relative;
  text-decoration: none; color: inherit;
  display: block;
}
.brego-proj.span-12 { grid-column: span 12; }
.brego-proj.span-8 { grid-column: span 8; }
.brego-proj.span-7 { grid-column: span 7; }
.brego-proj.span-5 { grid-column: span 5; }
.brego-proj.span-4 { grid-column: span 4; }
.brego-proj .thumb {
  aspect-ratio: 4/3;
  background: #1a0f0a;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease;
}
.brego-proj.span-7 .thumb,
.brego-proj.span-8 .thumb { aspect-ratio: 16/10; }
.brego-proj.span-12 .thumb { aspect-ratio: 21/9; }
.brego-proj:hover .thumb { transform: translateY(-4px); }
.brego-proj .num {
  position: absolute; top: 16px; left: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--ink);
  z-index: 2;
}
.brego-proj .ttype {
  position: absolute; top: 16px; right: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em;
  color: var(--acc);
  z-index: 2;
}
.brego-proj .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 0;
}
.brego-proj h3 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 22px; margin: 0;
  letter-spacing: -0.02em;
}
.brego-proj .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--dim);
}

/* ===== CLIENTES ===== */
.brego-clients {
  padding: 100px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.brego-clients-head { padding: 0 48px 48px; }
.brego-clients-head h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(48px, 6vw, 80px);
  margin: 0; letter-spacing: -0.03em; line-height: 0.9;
}
.brego-clients-head h2 em {
  font-style: italic; font-family: Georgia, serif;
  color: var(--acc); font-weight: normal;
}
.brego-marquee { overflow: hidden; }
.brego-marquee-track {
  display: flex; align-items: center; gap: 32px;
  white-space: nowrap;
  animation: brego-marquee 40s linear infinite;
  font-family: 'Archivo Black', sans-serif;
  font-size: 56px;
}
.client { color: var(--ink); }
.client:nth-child(4n+2) {
  -webkit-text-stroke: 1px var(--ink);
  -webkit-text-fill-color: transparent;
  font-style: italic; font-family: Georgia, serif;
}
.client-dot {
  display: inline-block;
  width: 12px; height: 12px;
  background: var(--acc); border-radius: 50%;
  flex-shrink: 0;
}
@keyframes brego-marquee {
  to { transform: translateX(-50%); }
}

/* ===== CTA ===== */
.brego-cta { padding: 120px 0 48px; }
.brego-cta h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(72px, 14vw, 200px);
  line-height: 0.85; margin: 0 0 64px;
  letter-spacing: -0.04em;
}
.brego-cta h2 em {
  font-style: italic; font-family: Georgia, serif;
  color: var(--acc); font-weight: normal;
}
.brego-cta-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 48px; padding: 48px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.brego-contact {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; line-height: 1.8;
  color: var(--dim);
}
.brego-contact strong {
  display: block; color: var(--ink);
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px; letter-spacing: 0;
  margin-bottom: 4px;
}
.brego-contact a { color: var(--ink); text-decoration: none; }
.brego-contact a:hover { color: var(--acc); }
.brego-big-link {
  display: flex; align-items: center; gap: 24px;
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(28px, 4vw, 56px);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}
.brego-big-link:hover { color: var(--acc); }
.brego-big-link svg { flex-shrink: 0; }
.brego-foot {
  display: flex; justify-content: space-between;
  padding: 32px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--dim);
}
.brego-foot a { color: var(--dim); text-decoration: none; }
.brego-foot a:hover { color: var(--acc); }

/* ===== RESPONSIVE ===== */

/* --- Showreel preview thumbnail --- */
.brego-reel-frame { position: relative; overflow: hidden; }
.brego-reel-preview {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.75;
  pointer-events: none;
}
.brego-reel-frame .brego-play,
.brego-reel-frame .brego-tape { position: relative; z-index: 2; }

@media (max-width: 900px) {
  .brego-maxw { padding: 0 24px; }
  .brego-deep { padding: 72px 0; }
  .brego-showreel { padding: 0 0 48px; }
  .brego-services { padding: 0 0 48px; }
  .brego-cta { padding: 48px 0 32px; }
  .brego-service { min-height: auto; padding: 28px 24px; }
  .brego-service .num { margin-bottom: 16px; }
  .brego-reel-frame { aspect-ratio: 16/9; }
  .brego-services-grid { grid-template-columns: 1fr; }
  .brego-projects-grid { grid-template-columns: 1fr; gap: 16px; }
  .brego-proj.span-12, .brego-proj.span-8, .brego-proj.span-7,
  .brego-proj.span-5, .brego-proj.span-4 { grid-column: span 1; }
  .brego-section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .brego-cta-row { flex-direction: column; align-items: flex-start; }
  .brego-hud.bl, .brego-hud.br { display: none; }
  .brego-strip-words { display: none; }
}