/* ==========================================
   Koodisto.org — Styles
   ========================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background-color: #0F1218;
  color: #F0F2F5;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* --- Saavutettavuus (a11y) --- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: #2DD4A0;
  color: #0F1218;
  font-weight: 500;
  font-size: 14px;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

.skip-to-content:focus {
  top: 0;
  clip: auto;
  overflow: visible;
}

:focus-visible {
  outline: 2px solid #2DD4A0;
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #2DD4A0;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Container --- */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
.bracket {
  color: #2DD4A0;
  font-family: 'JetBrains Mono', monospace;
}

.bracket-open {
  margin-right: 2px;
}

.bracket-close {
  margin-left: -2px;
}

.logo-text {
  color: #F0F2F5;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 4px;
}

.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: #2DD4A0;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 48px;
}

/* ==========================================
   Navigaatio
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(15, 18, 24, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid rgba(45, 212, 160, 0.08);
}

.nav-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: #9CA3AF;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #F0F2F5;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 1px;
  background: #2DD4A0;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #F0F2F5;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   Hero
   ========================================== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 100px 24px;
}

.hero-content {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.hero-logo {
  font-size: 48px;
  font-weight: 400;
  margin-bottom: 16px;
}

.hero-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #6B7280;
  letter-spacing: 5px;
  margin-bottom: 40px;
}

.hero-description {
  font-size: 16px;
  color: #9CA3AF;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  margin-top: 40px;
  padding: 14px 32px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #0F1218;
  background: #2DD4A0;
  border-radius: 8px;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.hero-cta:hover {
  background: #1A9E74;
  transform: translateY(-1px);
}

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

/* ==========================================
   Sections
   ========================================== */
.section {
  padding: 100px 0;
  border-top: 1px solid rgba(45, 212, 160, 0.15);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   Palvelukortit
   ========================================== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: rgba(45, 212, 160, 0.04);
  border: 0.5px solid rgba(45, 212, 160, 0.12);
  border-radius: 10px;
  padding: 28px;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(45, 212, 160, 0.3);
  background: rgba(45, 212, 160, 0.06);
}

.card-title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #F0F2F5;
  margin-bottom: 8px;
}

.card-description {
  font-size: 14px;
  color: #9CA3AF;
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #2DD4A0;
  background: rgba(45, 212, 160, 0.06);
  border: 0.5px solid rgba(45, 212, 160, 0.12);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ==========================================
   Prosessi
   ========================================== */
.process-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.process-step {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: rgba(45, 212, 160, 0.04);
  border: 0.5px solid rgba(45, 212, 160, 0.12);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.process-step:hover {
  border-color: rgba(45, 212, 160, 0.3);
  background: rgba(45, 212, 160, 0.06);
}

.step-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: #2DD4A0;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.5;
}

.step-title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #F0F2F5;
  margin-bottom: 6px;
}

.step-description {
  font-size: 14px;
  color: #9CA3AF;
  line-height: 1.6;
}

/* ==========================================
   Referenssit
   ========================================== */
.references {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.reference-card {
  background: rgba(45, 212, 160, 0.04);
  border: 0.5px solid rgba(45, 212, 160, 0.12);
  border-radius: 10px;
  padding: 28px;
  transition: all 0.3s ease;
}

.reference-card:hover {
  border-color: rgba(45, 212, 160, 0.3);
  background: rgba(45, 212, 160, 0.06);
}

.reference-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.reference-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.kiertue-icon {
  background: rgba(45, 212, 160, 0.15);
  color: #2DD4A0;
}

.pesakirja-icon {
  background: rgba(156, 163, 175, 0.15);
  color: #9CA3AF;
}

.reference-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: #F0F2F5;
  letter-spacing: 1px;
}

.reference-url {
  font-size: 13px;
  color: #6B7280;
  transition: color 0.3s ease;
}

.reference-url:hover {
  color: #2DD4A0;
}

.reference-screenshot {
  margin-bottom: 20px;
}

.screenshot-placeholder {
  width: 100%;
  height: 200px;
  background: #141920;
  border-radius: 8px;
  border: 0.5px solid rgba(45, 212, 160, 0.08);
}

.screenshot-img {
  width: 100%;
  border-radius: 8px;
  border: 0.5px solid rgba(45, 212, 160, 0.08);
  display: block;
}

.reference-description {
  font-size: 15px;
  color: #9CA3AF;
  line-height: 1.7;
  margin-bottom: 16px;
}

.reference-link {
  display: inline-block;
  font-size: 14px;
  color: #2DD4A0;
  margin-top: 8px;
  transition: opacity 0.3s ease;
}

.reference-link:hover {
  opacity: 0.8;
}

/* ==========================================
   Artikkelit (etusivun esikatselukortit)
   ========================================== */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.article-card {
  display: block;
  padding: 28px;
  background: rgba(45, 212, 160, 0.04);
  border: 0.5px solid rgba(45, 212, 160, 0.12);
  border-radius: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.article-card:hover {
  border-color: rgba(45, 212, 160, 0.3);
  background: rgba(45, 212, 160, 0.06);
}

.article-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #2DD4A0;
  background: rgba(45, 212, 160, 0.06);
  border: 0.5px solid rgba(45, 212, 160, 0.12);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.article-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #F0F2F5;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-card-excerpt {
  font-size: 15px;
  color: #9CA3AF;
  line-height: 1.6;
  margin-bottom: 16px;
}

.article-card-link {
  font-size: 14px;
  color: #2DD4A0;
  transition: opacity 0.3s ease;
}

.article-card:hover .article-card-link {
  opacity: 0.8;
}

/* ==========================================
   Yhteystiedot
   ========================================== */
.contact-content {
  text-align: center;
}

.contact-intro {
  font-size: 18px;
  color: #9CA3AF;
  margin-bottom: 24px;
}

.contact-email {
  display: inline-block;
  font-size: 20px;
  color: #2DD4A0;
  font-weight: 500;
  margin-bottom: 16px;
  transition: opacity 0.3s ease;
}

.contact-email:hover {
  opacity: 0.8;
}

.contact-location {
  font-size: 14px;
  color: #6B7280;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
  border-top: 1px solid rgba(45, 212, 160, 0.15);
  padding: 40px 0;
  text-align: center;
}

.footer-logo {
  font-size: 16px;
  display: block;
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 13px;
  color: #6B7280;
}

.footer-link {
  display: inline-block;
  font-size: 13px;
  color: #6B7280;
  margin-top: 8px;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #2DD4A0;
}

/* ==========================================
   Blogi
   ========================================== */
.blog-header {
  padding: 20px 0;
  border-bottom: 1px solid rgba(45, 212, 160, 0.08);
}

.blog-nav {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-back {
  font-size: 14px;
  color: #9CA3AF;
  transition: color 0.3s ease;
}

.blog-back:hover {
  color: #2DD4A0;
}

.blog-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 80px 24px;
}

.blog-title {
  font-family: 'Inter', sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #F0F2F5;
  line-height: 1.3;
  margin-bottom: 16px;
}

.blog-meta {
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 48px;
}

.blog-body h2 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #F0F2F5;
  margin-top: 48px;
  margin-bottom: 16px;
}

.blog-body p {
  font-size: 16px;
  color: #9CA3AF;
  line-height: 1.8;
  margin-bottom: 20px;
}

.blog-body ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 20px;
}

.blog-body li {
  font-size: 16px;
  color: #9CA3AF;
  line-height: 1.8;
  margin-bottom: 8px;
}

.blog-body strong {
  color: #F0F2F5;
  font-weight: 600;
}

.blog-cta {
  margin-top: 64px;
  padding: 32px;
  background: rgba(45, 212, 160, 0.04);
  border: 0.5px solid rgba(45, 212, 160, 0.12);
  border-radius: 10px;
  text-align: center;
}

.blog-cta p {
  font-size: 16px;
  color: #9CA3AF;
  margin-bottom: 12px;
}

.blog-cta a {
  color: #2DD4A0;
  font-weight: 500;
  font-size: 18px;
  transition: opacity 0.3s ease;
}

.blog-cta a:hover {
  opacity: 0.8;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-list-item {
  display: block;
  padding: 28px;
  background: rgba(45, 212, 160, 0.04);
  border: 0.5px solid rgba(45, 212, 160, 0.12);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.blog-list-item:hover {
  border-color: rgba(45, 212, 160, 0.3);
  background: rgba(45, 212, 160, 0.06);
}

.blog-list-title {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #F0F2F5;
  margin-bottom: 8px;
}

.blog-list-excerpt {
  font-size: 15px;
  color: #9CA3AF;
  line-height: 1.6;
}

.blog-list-date {
  font-size: 13px;
  color: #6B7280;
  margin-top: 12px;
}

/* ==========================================
   Mobiili (< 768px)
   ========================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  .hamburger {
    display: flex;
    z-index: 1002;
    position: relative;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 280px;
    height: 100vh;
    height: 100dvh;
    background: #141920;
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(45, 212, 160, 0.12);
    z-index: 1001;
  }

  .nav-links.open {
    right: 0;
  }

  /* Overlay tausta valikon takana */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-overlay.open {
    display: block;
  }

  .nav-links a {
    font-size: 16px;
  }

  .hero-logo {
    font-size: 32px;
  }

  .hero-tagline {
    font-size: 11px;
    letter-spacing: 4px;
  }

  .services-grid,
  .process-steps {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 72px 0;
  }

  .screenshot-placeholder {
    height: 150px;
  }

  .hero-cta {
    padding: 12px 28px;
    font-size: 14px;
  }

  .blog-title {
    font-size: 24px;
  }

  .blog-content {
    padding: 48px 16px;
  }

  .blog-logo-banner {
    padding: 16px 20px;
    gap: 14px;
  }

  .blog-logo-banner img {
    width: 40px;
    height: 40px;
  }

  .blog-logo-banner-text h3 {
    font-size: 17px;
  }

  .blog-logo-banner-text p {
    font-size: 13px;
  }

  .blog-highlight-box {
    padding: 18px 20px;
  }

  .blog-image,
  .blog-image-full {
    margin: 24px 0;
    border-radius: 8px;
  }

  .blog-image-caption {
    margin-top: -14px;
    margin-bottom: 24px;
    font-size: 12px;
  }

  .article-card {
    padding: 20px;
  }

  .article-card-title {
    font-size: 16px;
  }

  .blog-list-item {
    padding: 20px;
  }

  .blog-list-title {
    font-size: 16px;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* ==========================================
   Evästebanneri
   ========================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: #141920;
  border-top: 1px solid rgba(45, 212, 160, 0.15);
  padding: 20px 24px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner.hidden {
  transform: translateY(100%);
}

.cookie-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-text {
  font-size: 14px;
  color: #9CA3AF;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cookie-btn-accept {
  background: #2DD4A0;
  color: #0F1218;
}

.cookie-btn-accept:hover {
  background: #1A9E74;
}

.cookie-btn-decline {
  background: transparent;
  color: #9CA3AF;
  border: 0.5px solid rgba(156, 163, 175, 0.3);
}

.cookie-btn-decline:hover {
  color: #F0F2F5;
  border-color: rgba(156, 163, 175, 0.5);
}

/* ==========================================
   Blog images / case study visuals
   ========================================== */
.blog-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 32px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.blog-image-caption {
  text-align: center;
  font-size: 13px;
  color: #6B7280;
  margin-top: -20px;
  margin-bottom: 32px;
  font-style: italic;
}

.blog-image-full {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 40px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.blog-logo-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  margin: 32px 0;
}

.blog-logo-banner img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.blog-logo-banner-text h3 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #F0F2F5;
  margin: 0 0 4px 0;
}

.blog-logo-banner-text p {
  font-size: 14px;
  color: #9CA3AF;
  margin: 0;
}

.blog-highlight-box {
  background: rgba(45, 212, 160, 0.05);
  border: 1px solid rgba(45, 212, 160, 0.15);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0;
}

.blog-highlight-box p {
  margin: 0;
  color: #D1D5DB;
  font-size: 15px;
  line-height: 1.7;
}

.blog-highlight-box strong {
  color: #2DD4A0;
}
