/* SUPA Website - Suomi.fi Design System */
/* Finnish Government Design: Clean, Accessible, Professional */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap');

:root {
  /* Suomi.fi Color Palette */
  --suomi-blue: #003479;
  --suomi-blue-light: #2A6EBB;
  --suomi-blue-dark: #00205B;
  --suomi-highlight: #00B5AD;
  --suomi-accent: #E97025;
  --suomi-success: #00A651;
  --suomi-warning: #FFB800;
  --suomi-error: #C73F00;
  
  --background: #FFFFFF;
  --surface: #F5F5F5;
  --surface-alt: #E8E8E8;
  --text-primary: #1A1A1A;
  --text-secondary: #595959;
  --text-light: #767676;
  --border-color: #C9CDCF;
  --white: #FFFFFF;
  
  /* Suomi.fi Typography */
  --font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --heading-weight: 700;
  --body-weight: 400;
  --semibold: 600;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
  
  /* Border Radius */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
}

/* Typography - Suomi.fi Style */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--heading-weight);
  line-height: 1.2;
  color: var(--suomi-blue);
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; letter-spacing: -0.5px; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

a {
  color: var(--suomi-blue);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--suomi-blue-light);
}

a:focus {
  outline: 3px solid var(--suomi-highlight);
  outline-offset: 2px;
}

/* Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===== HEADER - Suomi.fi Style ===== */
header {
  background-color: var(--suomi-blue);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
}

.logo {
  font-size: 1.5rem;
  font-weight: var(--heading-weight);
  color: var(--white);
  text-decoration: none;
  letter-spacing: 1px;
}

.logo:hover {
  color: var(--white);
}

nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: var(--semibold);
  font-size: 1rem;
  padding: var(--space-sm) 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: var(--white);
}

.nav-links a:focus {
  outline: 2px solid var(--suomi-highlight);
  outline-offset: 4px;
}

/* Language Toggle - Text Style */
.lang-switcher {
  margin-left: var(--space-md);
}

.lang-toggle-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: var(--semibold);
}

.lang-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--white);
}

.lang-toggle-btn:focus {
  outline: 2px solid var(--suomi-highlight);
  outline-offset: 2px;
}

/* ===== HERO SECTION - Suomi.fi Style ===== */
.hero {
  background: linear-gradient(180deg, var(--suomi-blue) 0%, var(--suomi-blue-dark) 100%);
  color: var(--white);
  padding: var(--space-3xl) 0;
  text-align: left;
}

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

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

.hero .subheadline {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

/* ===== BUTTONS - Suomi.fi Style ===== */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: var(--semibold);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  text-align: center;
}

.btn:focus {
  outline: 3px solid var(--suomi-highlight);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--suomi-accent);
  color: var(--white);
  border-color: var(--suomi-accent);
}

.btn-primary:hover {
  background: #D4631F;
  border-color: #D4631F;
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--suomi-blue);
  border-color: var(--suomi-blue);
}

.btn-secondary:hover {
  background: var(--suomi-blue);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--suomi-blue);
  border: 2px solid var(--suomi-blue);
}

.btn-outline:hover {
  background: var(--suomi-blue);
  color: var(--white);
}

/* ===== SECTIONS ===== */
section {
  padding: var(--space-3xl) 0;
}

.section-title {
  margin-bottom: var(--space-2xl);
}

.section-title h2 {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 4px solid var(--suomi-accent);
  display: inline-block;
}

/* ===== CONTENT BLOCKS ===== */
.content-block {
  background: var(--surface);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  border-left: 4px solid var(--suomi-blue);
}

.content-block h3 {
  margin-bottom: var(--space-md);
}

.content-block p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== FEATURE CARDS - Suomi.fi Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--white);
  padding: var(--space-xl);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  border-top: 4px solid var(--suomi-blue);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  color: var(--suomi-blue);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Feature Icon - Clean SVG Style */
.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--suomi-blue) 0%, var(--suomi-blue-light) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--white);
  stroke-width: 2;
  fill: none;
}

/* ===== BULLET LIST - Suomi.fi Style ===== */
.bullet-list {
  list-style: none;
  margin: var(--space-xl) 0;
}

.bullet-list li {
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  background: var(--white);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--suomi-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: background 0.2s ease;
}

.bullet-list li:hover {
  background: var(--surface);
}

.bullet-list li strong {
  color: var(--suomi-blue);
  font-weight: var(--semibold);
  display: block;
  margin-bottom: var(--space-xs);
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: var(--suomi-blue);
  color: var(--white);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  margin: var(--space-2xl) 0;
  border-radius: var(--radius-lg);
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  margin-bottom: var(--space-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== FORMS - Suomi.fi Style ===== */
.form-container {
  max-width: 500px;
  margin: 0 auto;
  background: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: var(--semibold);
  color: var(--text-primary);
  font-size: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-family);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--suomi-blue);
  box-shadow: 0 0 0 3px rgba(0, 52, 121, 0.15);
}

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

/* ===== SLOGAN BLOCK ===== */
.slogan {
  text-align: center;
  font-size: 1.5rem;
  font-weight: var(--semibold);
  color: var(--suomi-blue);
  padding: var(--space-2xl);
  margin: var(--space-xl) 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
}

/* ===== INFO BOX ===== */
.info-box {
  background: #E6F3FF;
  border: 1px solid var(--suomi-blue-light);
  border-left: 4px solid var(--suomi-blue);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.info-box h4 {
  color: var(--suomi-blue);
  margin-bottom: var(--space-sm);
}

.info-box p {
  margin-bottom: 0;
  color: var(--text-primary);
}

/* ===== FOOTER - Suomi.fi Style ===== */
footer {
  background: var(--suomi-blue-dark);
  color: var(--white);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h4 {
  color: var(--white);
  font-size: 1.125rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--suomi-accent);
  display: inline-block;
}

.footer-section p,
.footer-section a {
  color: #FFFFFF;
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-section a {
  text-decoration: none;
  color: #FFFFFF;
}

.footer-section a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: var(--space-lg);
  text-align: center;
}

.footer-bottom p {
  color: #FFFFFF;
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ===== EXPANDED CONTENT SECTION ===== */
.expanded-content {
  background: var(--white);
  padding: var(--space-2xl);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
}

.expanded-content h3 {
  color: var(--suomi-blue);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--suomi-accent);
}

.expanded-content p {
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.expanded-content p:last-child {
  margin-bottom: 0;
}

/* ===== COMPARISON HIGHLIGHT ===== */
.comparison-note {
  background: linear-gradient(135deg, #E6F3FF 0%, #F0F8FF 100%);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
  border: 1px solid var(--suomi-blue-light);
}

.comparison-note strong {
  color: var(--suomi-blue);
}

/* ===== WASL FORM STYLES ===== */
.wasl-form {
  max-width: 500px;
  margin: 0 auto;
}

.captcha-group {
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.captcha-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: var(--semibold);
  color: var(--text-primary);
}

.mcaptcha-container {
  min-height: 80px;
}

.captcha-hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: var(--space-sm);
}

.submit-btn {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  background: var(--suomi-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: var(--semibold);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
  background: #D4631F;
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.submit-btn .spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.success-message, .error-message {
  text-align: center;
  padding: var(--space-2xl);
  animation: fadeIn 0.5s ease-out;
}

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

.success-icon, .error-icon {
  margin-bottom: var(--space-lg);
}

.success-icon svg {
  filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.4));
}

.success-title {
  font-size: 1.5rem;
  font-weight: var(--heading-weight);
  color: var(--suomi-success);
  margin: 0 0 var(--space-sm) 0;
}

.success-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0 0 var(--space-xs) 0;
}

.success-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg) 0;
}

.error-title {
  font-size: 1.25rem;
  font-weight: var(--heading-weight);
  color: var(--suomi-error);
  margin: 0 0 var(--space-sm) 0;
}

.error-text {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-md) 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  
  .header-content {
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md);
  }
  
  .nav-links {
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-links a {
    font-size: 0.9rem;
  }
  
  .hero {
    padding: var(--space-2xl) 0;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero .subheadline {
    font-size: 1.1rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  section {
    padding: var(--space-2xl) 0;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-section {
    padding: var(--space-2xl) var(--space-md);
    margin: var(--space-lg) 0;
    border-radius: 0;
  }
  
  .slogan {
    font-size: 1.25rem;
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.95rem;
  }
  
  .feature-card {
    padding: var(--space-lg);
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000;
  }
  
  .feature-card,
  .content-block {
    border-width: 2px;
  }
}

/* Print styles */
@media print {
  header, footer, .btn, .lang-switcher {
    display: none;
  }
  
  body {
    font-size: 12pt;
    color: #000;
  }
  
  .hero {
    background: none;
    color: #000;
    padding: 1rem 0;
  }
  
  .hero h1, .hero .subheadline {
    color: #000;
  }
}
