/* Design Lancetta: evästebanneri, tietosuoja- ja evästesivut, 404.
   Oma tiedosto, jotta main.css:n muutokset eivät törmää tähän.
   Käyttää main.css:n tokeneita (--gold, --ink, --line, --ease, fontit). */

/* ---------- Evästebanneri ----------
   Pieni kortti vasemmassa alakulmassa: ei harsoa, ei peitä sivua, selailu
   jatkuu sen ohi. Sama kieli kuin showroom-kutsussa: valkoinen kortti,
   ohut kultaviiva, rauhallinen nousu. */
.cc {
  position: fixed;
  left: clamp(1rem, 2.4vw, 2rem);
  bottom: clamp(1rem, 2.4vw, 2rem);
  z-index: 80;
  width: min(27rem, calc(100% - 2rem));
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.cc.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
}
.cc[hidden] { display: none; }
.cc.is-settings { width: min(32.5rem, calc(100% - 2rem)); }
.cc-card {
  position: relative;
  max-height: calc(100vh - 2rem);
  max-height: calc(100svh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--pure);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.1rem 2rem 1.75rem;
  box-shadow: 0 34px 70px -34px rgba(29, 24, 17, 0.42), 0 2px 8px -2px rgba(29, 24, 17, 0.06);
}
/* Ohut kultaviiva kortin yläkulmassa: sama ele kuin kutsussa. */
.cc-card::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: 2rem;
  width: 2.25rem;
  height: 1px;
  background: var(--gold);
}
.cc-title {
  font-size: 1.65rem;
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0.35rem 0 0.6rem;
  outline: none;
}
.cc-text {
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.cc-text a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.4rem;
}
.cc-actions .btn { padding: 0.95rem 1.7rem; }
/* Asetuksissa kaksi nappia rinnakkain samalla leveydellä, kieltäytyminen omalla rivillään. */
.cc-settings .cc-actions .btn { flex: 1 1 0; padding-inline: 1rem; }
.cc-settings .cc-link { flex: 1 1 100%; text-align: left; }
.cc .btn-ghost::after { display: none; }
.cc-ghost:hover { border-color: var(--ink); }
.cc-link {
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: 0;
  padding: 0.7rem 0.1rem;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(29, 24, 17, 0.25);
  text-underline-offset: 5px;
  transition: color 0.3s var(--ease), text-decoration-color 0.3s var(--ease);
}
.cc-link:hover { color: var(--ink); text-decoration-color: var(--gold); }
.cc :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Asetusnäkymä vaihtuu pehmeästi samassa kortissa. */
.cc-settings:not([hidden]),
.cc.is-settings .cc-intro:not([hidden]) { animation: cc-swap 0.45s var(--ease) both; }
@keyframes cc-swap {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.cc-opts { margin: 0 0 1.5rem; border-top: 1px solid var(--line); }
.cc-opt {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.cc-opt > div { flex: 1; }
.cc-opt strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}
.cc-opt span { display: block; font-size: 0.8rem; line-height: 1.65; color: var(--ink-soft); }

/* Kytkin: ohut pilleri, kulta kun päällä. */
.cc-switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  margin-top: 0.15rem;
}
.cc-switch input {
  position: absolute;
  inset: -9px;
  width: calc(100% + 18px);
  height: calc(100% + 18px);
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.cc-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9d2c4;
  transition: background-color 0.3s var(--ease);
}
.cc-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(29, 24, 17, 0.25);
  transition: transform 0.3s var(--ease);
}
.cc-switch input:checked + span { background: var(--gold); }
.cc-switch input:checked + span::after { transform: translateX(18px); }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch input:disabled + span { background: var(--gold); opacity: 0.45; }
.cc-switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 560px) {
  .cc,
  .cc.is-settings {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    width: auto;
  }
  .cc-card { padding: 1.8rem 1.35rem 1.15rem; max-height: calc(100svh - 1.5rem); }
  .cc-title { font-size: 1.5rem; }
  .cc-settings .cc-text { margin-bottom: 1rem; }
  .cc-opt { padding: 0.8rem 0; gap: 1rem; }
  .cc-opt strong { font-size: 1.1rem; }
  .cc-opts { margin-bottom: 1.1rem; }
  .cc-card::before { left: 1.4rem; }
  .cc-actions .btn { flex: 1 1 100%; }
  .cc-intro .cc-actions { flex-wrap: nowrap; }
  .cc-intro .cc-actions .btn { flex: 1 1 auto; }
  .cc-settings .cc-actions .btn { flex: 1 1 100%; }
  .cc-settings .cc-link { text-align: center; min-height: 40px; padding: 0.5rem 0.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cc,
  .cc.is-in { transform: none; transition: opacity 0.2s linear; }
  .cc-settings:not([hidden]),
  .cc.is-settings .cc-intro:not([hidden]) { animation: none; }
  .cc-switch span,
  .cc-switch span::after { transition: none; }
}

/* ---------- Footerin oikeudelliset linkit ---------- */
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer-legal a,
.footer-legal button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.25s ease;
}
.footer-legal a:hover,
.footer-legal button:hover { color: var(--white); }

/* ---------- Tietosuoja ja evästekäytäntö ---------- */
.legal { padding: 0 0 clamp(4.5rem, 9vw, 7rem); }
.legal-body { max-width: 44rem; margin: 0 auto; }
.legal-meta {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: -0.5rem auto 0;
}
.legal-toc {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  columns: 2 16rem;
  column-gap: 2.5rem;
  counter-reset: toc;
  list-style: none;
  font-size: 0.9rem;
}
.legal-toc li {
  counter-increment: toc;
  break-inside: avoid;
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  padding: 0.28rem 0;
  line-height: 1.5;
}
.legal-toc li::before {
  content: counter(toc) ".";
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
.legal-body .legal-toc a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.25s ease;
}
.legal-body .legal-toc a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); }
@media (max-width: 640px) { .legal-toc { font-size: 0.86rem; padding: 1.2rem 0; } }
.legal-body h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.2rem);
  margin: clamp(2.8rem, 5vw, 3.6rem) 0 1rem;
  scroll-margin-top: 6rem;
}
.legal-body h3 {
  font-size: 1.3rem;
  margin: 1.8rem 0 0.5rem;
}
.legal-body p,
.legal-body li { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.8; }
.legal-body p + p { margin-top: 0.9rem; }
.legal-body ul { margin: 0.8rem 0 0.4rem; }
.legal-body ul li { position: relative; padding-left: 1.4rem; margin: 0.35rem 0; }
.legal-body ul li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.78em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid var(--gold);
}
.legal-body strong { color: var(--ink); font-weight: 700; }
.legal-body a:not(.btn) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.legal-card {
  margin: 1rem 0 0;
  padding: 1.4rem 1.6rem;
  background: var(--warm);
  border-radius: var(--radius);
}
.legal-card p { margin: 0; }
.legal-actions { margin-top: 1.5rem; }

.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0 0.5rem; font-size: 0.88rem; }
.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}
.legal-table th { font-weight: 700; color: var(--ink); font-size: 0.8rem; letter-spacing: 0.02em; }
.legal-table td { color: var(--ink-soft); hyphens: auto; -webkit-hyphens: auto; }
.legal-table code { font-size: 0.8rem; color: var(--ink); white-space: nowrap; }
@media (max-width: 640px) {
  .legal-table thead { display: none; }
  .legal-table tr { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .legal-table td { display: block; border: 0; padding: 0.15rem 0; }
  .legal-table td::before {
    content: attr(data-th) ": ";
    font-weight: 700;
    color: var(--ink);
  }
}

/* ---------- 404 ---------- */
.nf { text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(5rem, 10vw, 8rem); }
/* Tuotekuvan tausta ei ole puhdas valkoinen: pehmeä pyöreä maski häivyttää
   neliön reunat, ettei kuva näytä laatikolta valkoisella sivulla. */
.nf-img {
  width: min(17rem, 62%);
  margin: 0 auto clamp(0.5rem, 2vw, 1.25rem);
  filter: brightness(1.05);
  -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
}
.nf h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); max-width: 16ch; margin: 0 auto 1rem; }
.nf .lede { margin: 0 auto; max-width: 42ch; }
.nf-actions { margin-top: clamp(2rem, 4vw, 2.75rem); display: flex; gap: 0.9rem 1.2rem; justify-content: center; flex-wrap: wrap; }
.nf-links {
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
  font-size: 0.9rem;
}
.nf-links a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.nf-links a:hover { color: var(--ink); text-decoration-color: var(--gold); }
