/* aurora-drift — S8 living cover
   Palette: ink #0B0E1A · violet #6D5BD0 · teal #2FA79B · rose #D9708A
   Text: paper #F4F3FB (14.9:1 on ink) · muted #B9B6D4 (8.4:1 on ink)
   The living layer: three huge blurred radial blobs drifting on 34–52 s
   cycles behind a fine grain sheet. No JS. */

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/syne-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/manrope-variable-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  --ink: #0B0E1A;
  --ink-2: #12162A;
  --violet: #6D5BD0;
  --teal: #2FA79B;
  --rose: #D9708A;
  --paper: #F4F3FB;
  --muted: #B9B6D4;
  --line: rgba(244, 243, 251, 0.14);
  --display: "Syne", "Trebuchet MS", sans-serif;
  --body: "Manrope", "Segoe UI", sans-serif;
  /* centered content shell — the aurora layer stays full-bleed */
  --shell: 72rem;
  --gutter: 1.5rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--paper);
  background: var(--ink);
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 2px; }
img { display: block; max-width: 100%; }

/* ---- demo banner ---- */
.demo-banner {
  display: block;
  position: relative;
  z-index: 5;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
}
.demo-banner b { font-weight: 800; }

/* ---- the living cover ---- */
.cover {
  position: relative;
  min-height: calc(100svh - 2.4rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.25rem var(--gutter) calc(3rem + env(safe-area-inset-bottom));
  isolation: isolate;
}
.aurora {
  position: absolute;
  inset: -20%;
  z-index: -2;
  filter: blur(70px);
}
.aurora-blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0.75;
  will-change: transform;
}
.aurora-blob--1 {
  width: 70vmax; height: 70vmax;
  top: -18%; left: -14%;
  background: radial-gradient(circle at 50% 50%, var(--violet) 0%, rgba(109, 91, 208, 0) 62%);
  animation: drift-a 34s ease-in-out infinite;
}
.aurora-blob--2 {
  width: 62vmax; height: 62vmax;
  bottom: -22%; right: -16%;
  background: radial-gradient(circle at 50% 50%, var(--teal) 0%, rgba(47, 167, 155, 0) 62%);
  animation: drift-b 44s ease-in-out infinite;
}
.aurora-blob--3 {
  width: 46vmax; height: 46vmax;
  top: 34%; left: 42%;
  background: radial-gradient(circle at 50% 50%, var(--rose) 0%, rgba(217, 112, 138, 0) 62%);
  opacity: 0.5;
  animation: drift-c 52s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(6vw, 5vh, 0) scale(1.12); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50%      { transform: translate3d(-7vw, -4vh, 0) scale(0.92); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.95); }
  50%      { transform: translate3d(-5vw, 7vh, 0) scale(1.15); }
}
/* fine grain so the gradient never bands */
.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
}

.cover-nav {
  width: min(100%, var(--shell));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}
.wordmark { font-family: var(--display); font-weight: 700; letter-spacing: 0.02em; font-size: 1rem; }
.cover-nav a { text-decoration: none; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.cover-nav a:hover { color: var(--paper); border-bottom-color: var(--paper); }

.cover-inner {
  flex: 1;
  width: min(100%, var(--shell));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.cover h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.25rem, 15vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}
.cover h1 em {
  font-style: normal;
  font-weight: 400;
  background: linear-gradient(96deg, var(--teal), var(--rose) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: clamp(1.0625rem, 3.6vw, 1.3125rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 2.5rem;
}

/* ---- pill cta ---- */
.pill {
  align-self: flex-start;
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease;
}
.pill:hover { transform: translateY(-2px); background: #fff; }
.pill--ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
}
.pill--ghost:hover { background: rgba(244, 243, 251, 0.08); }

.scroll-hint { display: flex; justify-content: center; }
.scroll-line {
  display: block;
  width: 1px;
  height: 3.5rem;
  background: linear-gradient(var(--line), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 1.2rem;
  background: var(--paper);
  animation: trickle 3.2s ease-in-out infinite;
}
@keyframes trickle {
  0%   { transform: translateY(-1.2rem); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(3.5rem); opacity: 0; }
}

/* ---- sections ---- */
main section {
  max-width: calc(var(--shell) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(4.5rem, 13vh, 8rem) var(--gutter);
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.875rem, 6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 2.5rem;
  max-width: 20ch;
}

/* ---- cards ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(244, 243, 251, 0.3); }
.card-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.8125rem;
  color: var(--teal);
  letter-spacing: 0.1em;
}
.card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3125rem;
  margin: 0.75rem 0 0.75rem;
}
.card p { color: var(--muted); font-size: 0.9375rem; }
.card-meta {
  margin-top: 1rem;
  font-size: 0.8125rem !important;
  letter-spacing: 0.06em;
  color: var(--paper) !important;
  opacity: 0.75;
}

/* ---- gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 2.5rem; }
.gallery figure { margin: 0; }
.gallery picture {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { margin-top: 0.7rem; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.photo-note {
  max-width: 42rem;
  font-size: 0.9375rem;
  color: var(--muted);
  border-left: 2px solid var(--teal);
  padding: 0.9rem 1.25rem;
  background: var(--ink-2);
  border-radius: 0 12px 12px 0;
}
.photo-note strong { color: var(--paper); }

/* ---- yhteys ---- */
.yhteys-lede { color: var(--muted); max-width: 36rem; margin-bottom: 2.5rem; }
.yhteys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2.5rem; }
.yhteys-grid dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.yhteys-grid dd { font-size: 0.9375rem; }

/* ---- footer ---- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.5rem calc(2.5rem + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}
.footer a { color: var(--paper); }
.footer .small { margin-top: 0.35rem; font-size: 0.8125rem; }

/* ---- entrance ---- */
@media (prefers-reduced-motion: no-preference) {
  .cover-inner > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
  .cover-inner > :nth-child(2) { animation-delay: 0.08s; }
  .cover-inner > :nth-child(3) { animation-delay: 0.16s; }
  .cover-inner > :nth-child(4) { animation-delay: 0.24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yhteys-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --gutter: 1.25rem; }
  .aurora { filter: blur(50px); }
  .gallery { grid-template-columns: minmax(0, 1fr); max-width: 26rem; }
  .pill { align-self: stretch; text-align: center; }
}

/* --- Tekoälyilmoitus (EU AI Act 50 art.) — webpages/kit/ai-disclosure/ --- */
.ai-note {
  margin: 1.5rem auto 0;
  max-width: 62ch;
  padding: 0 1rem 2rem;
  font-size: 0.75rem;
  line-height: 1.55;
}
.ai-note strong { font-weight: 600; }
