/* ==========================================================================
   AFA Studio - Swiss Creative Excellence Stylesheet
   ========================================================================== */

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

:root {
  --bg-dark: #020617;
  /* Deep Slate/Black */
  --bg-radial: radial-gradient(circle at 50% 0%, #0f172a 0%, #020617 80%);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #3b82f6;
  /* Premium professional blue */
  --accent-glow: rgba(59, 130, 246, 0.25);
  --card-bg: rgba(15, 23, 42, 0.45);
  /* Glassmorphic deep card */
  --border-color: rgba(255, 255, 255, 0.06);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

/* Universal target element offset for sticky/fixed headers */
:target {
  scroll-margin-top: 100px;
}

body {
  background-color: var(--bg-dark);
  background-image: var(--bg-radial);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Fixed Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background-color: rgba(2, 6, 23, 0.4);
  animation: fadeUp 0.8s ease-out forwards;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.3s;
}

.logo:hover {
  opacity: 0.8;
}

.header-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

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

/* Hero Section (Landing) */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 2rem 2rem;
  position: relative;
  box-sizing: border-box;
}

.hero-center-container {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
}

/* --- Swiss Precision Animated Logo & Flag System --- */

/* 1. Header Logo Wrapper Styling */
.logo-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.logo-wrapper:hover {
  opacity: 0.85;
}

.logo-wrapper .swiss-flag-animated {
  opacity: 0;
  transform: scale(0.8);
  animation: flagEntrance 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.logo-wrapper .swiss-flag-animated svg {
  width: 22px;
  height: 22px;
  display: block;
}

.logo-wrapper .brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(8px);
  animation: textEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
}

/* 2. Coordinated Flag Pulse Animations */
.swiss-flag-animated svg {
  filter: drop-shadow(0 0 0 rgba(218, 41, 28, 0));
  animation: flagPulse 3s infinite ease-in-out 1s;
}

.swiss-flag svg {
  filter: drop-shadow(0 0 0 rgba(218, 41, 28, 0));
  animation: flagPulse 3s infinite ease-in-out;
}

/* 3. Hero Section Staggered Entrance Animations */
.hero-pretitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(15px);
  animation: heroFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s forwards;
}

.hero .swiss-flag-animated {
  display: inline-flex;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(15px);
  animation: heroFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
}

.hero .swiss-flag-animated svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* 4. Entrance & Pulse Keyframes */
@keyframes flagEntrance {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes textEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flagPulse {

  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(218, 41, 28, 0));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 8px rgba(218, 41, 28, 0.4));
    transform: scale(1.05);
  }
}

/* Mobile Adjustment for Logo Wrapper */
@media (max-width: 640px) {
  .logo-wrapper {
    gap: 0.5rem;
  }

  .logo-wrapper .swiss-flag-animated svg {
    width: 20px;
    height: 20px;
  }

  .logo-wrapper .brand-text {
    font-size: 1.1rem;
  }
}

.hero-title {
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(15px);
  animation: heroFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
  margin-bottom: 3.5rem;
  opacity: 0;
  transform: translateY(15px);
  animation: heroFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s forwards;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Hero Actions & Secondary Links */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(15px);
  animation: heroFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.9s forwards;
}

.btn-gateway {
  background-color: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 0.8rem 2.2rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gateway:hover {
  background-color: #ffffff;
  color: var(--bg-dark);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

.link-hero {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s ease, transform 0.3s ease;
}

.link-hero:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Hero Overlay Footer */
.hero-footer {
  width: 100%;
  max-width: 600px;
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.hero-footer-contact a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.hero-footer-secure {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(148, 163, 184, 0.4);
  font-weight: 400;
  text-transform: uppercase;
}

/* Main Content Area */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Content Sections */
.afa-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  margin-bottom: 3rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  transition: border-color 0.3s, box-shadow 0.3s;
  scroll-margin-top: 100px;
  /* Offset to prevent targeted anchors from being hidden under the fixed header */
}

.afa-section:hover {
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.afa-section h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.section-lead {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Services Grid & Cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer Section */
.site-footer {
  padding: 5rem 0 3rem 0;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(to top, rgba(2, 6, 23, 0.8), transparent);
  color: var(--text-secondary);
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.swiss-flag {
  display: inline-flex;
  align-items: center;
}

.swiss-flag svg {
  border-radius: 2px;
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 320px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-family: monospace;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGlow 2s infinite ease-in-out;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.link-column h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.link-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-column li {
  margin-bottom: 0.75rem;
  padding: 0;
  list-style-type: none;
  /* absolute bullet prevention */
}

.link-column a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.link-column a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

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

.secure-badge {
  font-family: monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: rgba(148, 163, 184, 0.5);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
    /* Hide header navigation links on mobile */
  }

  .hero {
    padding-top: 6rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 280px;
  }

  .btn-gateway,
  .link-hero {
    width: 100%;
    text-align: center;
    margin: 0;
  }

  .link-hero {
    padding: 0.5rem 0;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-links {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .link-column a:hover {
    transform: none;
    /* Disable horizontal slide on mobile hover */
  }
}