/* Onnelin sivuston tyylit (goal 006, hyväksytty mallikuva v12): omat fontit, ei ulkoisia pyyntöjä. */

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/lexend-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/lexend-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/lexend-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-700-normal.woff2") format("woff2");
}

:root {
  --color-bg: #ffffff;
  --color-surface: #f3f6f2;
  --color-text: #1b2a24;
  --color-heading: #16241e;
  --color-muted: #3d4b45;
  --color-subtle: #4a5852;
  --color-link: #1e5a47;
  --color-link-hover: #123b2e;
  --color-accent: #1e5a47;
  --color-on-accent: #ffffff;
  --color-dark: #16241e;
  --color-on-dark: #d5e0da;
  --color-highlight: #f2c46d;
  --color-on-highlight: #3a2a05;
  --color-border: #e3e9e5;
  --color-border-strong: #c9d6ce;
  --color-photo: #dce6df;
  --color-focus: #b34700;
  --font-heading: "Lexend", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

html {
  font-size: 112.5%; /* 18 px when the browser default is 16 px; follows the user's own setting */
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0556rem; /* 19 px */
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--color-heading);
}

p {
  margin: 0;
}

a {
  color: var(--color-link);
}

a:hover {
  color: var(--color-link-hover);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.table-scroll:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  padding: 0.5rem 1rem;
}

.skip-link:focus {
  left: 1rem;
}

.wrap {
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: center;
}

.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 84px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav .link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

/* Buttons */

.button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 16px 34px;
  border: 2px solid var(--color-accent);
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--color-link-hover);
  border-color: var(--color-link-hover);
  color: var(--color-on-accent);
}

.button-header {
  min-height: 44px;
  padding: 12px 26px;
  font-size: inherit;
}

.button-secondary {
  padding: 16px 30px;
  background: var(--color-bg);
  border-color: var(--color-border-strong);
  color: var(--color-heading);
}

.button-secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-heading);
}

.button-start {
  align-self: flex-start;
}

.button-block {
  display: flex;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.link-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Homepage sections */

.hero {
  background: var(--color-surface);
  padding: 72px 0 88px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-title {
  font-size: 60px;
}

.pill {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-highlight);
  color: var(--color-on-highlight);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill-outline {
  background: var(--color-bg);
  border: 2px solid var(--color-border-strong);
  color: var(--color-text);
}

.lead-large {
  font-size: 22px;
  color: var(--color-muted);
}

.lead {
  font-size: 20px;
  color: var(--color-muted);
}

.checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  color: #2e3d36;
}

.checklist li {
  display: flex;
  gap: 8px;
  align-items: center;
}

.photo {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--color-photo);
}

.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo picture {
  display: block;
  height: 100%;
}

.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.ratio-1-1 {
  aspect-ratio: 1 / 1;
}

.ratio-16-10 {
  aspect-ratio: 16 / 10;
  border-radius: 24px;
}

.band {
  background: var(--color-accent);
  color: var(--color-on-accent);
  padding: 22px 0;
}

.band-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 18px;
}

.band-row strong {
  font-family: var(--font-heading);
}

.section {
  padding: 96px 0;
}

.section-after {
  padding: 0 0 96px;
}

.section-surface {
  background: var(--color-surface);
}

.section-dark {
  background: var(--color-dark);
  color: var(--color-on-accent);
}

.section-dark h2 {
  color: var(--color-on-accent);
}

.section-dark .lead {
  color: var(--color-on-dark);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}

.h2-large {
  font-size: 44px;
}

.h2-medium {
  font-size: 40px;
}

.stack-48,
.stack-32,
.stack-28,
.stack-22,
.stack-20 {
  display: flex;
  flex-direction: column;
}

.stack-48 {
  gap: 48px;
}

.stack-32 {
  gap: 32px;
}

.stack-28 {
  gap: 28px;
}

.stack-22 {
  gap: 22px;
}

.stack-20 {
  gap: 20px;
}

.narrow {
  max-width: 900px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 36px;
  border-radius: 24px;
  background: var(--color-surface);
}

.step h3 {
  font-size: 24px;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: var(--font-heading);
  font-weight: 700;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.tick {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--color-highlight);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border: 2px solid var(--color-border);
  border-radius: 20px;
}

.fact strong {
  font-family: var(--font-heading);
  font-size: 19px;
}

.link-highlight {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  color: var(--color-highlight);
  font-weight: 700;
}

.link-highlight:hover {
  color: #ffffff;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 40px;
  border-radius: 28px;
  background: var(--color-bg);
  color: var(--color-heading);
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.price-unit {
  font-size: 22px;
  font-weight: 600;
}

.price-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 0;
  font-size: 18px;
}

.price-list dt {
  color: var(--color-subtle);
}

.price-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.price-note {
  font-size: 16px;
  color: var(--color-subtle);
}

.faq {
  padding: 18px 0;
  border-bottom: 2px solid var(--color-border);
}

.faq summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 600;
  cursor: pointer;
}

.faq p {
  margin-top: 12px;
  color: var(--color-muted);
}

.order-card {
  box-sizing: border-box;
  padding: 56px;
  border-radius: 32px;
  background: var(--color-surface);
}

/* Other pages */

.page {
  padding-top: 48px;
  padding-bottom: 72px;
  max-width: 900px;
}

.page h1 {
  font-size: 40px;
  margin-bottom: 24px;
}

.page h2 {
  font-size: 26px;
  margin-top: 40px;
  margin-bottom: 12px;
}

.page p,
.page ul,
.page ol {
  margin-bottom: 16px;
}

.page li {
  margin-bottom: 6px;
}

/* Device documents (goal 009) */

.doc-version {
  color: var(--color-muted);
  font-size: 16px;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 16px;
}

.table-scroll table {
  min-width: 34rem;
  border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
  padding: 8px 10px;
  border: 1px solid var(--color-border-strong);
  text-align: left;
  vertical-align: top;
}

/* Footer */

.site-footer {
  background: var(--color-dark);
  color: var(--color-on-dark);
  padding: 48px 0;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  font-size: 17px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-logo {
  display: block;
  align-self: flex-start;
  height: 36px;
  width: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  align-items: flex-start;
}

.footer-links a,
.footer-links .link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #ffffff;
}

/* Consent banner (static/consent.js) */

.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--color-surface);
  color: var(--color-text);
  border-top: 2px solid var(--color-accent);
  padding: 1rem;
}

.consent-banner p {
  max-width: 42rem;
  margin: 0 auto 0.75rem;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 42rem;
  margin: 0 auto;
}

.consent-button {
  box-sizing: border-box;
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--color-accent);
  border-radius: 0.4rem;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Phones and narrow windows: the mockup's 860 px breakpoint */

@media (max-width: 860px) {
  .two,
  .three {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .nav .link {
    display: none;
  }

  .hero-title {
    font-size: 40px;
  }

  .wrap {
    padding: 0 18px;
  }

  .order-card {
    padding: 32px 22px;
  }

  .price-card {
    padding: 28px;
  }

  .price-amount {
    font-size: 48px;
  }
}

@media (max-width: 30rem) {
  .consent-button {
    flex: 1 1 100%;
  }
}
