/* ==========================================================================
   Vieno – landing page
   Värit, fontit ja mitat: Vieno design system (brändiohje 29.9.2026).
   Ulkoasu: canvas "Vieno – landing page", vaihtoehto B (desktop 1280 / mobiili 390).
   Leikkauspisteet: < 720 px mobiili, 720–1023 px tabletti, ≥ 1024 px desktop.
   ========================================================================== */

/* ---- Fontit (itse palveltu; lisenssi assets/fonts/OFL.txt) ---- */
@font-face {
  font-family: "Lato";
  src: url("assets/fonts/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("assets/fonts/Lato-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("assets/fonts/Lato-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("assets/fonts/Lato-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ---- Tokenit ---- */
:root {
  --navy: #1f4161;
  --violet: #8083f1;
  --violet-text: #6261cb;
  --violet-bg: #edeffe;
  --violet-line: #d7dbfe;
  --cream: #fbf8f1;
  --white: #f9f9f9;
  --alert: #e37959;
  --alert-text: #b94b29;

  --surface: var(--cream);
  --surface-raised: var(--white);
  --surface-muted: #e3e7ea;
  --surface-inverse: var(--navy);
  --ink: var(--navy);
  --ink-muted: #4f6981;
  --ink-disabled: #7b8e9d;
  --ink-inverse: var(--white);
  --ink-inverse-muted: #c3cbd3;
  --primary: var(--navy);
  --primary-hover: #19344e;
  --primary-active: #162e44;
  --on-primary: var(--white);
  --accent: var(--violet);
  --accent-hover: var(--violet-text);
  --accent-text: var(--violet-text);
  --line: #d8dde2;
  --line-strong: #778a9b;
  --line-inverse: #4b667f;
  --link: var(--navy);
  --link-hover: #19344e;
  --focus-ring: 0 0 0 2px var(--cream), 0 0 0 4px var(--navy);
  --focus-ring-inverse: 0 0 0 2px var(--navy), 0 0 0 4px var(--white);

  --radius-md: 8px;
  --radius-lg: 12px;
  --container: 1152px; /* sisältöleveys 1280 px:n taululla (1280 − 2 × 64) */
  --gutter: 16px; /* sivun reunatila; kasvaa leikkauspisteissä */

  --font-sans: "Lato", system-ui, -apple-system, "Segoe UI", Helvetica, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  hyphens: manual;
}
p {
  hyphens: auto;
}

img {
  display: block;
  max-width: 100%;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--link);
}
a:hover {
  color: var(--link-hover);
}
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}
.inverse a:focus-visible {
  box-shadow: var(--focus-ring-inverse);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}

/* ---- Painike, linkki, otsake ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 32px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--white);
  font-size: 19px;
  line-height: 24px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.btn:hover,
.btn:active {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--white);
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.link {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}
.link-inverse,
.link-inverse:hover {
  color: var(--ink-inverse);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.inverse .eyebrow {
  color: var(--ink-inverse-muted);
}

/* ---- Osiot ---- */
.section {
  padding: 64px var(--gutter);
}
.inverse {
  background: var(--surface-inverse);
  color: var(--ink-inverse);
}
.raised {
  background: var(--surface-raised);
}

.lead {
  font-size: 18px;
  line-height: 28px;
  text-wrap: pretty;
}
.h2 {
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
  text-wrap: balance;
}
.h3 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}

/* Hero */
.hero {
  padding: 32px var(--gutter) 120px;
}
.hero .container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.hero .logo-row {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.hero .logo {
  height: 28px;
  width: auto;
}
.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.hero .intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero h1 {
  font-size: 40px;
  line-height: 48px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero .actions {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}
.hero nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.hero nav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  text-decoration: none;
}
.hero nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Numeroidut rivit (Vieno ERP, Vakka) */
.rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-inverse);
}
.rows li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-inverse);
  font-weight: 700;
}
.rows .num {
  flex: none;
  min-width: 24px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-inverse-muted);
}

/* Vieno ERP */
#vieno-erp {
  padding: 80px var(--gutter);
}
#vieno-erp .container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
#vieno-erp .text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#vieno-erp .h2 {
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.01em;
}
#vieno-erp .rows li {
  font-size: 18px;
  line-height: 28px;
}

/* Kortit (Mitä Vieno ERP sisältää, Tietoturva) – kortti on taustansa värinen, vain reunaviiva erottaa */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: transparent;
}
.card .icon {
  display: block;
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  color: var(--accent);
}

#sisalto .container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Vakka */
#vakka .container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#vakka .brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#vakka .details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#vakka .logo {
  height: 32px;
  width: auto;
  align-self: flex-start;
}
#vakka .claim {
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  text-wrap: balance;
}
#vakka .desc {
  color: var(--ink-inverse-muted);
  text-wrap: pretty;
}
#vakka .rows {
  margin-top: 12px;
}
#vakka .more {
  padding-top: 4px;
}

/* Tietoturva ja vaatimustenmukaisuus */
#tietoturva .container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
#tietoturva .heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
#tietoturva .heading p {
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-muted);
  text-wrap: balance;
}
#tietoturva .card h3 {
  color: var(--ink);
}

/* Yhteydenotto */
#yhteydenotto {
  border-top: 1px solid var(--line);
}
#yhteydenotto .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
#yhteydenotto .text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
#yhteydenotto .actions {
  display: flex;
  flex-direction: column;
}
.people {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.person img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.person .name {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}
.person .role {
  color: var(--ink-muted);
}
.person .email {
  margin-top: 8px;
}

/* Footer */
.footer {
  padding: 32px var(--gutter);
}
.footer .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer .logo {
  height: 24px;
  width: auto;
  align-self: flex-start;
}
.footer .legal {
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-inverse-muted);
}

/* ==========================================================================
   Tabletti ≥ 720 px
   ========================================================================== */
@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  p {
    hyphens: manual;
  }

  .section {
    padding: 80px var(--gutter);
  }

  .hero {
    padding: 48px var(--gutter) 128px;
  }
  .hero .container {
    gap: 56px;
  }
  .hero .logo {
    height: 32px;
  }
  .hero h1 {
    font-size: 48px;
    line-height: 56px;
  }
  .hero .lead {
    font-size: 20px;
    line-height: 30px;
    max-width: 640px;
  }
  .hero .actions {
    flex-direction: row;
  }
  .hero nav {
    max-width: 320px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
  #yhteydenotto .actions {
    flex-direction: row;
  }
  #yhteydenotto .text {
    align-items: flex-start;
  }

  .footer .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  .footer .logo {
    align-self: auto;
  }
}

/* ==========================================================================
   Desktop ≥ 1024 px (taulu 1280 px)
   ========================================================================== */
@media (min-width: 1024px) {
  :root {
    --gutter: 64px;
  }

  .section {
    padding: 96px var(--gutter);
  }
  .lead {
    font-size: 20px;
    line-height: 30px;
  }
  .h2 {
    font-size: 32px;
    line-height: 40px;
  }

  /* 12 palstaa: teksti 1–5, sisältö 7–12 */
  #vieno-erp .container,
  #vakka .container,
  #yhteydenotto .container {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 32px;
  }

  /* Hero */
  .hero {
    padding: 48px var(--gutter) 160px;
  }
  .hero .container {
    gap: 72px;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 32px;
    align-items: end;
  }
  .hero .intro {
    grid-column: span 8;
    gap: 24px;
  }
  .hero h1 {
    font-size: 56px;
    line-height: 64px;
  }
  .hero nav {
    grid-column: 10 / span 3;
    max-width: none;
  }

  /* Numeroidut rivit */
  .rows li {
    gap: 20px;
  }
  .rows .num {
    min-width: 28px;
  }

  /* Vieno ERP */
  #vieno-erp {
    padding: 128px var(--gutter);
  }
  #vieno-erp .text {
    grid-column: span 5;
    gap: 16px;
  }
  #vieno-erp .h2 {
    font-size: 40px;
    line-height: 48px;
  }
  #vieno-erp .rows {
    grid-column: 7 / span 6;
  }
  #vieno-erp .rows li {
    padding: 24px 0;
    font-size: 20px;
    line-height: 32px;
  }

  /* Kortit */
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #sisalto .container {
    gap: 48px;
  }

  /* Vakka */
  #vakka .brand {
    grid-column: span 5;
    gap: 24px;
  }
  #vakka .details {
    grid-column: 7 / span 6;
    gap: 24px;
  }
  #vakka .logo {
    height: 44px;
  }
  #vakka .claim {
    font-size: 20px;
    line-height: 30px;
  }
  #vakka .rows {
    margin-top: 0;
  }
  #vakka .rows li {
    padding: 20px 0;
  }
  #vakka .more {
    padding-top: 0;
  }

  /* Tietoturva */
  #tietoturva .container {
    gap: 48px;
    align-items: center;
  }
  #tietoturva .heading {
    max-width: 720px;
  }

  /* Yhteydenotto */
  #yhteydenotto .text {
    grid-column: span 5;
  }
  #yhteydenotto .people {
    grid-column: 7 / span 6;
  }
  .person img {
    width: 112px;
    height: 112px;
  }
}
