/* ==========================================================================
   Canorama.fi, päätyylitiedosto (valkoinen ilme, hillitty greige-aksentti)
   Väripaletti: pääosin valkoinen + rauhalliset graafiset aksentit
   ========================================================================== */

:root {
  --ink: #26282B;
  --ink-deep: #1E2023;
  --accent: #E31E30;
  --accent-dark: #B01626;
  --accent-deeper: #8C0F1D;
  --accent-light: #F5B9C0;
  --granite: #43464B;
  --granite-deep: #2F3236;
  /* vanhat nimet säilytetty yhteensopivuuden vuoksi */
  --red: var(--accent);
  --red-dark: var(--accent-dark);
  --red-deeper: var(--accent-deeper);
  --red-light: var(--accent-light);
  --text: #26282B;
  --text-muted: #5F6368;
  --text-faint: #9AA0A6;
  --bg: #FFFFFF;
  --bg-soft: #F7F7F8;
  --bg-warm: #FFFFFF;
  --grad-hero: linear-gradient(160deg, #FFFFFF 0%, #FFFFFF 55%, #F3F4F6 100%);
  --grad-card: #FFFFFF;
  --border: #E8E9EB;
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent-deeper); text-decoration: underline; }

img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Napit ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15.5px;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #3A3D42; color: #fff; }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #F0F1F2; color: var(--ink); }

.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

.btn-outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.4); }
.btn-outline-light:hover { border-color: #fff; color: #fff; }

.link-arrow { font-weight: 700; font-size: 14.5px; color: var(--accent-dark); }
.link-arrow::after { content: " →"; }

/* ---------- Yläpalkki ---------- */
.site-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}
.site-logo img { height: 19px; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a, .nav-drop > button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: 999px;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.site-nav > a:hover, .nav-drop > button:hover { color: var(--ink); background: rgba(67,70,75,0.08); text-decoration: none; }
.site-nav > a[aria-current="page"] { color: var(--ink); }

.nav-drop { position: relative; }
.nav-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 280px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(30,32,35,0.14);
  padding: 8px;
  flex-direction: column;
}
.nav-drop.open .nav-drop-menu { display: flex; }
.nav-drop-menu a {
  padding: 11px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
}
.nav-drop-menu a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.nav-drop-menu a span { display: block; font-weight: 400; font-size: 13px; color: var(--text-muted); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; gap: 2px; font-size: 13px; font-weight: 700; }
.lang-switch a { color: var(--text-faint); padding: 4px 6px; border-radius: 4px; }
.lang-switch a:hover { color: var(--ink); text-decoration: none; }
.lang-switch a[aria-current="true"] { color: var(--ink); }
.btn-oma {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 999px;
}
.btn-oma:hover { background: #3A3D42; text-decoration: none; color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 1px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--grad-hero);
  overflow: hidden;
  color: var(--text);
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 80px;
}
.hero-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 14px;
}
.hero h1 {
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(34px, 4.2vw, 52px);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.hero-lead {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 44ch;
  margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-link { color: var(--accent-dark); font-weight: 700; font-size: 15.5px; }
.hero-link:hover { color: var(--accent-deeper); }

.hero-media {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 34px rgba(30,32,35,0.08);
  border-radius: var(--radius);
  min-height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Alasivun kapeampi hero */
.hero--page .container { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 56px; }
.hero--page h1 { font-size: clamp(30px, 3.4vw, 42px); }

/* ---------- Osiot ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-weight: 800; font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 8px; }
.section-head h2::after {
  content: "";
  display: block;
  width: 64px; height: 3px;
  border-radius: 2px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--accent), rgba(227,30,48,0));
}
.section-head p { font-size: 15.5px; color: var(--text-muted); }
.section-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }

/* ---------- Kortit ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(30,32,35,0.05);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.card-on-white { background: #fff; }
.card-accent {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--granite), var(--granite-deep));
  margin-bottom: 8px;
}
.card-accent svg { width: 19px; height: 19px; }
.card h3 { font-weight: 700; font-size: 17.5px; }
.card p { font-size: 14.5px; color: var(--text-muted); flex: 1; }

/* ---------- Dokumentin elinkaari ---------- */
.lifecycle {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #F7F8F9 0%, #EFF1F3 100%);
  padding: 72px 0;
}
.lifecycle .container { position: relative; z-index: 1; }
.lifecycle .section-head h2 { color: var(--ink); }
.lifecycle .section-head p { color: var(--text-muted); max-width: 62ch; }
.lc-kicker {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
.lc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.lc-step {
  position: relative;
  background: #fff;
  border: 1px solid #E0E2E5;
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-start;
}
/* käärmerivi: rivi 2 kulkee oikealta vasemmalle */
.lc-grid > :nth-child(5) { grid-area: 2 / 4; }
.lc-grid > :nth-child(6) { grid-area: 2 / 3; }
.lc-grid > :nth-child(7) { grid-area: 2 / 2; }
.lc-grid > :nth-child(8) { grid-area: 2 / 1; }
.lc-num {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--granite), var(--granite-deep));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.lc-tag {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent-dark);
}
.lc-step h3 { color: var(--ink); font-size: 15.5px; line-height: 1.3; }
.lc-step p { font-size: 13.5px; line-height: 1.55; color: var(--text-muted); flex: 1; }
.lc-step::after {
  color: var(--accent);
  font-size: 19px;
  font-weight: 700;
  position: absolute;
  z-index: 2;
}
.lc-right::after { content: "→"; right: -19px; top: 50%; transform: translateY(-50%); }
.lc-left::after  { content: "←"; left: -19px; top: 50%; transform: translateY(-50%); }
.lc-down::after  { content: "↓"; bottom: -21px; left: 50%; transform: translateX(-50%); }
.lc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid #DDE0E3;
}
.lc-foot p { font-size: 14.5px; color: var(--text-muted); max-width: 58ch; }

@media (max-width: 960px) {
  .lc-grid { grid-template-columns: 1fr 1fr; }
  .lc-grid > :nth-child(5), .lc-grid > :nth-child(6),
  .lc-grid > :nth-child(7), .lc-grid > :nth-child(8) { grid-area: auto; }
  .lc-step::after { content: none; }
}
@media (max-width: 640px) {
  .lc-grid { grid-template-columns: 1fr; }
  .lifecycle { padding: 48px 0; }
}

/* ---------- Klikattavat kortit ---------- */
a.card-link { text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
a.card-link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(30,32,35,0.10); border-color: #D5D7DA; }
a.card-link:hover .link-arrow { color: var(--accent-deeper); }
a.card-link .link-arrow { margin-top: 2px; }

/* ---------- Miksi Canorama ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.why-item .why-num { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; color: var(--accent); display: block; margin-bottom: 10px; }
.why-item h3 { font-size: 18px; margin-bottom: 8px; }
.why-item p { font-size: 14.5px; color: var(--text-muted); line-height: 1.65; }
@media (max-width: 640px) { .why-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Brändiaalto ---------- */
.wave-divider { line-height: 0; overflow: hidden; padding: 8px 0; }
.wave-divider img { width: 100%; min-width: 900px; display: block; }
.wave-divider--flip img { transform: scaleX(-1); }

/* ---------- Nostopalkki (etätyö) ---------- */
.strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(30,32,35,0.05);
  border-radius: var(--radius);
  padding: 26px 30px;
}
.strip h3 { font-size: 17.5px; margin-bottom: 6px; }
.strip p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- CBC-kumppanistrip ---------- */
.strip-cbc { background: #fff; }
.strip-cbc .cbc-badge { flex: none; height: 68px; width: auto; display: block; }
.strip-cbc > div { flex: 1; }
.strip-cbc .btn { flex: none; }

/* ---------- Asiakastarina ---------- */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}
.story-media {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
}
.story-media img { width: 100%; height: 100%; object-fit: cover; }
.story-kicker {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 12px;
}
.story-grid h2 { font-size: 24px; font-weight: 800; margin-bottom: 14px; }
.story-quote { font-size: 15.5px; font-style: italic; color: var(--text-muted); margin-bottom: 16px; }
.story-attrib { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 20px; }

/* ---------- Uutiskortit ---------- */
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.news-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(30,32,35,0.05);
}
.news-date { font-size: 12.5px; font-weight: 700; color: var(--text-faint); margin-bottom: 8px; }
.news-card h3 { font-size: 17px; font-weight: 700; line-height: 1.35; margin-bottom: 10px; }
.news-card p { font-size: 14.5px; color: var(--text-muted); margin-bottom: 12px; }

/* ---------- Tukipalkki ---------- */
.support-band {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.support-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/abstract-bg.svg") center right / cover no-repeat;
  opacity: 0.85;
}
.support-band .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 36px;
  padding-bottom: 36px;
}
.support-band h3 { color: #fff; font-size: 19px; margin-bottom: 4px; }
.support-band p { font-size: 14.5px; color: rgba(255,255,255,0.65); }
.support-actions { display: flex; gap: 12px; flex: none; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: rgba(255,255,255,0.65); }
.site-footer .container { padding-top: 48px; padding-bottom: 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-grid img { height: 16px; margin-bottom: 14px; }
.footer-grid p { font-size: 13.5px; color: rgba(255,255,255,0.5); max-width: 30ch; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.footer-col strong { color: #fff; font-family: var(--font-body); margin-bottom: 4px; }
.footer-col a { color: rgba(255,255,255,0.65); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Lomakkeet ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 640px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-weight: 700; font-size: 14px; color: var(--ink); }
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--accent-dark);
}
.form-hint { font-size: 13px; color: var(--text-muted); }
.form-status { margin-top: 16px; font-weight: 700; font-size: 14.5px; }
.form-status.ok { color: #1B7F4D; }
.form-status.error { color: #B04A3A; }

/* honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Kartta ---------- */
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 520px;
  background: var(--bg-soft);
}
.map-frame > div, .map-frame iframe { width: 100%; height: 100%; border: 0; }

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

/* ---------- Responsiivisuus ---------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 56px; }
  .hero-media { min-height: 240px; }
  .card-grid, .office-grid { grid-template-columns: 1fr 1fr; }
  .story-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .site-nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--bg-warm);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 2px;
    border-top: 1px solid var(--border);
  }
  .site-nav.open { display: flex; }
  .nav-drop-menu { position: static; box-shadow: none; background: var(--bg-soft); margin: 4px 0; }
  .nav-drop-menu a { color: var(--text); }
  .nav-drop-menu a span { color: var(--text-muted); }
  .nav-drop-menu a:hover { background: var(--bg-soft); color: var(--ink); }
  .nav-toggle { display: block; }
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .card-grid, .news-grid, .office-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .strip, .support-band .container { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr }
  .footer-bottom { flex-direction: column; }
}
