/* CD-Yhtiöt Oy — design system
   Light grey + black theme, burgundy & rose palette, DM Serif Display + DM Sans,
   asymmetric split layout, contour-line motif, rounded cards with soft shadows, boxed nav card. */

:root {
  --grey-50: #f6f6f4;
  --grey-100: #ecebe8;
  --grey-200: #dcdbd7;
  --grey-500: #6b6a6e;
  --ink: #141314;
  --ink-2: #2a282b;
  --white: #ffffff;
  --burgundy: #7a1d33;
  --burgundy-700: #5e1527;
  --burgundy-100: #f3e4e7;
  --rose: #e7b3bd;
  --rose-300: #d78f9d;

  --bg: var(--grey-100);
  --surface: var(--white);
  --text: var(--ink);
  --muted: #4f4d52;
  --line: var(--grey-200);

  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(20, 19, 20, .06), 0 2px 8px rgba(20, 19, 20, .05);
  --shadow-md: 0 2px 6px rgba(20, 19, 20, .05), 0 12px 32px rgba(20, 19, 20, .09);
  --shadow-lg: 0 6px 16px rgba(20, 19, 20, .08), 0 24px 60px rgba(20, 19, 20, .14);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
a { color: var(--burgundy); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--burgundy-700); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 3px; border-radius: 6px; }
em { font-style: italic; color: var(--burgundy); }
img, svg { max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--r-sm); z-index: 200; }
.skip:focus { top: 16px; color: var(--white); }
.small { font-size: .92rem; color: var(--muted); }
.muted-light { color: #b9b6bb; font-size: .9rem; }

.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--burgundy); margin-bottom: .9rem; }
.eyebrow--light { color: var(--rose); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 40em; }

.icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.4em;
  font: 700 1rem/1.2 var(--font-body);
  border-radius: 12px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--burgundy); color: var(--white); box-shadow: 0 6px 18px rgba(122, 29, 51, .25); }
.btn--primary:hover { background: var(--burgundy-700); color: var(--white); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--rose { background: var(--rose); color: var(--ink); }
.btn--rose:hover { background: var(--white); color: var(--ink); }
.btn--sm { min-height: 42px; padding: .55em 1.1em; font-size: .95rem; }

/* ---------- header: boxed nav card ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding: 14px var(--gutter) 0; }
.navcard {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 10px 12px 10px 22px;
}
.brand { font-family: var(--font-body); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--burgundy); text-decoration: none; }
.brand--light { color: var(--white); font-size: 1.35rem; }
.brand--light:hover { color: var(--rose); }
.site-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav ul a { display: block; padding: 8px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav ul a:hover { background: var(--grey-100); }
.site-nav ul a[aria-current="page"] { background: var(--burgundy-100); color: var(--burgundy-700); }
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .js .nav-toggle {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
    font: 700 .95rem var(--font-body); color: var(--ink);
    background: var(--grey-100); border: 0; border-radius: 10px; cursor: pointer;
  }
  .js .site-nav { display: none; width: 100%; padding: 8px 0 6px; }
  .js .site-nav.is-open { display: flex; flex-direction: column; align-items: stretch; }
  .js .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 12px 14px; }
  .site-nav .btn { width: 100%; }
}

/* ---------- contour motif ---------- */
.contours { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--rose-300); stroke-width: 1.1; opacity: .55; pointer-events: none; }
.contours--band { stroke: var(--rose); opacity: .18; }

/* ---------- hero: asymmetric split + fact cards ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0 clamp(64px, 9vw, 120px); margin-top: -90px; padding-top: calc(90px + clamp(56px, 8vw, 110px)); }
.hero .contours { left: 30%; width: 75%; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy h1 em { display: block; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.fact-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fact {
  background: var(--surface); border-radius: var(--r-md); padding: 18px 20px;
  box-shadow: var(--shadow-md); border: 1px solid rgba(255, 255, 255, .6);
  display: flex; flex-direction: column; gap: 4px;
}


.fact--wide { grid-column: 1 / -1; background: var(--ink); color: var(--white); }
.fact--wide .k { color: var(--rose); }
.fact .k { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--burgundy); }
.fact .v { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; }
.fact:last-child { background: var(--burgundy); color: var(--white); }
.fact:last-child .k { color: var(--rose); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .contours { left: 0; width: 100%; opacity: .35; }

}

/* ---------- sections ---------- */
.section { position: relative; padding: var(--section) 0; }
.section--tint { background: var(--grey-50); }
.section--dark { background: var(--ink); color: #e9e7ea; overflow: hidden; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .contours { inset: 0; }
.section-head { max-width: 46em; margin-bottom: clamp(32px, 4vw, 56px); position: relative; }
.section-head p { color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.split-aside { position: sticky; top: 120px; }
.split-aside p { color: var(--muted); }
.split--contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 880px) {
  .split, .split--contact { grid-template-columns: 1fr; }
  .split-aside { position: static; }
}

.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: clamp(22px, 3vw, 34px); }

/* service cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-card { display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.service-card > .icon { width: 44px; height: 44px; padding: 9px; border-radius: 14px; background: var(--burgundy-100); color: var(--burgundy); margin-bottom: 18px; }
.service-card p { color: var(--muted); flex: 1; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.text-link .icon { width: 18px; height: 18px; transition: transform .2s; }
.text-link:hover .icon { transform: translateX(3px); }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; position: relative; }
.steps li { counter-increment: step; background: var(--ink-2); border-radius: var(--r-lg); padding: 28px 24px; border: 1px solid rgba(255, 255, 255, .08); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--rose); margin-bottom: 18px; }
.steps p { color: #c9c6cb; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* why */
.why-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.why-list li { border-top: 4px solid var(--burgundy); }
.why-list li:nth-child(2), .why-list li:nth-child(3) { border-top-color: var(--rose-300); }
.why-list p { color: var(--muted); margin: 0; }
@media (max-width: 620px) { .why-list { grid-template-columns: 1fr; } }

/* faq */
.faq { display: grid; gap: 12px; }
.faq details { padding: 0; border-radius: var(--r-md); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative;
  font-weight: 700; font-size: 1.05rem; border-radius: var(--r-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--burgundy); border-bottom: 2px solid var(--burgundy); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 24px 22px; margin: 0; color: var(--muted); }

/* ---------- finder ---------- */
.finder fieldset { border: 0; padding: 0; margin: 0 0 24px; }
.finder legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.step { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--white); font-size: .85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 10px 16px; border-radius: 12px; border: 1.5px solid var(--grey-200);
  background: var(--grey-50); font-weight: 500; transition: border-color .2s, background-color .2s, color .2s;
}
.chip input:hover + span { border-color: var(--ink); }
.chip input:checked + span { background: var(--burgundy); border-color: var(--burgundy); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--burgundy); outline-offset: 2px; }
.finder-result { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.finder-result:focus { outline: none; }
.finder-result h3 { font-size: 1.5rem; }
.finder-list { padding-left: 1.1em; margin: 0 0 16px; }
.finder-list li { margin-bottom: 10px; }
.finder-list li::marker { color: var(--burgundy); }
.finder-note { font-size: .92rem; color: var(--muted); }

/* ---------- contact & forms ---------- */
.contact-list { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--surface); color: var(--burgundy); box-shadow: var(--shadow-sm); }
.contact-list .k { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--grey-500); }
.form-card h2 { font-size: 1.9rem; }
.enquiry-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full, .field:has(textarea) { grid-column: 1 / -1; }
.field:nth-of-type(3) { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .95rem; }
.optional { font-weight: 400; color: var(--grey-500); }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--grey-50);
  border: 1.5px solid var(--grey-200); border-radius: 12px; padding: 12px 14px; width: 100%;
  transition: border-color .2s, background-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--burgundy); background: var(--white); box-shadow: 0 0 0 4px var(--burgundy-100); }
.field textarea { resize: vertical; min-height: 140px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-privacy { font-size: .9rem; color: var(--muted); margin: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--burgundy); flex: none; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { margin: 0; font-weight: 500; }
.form-status.is-error { color: #a1132b; }
.form-status.is-ok { color: #1e6b3b; }
@media (max-width: 560px) { .enquiry-form { grid-template-columns: 1fr; } }

/* ---------- inner page head ---------- */
.page-head { position: relative; overflow: hidden; margin-top: -90px; padding: calc(90px + clamp(56px, 7vw, 96px)) 0 clamp(48px, 6vw, 80px); background: var(--grey-50); border-bottom: 1px solid var(--line); }
.page-head .contours { opacity: .5; }
.page-head-inner { position: relative; max-width: var(--wrap); }
.page-head h1 { max-width: 16em; }
.page-head--404 { min-height: 70vh; }
.link-row { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }

/* about */
.details-card { position: sticky; top: 120px; }
.details-card h2 { font-size: 1.7rem; }
.details { margin: 0 0 18px; display: grid; gap: 0; }
.details dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--burgundy); padding-top: 12px; border-top: 1px solid var(--line); }
.details dt:first-child { border-top: 0; padding-top: 0; }
.details dd { margin: 2px 0 12px; }
@media (max-width: 880px) { .details-card { position: static; } }

.prose { max-width: 46em; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose--legal { margin: 0 auto; max-width: 52em; }
.prose--legal ul { padding-left: 1.2em; }
.prose--legal li { margin-bottom: .5em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--ink); color: var(--white); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
code { font-size: .9em; background: var(--burgundy-100); color: var(--burgundy-700); padding: 1px 6px; border-radius: 6px; }

/* services page */
.service-index { margin-bottom: clamp(40px, 6vw, 72px); padding: 14px; }
.service-index ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.service-index a { display: flex; gap: 12px; align-items: baseline; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 500; }
.service-index a:hover { background: var(--grey-100); }
.num { font-family: var(--font-display); color: var(--burgundy); }
@media (max-width: 760px) { .service-index ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .service-index ul { grid-template-columns: 1fr; } }

.service-detail {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 4fr); gap: clamp(20px, 3vw, 44px);
  padding: clamp(36px, 5vw, 60px) 0; border-top: 1px solid var(--grey-200); align-items: start;
}
.service-detail-head { display: flex; flex-direction: column; gap: 10px; }
.service-detail-head .icon { color: var(--burgundy); width: 34px; height: 34px; }
.service-detail-head h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin: 0; }
.num--big { font-size: 3.4rem; line-height: 1; color: var(--rose-300); }
.service-detail-body p { color: var(--ink-2); }
.service-detail-list h3 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 8px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--burgundy); border-bottom: 2px solid var(--burgundy); transform: rotate(-45deg); }
@media (max-width: 960px) { .service-detail { grid-template-columns: 1fr 1fr; } .service-detail-head { grid-column: 1 / -1; } }
@media (max-width: 620px) { .service-detail { grid-template-columns: 1fr; } }

.cta-band { text-align: center; }
.cta-inner { position: relative; max-width: 760px; }
.cta-inner p { color: #c9c6cb; font-size: 1.1rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #d6d3d8; padding: clamp(56px, 7vw, 88px) 0 28px; font-size: .95rem; }
.site-footer a { color: #f1eef2; }
.site-footer a:hover { color: var(--rose); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.1fr 1fr .8fr; gap: 36px; }
.footer-about { margin-top: 14px; color: #bdb9bf; }
.footer-h { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rose); margin-bottom: 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.footer-dl dt { color: #9e9aa1; }
.footer-dl dd { margin: 0; color: #f1eef2; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 48px; padding-top: 22px; color: #9e9aa1; font-size: .88rem; }
.footer-base p { margin: 0; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  max-width: 760px; margin: 0 auto;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  max-height: calc(100vh - 32px); overflow-y: auto;
}
.cookie-banner[hidden] { display: none; }
.cookie-inner { padding: 22px 24px; border-top: 5px solid var(--burgundy); border-radius: var(--r-lg); }
.cookie-title { font-size: 1.45rem; margin-bottom: .3em; }
.cookie-text { font-size: .95rem; color: var(--muted); margin-bottom: 16px; }
.cookie-prefs fieldset { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.cookie-prefs[hidden] { display: none; }
.pref { display: flex; gap: 12px; align-items: flex-start; background: var(--grey-50); border-radius: 14px; padding: 12px 14px; }
.pref input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--burgundy); flex: none; }
.pref label span { display: block; font-size: .9rem; color: var(--muted); }
.cookie-prefs .btn { margin-bottom: 14px; }
.cookie-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--grey-200); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--choice { background: var(--ink); color: var(--white); }
.btn--choice:hover { background: var(--burgundy); color: var(--white); }
@media (max-width: 560px) {
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; }
  .cookie-inner { padding: 18px 16px; }
  .cookie-actions { grid-template-columns: 1fr 1fr; }
  .cookie-actions #cookie-preferences { grid-column: 1 / -1; order: 3; }
}
