/* terrazzo-pop — S8 living cover
   Palette: cream #FFF7ED · ink #1F1B18 · coral #E8593F (text #C2402B)
            blueberry #3B49A8 · leaf #2A7F55
   Text on cream: ink 14.6:1 · coral-text 5.2:1 · blueberry 7.5:1
   White on coral 4.6:1, on blueberry 8.3:1, on leaf 4.6:1 — AA at the
   sizes used (tile headings ≥1.5rem bold).
   The living layer: twelve terrazzo chips floating on independent slow
   orbits. Playful, but nothing moves fast enough to distract. */

@font-face {
  font-family: "Gabarito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("assets/fonts/gabarito-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: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/outfit-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 {
  --cream: #FFF7ED;
  --cream-2: #FBECDC;
  --ink: #1F1B18;
  --coral: #E8593F;
  --coral-text: #C2402B;
  --blue: #3B49A8;
  --leaf: #2A7F55;
  --grey: #5F5850;
  --display: "Gabarito", "Trebuchet MS", sans-serif;
  --body: "Outfit", "Segoe UI", sans-serif;
  /* centered content shell — the chip field stays full-bleed */
  --shell: 76rem;
  --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(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; }

.demo-banner {
  display: block;
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
}

/* ---- the floating cover ---- */
.cover {
  position: relative;
  min-height: calc(100svh - 2.4rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.25rem var(--gutter) calc(2.5rem + env(safe-area-inset-bottom));
}
.confetti { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.chip {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(4.5rem * var(--s));
  height: calc(4.5rem * var(--s));
  animation: bob 22s ease-in-out infinite;
  animation-delay: var(--d);
  will-change: transform;
}
.chip--a { background: var(--coral); border-radius: 50%; opacity: 0.22; }
.chip--b { background: var(--blue); border-radius: 38% 62% 55% 45% / 52% 40% 60% 48%; opacity: 0.18; }
.chip--c { background: var(--leaf); border-radius: 26px; opacity: 0.20; animation-duration: 30s; }
.chip--d { background: var(--coral); border-radius: 62% 38% 44% 56% / 44% 58% 42% 56%; opacity: 0.28; animation-duration: 26s; }
@keyframes bob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  33%      { transform: translate3d(2.2rem, -1.6rem, 0) rotate(42deg); }
  66%      { transform: translate3d(-1.4rem, 2rem, 0) rotate(-28deg); }
}

.cover-top, .cover-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
}
.cover-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.375rem; letter-spacing: -0.01em; }
.mini-cta {
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  background: var(--ink);
  color: var(--cream);
  padding: 0.5rem 1rem;
  border-radius: 999px;
}
.mini-cta:hover { background: var(--coral-text); }

.cover-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 0 1rem;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral-text);
  margin-bottom: 1.25rem;
}
.cover h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.25rem, 15vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}
.cover h1 .hl {
  color: var(--coral-text);
  position: relative;
  white-space: nowrap;
}
.cover h1 .hl::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.08em;
  height: 0.12em;
  background: var(--leaf);
  border-radius: 999px;
  opacity: 0.55;
}
.lede {
  font-size: clamp(1.0625rem, 3.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--grey);
  max-width: 32rem;
  margin-bottom: 2rem;
}
.cover-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }

.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badges li {
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(31, 27, 24, 0.07);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

/* ---- buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { background: var(--coral-text); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }

/* ---- sections ---- */
main section {
  max-width: calc(var(--shell) + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 7rem) var(--gutter);
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral-text);
  margin-bottom: 0.9rem;
}
.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.875rem, 6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  max-width: 20ch;
}

/* ---- tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.tile {
  border-radius: 26px;
  padding: 1.75rem 1.5rem;
  background: var(--cream-2);
  transition: transform 0.25s ease;
}
.tile:hover { transform: translateY(-4px); }
.tile h3 { font-family: var(--display); font-weight: 800; font-size: 1.5rem; margin-bottom: 0.6rem; letter-spacing: -0.02em; }
.tile p { font-size: 0.9375rem; color: var(--grey); }
.tile-price { margin-top: 1rem; font-weight: 700; color: var(--ink) !important; font-size: 0.9375rem; }
.tile--coral { background: var(--coral); }
.tile--blue  { background: var(--blue); }
.tile--leaf  { background: var(--leaf); }
.tile--ink   { background: var(--ink); }
.tile--coral, .tile--blue, .tile--leaf, .tile--ink { color: #fff; }
.tile--coral p, .tile--blue p, .tile--leaf p, .tile--ink p { color: rgba(255, 255, 255, 0.9); }
.tile--coral .tile-price, .tile--blue .tile-price,
.tile--leaf .tile-price, .tile--ink .tile-price { color: #fff !important; }
.tile-note { margin-top: 1.5rem; font-size: 0.875rem; color: var(--grey); max-width: 38rem; }

/* ---- gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; max-width: 44rem; }
.gallery figure { margin: 0; }
.gallery picture { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 22px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption { margin-top: 0.6rem; font-weight: 600; font-size: 0.875rem; color: var(--grey); }
.photo-note {
  max-width: 42rem;
  font-size: 0.9375rem;
  color: var(--grey);
  background: var(--cream-2);
  border-radius: 18px;
  padding: 1rem 1.25rem;
}
.photo-note strong { color: var(--ink); }

/* ---- tarjous ---- */
.tarjous-box { background: var(--cream-2); border-radius: 32px; padding: clamp(1.75rem, 5vw, 3rem); }
.tarjous-lede { color: var(--grey); max-width: 36rem; margin-bottom: 2rem; }
.yhteys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.yhteys-grid dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral-text);
  margin-bottom: 0.4rem;
}
.yhteys-grid dd { font-size: 0.9375rem; }

/* ---- footer ---- */
.footer {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 2.5rem 1.5rem calc(2.5rem + env(safe-area-inset-bottom));
  font-size: 0.875rem;
}
.footer .small { margin-top: 0.35rem; opacity: 0.8; font-size: 0.8125rem; }
.footer a { text-decoration-color: var(--coral); text-underline-offset: 3px; }

/* ---- entrance ---- */
@media (prefers-reduced-motion: no-preference) {
  .cover-inner > * { animation: pop 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
  .cover-inner > :nth-child(2) { animation-delay: 0.07s; }
  .cover-inner > :nth-child(3) { animation-delay: 0.14s; }
  .cover-inner > :nth-child(4) { animation-delay: 0.21s; }
  .cover-inner > :nth-child(5) { animation-delay: 0.28s; }
  @keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.985); } 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) {
  .tiles { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .yhteys-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 560px) {
  :root { --gutter: 1.25rem; }
  .cover-actions .btn { flex: 1 1 100%; text-align: center; }
  .chip { width: calc(3.4rem * var(--s)); height: calc(3.4rem * var(--s)); }
}

/* --- 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; }
