/* =============================================
   VMH Group Oy � Modern Portal Stylesheet
   ============================================= */

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

:root {
  --color-primary:    #1a3c5e;
  --color-primary-light: #2563a8;
  --color-accent:     #e8a020;
  --color-accent-dark:#c47f10;
  --color-green:      #2d6a4f;
  --color-bg:         #f8f9fb;
  --color-surface:    #ffffff;
  --color-text:       #1a1f2e;
  --color-muted:      #6b7280;
  --color-border:     #e5e7eb;
  --radius-sm:        8px;
  --radius-md:        14px;
  --radius-lg:        22px;
  --shadow-sm:        0 1px 4px rgba(0,0,0,.06);
  --shadow-md:        0 4px 20px rgba(0,0,0,.09);
  --shadow-lg:        0 12px 40px rgba(0,0,0,.13);
  --transition:       0.25s ease;
  --font:             'Inter', system-ui, -apple-system, sans-serif;
  --nav-height:       68px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(10, 25, 47, 0.55);
  backdrop-filter: blur(4px);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,.10);
  backdrop-filter: blur(8px);
}
.navbar.scrolled .nav-links a { color: var(--color-text); }
.navbar.scrolled .nav-cta { color: #fff !important; }
.navbar.scrolled .nav-links a:hover { color: var(--color-accent); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  height: 36px;
  width: auto;
  transition: opacity var(--transition);
}
.nav-logo--dark  { display: block; }
.nav-logo--light { display: none; }
.navbar.scrolled .nav-logo--dark  { display: none; }
.navbar.scrolled .nav-logo--light { display: block; }

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--color-accent); }

.nav-cta {
  background: var(--color-accent);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: background var(--transition), transform var(--transition) !important;
}
.nav-cta:hover {
  background: var(--color-accent-dark) !important;
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}
.navbar.scrolled .hamburger span { background: var(--color-text); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--color-surface);
  padding: 16px 24px 24px;
  gap: 4px;
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 0;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 25, 47, 0.82) 0%,
    rgba(10, 25, 47, 0.60) 60%,
    rgba(10, 25, 47, 0.40) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge {
  display: none;
}

.hero-content {
  max-width: 780px;
  text-align: center;
  padding: 0 24px;
  color: #fff;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(232,160,32,0.15);
  border: 1px solid rgba(232,160,32,0.4);
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.8);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,160,32,0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--color-primary);
  padding: 28px 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 48px;
  color: #fff;
}
.stat-item strong {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}
.stat-item span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--color-muted);
}

/* --- Services --- */
.services {
  padding: 100px 0;
  background: var(--color-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.new-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
  z-index: 2;
}

.card-img-wrap {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f4f8;
  padding: 28px;
  overflow: hidden;
}

.card-img-wrap img {
  max-height: 100px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition);
}
.service-card:hover .card-img-wrap img { transform: scale(1.06); }
a.card-img-wrap { cursor: pointer; display: flex; }

/* Majoittajat special card image area */
.card-img-wrap--majoittajat {
  background: linear-gradient(135deg, #e8f5ee 0%, #d1ead9 100%);
  flex-direction: column;
  gap: 8px;
}

.card-img-wrap--kirjus {
    background: linear-gradient(135deg, #fdf4e3 0%, #f7e2b8 100%);
    flex-direction: column;
    gap: 8px;
}

.card-domain--kirjus {
    color: var(--color-accent-dark);
}
.card-icon {
  width: 64px;
  height: 64px;
}

.card-domain {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-green);
  letter-spacing: 0.04em;
}

.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--color-muted);
  flex: 1;
  margin-bottom: 20px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-light);
  transition: gap var(--transition), color var(--transition);
}
.card-link:hover {
  color: var(--color-primary);
  gap: 10px;
}

/* --- Avainlippu Section --- */
.avainlippu-section {
  background: var(--color-primary);
  padding: 60px 0;
}

.avainlippu-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.avainlippu-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.avainlippu-text h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.avainlippu-text p {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
}

/* --- Story --- */
.story {
  padding: 100px 0;
  background: var(--color-surface);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.story-text .section-label { margin-bottom: 16px; }

.story-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.story-text p {
  font-size: 1rem;
  color: var(--color-muted);
  line-height: 1.75;
}

.story-values {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.value-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.value-icon svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

.value-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.value-item p {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* --- Footer --- */
.footer {
  background: #0d1b2a;
  color: rgba(255,255,255,0.75);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  height: 36px;
  width: auto;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.55);
}

.footer-avainlippu {
  height: 64px;
  width: auto;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}
.footer-links ul li a:hover { color: var(--color-accent); }

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.65);
}

.footer-contact a {
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}
.footer-contact a:hover { color: var(--color-accent); }

.footer-bottom {
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.services-grid .service-card:nth-child(1)  { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2)  { transition-delay: 0.10s; }
.services-grid .service-card:nth-child(3)  { transition-delay: 0.15s; }
.services-grid .service-card:nth-child(4)  { transition-delay: 0.20s; }
.services-grid .service-card:nth-child(5)  { transition-delay: 0.25s; }
.services-grid .service-card:nth-child(6)  { transition-delay: 0.30s; }
.services-grid .service-card:nth-child(7)  { transition-delay: 0.35s; }
.services-grid .service-card:nth-child(8)  { transition-delay: 0.40s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .stat-item { padding: 8px 28px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero-badge { left: 16px; }
  .hero-badge img { height: 44px; }

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

  .avainlippu-inner {
    flex-direction: column;
    text-align: center;
  }

  .stats-grid {
    gap: 0;
  }
  .stat-item { padding: 12px 20px; }
  .stat-divider { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.8rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
.card-img-wrap--rentora {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    flex-direction: column;
    gap: 8px;
}
.card-domain--rentora { color: #0f766e; }

.card-img-wrap--sellora {
    background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%);
    flex-direction: column;
    gap: 8px;
}
.card-domain--sellora { color: #6d28d9; }
