/* ===========================================================================
   Edurec.fi · komponentit
   Käyttää vain tokens.css:n muuttujia. Ei kovakoodattuja värejä tai kokoja.
   =========================================================================== */

/* --- Perusta -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--e-bg);
  color: var(--e-text);
  font-family: var(--e-font-body);
  font-size: var(--e-body);
  line-height: var(--e-lh-normal);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--e-font-heading);
  line-height: var(--e-lh-tight);
  color: var(--e-text);
  margin: 0;
  letter-spacing: -0.015em;
}

h1 { font-size: var(--e-h1); font-weight: var(--e-w-black); }
h2 { font-size: var(--e-h2); font-weight: var(--e-w-bold); }
h3 { font-size: var(--e-h3); font-weight: var(--e-w-semibold); }

p { margin: 0 0 var(--e-4); }

a {
  color: var(--e-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--e-accent-hover); }

/* Fokus näkyy aina. Tätä ei poisteta missään. */
:focus-visible {
  outline: var(--e-focus-width) solid var(--e-focus-color);
  outline-offset: var(--e-focus-offset);
  border-radius: var(--e-radius-sm);
}

/* --- Layout --------------------------------------------------------------- */

.e-section {
  padding: var(--e-section-y) var(--e-gutter);
}
.e-section--alt   { background: var(--e-bg-alt); }
.e-section--stone { background: var(--e-stone-dark); }
.e-section--dark  { background: var(--e-green); color: var(--e-white); }
.e-section--dark h1,
.e-section--dark h2,
.e-section--dark h3 { color: var(--e-white); }

.e-wrap    { max-width: var(--e-content); margin-inline: auto; }
.e-wrap--article { max-width: var(--e-article); margin-inline: auto; }

.e-grid { display: grid; gap: var(--e-grid-gap); }
@media (min-width: 640px) {
  .e-grid--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .e-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .e-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .e-grid--2-1 { grid-template-columns: 1.4fr 1fr; align-items: start; }
}

/* --- Tunniste ja osion otsikko -------------------------------------------- */

.e-label {
  font-family: var(--e-font-body);
  font-size: var(--e-label);
  font-weight: var(--e-w-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--e-text-muted);
  margin: 0 0 var(--e-3);
}
.e-label--accent { color: var(--e-accent); }

.e-head { max-width: 62ch; margin-bottom: var(--e-6); }
.e-lead {
  font-size: var(--e-lead);
  color: var(--e-text-muted);
  max-width: 68ch;
  margin: var(--e-3) 0 0;
}

/* --- Hero ----------------------------------------------------------------- */

.e-hero { padding: var(--e-8) var(--e-gutter) var(--e-7); }
.e-hero h1 { max-width: 18ch; }
.e-hero .e-lead { max-width: 60ch; margin-top: var(--e-4); }
.e-hero__stats {
  display: flex; flex-wrap: wrap; gap: var(--e-5);
  margin-top: var(--e-6);
  font-size: var(--e-small);
  color: var(--e-text-muted);
}
.e-hero__stats b {
  display: block;
  font-family: var(--e-font-heading);
  font-size: 1.5rem;
  font-weight: var(--e-w-bold);
  color: var(--e-accent);
  line-height: 1.2;
}

/* --- Painikkeet: kaksi tyyppiä, ei kolmatta -------------------------------- */

.e-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: var(--e-radius-sm);
  font-family: var(--e-font-heading);
  font-size: 0.95rem;
  font-weight: var(--e-w-semibold);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--e-speed) var(--e-ease),
              color var(--e-speed) var(--e-ease),
              border-color var(--e-speed) var(--e-ease);
}
.e-btn--primary {
  background: var(--e-green);
  color: var(--e-white);
}
.e-btn--primary:hover { background: var(--e-green-dark); color: var(--e-white); }

.e-btn--secondary {
  background: transparent;
  color: var(--e-green);
  border-color: var(--e-green);
}
.e-btn--secondary:hover { background: var(--e-stone); color: var(--e-green-dark); }

.e-btns { display: flex; flex-wrap: wrap; gap: var(--e-3); margin-top: var(--e-5); }

/* --- Kortit: kolme tyyppiä ------------------------------------------------- */

.e-card {
  background: var(--e-white);
  border: 1px solid var(--e-border);
  border-radius: var(--e-radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: var(--e-2);
  transition: transform var(--e-speed) var(--e-ease),
              border-color var(--e-speed) var(--e-ease);
}
.e-card__title {
  font-family: var(--e-font-heading);
  font-weight: var(--e-w-semibold);
  font-size: 1rem;
}
.e-card__body { font-size: var(--e-small); color: var(--e-text-muted); }
.e-card__link {
  margin-top: auto; padding-top: var(--e-3);
  font-size: var(--e-small);
  font-weight: var(--e-w-semibold);
  color: var(--e-accent);
}
a.e-card { text-decoration: none; color: inherit; }
a.e-card:hover { transform: translateY(-2px); border-color: var(--e-line-strong); }

/* Tuotekortti: korosteväri erottaa tuotteen palvelusta */
.e-product {
  border-radius: var(--e-radius);
  padding: var(--e-5);
  border: 1px solid transparent;
}
.e-product--arpro    { background: var(--e-slate-bg);   border-color: #CFE0E9; }
.e-product--arpro .e-label,
.e-product--arpro h3 { color: var(--e-slate); }

.e-product--kv       { background: var(--e-apricot-bg); border-color: #F0D3BF; }
.e-product--kv .e-label,
.e-product--kv h3    { color: var(--e-apricot-text); }

.e-product p { font-size: var(--e-small); color: var(--e-text-muted); margin-top: var(--e-2); }

/* Artikkelikortti */
.e-article-card { display: flex; flex-direction: column; gap: var(--e-2); text-decoration: none; color: inherit; }
.e-article-card__img {
  aspect-ratio: 16 / 9;
  background: var(--e-stone-dark);
  border-radius: var(--e-radius);
  border: 1px solid var(--e-border);
}
.e-article-card__meta { font-size: var(--e-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--e-text-muted); }
.e-article-card__title { font-family: var(--e-font-heading); font-weight: var(--e-w-semibold); font-size: 1.05rem; }
.e-article-card__lead  { font-size: var(--e-small); color: var(--e-text-muted); }

/* --- Vaiheet -------------------------------------------------------------- */

.e-steps { display: grid; gap: var(--e-5); }
@media (min-width: 640px) { .e-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .e-steps { grid-template-columns: repeat(3, 1fr); } }

.e-step { border-top: 2px solid var(--e-accent); padding-top: var(--e-3); }
.e-step__n {
  display: block;
  font-family: var(--e-font-heading);
  font-size: var(--e-label);
  font-weight: var(--e-w-bold);
  color: var(--e-accent);
  margin-bottom: var(--e-1);
}
.e-step__t { display: block; font-family: var(--e-font-heading); font-weight: var(--e-w-semibold); margin-bottom: var(--e-1); }
.e-step__d { display: block; font-size: var(--e-small); color: var(--e-text-muted); }

/* --- Pylväät (Löydä. Tunnista. Kehitä.) ------------------------------------ */

.e-pillar h3 { color: var(--e-accent); margin-bottom: var(--e-2); }
.e-pillar__d { font-size: var(--e-small); color: var(--e-text-muted); }
.e-pillar ul { list-style: none; padding: 0; margin: var(--e-3) 0 0; }
.e-pillar li { font-size: var(--e-small); padding: var(--e-1) 0; }
.e-pillar li::before { content: "— "; color: var(--e-text-muted); }

/* --- Taulukko ------------------------------------------------------------- */

.e-table-wrap { overflow-x: auto; }
.e-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--e-small);
}
.e-table th, .e-table td {
  text-align: left;
  padding: var(--e-3) var(--e-4);
  border-bottom: 1px solid var(--e-border);
  vertical-align: top;
}
.e-table thead th {
  font-family: var(--e-font-body);
  font-size: var(--e-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--e-text-muted);
  font-weight: var(--e-w-semibold);
  background: var(--e-stone);
}
.e-table tbody th { font-weight: var(--e-w-semibold); color: var(--e-text); width: 22%; }

/* --- Usein kysyttyä -------------------------------------------------------- */

.e-faq { display: grid; gap: 0; }
.e-faq__item { border-bottom: 1px solid var(--e-border); padding: var(--e-5) 0; }
.e-faq__item:first-child { border-top: 1px solid var(--e-border); }
.e-faq__q { font-family: var(--e-font-heading); font-weight: var(--e-w-semibold); font-size: 1rem; margin-bottom: var(--e-2); }
.e-faq__a { font-size: var(--e-small); color: var(--e-text-muted); margin: 0; max-width: 72ch; }

/* --- Henkilö -------------------------------------------------------------- */

.e-person__img {
  aspect-ratio: 4 / 5;
  background: var(--e-stone-dark);
  border: 1px solid var(--e-border);
  border-radius: var(--e-radius);
  margin-bottom: var(--e-3);
}
.e-person__name { font-family: var(--e-font-heading); font-weight: var(--e-w-semibold); }
.e-person__role { font-size: var(--e-small); color: var(--e-accent); }
.e-person__text { font-size: var(--e-small); color: var(--e-text-muted); margin-top: var(--e-2); }

/* --- Lomake --------------------------------------------------------------- */

.e-field { display: flex; flex-direction: column; gap: var(--e-1); margin-bottom: var(--e-4); }
.e-field label { font-size: var(--e-small); font-weight: var(--e-w-semibold); }
.e-field input,
.e-field select,
.e-field textarea {
  font-family: var(--e-font-body);
  font-size: var(--e-body);
  padding: var(--e-3) var(--e-4);
  border: 1px solid var(--e-ink-soft);   /* AA-kontrasti UI-elementtinä */
  border-radius: var(--e-radius-sm);
  background: var(--e-white);
  color: var(--e-text);
}
.e-field textarea { min-height: 120px; resize: vertical; }
.e-field input:focus-visible,
.e-field select:focus-visible,
.e-field textarea:focus-visible { border-color: var(--e-accent); }

/* --- Huomiolaatikko ------------------------------------------------------- */

.e-note {
  border-left: 3px solid var(--e-accent);
  background: var(--e-stone);
  padding: var(--e-4) var(--e-5);
  border-radius: 0 var(--e-radius-sm) var(--e-radius-sm) 0;
  font-size: var(--e-small);
  color: var(--e-text-muted);
}

/* --- Apuluokat ------------------------------------------------------------- */

.e-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.e-center { text-align: center; }
.e-stack > * + * { margin-top: var(--e-4); }

/* ===========================================================================
   v10-lisäykset · 13.10.2026
   =========================================================================== */

/* --- Luettelo kortissa (Timo r21: lyhyt viiva luettelomerkkinä) ------------ */

.e-bullets { list-style: none; margin: var(--e-2) 0 0; padding: 0; display: grid; gap: var(--e-2); }
.e-bullets li { position: relative; padding-left: 18px; }
.e-bullets li::before { content: "–"; position: absolute; left: 0; color: var(--e-accent); font-weight: var(--e-w-semibold); }
.e-bullets__after { margin: var(--e-4) 0 0; }

/* --- Nostolukujen lähde ----------------------------------------------------- */

.e-stats__src { font-size: 0.78rem; color: var(--e-text-muted); margin: var(--e-3) 0 0; }

/* --- Nimikirjaimet, kunnes valokuva on olemassa ----------------------------- */
/* Kuvan tullessa div korvataan <img>-elementillä, ks. Wix-ohje luku 6.        */

.e-mono {
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--e-stone), var(--e-stone-dark));
  color: var(--e-green);
  font-family: var(--e-font-heading); font-weight: var(--e-w-bold);
  letter-spacing: 0.04em;
}
.e-person__img.e-mono { font-size: clamp(2rem, 6vw, 3rem); }
.e-expert__img.e-mono { font-size: 2rem; }
.e-person__img img, .e-expert__img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.e-person__img, .e-expert__img { overflow: hidden; }
.e-expert__img img { object-position: 50% 12%; }

/* --- Etusivun hero-kuvio ---------------------------------------------------- */

.e-venn { width: 100%; height: auto; display: block; }
.e-venn text { font-family: var(--e-font-heading); }

/* --- Lomakkeen tila ---------------------------------------------------------- */

.e-form__hint { font-size: 0.78rem; color: var(--e-text-muted); margin: var(--e-2) 0 0; }
.e-form__status { font-size: var(--e-small); margin: var(--e-3) 0 0; }
.e-form__status:empty { display: none; }
.e-form__status--ok { color: var(--e-green); }
.e-form__status--err { color: var(--e-apricot-text); }
.e-field input[aria-invalid="true"],
.e-field textarea[aria-invalid="true"],
.oy-field input[aria-invalid="true"],
.oy-field textarea[aria-invalid="true"] { border-color: var(--e-apricot-text); }

/* --- Kielilinkki ------------------------------------------------------------- */

.e-langlink {
  display: inline-flex; align-items: center; gap: var(--e-2);
  font-size: var(--e-small); font-weight: var(--e-w-semibold);
  color: var(--e-green); text-decoration: none;
  border: 1px solid var(--e-border); border-radius: var(--e-radius-pill, 999px);
  padding: 6px 14px; background: var(--e-white);
}
.e-langlink:hover { border-color: var(--e-line-strong); }
.e-footer__lang { margin-top: var(--e-4); font-size: var(--e-small); }
.e-footer__lang a { font-weight: var(--e-w-semibold); }
