/* ===== STRAVI WIP - Design System ===== */

/* StraviFont Integration */
@font-face {
    font-family: 'StraviFont';
    src: url('StraviFont.woff2') format('woff2'),
         url('StraviFont.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

:root {
  /* STRAVI 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 */
  --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;
}

.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(800px, 95vw);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + var(--space-2xl)) var(--space-lg) var(--space-lg);
  position: relative;
  z-index: 1;
}

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

.wip-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.wip-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.wip-img:hover {
  transform: scale(1.02);
}

.hero-text {
  text-align: center;
  max-width: 600px;
}

.main-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-md);
  letter-spacing: 3px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.tagline {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: var(--space-lg);
  line-height: 1.4;
}

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

.sub {
  color: var(--muted);
  max-width: 50ch;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 auto;
}

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

.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  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: 2.4rem;
  font-weight: 700;
  color: var(--white);
}

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

.profile-content {
  flex: 1;
  text-align: left;
}

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

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

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

/* ===== LINKS SECTION ===== */
.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.link-btn {
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  font-size: 1.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: 60px;
  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(-4px);
  box-shadow: 0 12px 28px 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 {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--accent-blue), var(--dark-blue));
  border: none;
  font-weight: 700;
  font-size: 1.2rem;
}

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

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

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

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

.btn-text {
  flex: 1;
}

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

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

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) { 
  .grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
  .grid .embed:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) { 
  .grid {
    grid-template-columns: 1fr;
  }
  .grid .embed:last-child {
    grid-column: auto;
  }
}

.embed {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass);
  backdrop-filter: blur(calc(var(--blur) / 1.5));
  border: 1px solid rgba(91, 158, 191, 0.15);
  transition: all 0.3s ease;
}

.embed:hover {
  background: var(--glass-hover);
  transform: translateY(-4px);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 24px rgba(91, 158, 191, 0.2);
}

/* ===== LEGAL FOOTER ===== */
.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-xl);
  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; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .wrap {
    width: 95vw;
    padding: calc(env(safe-area-inset-top) + var(--space-xl)) var(--space-md) var(--space-md);
  }
  
  .main-title {
    font-size: 2.4rem;
    letter-spacing: 2px;
  }
  
  .tagline {
    font-size: 1.1rem;
  }
  
  .profile-section {
    flex-direction: column;
    text-align: center;
    padding: var(--space-lg);
    gap: var(--space-lg);
  }
  
  .profile-content {
    text-align: center;
  }
  
  .profile-image {
    width: 100px;
    height: 100px;
  }
  
  .profile-image:not(:has(img))::before {
    font-size: 2rem;
  }
  
  .links {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  
  .link-btn {
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
  }
  
  .link-btn.primary.handwriting {
    font-size: 1.8rem;
    padding: 20px 28px;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: 98vw;
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }
  
  .main-title {
    font-size: 2rem;
    letter-spacing: 1px;
  }
  
  .tagline {
    font-size: 1rem;
  }
  
  .sub {
    font-size: 0.9rem;
  }
  
  .profile-section {
    padding: var(--space-md);
    gap: var(--space-md);
  }
  
  .profile-image {
    width: 80px;
    height: 80px;
  }
  
  .profile-name {
    font-size: 1.1rem;
  }
  
  .profile-description {
    font-size: 0.9rem;
  }
  
  .link-btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.95rem;
  }
  
  .link-btn.primary.handwriting {
    font-size: 1.6rem;
    padding: 18px 24px;
  }
  
  .wip-container {
    max-width: 100%;
  }
  
  .section-header {
    font-size: 1.2rem;
  }
}

/* ===== 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;
  }
  
  .wip-title,
  .link-btn.primary.handwriting {
    transform: none !important;
  }
}

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

.handwriting {
  font-family: var(--font-handwriting);
  font-weight: 700;
  letter-spacing: 1px;
  transform: rotate(-0.5deg);
  display: inline-block;
}

/* 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;
  }
}