/* ==========================================================================
   THE ROYAL™ — Venture & Enterprise Tech Strategy Practice (Master Styles)
   Art Direction: Dark Violet × Hyper Violet × Cyber Cyan × Electric Indigo
   ========================================================================== */

:root {
  --tech-bg: #080612;
  --tech-surface: #0E0B20;
  --tech-card: #14102C;
  --tech-card-alt: #1A1438;
  --tech-violet: #A78BFA;
  --tech-purple: #8B5CF6;
  --tech-indigo: #6366F1;
  --tech-cyan: #00E5FF;
  --tech-emerald: #34D399;
  --tech-text: #F8FAFC;
  --tech-muted: #94A3B8;
  --tech-border: rgba(167, 139, 250, 0.28);
  --tech-border-subtle: rgba(255, 255, 255, 0.08);
  --tech-glow: rgba(167, 139, 250, 0.35);
  --tech-cyan-glow: rgba(0, 229, 255, 0.3);
  --tech-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Body */
body.tech-body {
  background-color: var(--tech-bg);
  color: var(--tech-text);
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.6;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.16) 0%, transparent 65%),
    radial-gradient(circle at 90% 25%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 10% 75%, rgba(0, 229, 255, 0.07) 0%, transparent 50%);
}

/* Navigation Header Glassmorphism (Prevents Scrolling Text Overlap) */
body.tech-body nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  padding: 20px 60px;
  background: rgba(8, 6, 18, 0.92) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border-bottom: 1px solid rgba(167, 139, 250, 0.18) !important;
  pointer-events: auto !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* Base Form Control Reset to Prevent Top Layout Overlap */
body.tech-body input,
body.tech-body select,
body.tech-body textarea,
body.tech-body button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  box-sizing: border-box;
}

/* View Transitions API Morphing */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hero Section */
.tech-hero {
  padding: 140px 60px 80px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.tech-hero-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.tech-hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.2) contrast(1.1) saturate(0.8);
}

.tech-hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(8, 6, 18, 0.65) 0%, rgba(8, 6, 18, 0.98) 85%),
              linear-gradient(to bottom, rgba(8, 6, 18, 0.85) 0%, rgba(8, 6, 18, 0.99) 100%);
}

.tech-hero-cursor-bloom {
  position: absolute;
  top: var(--mouse-y, 40%);
  left: var(--mouse-x, 50%);
  width: 320px;
  height: 320px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.14) 0%, rgba(0, 229, 255, 0.05) 50%, transparent 75%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  will-change: left, top;
}

.tech-data-stream-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at 20% 30%, rgba(167, 139, 250, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 70%, rgba(0, 229, 255, 0.06) 0%, transparent 60%);
  opacity: 0.5;
}

.tech-hero > *:not(.tech-hero-bg-media):not(.tech-hero-cursor-bloom):not(.tech-data-stream-layer) {
  position: relative;
  z-index: 10;
}

/* Badges & Titles */
.tech-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.tech-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tech-violet);
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid var(--tech-border);
  padding: 6px 14px;
  border-radius: 9999px;
}

.tech-badge.cyan {
  color: var(--tech-cyan);
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.3);
}

.tech-title {
  font-size: clamp(38px, 5.8vw, 76px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  color: #FFFFFF;
}

.gradient-text {
  background: linear-gradient(135deg, #FFFFFF 20%, var(--tech-violet) 65%, var(--tech-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech-lead {
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--tech-muted);
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 40px;
}

/* Impact Value Chain Ribbon */
.tech-impact-chain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 44px;
  background: rgba(14, 11, 32, 0.75);
  border: 1px solid var(--tech-border);
  border-radius: 12px;
  padding: 24px;
  backdrop-filter: blur(12px);
}

.tech-chain-node {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tech-chain-step {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--tech-cyan);
  letter-spacing: 0.12em;
}

.tech-chain-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

.tech-chain-desc {
  font-size: 12px;
  color: var(--tech-muted);
  line-height: 1.45;
}

/* Buttons */
.tech-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-tech {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--tech-purple) 0%, var(--tech-indigo) 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  transition: var(--tech-transition);
  cursor: pointer;
}

.btn-tech:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6);
  border-color: var(--tech-cyan);
}

.btn-tech-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 16, 44, 0.6);
  color: var(--tech-text);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--tech-border);
  transition: var(--tech-transition);
}

.btn-tech-outline:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: var(--tech-violet);
  color: #FFFFFF;
}

/* Main Sections Layout */
.tech-section {
  padding: 90px 60px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.sec-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tech-cyan);
  display: block;
  margin-bottom: 10px;
}

.sec-heading {
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin: 0 0 16px;
}

.sec-desc {
  font-size: 16px;
  color: var(--tech-muted);
  max-width: 760px;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* Strategic Shift Grid */
.shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

.shift-card {
  background: var(--tech-card);
  border: 1px solid var(--tech-border);
  padding: 36px;
  border-radius: 12px;
  position: relative;
}

.shift-card.legacy {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(24, 15, 24, 0.6);
}

.shift-card.future {
  border-color: var(--tech-border);
  background: var(--tech-card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.shift-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  display: block;
  margin-bottom: 20px;
  color: var(--tech-violet);
}

.shift-card.legacy .shift-tag { color: #F87171; }
.shift-card.future .shift-tag { color: var(--tech-cyan); }

.shift-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.shift-list li {
  font-size: 14px;
  color: var(--tech-text);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.shift-list li span {
  font-weight: 800;
  line-height: 1;
}

.shift-card.legacy .shift-list li span { color: #EF4444; }
.shift-card.future .shift-list li span { color: var(--tech-emerald); }

/* Equation Bar */
.eq-bar {
  background: rgba(14, 11, 32, 0.9);
  border: 1px solid var(--tech-border);
  border-radius: 12px;
  padding: 32px;
}

.eq-formula {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(12px, 1.3vw, 15px);
  font-weight: 700;
  color: var(--tech-cyan);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.05em;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--tech-border-subtle);
}

.eq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.eq-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 6px;
}

.eq-item p {
  font-size: 12px;
  color: var(--tech-muted);
  margin: 0;
  line-height: 1.45;
}

/* 8-Stakeholder Buying Committee Tabs & Display */
.aud-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.aud-btn {
  background: rgba(20, 16, 44, 0.7);
  border: 1px solid var(--tech-border-subtle);
  color: var(--tech-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--tech-transition);
}

.aud-btn:hover,
.aud-btn.active {
  background: rgba(167, 139, 250, 0.16);
  border-color: var(--tech-violet);
  color: #FFFFFF;
}

.aud-display {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  background: var(--tech-card);
  border: 1px solid var(--tech-border);
  border-radius: 12px;
  padding: 36px;
  min-height: 320px;
}

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

.aud-col h4 {
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  color: var(--tech-cyan);
  margin: 0 0 12px;
  letter-spacing: 0.08em;
}

.aud-col p {
  font-size: 14px;
  color: var(--tech-text);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Triad Cards (B2B SaaS, AI Infra, FinTech) */
.triad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.triad-card {
  background: var(--tech-card);
  border: 1px solid var(--tech-border);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.triad-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--tech-violet);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.triad-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 16px;
}

.triad-card p {
  font-size: 14px;
  color: var(--tech-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.triad-specs {
  margin-top: auto;
  border-top: 1px solid var(--tech-border-subtle);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.triad-spec-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.triad-spec-label { color: var(--tech-muted); }
.triad-spec-val { font-weight: 700; color: var(--tech-cyan); font-family: 'JetBrains Mono', monospace; }

/* Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.pillar-box {
  background: var(--tech-card);
  border: 1px solid var(--tech-border-subtle);
  border-radius: 12px;
  padding: 30px;
}

.pillar-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--tech-indigo);
  margin-bottom: 12px;
}

.pillar-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 10px;
}

.pillar-box p {
  font-size: 13px;
  color: var(--tech-muted);
  line-height: 1.5;
  margin: 0;
}

/* Funnel Grid (Scroll Driven) */
.funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.funnel-stage {
  background: var(--tech-card);
  border: 1px solid var(--tech-border);
  border-radius: 10px;
  padding: 24px;
  position: relative;
}

.funnel-stage-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--tech-cyan);
  margin-bottom: 8px;
}

.funnel-stage h4 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 8px;
}

.funnel-stage p {
  font-size: 12px;
  color: var(--tech-muted);
  line-height: 1.45;
  margin: 0;
}

/* Valuation Multiple & ACV Calculator Simulator */
.calc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--tech-card);
  border: 1px solid var(--tech-border);
  border-radius: 14px;
  padding: 40px;
}

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

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-input-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--tech-text);
}

.calc-input-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--tech-cyan);
}

.calc-input-group input[type="range"] {
  width: 100%;
  accent-color: var(--tech-purple);
  cursor: pointer;
}

.calc-results {
  background: rgba(14, 11, 32, 0.9);
  border: 1px solid var(--tech-border);
  border-radius: 12px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
}

.calc-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--tech-border-subtle);
  padding-bottom: 12px;
}

.calc-metric:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.calc-metric-label {
  font-size: 13px;
  color: var(--tech-muted);
}

.calc-metric-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
}

.calc-metric-num.cyan { color: var(--tech-cyan); }
.calc-metric-num.highlight { color: var(--tech-emerald); font-size: 22px; }

/* Proposal Desk & Form Styling (Isolated & Clean Flow) */
.proposal-box {
  background: var(--tech-card);
  border: 1px solid var(--tech-border);
  border-radius: 14px;
  padding: 48px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

.proposal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--tech-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(8, 6, 18, 0.8) !important;
  border: 1px solid var(--tech-border) !important;
  color: #FFFFFF !important;
  padding: 14px 16px !important;
  border-radius: 6px !important;
  outline: none !important;
  width: 100% !important;
  position: static !important;
  margin: 0 !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--tech-cyan) !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25) !important;
}

/* OTP Modal & Alert (Hidden Initially to avoid stack overlap) */
.otp-modal {
  display: none;
  background: rgba(14, 11, 32, 0.95);
  border: 1px solid var(--tech-violet);
  border-radius: 12px;
  padding: 36px;
  text-align: center;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.otp-digit {
  width: 52px !important;
  height: 58px !important;
  text-align: center !important;
  font-size: 24px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 800 !important;
  background: rgba(8, 6, 18, 0.9) !important;
  border: 1px solid var(--tech-violet) !important;
  color: #FFFFFF !important;
  border-radius: 8px !important;
}

.success-alert {
  display: none;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid var(--tech-emerald);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

/* Footer Reset */
footer {
  background: #05040B;
  border-top: 1px solid var(--tech-border-subtle);
  padding: 60px 60px 40px;
}

.ft-hero {
  margin-bottom: 40px;
  text-align: center;
}

.ft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto 40px;
}

.ft-grid h5 {
  font-size: 14px;
  color: #FFFFFF;
  margin: 0 0 16px;
  font-family: 'JetBrains Mono', monospace;
}

.ft-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ft-grid a {
  color: var(--tech-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.ft-grid a:hover { color: var(--tech-violet); }

.ft-btm {
  text-align: center;
  border-top: 1px solid var(--tech-border-subtle);
  padding-top: 24px;
  font-size: 12px;
  color: var(--tech-muted);
}

/* ==========================================================================
   FIXES: High-Contrast Menu Button & Media Mockup Image Height Bounds
   ========================================================================== */
body.tech-body .menu-toggle {
  color: #171615 !important;
  font-weight: 800 !important;
}

body.tech-body .menu-toggle span {
  color: #171615 !important;
  font-weight: 800 !important;
}

body.tech-body .menu-shell.open .menu-toggle,
body.tech-body .menu-shell.open .menu-toggle span {
  color: #FFFFFF !important;
}

body.tech-body .menu-ico::before,
body.tech-body .menu-ico::after {
  background: #171615 !important;
}

body.tech-body .menu-shell.open .menu-ico::before,
body.tech-body .menu-shell.open .menu-ico::after {
  background: #FFFFFF !important;
}

/* Strict Container Bounds for Triad Media Mockups to prevent image overflow */
.tech-media-mockup {
  position: relative;
  width: 100%;
  height: 200px !important;
  max-height: 200px !important;
  border-radius: 12px;
  overflow: hidden !important;
  border: 1px solid var(--tech-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: var(--tech-transition);
  margin-bottom: 20px;
  background: #0E0B20;
}

.tech-media-mockup video,
.tech-media-mockup img {
  width: 100% !important;
  height: 100% !important;
  max-height: 200px !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s ease;
}

.tech-media-mockup:hover video,
.tech-media-mockup:hover img {
  transform: scale(1.04);
}
