/* ===== LOCAL FONTS ===== */
/* Your Custom Font */
@font-face {
    font-family: 'StraviFont';
    src: url('StraviFont.woff2') format('woff2'),
         url('StraviFont.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

/* ===== STRAVI.DE - Enhanced Design ===== */

:root {
  /* Your existing brand colors */
  --dark-bg: #2E2E2E;
  --dark-blue: #3A567F;
  --accent-blue: #5B9EBF;
  --white: #FFFFFF;
  --muted: #cbd5e1;
  
  /* Glass morphism effects */
  --glass: rgba(91, 158, 191, 0.15);
  --glass-hover: rgba(91, 158, 191, 0.25);
  --glass-strong: rgba(91, 158, 191, 0.2);
  
  /* Design system */
  --blur: 20px;
  --radius: 18px;
  --radius-small: 12px;
  --portrait: 320px;
  
  /* Spacing system */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Typography - Optimized System Fonts */
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-handwriting: 'StraviFont', 'Brush Script MT', 'Lucida Handwriting', cursive;
}

/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1a1a 100%);
  color: var(--white);
  font-family: var(--font-body);
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Loading state */
body:not(.loaded) * {
  animation-play-state: paused;
}

/* ===== BACKGROUND ANIMATION ===== */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent-blue), var(--dark-blue));
  opacity: 0.08;
  animation: float 8s ease-in-out infinite;
}

.bg-circle:nth-child(1) {
  width: 300px;
  height: 300px;
  top: 5%;
  left: 75%;
  animation-delay: 0s;
}

.bg-circle:nth-child(2) {
  width: 250px;
  height: 250px;
  top: 55%;
  left: 5%;
  animation-delay: 3s;
}

.bg-circle:nth-child(3) {
  width: 200px;
  height: 200px;
  top: 25%;
  left: -5%;
  animation-delay: 6s;
}

/* Add more background coverage */
.bg-circle:nth-child(4) {
  width: 180px;
  height: 180px;
  top: 70%;
  left: 80%;
  animation-delay: 9s;
}

.bg-circle:nth-child(5) {
  width: 120px;
  height: 120px;
  top: 85%;
  left: 15%;
  animation-delay: 12s;
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) scale(1);
    opacity: 0.08;
  }
  50% { 
    transform: translateY(-20px) scale(1.1);
    opacity: 0.12;
  }
}

/* ===== LAYOUT ===== */
.wrap {
  width: min(var(--portrait), 92vw);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + var(--space-2xl)) var(--space-md) var(--space-lg);
  position: relative;
  z-index: 1;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  text-align: center;
  animation: slideDown 0.8s ease-out;
}

.logo-container {
  position: relative;
  margin-bottom: var(--space-sm);
}

.logo {
  height: 120px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}

/* Handwritten logo styling */
.logo-handwriting {
  font-family: var(--font-handwriting);
  font-size: 4.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--white) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: rotate(-1deg);
  display: inline-block;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
  margin-top: var(--space-sm);
}

.highlight {
  color: var(--accent-blue);
  font-weight: 500;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== PROFILE SECTION ===== */
.profile-section {
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  border: 1px solid rgba(91, 158, 191, 0.2);
  animation: slideUp 0.8s ease-out 0.2s both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.profile-image {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: linear-gradient(45deg, var(--accent-blue), var(--dark-blue));
  animation: pulse 3s ease-in-out infinite;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback if no portrait image */
.profile-image:not(:has(img))::before {
  content: 'TS';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--white);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.profile-content {
  text-align: center;
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--white);
}

.profile-description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.highlight-stat {
  color: var(--accent-blue);
  font-weight: 600;
}

/* ===== SERVICES PREVIEW ===== */
.services-preview {
  margin-bottom: var(--space-xl);
  animation: slideUp 0.8s ease-out 0.4s both;
}

.section-header {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-align: center;
  margin-bottom: var(--space-lg);
  letter-spacing: 0.5px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  width: 100%;
  max-width: var(--portrait);
  margin: 0 auto;
}

.service-item {
  background: var(--glass);
  backdrop-filter: blur(calc(var(--blur) / 2));
  border-radius: var(--radius-small);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(91, 158, 191, 0.15);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.service-item:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
  border-color: var(--accent-blue);
}

.service-icon {
  font-size: 1.2rem;
  display: block;
}

.service-text {
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: center;
}

/* ===== LINKS SECTION ===== */
.links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.link-btn {
  width: 100%;
  max-width: var(--portrait);
  padding: var(--space-md) var(--space-lg);
  text-align: center;
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  border: 1px solid rgba(91, 158, 191, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

/* Animated shine effect */
.link-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(91, 158, 191, 0.2), transparent);
  transition: left 0.5s ease;
}

.link-btn:hover::before {
  left: 100%;
}

.link-btn:hover {
  background: var(--glass-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(91, 158, 191, 0.3);
  border-color: var(--accent-blue);
}

.link-btn:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Primary CTA button */
.link-btn.primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--dark-blue));
  border: none;
  font-weight: 700;
  font-size: 1.1rem;
}

.link-btn.primary:hover {
  background: linear-gradient(135deg, var(--dark-blue), var(--accent-blue));
  box-shadow: 0 10px 30px rgba(91, 158, 191, 0.4);
}

/* Primary CTA with handwriting font - optimized for short text */
.link-btn.primary.handwriting {
  font-family: var(--font-handwriting);
  font-size: 2.2rem;
  padding: 20px 28px;
  letter-spacing: 0.5px;
  transform: rotate(-0.5deg);
  line-height: 1.1;
}

.link-btn.primary.handwriting:hover {
  transform: rotate(-0.5deg) translateY(-3px);
}

/* Secondary buttons (legal links) */
.link-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  min-height: auto;
}

.btn-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.btn-text {
  flex: 1;
}

/* Legal links container */
.legal-links {
  display: flex;
  gap: var(--space-sm);
  width: 100%;
  margin-top: var(--space-md);
}

.legal-links .link-btn {
  flex: 1;
}

/* Legal footer - small text links */
.legal-footer {
  text-align: center;
  margin: var(--space-lg) 0 var(--space-md) 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.legal-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
  padding: var(--space-xs) var(--space-sm);
}

.legal-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.legal-separator {
  margin: 0 var(--space-xs);
  opacity: 0.5;
}

/* ===== FOOTER ===== */
.footer {
  margin-top: var(--space-2xl);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(91, 158, 191, 0.2);
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
  from { 
    opacity: 0; 
    transform: translateY(-30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Staggered animations for link buttons */
.link-btn {
  animation: slideUp 0.6s ease-out both;
}

.link-btn:nth-child(1) { animation-delay: 0.3s; }
.link-btn:nth-child(2) { animation-delay: 0.4s; }
.link-btn:nth-child(3) { animation-delay: 0.5s; }
.link-btn:nth-child(4) { animation-delay: 0.6s; }
.link-btn:nth-child(5) { animation-delay: 0.7s; }
.link-btn:nth-child(6) { animation-delay: 0.8s; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
  .wrap {
    padding: calc(env(safe-area-inset-top) + var(--space-xl)) var(--space-md) var(--space-md);
    width: 95vw;
  }
  
  .logo {
    height: 100px;
  }
  
  .logo-handwriting {
    font-size: 4rem;
  }
  
  .section-header {
    font-size: 1.1rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
  
  .service-text {
    font-size: 0.85rem;
  }
  
  .link-btn {
    padding: var(--space-md) var(--space-md);
    font-size: 0.95rem;
  }
  
  .link-btn.primary.handwriting {
    font-size: 1.8rem;
    padding: 18px 24px;
  }
  
  .legal-links {
    flex-direction: column;
  }
  
  .profile-section {
    padding: var(--space-md);
  }
  
  .profile-image {
    width: 140px;
    height: 140px;
  }
  
  .profile-image:not(:has(img))::before {
    font-size: 3.2rem;
  }
}

@media (max-width: 320px) {
  .wrap {
    width: 98vw;
    padding-left: var(--space-xs);
    padding-right: var(--space-xs);
  }
  
  .link-btn {
    padding: var(--space-sm) var(--space-md);
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .bg-circle {
    animation: none;
  }
  
  .logo-handwriting,
  .section-header,
  .link-btn.primary.handwriting {
    transform: none !important;
  }
}

@media (prefers-color-scheme: light) {
  /* If someone has light mode preference, we could add a light theme here */
  /* For now, keeping the dark theme as it's part of your brand identity */
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-auto {
  margin-top: auto;
}

/* ===== HANDWRITING UTILITY CLASS - For Logo/Important Titles Only ===== */
.handwriting {
  font-family: var(--font-handwriting);
  font-weight: 700;
  letter-spacing: 1px;
  transform: rotate(-0.5deg);
  display: inline-block;
}

/* Dark/light theme toggle preparation */
[data-theme="light"] {
  /* Light theme variables would go here if needed */
}

/* Print styles */
@media print {
  .bg-animation,
  .link-btn::before {
    display: none;
  }
  
  .link-btn {
    background: transparent;
    border: 2px solid #333;
    color: #333;
  }
  
  body {
    background: white;
    color: #333;
  }
}