/* Perez Global Limited — consulting layout (Modulabs-inspired: dark, modular, precise) */

:root {
  --bg-deep: #0a0b0f;
  --bg-panel: #12141c;
  --bg-elevated: #1a1d28;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --text-muted: #8b919d;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.15);
  --accent-2: #a78bfa;
  --danger-glow: rgba(167, 139, 250, 0.12);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}

a:hover {
  opacity: 0.85;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Noise overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Grid background */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

/* Layout */
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 15, 0.75);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo svg {
  flex-shrink: 0;
}

.logo-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.logo-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .logo-title {
    font-size: 0.9rem;
  }
  .logo-sub {
    font-size: 0.6rem;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2dd4bf);
  color: #042f2e;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(94, 234, 212, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hero */
.hero {
  padding: clamp(3rem, 12vw, 7rem) 0 clamp(4rem, 10vw, 6rem);
  position: relative;
}

.hero-top {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: center;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

@media (min-width: 900px) {
  .hero-top {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 2.5rem 3rem;
  }

  .hero-copy h1 {
    max-width: 18ch;
  }
}

.hero-media {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-credit {
  margin: 0;
  padding: 0.5rem 0.75rem 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.services-spotlight {
  margin: 0 0 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.services-spotlight img {
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  max-height: min(360px, 42vw);
  object-fit: cover;
}

.services-spotlight .image-credit {
  padding: 0.85rem 1rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: normal;
  border-top: 1px solid var(--border);
  background: rgba(10, 11, 15, 0.5);
}

/* Sectors slideshow */
.sectors-slideshow {
  max-width: min(960px, 100%);
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  overflow: hidden;
  outline: none;
}

.sectors-slideshow:focus-visible {
  box-shadow: 0 0 0 2px var(--bg-deep), 0 0 0 4px var(--accent);
}

.sectors-slideshow-viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-deep);
}

.sectors-slideshow-slides {
  position: absolute;
  inset: 0;
}

.sectors-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.65s var(--ease);
  pointer-events: none;
}

.sectors-slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.sectors-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sectors-slide-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem 1.25rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  background: linear-gradient(transparent, rgba(10, 11, 15, 0.94) 42%);
}

.sectors-slideshow-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.25rem 1.15rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.sectors-slideshow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sectors-slideshow-btn:hover {
  border-color: rgba(94, 234, 212, 0.45);
  color: var(--accent);
}

.sectors-slideshow-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

.sectors-slideshow-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.sectors-slideshow-dots button {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.sectors-slideshow-dots button:hover {
  background: rgba(94, 234, 212, 0.55);
}

.sectors-slideshow-dots button.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

.sectors-slideshow-dots button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .sectors-slide {
    transition-duration: 0.01ms;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(94, 234, 212, 0.25);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 0 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0;
}

.hero-visual {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--accent-dim), transparent 70%);
  pointer-events: none;
}

.stat-card strong {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.25rem;
}

.stat-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sections */
section {
  padding: clamp(3rem, 8vw, 5rem) 0;
  position: relative;
  z-index: 1;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  margin: 0 0 0.75rem;
}

section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 20ch;
}

.section-intro {
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 0 2.5rem;
}

/* Bento services */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.bento-item {
  grid-column: span 12;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  position: relative;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

@media (min-width: 720px) {
  .bento-item.span-7 {
    grid-column: span 7;
  }
  .bento-item.span-5 {
    grid-column: span 5;
  }
  .bento-item.span-6 {
    grid-column: span 6;
  }
  .bento-item.span-4 {
    grid-column: span 4;
  }
}

.bento-item:hover {
  border-color: rgba(94, 234, 212, 0.25);
  transform: translateY(-2px);
}

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: var(--accent-dim);
  color: var(--accent);
}

.bento-item:nth-child(2) .bento-icon {
  background: var(--danger-glow);
  color: var(--accent-2);
}

.bento-item:nth-child(3) .bento-icon {
  background: rgba(94, 234, 212, 0.08);
}

.bento-item h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.bento-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.bento-item ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.bento-item li {
  margin-bottom: 0.35rem;
}

/* Control tower strip */
.tower {
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-deep));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.tower-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .tower-inner {
    grid-template-columns: 1fr 1.1fr;
  }
}

.tower-diagram {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 30% 20%, var(--accent-dim), transparent 50%),
    radial-gradient(ellipse at 70% 80%, var(--danger-glow), transparent 45%),
    var(--bg-panel);
  position: relative;
  overflow: hidden;
}

.tower-node {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(8px);
}

.tower-node.n1 {
  top: 18%;
  left: 12%;
}
.tower-node.n2 {
  top: 42%;
  right: 18%;
}
.tower-node.n3 {
  bottom: 22%;
  left: 22%;
}
.tower-node.n4 {
  top: 28%;
  right: 38%;
}

.tower-lines {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 39px,
    rgba(94, 234, 212, 0.15) 39px,
    rgba(94, 234, 212, 0.15) 40px
  );
}

/* AI + BA ribbon */
.ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.ribbon-chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
}

.ribbon-chip strong {
  color: var(--accent);
  font-weight: 600;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}

.contact-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-card h2 {
  margin-top: 0;
}

.office-map-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.office-map-link:hover {
  text-decoration: underline;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile nav */
@media (max-width: 640px) {
  .nav {
    gap: 1rem;
  }
  .nav .btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }
}
