/* Pankkih — syvä tausta, Fraunces + IBM Plex Sans, teal-akcentti */

:root {
  --void: #04070d;
  --bg0: #070c16;
  --bg1: #0c1424;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --ink: #e8eef7;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.35);
  --flare: #fcd34d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --max: 1080px;
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg0);
  line-height: 1.62;
  font-size: 1.05rem;
  font-weight: 400;
  min-height: 100vh;
  position: relative;
}

/* Taustakerrokset: syvyys ilman “AI gradient card” -kliseetä */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 120% 80% at 10% -20%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 10%, rgba(252, 211, 77, 0.06), transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(30, 64, 175, 0.25), transparent 45%),
    linear-gradient(165deg, var(--void) 0%, var(--bg1) 42%, var(--bg0) 100%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, black, transparent);
  pointer-events: none;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: #5eead4;
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 10px;
  z-index: 1000;
  color: var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 12, 22, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--accent-dim), 0 12px 32px rgba(45, 212, 191, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  letter-spacing: -0.03em;
  font-size: 1.22rem;
}

.brand-tag {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 10px;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

nav a:hover::after {
  transform: scaleX(1);
}

nav a[aria-current="page"] {
  color: var(--accent);
}

nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 12px;
  flex: 1;
  min-width: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 5px 9px 5px 7px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  box-shadow: none;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.lang-switch:hover {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.07);
  border-color: rgba(45, 212, 191, 0.3);
  text-decoration: none;
}

.lang-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-switch__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.72;
}

.lang-switch:hover .lang-switch__icon {
  opacity: 0.95;
}

.lang-switch__text {
  line-height: 1;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 22px 72px;
}

@media (max-width: 920px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-end {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }
  nav ul {
    width: 100%;
  }
}

/* --- Sivun sisään tulo (yksi selkeä hetki) --- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(22px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero > div:first-child,
  .hero-media {
    animation: rise 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
  }

  .hero-media {
    animation-delay: 0.12s;
  }

  .stagger-in > * {
    animation: rise 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
  }

  .stagger-in > *:nth-child(1) {
    animation-delay: 0.06s;
  }
  .stagger-in > *:nth-child(2) {
    animation-delay: 0.14s;
  }
  .stagger-in > *:nth-child(3) {
    animation-delay: 0.22s;
  }
  .stagger-in > *:nth-child(4) {
    animation-delay: 0.3s;
  }
  .stagger-in > *:nth-child(5) {
    animation-delay: 0.38s;
  }
  .stagger-in > *:nth-child(6) {
    animation-delay: 0.46s;
  }
  .stagger-in > *:nth-child(7) {
    animation-delay: 0.54s;
  }
  .stagger-in > *:nth-child(8) {
    animation-delay: 0.62s;
  }
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 28px 0 8px;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 680;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  font-size: clamp(2.1rem, 4vw, 3.05rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  max-width: 14ch;
}

.hero h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 18px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--flare));
}

.lead {
  font-size: 1.13rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #042f2e;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.4), 0 16px 40px rgba(45, 212, 191, 0.22);
}

.btn-primary:hover {
  color: #022c22;
  filter: brightness(1.06);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent-dim);
  background: var(--surface-2);
}

.hero-media {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  position: relative;
  min-height: 300px;
  background: #050a14;
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 300px;
  filter: saturate(1.08) contrast(1.05) brightness(0.92);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(4, 47, 46, 0.65) 0%, transparent 45%, rgba(15, 23, 42, 0.5) 100%);
  pointer-events: none;
}

.section {
  margin-top: 64px;
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 650;
  font-variation-settings: "SOFT" 35, "WONK" 0.5;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  color: var(--ink);
}

.section p {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 62ch;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 26px;
}

@media (max-width: 920px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Etusivun laajempi palvelukartta (6 laattaa) */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 26px;
}

@media (max-width: 1000px) {
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-6 {
    grid-template-columns: 1fr;
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 26px;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-3px);
  }
}

.card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.card p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 26px;
}

@media (max-width: 920px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #050a14;
}

.figure--flush {
  margin: 0 0 26px;
}

.figure img {
  width: 100%;
  display: block;
  height: auto;
  filter: saturate(1.05) brightness(0.9);
}

.note {
  font-size: 0.93rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin-top: 8px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(4, 7, 13, 0.92);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 22px 40px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

@media (max-width: 920px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-title {
  font-family: var(--font-display);
  font-weight: 650;
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.muted {
  color: var(--muted);
}

.footer-credit {
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--muted);
  opacity: 0.85;
}

.page-hero {
  padding: 14px 0 10px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 680;
  font-variation-settings: "SOFT" 45, "WONK" 1;
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  letter-spacing: -0.03em;
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  font-family: var(--font-display);
  font-weight: 640;
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-family: var(--font-display);
  font-weight: 620;
  margin-top: 26px;
  margin-bottom: 10px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.prose p {
  color: var(--muted);
}

.prose-wide {
  max-width: 76ch;
}

.list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.list li {
  margin: 14px 0;
  padding-left: 22px;
  position: relative;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}

.list strong {
  color: var(--ink);
  font-weight: 600;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

@media (max-width: 920px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
}

.contact-card > h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}

.contact-card dt {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.contact-card dd {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: 1.05rem;
}

.email-graphic {
  display: block;
  max-width: min(100%, 360px);
  height: auto;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0b1220;
}

@media (prefers-reduced-motion: reduce) {
  .hero > div:first-child,
  .hero-media,
  .stagger-in > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
