/* RGZ Tech Services — interactive effects (see js/effects.js) */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- DotGrid ---------- */
.fx-dot-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
/* The canvas replaces the static CSS grid lines */
.hero.has-dot-grid::before { display: none; }

/* ---------- RotatingText ---------- */
.fx-rotate {
  display: inline-block;
  position: relative;
  vertical-align: top;
  overflow: hidden;
  white-space: nowrap;
  height: 1lh;
  transition: width 450ms cubic-bezier(.2,.8,.2,1);
  color: var(--orange-500);
  font-weight: 700;
}
.fx-rotate-word {
  display: inline-block;
  position: absolute;
  left: 0;
  top: 0;
}
.fx-rotate-word:only-child { position: relative; }
.fx-rotate-in { animation: fx-rotate-in 450ms cubic-bezier(.2,.8,.2,1) both; }
.fx-rotate-out { animation: fx-rotate-out 450ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes fx-rotate-in { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fx-rotate-out { from { transform: none; opacity: 1; } to { transform: translateY(-100%); opacity: 0; } }

/* ---------- SpotlightCard ---------- */
@property --spot {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
.fx-spotlight {
  --mx: 50%;
  --my: 50%;
  background-image: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 107, 26, calc(0.13 * var(--spot))), transparent 70%);
  transition: --spot 300ms ease, transform var(--transition), box-shadow var(--transition), border-color var(--transition), background-color var(--transition);
}
.fx-spotlight:hover { --spot: 1; }

/* ---------- TiltedCard ---------- */
.fx-tilt {
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
}
/* Soft glare that follows the cursor on tilted images */
.fx-tilt-glare { position: relative; display: inline-block; border-radius: 30px; }
.fx-tilt-glare::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.22), transparent 55%);
  opacity: 0;
  transition: opacity 300ms ease;
}
.fx-tilt-glare:hover::after { opacity: 1; }
.fx-tilt-glare .app-promo-shot { width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  .fx-rotate, .fx-rotate-in, .fx-rotate-out { animation: none; transition: none; }
}

/* =========================================================
   Bento services grid
   ========================================================= */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(230px, auto);
  gap: 20px;
}
.bento-tile { display: flex; flex-direction: column; color: inherit; text-decoration: none; overflow: hidden; position: relative; }
.bento-tile h3 { color: var(--text-heading); }
.bento-tile .card-link { margin-top: auto; padding-top: 14px; }
.bento-managed { grid-column: span 2; grid-row: span 2; }
.bento-cyber, .bento-wide { grid-column: span 2; flex-direction: row; gap: 24px; }
.bento-cyber .bento-copy, .bento-wide .bento-copy { flex: 1 1 55%; display: flex; flex-direction: column; }
.bento-cyber .bento-visual, .bento-wide .bento-visual { flex: 1 1 45%; align-self: center; }
.bento-managed .bento-copy { display: flex; flex-direction: column; }
.bento-managed .bento-visual { margin-top: 20px; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }

/* Managed IT: live network diagram */
.net-diagram { width: 100%; height: auto; max-height: 240px; }
.net-links path { stroke: var(--border-1-strong, rgba(148,163,184,.3)); stroke-width: 1.5; stroke-dasharray: 4 5; fill: none; animation: net-dash 1.2s linear infinite; }
@keyframes net-dash { to { stroke-dashoffset: -18; } }
.net-packets circle { fill: var(--orange-500); filter: drop-shadow(0 0 4px rgba(255,107,26,.8)); }
.net-node circle { fill: var(--surface-2, #0f1d36); stroke: var(--blue-400, #60a5fa); stroke-width: 1.5; }
.net-node text { fill: var(--text-body); font-size: 11px; font-weight: 600; text-anchor: middle; font-family: var(--font-sans); }
.net-hub circle { stroke: var(--orange-500); stroke-width: 2; animation: hub-pulse 2.4s ease-in-out infinite; transform-origin: 200px 110px; }
.net-hub text { fill: var(--orange-500); font-weight: 800; font-size: 12px; }
.net-small circle { stroke-width: 1; opacity: .7; }
@keyframes hub-pulse { 0%,100% { filter: drop-shadow(0 0 0 rgba(255,107,26,0)); } 50% { filter: drop-shadow(0 0 10px rgba(255,107,26,.6)); } }
.bento-status { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bento-status li { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--text-body); background: var(--tag-bg); border: 1px solid var(--tag-border); padding: 6px 12px; border-radius: 999px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: dot-ping 2s ease-out infinite; }
@keyframes dot-ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 80%,100% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } }

/* Cybersecurity: scrolling threat feed */
.threat-feed { list-style: none; margin: 0; padding: 0; height: 132px; overflow: hidden; position: relative;
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.threat-feed li { display: flex; align-items: center; gap: 10px; height: 33px; font-size: .82rem; color: var(--text-body); white-space: nowrap; animation: feed 8s linear infinite; }
@keyframes feed { from { transform: translateY(0); } to { transform: translateY(-132px); } }
.tf-tag { font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #22c55e; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); padding: 2px 8px; border-radius: 6px; }

/* Network design: VLAN traffic lanes */
.vlans { display: grid; gap: 12px; }
.vlan { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; font-size: .78rem; font-weight: 600; color: var(--text-body); }
.vlan i { height: 6px; border-radius: 6px; background:
  repeating-linear-gradient(90deg, var(--blue-400, #60a5fa) 0 14px, transparent 14px 26px);
  background-size: 26px 100%; opacity: .75; animation: lane var(--d, 2s) linear infinite; }
.vlan:nth-child(2) i { background-image: repeating-linear-gradient(90deg, var(--orange-500) 0 14px, transparent 14px 26px); }
@keyframes lane { to { background-position: 26px 0; } }

/* IT infrastructure: backup progress */
.backup { display: grid; gap: 10px; font-size: .8rem; }
.backup-row { display: flex; justify-content: space-between; color: var(--text-heading); font-weight: 600; }
.backup-row b { color: #22c55e; font-weight: 700; }
.backup-row:first-child b { color: var(--accent-text); }
.backup-row.muted { color: var(--text-body); }
.backup-bar { height: 8px; border-radius: 8px; background: var(--tag-bg); border: 1px solid var(--tag-border); overflow: hidden; }
.backup-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--orange-500), #ffb37a); animation: backup 4.5s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes backup { 0% { width: 0; } 80% { width: 100%; } 100% { width: 100%; opacity: .4; } }

@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-managed, .bento-cyber, .bento-wide { grid-column: span 2; }
  .bento-managed { grid-row: auto; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento-managed, .bento-cyber, .bento-wide { grid-column: auto; }
  .bento-cyber, .bento-wide { flex-direction: column; }
  .bento-cyber .bento-visual, .bento-wide .bento-visual { align-self: stretch; width: 100%; margin-top: 8px; flex: none; }
}

/* =========================================================
   Scroll stack (Why RGZ)
   ========================================================= */
.stack-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.stack-head { position: sticky; top: 140px; margin-bottom: 0; }
.scroll-stack { display: grid; gap: 28px; padding-bottom: 8vh; }
.stack-card {
  position: sticky;
  top: calc(130px + var(--i, 0) * 22px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: start;
  min-height: 260px;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface-1), var(--surface-2, var(--surface-1)));
  border: 1px solid var(--border-1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
  transform-origin: 50% 0;
  will-change: transform;
}
.stack-card:nth-child(1) { --i: 0; }
.stack-card:nth-child(2) { --i: 1; }
.stack-card:nth-child(3) { --i: 2; }
.stack-num { font-size: 3rem; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--orange-500); }
.stack-body h3 { font-size: 1.45rem; margin-bottom: 10px; color: var(--text-heading); }
.stack-body p { color: var(--text-body); }
.stack-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--orange-500); background: rgba(255,107,26,.1); border: 1px solid rgba(255,107,26,.25); }
@media (max-width: 900px) {
  .stack-layout { grid-template-columns: 1fr; gap: 32px; }
  .stack-head { position: static; }
  .stack-card { top: calc(90px + var(--i, 0) * 16px); grid-template-columns: auto 1fr; padding: 26px; min-height: 220px; }
  .stack-icon { display: none; }
}

/* =========================================================
   Terminal
   ========================================================= */
.terminal-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.terminal-split h2 { margin: 6px 0 16px; }
.terminal-split p { color: var(--text-body); }
.terminal { background: #070d1a; border: 1px solid rgba(148,163,184,.18); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(255,107,26,.05); }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #0c1527; border-bottom: 1px solid rgba(148,163,184,.12); }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.terminal-bar span:nth-child(1) { background: #ef4444; } .terminal-bar span:nth-child(2) { background: #f59e0b; } .terminal-bar span:nth-child(3) { background: #22c55e; }
.terminal-bar em { margin-left: 10px; font-style: normal; font-size: .78rem; color: #64748b; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.terminal-body { margin: 0; padding: 22px 22px 26px; min-height: 300px; font: 500 .86rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; color: #cbd5e1; white-space: normal; }
.terminal-body code { font: inherit; }
.t-line { display: block; white-space: pre-wrap; min-height: 1.75em; }
.t-cmd { color: #f1f5f9; margin-top: 6px; }
.t-cmd::before { content: "$ "; color: var(--orange-500); }
.t-dim { color: #64748b; }
.t-warn { color: #fbbf24; }
.t-ok { color: #4ade80; }
.t-done { color: #f1f5f9; font-weight: 700; margin-top: 6px; }
.t-caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: text-bottom; background: var(--orange-500); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
/* Lines not yet typed stay hidden once JS takes over */
.terminal.is-typing .t-line { visibility: hidden; }
.terminal.is-typing .t-line.shown { visibility: visible; }
@media (max-width: 900px) { .terminal-split { grid-template-columns: 1fr; gap: 32px; } .terminal-body { font-size: .76rem; min-height: 0; } }

@media (prefers-reduced-motion: reduce) {
  .net-links path, .net-hub circle, .dot, .threat-feed li, .vlan i, .backup-bar i, .t-caret { animation: none; }
  .backup-bar i { width: 100%; }
  .stack-card { position: relative; top: auto; }
}

/* =========================================================
   DiscForge (uses DiscForge's own forest + gold brand)
   ========================================================= */
.df-panel {
  --df-forest: #1B4332;
  --df-deep: #0D1F16;
  --df-gold: #D4A017;
  --df-text: #EEF4EF;
  --df-muted: #B9CDBF;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
  padding: 48px;
  border-radius: var(--radius-lg);
  color: var(--df-text);
  background:
    radial-gradient(600px 400px at 0% 0%, rgba(212,160,23,.14), transparent 60%),
    repeating-radial-gradient(circle at 20% 110%, rgba(255,255,255,.035) 0 1px, transparent 1px 22px),
    linear-gradient(150deg, #22533d, var(--df-forest) 45%, var(--df-deep));
  border: 1px solid rgba(212,160,23,.25);
  box-shadow: 0 30px 70px rgba(5, 20, 12, .35);
  overflow: hidden;
}
.df-media { display: flex; justify-content: center; }
.df-video-frame {
  width: min(360px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  background: var(--df-deep);
  border: 1px solid rgba(212,160,23,.35);
  box-shadow: 0 24px 50px rgba(0,0,0,.45), 0 0 0 6px rgba(13,31,22,.6);
}
.df-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.df-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.df-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 .78rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--df-gold); border: 1.5px solid rgba(212,160,23,.45); border-radius: 999px; padding: 7px 13px;
}
.df-badge--soon { color: var(--df-text); border-color: rgba(238,244,239,.3); }
.df-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--df-gold); animation: df-ping 2s ease-out infinite; }
@keyframes df-ping { 0% { box-shadow: 0 0 0 0 rgba(212,160,23,.6); } 80%,100% { box-shadow: 0 0 0 8px rgba(212,160,23,0); } }
.df-title {
  font-family: "Barlow Condensed", "Arial Narrow", var(--font-sans);
  font-weight: 800; font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: .95; letter-spacing: -.005em;
  color: #fff; margin-bottom: 16px; text-wrap: balance;
}
.df-title span { color: var(--df-gold); }
.df-lede { color: var(--df-muted); font-size: 1.05rem; max-width: 52ch; }
.df-stats { list-style: none; padding: 0; margin: 22px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.df-stats li { background: rgba(13,31,22,.55); border: 1px solid rgba(238,244,239,.12); border-radius: 999px; padding: 7px 14px; font-size: .86rem; font-weight: 600; color: var(--df-text); }
.df-stats strong { color: var(--df-gold); font-weight: 800; }
.df-features { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.df-features li { display: flex; gap: 12px; align-items: flex-start; color: var(--df-muted); font-size: .95rem; }
.df-features li b { color: var(--df-text); font-weight: 700; }
.df-features svg { width: 19px; height: 19px; color: #6fcf97; flex-shrink: 0; margin-top: 3px; }
.df-features .df-pro { background: rgba(212,160,23,.1); border: 1px solid rgba(212,160,23,.3); border-radius: 12px; padding: 12px 14px; margin-top: 4px; }
.df-features .df-pro svg { color: var(--df-gold); }
.df-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.df-btn-gold { background: var(--df-gold); color: #1B1400; border: 0; box-shadow: 0 10px 26px rgba(212,160,23,.3); }
.df-btn-gold:hover { background: #e5b225; color: #1B1400; transform: translateY(-2px); }
.df-btn-ghost { background: transparent; color: var(--df-text); border: 1.5px solid rgba(238,244,239,.35); }
.df-btn-ghost:hover { border-color: var(--df-gold); color: var(--df-gold); }
.df-build {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(238,244,239,.14);
  color: var(--df-muted); font-size: .92rem; text-decoration: none;
}
.df-build b { color: var(--df-text); }
.df-build svg { color: var(--df-gold); flex-shrink: 0; transition: transform .25s ease; }
.df-build:hover svg { transform: translateX(4px); }
.df-panel a:focus-visible { outline-color: var(--df-gold); }
@media (max-width: 900px) {
  .df-panel { grid-template-columns: 1fr; padding: 28px 22px; gap: 32px; }
  .df-video-frame { width: min(300px, 100%); }
}
@media (prefers-reduced-motion: reduce) { .df-dot { animation: none; } }
