/* ========================================
   Microsoft Security User Group Finland #16
   Fluent-inspired theme
   ======================================== */

:root {
  --ms-blue: #0078D4;
  --ms-blue-dark: #005A9E;
  --ms-blue-light: #DEECF9;
  --ms-yellow: #FFB900;
  --ms-red: #E74856;
  --ms-green: #00CC6A;
  --ms-purple: #8764B8;
  --ms-bg: #F3F2F1;
  --ms-surface: #FFFFFF;
  --ms-dark: #1B1A19;
  --ms-text: #323130;
  --ms-text-secondary: #605E5C;
  --shadow-sm: 0 1.6px 3.6px rgba(0,0,0,.132), 0 0.3px 0.9px rgba(0,0,0,.108);
  --shadow-md: 0 3.2px 7.2px rgba(0,0,0,.132), 0 0.6px 1.8px rgba(0,0,0,.108);
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ms-text);
  background: var(--ms-bg);
  line-height: 1.6;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 48px;
}
.navbar-brand {
  font-weight: 700;
  font-size: .95rem;
  color: var(--ms-blue);
  text-decoration: none;
}
.navbar-links { display: flex; gap: 1.5rem; list-style: none; }
.navbar-links a {
  text-decoration: none;
  color: var(--ms-text);
  font-size: .85rem;
  font-weight: 600;
  transition: color .2s;
}
.navbar-links a:hover { color: var(--ms-blue); }

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--ms-blue) 0%, #005A9E 60%, #003d6b 100%);
  color: #fff;
  padding: 4rem 2rem 3rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Crect x='0' y='0' width='40' height='40'/%3E%3Crect x='40' y='40' width='40' height='40'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-icon {
  width: 80px; height: 80px;
  margin-bottom: 1.5rem;
  opacity: .9;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}
.hero .event-number {
  display: inline-block;
  background: var(--ms-yellow);
  color: var(--ms-dark);
  font-weight: 800;
  border-radius: 4px;
  padding: 0 .4rem;
  margin-left: .25rem;
}
.hero .date-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: .5rem 1.5rem;
  border: 2px solid rgba(255,255,255,.4);
  border-radius: 100px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.hero .tagline {
  margin-top: 1.25rem;
  font-size: 1.15rem;
  opacity: .88;
  font-weight: 400;
}

/* --- Sections --- */
.section {
  padding: 5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ms-dark);
  margin-bottom: .5rem;
}
.section-subtitle {
  color: var(--ms-text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}
.accent-bar {
  width: 48px; height: 4px;
  background: var(--ms-blue);
  border-radius: 2px;
  margin-bottom: 1rem;
}

/* --- Organizer Card --- */
.organizer-card {
  display: flex;
  gap: 2rem;
  background: var(--ms-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  align-items: center;
}
.organizer-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--ms-blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  color: var(--ms-blue);
  flex-shrink: 0;
}
.organizer-info h3 {
  font-size: 1.3rem;
  margin-bottom: .25rem;
}
.organizer-info .role {
  color: var(--ms-blue);
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .75rem;
}
.organizer-info p {
  color: var(--ms-text-secondary);
  font-size: .95rem;
}

/* --- Agenda --- */
.agenda { list-style: none; }
.agenda-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  align-items: flex-start;
}
.agenda-item:last-child { border-bottom: none; }
.agenda-time {
  flex-shrink: 0;
  width: 72px;
  font-weight: 700;
  color: var(--ms-blue);
  font-size: 1rem;
  padding-top: 2px;
}
.agenda-content { flex: 1; }
.agenda-content h4 {
  font-size: 1.05rem;
  margin-bottom: .2rem;
}
.agenda-content p {
  color: var(--ms-text-secondary);
  font-size: .9rem;
}
.agenda-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .15rem .5rem;
  border-radius: 3px;
  margin-left: .5rem;
  vertical-align: middle;
}
.badge-talk { background: var(--ms-blue-light); color: var(--ms-blue); }
.badge-break { background: #FFF4CE; color: #7A6400; }
.badge-social { background: #DFF6DD; color: #0E7A0D; }

/* --- Pixel Grid Section --- */
.pixel-section {
  background: var(--ms-dark);
  color: #fff;
  padding: 5rem 2rem;
}
.pixel-section .section-title { color: #fff; }
.pixel-section .section-subtitle { color: rgba(255,255,255,.6); }
.pixel-section .accent-bar { background: var(--ms-yellow); }

.pixel-wrapper {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.pixel-instructions {
  margin-bottom: 1.5rem;
  font-size: .95rem;
  opacity: .7;
}

.palette-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.palette-swatch {
  width: 32px; height: 32px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.palette-swatch:hover { transform: scale(1.15); }
.palette-swatch.active {
  border-color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--ms-blue);
}

.grid-container {
  display: inline-block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: crosshair;
  touch-action: none;
}
.grid-container canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: min(640px, 90vw);
  height: min(640px, 90vw);
}

.pixel-stats {
  margin-top: 1rem;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}

/* --- Thank You / Footer --- */
.thankyou {
  text-align: center;
  padding: 5rem 2rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}
.thankyou h2 {
  font-size: 2rem;
  color: var(--ms-dark);
  margin-bottom: 1rem;
}
.thankyou p {
  color: var(--ms-text-secondary);
  font-size: 1rem;
  margin-bottom: .75rem;
}
.thankyou .heart {
  color: var(--ms-red);
  font-size: 1.4rem;
}

.footer {
  text-align: center;
  padding: 2rem;
  background: var(--ms-dark);
  color: rgba(255,255,255,.5);
  font-size: .8rem;
}
.footer a {
  color: var(--ms-blue);
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: .75rem;
  list-style: none;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .navbar-links { gap: .75rem; }
  .navbar-links a { font-size: .78rem; }
  .organizer-card {
    flex-direction: column;
    text-align: center;
  }
  .section { padding: 3.5rem 1.25rem; }
  .pixel-section { padding: 3.5rem 1rem; }
  .palette-swatch { width: 28px; height: 28px; }
}
