/*
  San Marino Ventures LLC - CSS Design System & Stylesheet
  Premium, modern, clean, tech-focused dark theme.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* CSS variables for consistent theming */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-primary: #0ea5e9; /* Sky Blue */
  --accent-secondary: #10b981; /* Emerald/Teal */
  --accent-gradient: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  --accent-glow: rgba(14, 165, 233, 0.15);
  
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --max-width: 1200px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

/* Reset and global rules */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Gradient text utility */
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Grid & Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.section-dark {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-header p {
  font-size: 1.125rem;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  transition: var(--transition-smooth);
}

.navbar.scrolled .container {
  padding: 0.75rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.logo svg {
  width: 32px;
  height: 32px;
  fill: none;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

/* Pseudo-element for standard links underline animation */
.nav-links a:not(.cta-btn)::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:not(.cta-btn):hover::after,
.nav-links a.active:not(.cta-btn)::after {
  transform: scaleX(1);
  transform-origin: left;
}

.cta-btn {
  background: var(--accent-gradient);
  color: #fff !important;
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
  transition: var(--transition-smooth);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.cta-btn.active {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.45);
}

.cta-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

/* Subtle glow effects (not excessive) */
.hero::before {
  content: '';
  position: absolute;
  top: 15%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: 5%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  max-width: 700px;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  color: var(--accent-primary);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-weight: 800;
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

.hero-graphic {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-svg-container {
  width: 100%;
  max-width: 420px;
  height: 420px;
  animation: float 6s ease-in-out infinite;
}

/* Key Metrics Bar */
.metrics-bar {
  display: flex;
  gap: 3rem;
  margin-top: 3.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-primary);
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 2.5rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 1px 1px rgba(14, 165, 233, 0.2);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-list {
  list-style: none;
  margin-top: 1.5rem;
}

.service-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-list li::before {
  content: '✓';
  color: var(--accent-secondary);
  font-weight: bold;
}

/* Sectors Grid */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.sector-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.sector-card:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

.sector-icon {
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
}

.sector-card:hover .sector-icon {
  color: var(--accent-primary);
}

.sector-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Global Presence & Interactive Map */
.map-container {
  position: relative;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.map-svg-wrapper {
  width: 100%;
  max-width: 800px;
  height: auto;
  position: relative;
}

.map-continent {
  fill: rgba(255, 255, 255, 0.04);
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1.5;
  transition: var(--transition-smooth);
}

.map-continent:hover {
  fill: rgba(255, 255, 255, 0.07);
  stroke: rgba(255, 255, 255, 0.3);
}

.map-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.map-point {
  cursor: pointer;
  transition: var(--transition-smooth);
}

.map-point circle {
  transition: var(--transition-smooth);
}

.map-point:hover circle.pulse-ring {
  transform: scale(2);
  opacity: 0;
}

.map-point:hover circle.core-dot {
  fill: #fff;
  filter: drop-shadow(0 0 8px var(--accent-primary));
}

.map-tooltip {
  position: absolute;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.map-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.region-group h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.region-group ul {
  list-style: none;
}

.region-group li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

/* Contact Page Styles */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  margin-top: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 20px;
  height: 20px;
}

.contact-item-text h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-item-text p, 
.contact-item-text a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.contact-item-text a:hover {
  color: var(--accent-primary);
}

.corporate-details-card {
  margin-top: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 2rem;
}

.corporate-details-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.corp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  font-size: 0.9rem;
}

.corp-row {
  display: flex;
  justify-content: space-between;
}

.corp-row span:first-child {
  color: var(--text-muted);
}

.corp-row span:last-child {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

/* Contact Form */
.contact-form-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.error-message {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}

.form-control.invalid {
  border-color: #ef4444;
}

.form-control.invalid:focus {
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.form-submit-btn {
  width: 100%;
  margin-top: 1rem;
}

/* Toast alert for form status */
.toast {
  position: fixed;
  bottom: 2rem;
  right: -350px;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-secondary);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1002;
  transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 320px;
}

.toast.show {
  right: 2rem;
}

.toast-icon {
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.toast-content h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.toast-content p {
  font-size: 0.8rem;
  margin: 0;
}

/* Legal Page Styles */
.legal-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 4rem;
  margin-top: 2rem;
}

.legal-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.legal-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-nav-link {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-left: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.legal-nav-link:hover,
.legal-nav-link.active {
  color: var(--accent-primary);
  border-left-color: var(--accent-primary);
  font-weight: 500;
}

.legal-content-pane {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
}

.legal-section-block {
  display: none;
}

.legal-section-block.active {
  display: block;
}

.legal-section-block h2 {
  font-size: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.legal-section-block h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-section-block ul,
.legal-section-block ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.legal-section-block li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.legal-section-block p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Footer styling */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-nav h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-nav a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a:hover {
  color: var(--text-secondary);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Scroll Animation classes */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Responsive styles */
@media (max-width: 992px) {
  h1 { font-size: 2.75rem; }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-graphic {
    order: -1;
  }
  
  .hero-svg-container {
    max-width: 320px;
    height: 320px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .legal-sidebar {
    position: relative;
    top: 0;
  }
  
  .legal-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
  }
  
  .legal-nav-link {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1rem;
  }
  
  .legal-nav-link:hover,
  .legal-nav-link.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent-primary);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2.5rem;
    gap: 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  }
  
  .nav-links.open {
    right: 0;
  }
  
  .nav-links a {
    font-size: 1.1rem;
    width: 100%;
    padding: 0.5rem 0;
  }
  
  .nav-links li:last-child {
    width: 100%;
    margin-top: 1rem;
  }
  
  .nav-links .cta-btn {
    display: block;
    width: 100%;
    text-align: center;
  }
  
  .metrics-bar {
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  
  .metric-value {
    font-size: 1.75rem;
  }
  
  .map-container {
    padding: 1.5rem;
  }
  
  .map-details {
    grid-template-columns: 1fr 1fr;
  }
  
  .contact-form-container {
    padding: 1.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

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