:root {
  --green: #199560;
  --green-dark: #12703f;
  --green-pale: #e8f5ee;
  --ink: #1c2622;
  --ink-soft: #4b5a53;
  --bg: #ffffff;
  --bg-alt: #f4f8f6;
  --border: #dfe8e3;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 60, 40, 0.08);
  --max-width: 1120px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

body.automaatit-page {
  background: linear-gradient(180deg, #d9f0e3 0px, #eef7f2 380px, #ffffff 700px);
}

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

a {
  color: var(--green-dark);
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  grid-column: 2;
  justify-self: center;
}

.logo-link img {
  height: 44px;
  width: auto;
}

.nav-toggle {
  display: none;
}

nav.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  grid-column: 1;
  justify-self: start;
}

.header-phone {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--green-pale);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
  grid-column: 3;
  justify-self: end;
}

.header-phone:hover {
  background: #dcf1e6;
}

nav.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  color: var(--green-dark);
  border-color: var(--green);
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 8px;
}

.nav-item-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  gap: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 60;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-col {
  display: flex;
  flex-direction: column;
  min-width: 170px;
}

.nav-dropdown-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--bg-alt);
}

nav.main-nav .nav-dropdown-heading {
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.nav-dropdown-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--ink-soft);
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.15s ease;
}

.nav-dropdown-brand {
  margin-bottom: 8px;
}

.nav-dropdown-brand:last-child {
  margin-bottom: 0;
}

nav.main-nav .nav-dropdown-brand-link {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  padding: 6px 10px 2px;
}

nav.main-nav .nav-dropdown-brand a:not(.nav-dropdown-brand-link) {
  padding-left: 20px;
  font-size: 0.87rem;
}

nav.main-nav .nav-dropdown-menu a {
  display: block;
  border-bottom: none;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}

nav.main-nav .nav-dropdown-menu a:hover {
  background: var(--bg-alt);
  color: var(--green-dark);
  border-color: transparent;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: 0.2s;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  position: absolute;
}

.nav-toggle-label span::before {
  top: -8px;
}

.nav-toggle-label span::after {
  top: 8px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, color 0.15s, border-color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--green);
  color: var(--green-dark);
}

.btn-outline:hover {
  background: var(--green-pale);
}

.btn-light {
  background: #fff;
  color: var(--green-dark);
}

.btn-light:hover {
  background: var(--green-pale);
}

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

.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  padding: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 50, 34, 0.88) 0%, rgba(20, 90, 58, 0.72) 55%, rgba(25, 149, 96, 0.55) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 76px 24px 68px;
}

.hero-inner.small {
  padding: 34px 24px 30px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 0 0 18px;
  max-width: 700px;
  line-height: 1.15;
}

.hero h1.hero-statement {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.9;
  max-width: 700px;
  margin: 0 0 30px;
}

.hero p.lead {
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 0 30px;
  color: #eafaf1;
}

.hero .btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.hero-tag-list a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.hero-tag-list a:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.6);
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: #d4f5e3;
  margin-bottom: 14px;
}

/* ---------- Sections ---------- */

section {
  padding: 72px 0;
}

section.alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head.left {
  margin: 0 0 40px;
  text-align: left;
}

.section-head h1,
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 12px;
}

.section-head p {
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Feature / info grid ---------- */

.grid {
  display: grid;
  gap: 28px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.card ul {
  margin: 14px 0 0;
  padding-left: 1.2em;
  color: var(--ink-soft);
}

.card ul li {
  margin-bottom: 4px;
}

.coffee-row-wrap {
  position: relative;
  margin: 0 0 32px;
}

.coffee-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 20px calc(50% - 92px) 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.coffee-gallery::-webkit-scrollbar {
  display: none;
}

.coffee-item {
  display: flex;
  position: relative;
  flex: 0 0 200px;
  margin: 0 -8px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  scroll-snap-align: center;
  will-change: transform, filter, opacity;
}

.coffee-item img {
  height: 175px;
  width: auto;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.coffee-item:hover img {
  transform: translateY(-4px) scale(1.04);
  box-shadow: var(--shadow);
}

.coffee-item figcaption {
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.coffee-item figcaption strong {
  display: block;
  color: var(--green-dark);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}

.coffee-bg-section {
  position: relative;
  padding: 44px 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.coffee-bg-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 50, 34, 0.82);
  z-index: 0;
}

.coffee-bg-section > .container {
  position: relative;
  z-index: 1;
}

.coffee-bg-section .section-head h1,
.coffee-bg-section .section-head h2,
.coffee-bg-section .section-head p {
  color: #fff;
}

.coffee-bg-section .section-head p {
  color: #eafaf1;
}

.coffee-bg-section .coffee-item figcaption {
  color: #eafaf1;
}

.coffee-bg-section .coffee-item figcaption strong {
  color: #fff;
}

/* ---------- Split image/text ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.split img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split.reverse .split-media {
  order: 2;
}

.split h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin-top: 0;
}

.split p {
  color: var(--ink-soft);
}

/* ---------- Product cards (automaatit) ---------- */

.product-group {
  margin-bottom: 56px;
}

.product-group:last-child {
  margin-bottom: 0;
}

.product-group-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
  border-bottom: 2px solid var(--green-pale);
  padding-bottom: 12px;
}

.product-group-title h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--green-dark);
}

.product-group-bg-image {
  position: absolute;
  inset: -10px;
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  z-index: 0;
}

.product-group-title-bg {
  position: relative;
  overflow: hidden;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  padding: 64px 0;
  margin-bottom: 26px;
  border-bottom: none;
}

.product-group-title-bg h2 {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.product-group .product-card {
  position: relative;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-group .product-card.in-view {
  opacity: 1;
  border-color: var(--green);
  box-shadow: 0 6px 18px rgba(20, 60, 40, 0.08);
}

.product-group .product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease 0.15s;
}

.product-group .product-card.in-view::before,
.product-group .product-card:hover::before {
  transform: scaleX(1);
}

.product-group .product-card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: 0 16px 34px rgba(20, 60, 40, 0.14);
}

.product-card-img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}

/* Size-comparison stage: images within one brand group scale proportionally
   to real-world height and share a common ground line (bottom-aligned). */
.img-stage {
  width: 100%;
  height: 210px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 3px solid var(--border);
}

.img-stage img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.zoomable {
  cursor: zoom-in;
  transition: transform 0.15s;
}

.zoomable:hover {
  transform: scale(1.03);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 999;
  cursor: zoom-out;
  animation: lightbox-fade 0.15s ease;
}

.lightbox-overlay[hidden] {
  display: none;
}

@keyframes lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-frame {
  width: min(94vw, 1100px);
  height: min(90vh, 800px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  padding: 24px;
  cursor: default;
  overflow: hidden;
}

.lightbox-frame:has(#lightbox-img) {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#lightbox-img {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: auto;
  object-fit: contain;
}

#lightbox-caption {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

#lightbox-caption[hidden] {
  display: none;
}

.lightbox-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.lightbox-track::-webkit-scrollbar {
  display: none;
}

.lightbox-overlay img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
}

.lightbox-dots {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.lightbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-dot.active {
  background: #fff;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.product-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.product-card ul {
  margin: 0 0 10px;
  padding-left: 1.15em;
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex-grow: 1;
}

.product-card ul li {
  margin-bottom: 3px;
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.spec-chip {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 999px;
}

.brand-label {
  grid-column: 1 / -1;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-dark);
  margin: 6px 0 -6px;
}

.brand-label:not(:first-child) {
  margin-top: 4px;
}

.brand-row-wrap {
  grid-column: 1 / -1;
  position: relative;
}

.brand-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 0.5%, #000 99.5%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 0.5%, #000 99.5%, transparent);
}

.brand-row::-webkit-scrollbar {
  display: none;
}

.brand-row > .product-card {
  flex: 0 0 340px;
  min-width: 0;
  max-width: 340px;
  padding: 14px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

@media (max-width: 480px) {
  .brand-row > .product-card {
    flex: 0 0 calc(100vw - 64px);
    max-width: calc(100vw - 64px);
  }
}

.brand-row .product-card-img,
.brand-row .img-stage {
  height: 150px;
  margin-bottom: 8px;
}

.brand-row .product-card ul {
  font-size: 0.88rem;
  line-height: 1.45;
}

.row-scroll-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--green-dark);
  background: #fff;
  color: var(--green-dark);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 5;
  padding: 0;
}

.row-scroll-btn:hover {
  background: var(--green-dark);
  color: #fff;
}

.row-scroll-left {
  left: -14px;
}

.row-scroll-right {
  right: -14px;
}

@media (max-width: 640px) {
  /* Nuolinapit näytetään myös kosketusnäytöllä, jotta ensikertalainen
     kävijä huomaa rivin jatkuvan sivulle. Täytetty vihreä väri korostaa
     niitä (ei animaatiota, koska piilotus/näyttö togglaus vierityksen
     mukana laukaisi sen toistuvasti uudelleen). */
  .row-scroll-btn {
    top: 89px;
    width: 34px;
    height: 34px;
    background: var(--green);
    border-color: var(--green-dark);
    color: #fff;
    box-shadow: 0 2px 12px rgba(20, 60, 40, 0.35);
  }

  .row-scroll-btn:hover {
    background: var(--green-dark);
  }

  .row-scroll-left {
    left: -10px;
  }

  .row-scroll-right {
    right: -10px;
  }
}

.product-note {
  background: var(--green-pale);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--green-dark);
  font-weight: 600;
  margin-top: 24px;
}

/* ---------- Simple list section ---------- */

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Brand bar & card tags ---------- */

.brand-bar-section {
  padding: 16px 0;
}

@media (max-width: 640px) {
  .brand-bar-section {
    padding: 8px 0;
  }
}

.category-section {
  padding: 60px 0 16px;
}

.brand-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.brand-bar-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 100px;
  width: max-content;
  min-width: 100%;
  animation: brand-bar-scroll 34s linear infinite;
}

.brand-bar:hover .brand-bar-track {
  animation-play-state: paused;
}

@keyframes brand-bar-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.brand-bar-track a {
  display: flex;
  align-items: center;
}

.brand-bar-track img {
  height: 24px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.brand-bar-track a:hover img {
  opacity: 1;
}

.card-tag {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ---------- Category highlight tiles ---------- */

.category-highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.category-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(20, 60, 40, 0.22);
}

.category-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 40, 28, 0) 35%, rgba(10, 26, 18, 0.9) 100%);
  transition: background 0.2s ease;
}

.category-tile:hover .category-tile-overlay {
  background: linear-gradient(180deg, rgba(18, 40, 28, 0.05) 15%, rgba(10, 26, 18, 0.94) 100%);
}

.category-tile-label {
  position: relative;
  z-index: 1;
  padding: 28px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-tile-title {
  font-size: 1.6rem;
  font-weight: 800;
}

.category-tile-cta {
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0.9;
}

@media (max-width: 640px) {
  .category-highlight {
    grid-template-columns: 1fr;
  }

  .category-tile {
    height: 220px;
  }
}

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(120deg, var(--green-dark), var(--green));
  color: #fff;
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.cta-band p {
  margin: 0 0 26px;
  color: #eafaf1;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-band .btn-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  scroll-margin-top: 90px;
}

.contact-card h3 {
  margin: 0 0 4px;
  color: var(--green-dark);
}

.contact-card .role {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 14px;
}

.contact-card a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  margin-top: 4px;
}

.contact-card a:hover {
  color: var(--green-dark);
}

.address-block {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
}

.address-block h3 {
  margin-top: 0;
}

form.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-alt);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  background: #fff;
}

.form-row textarea {
  min-height: 130px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.checkbox-row input {
  margin-top: 4px;
}

.checkbox-sub {
  display: flex;
  gap: 20px;
  margin: 6px 0 18px 30px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 14px;
}

.form-success {
  padding: 24px;
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 10px;
  font-weight: 700;
  text-align: center;
}

form.quote-form {
  padding: 32px;
}

.quote-product-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 24px;
}

.quote-product-group h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--green-dark);
}

.quote-product-brand {
  margin-bottom: 14px;
}

.quote-product-brand:last-child {
  margin-bottom: 0;
}

.quote-product-brand h5 {
  margin: 0 0 2px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}

.quote-product-brand .quote-product-row {
  padding-left: 10px;
}

.quote-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
}

.quote-product-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.quote-product-row .quote-qty {
  width: 56px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: center;
}

.quote-product-row .quote-qty:disabled {
  background: var(--bg-alt);
  color: var(--ink-soft);
}

#quote-empty-msg {
  color: #b3261e;
  font-style: normal;
  font-weight: 600;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.map-embed iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
}

/* ---------- Footer ---------- */

footer.site-footer {
  background: #10241a;
  color: #cfe6da;
  padding: 56px 0 26px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-grid img {
  height: 40px;
  margin-bottom: 14px;
  filter: brightness(0) invert(1);
}

.footer-grid p {
  color: #a9c7b8;
  font-size: 0.92rem;
  max-width: 320px;
}

.footer-grid h4 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid ul li {
  margin-bottom: 10px;
}

.footer-grid a {
  color: #cfe6da;
  text-decoration: none;
  font-size: 0.94rem;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 0.85rem;
  color: #7fa392;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .grid-2,
  .grid-3,
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split .split-media {
    order: -1 !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .check-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .header-inner {
    display: flex;
  }

  .logo-link {
    justify-self: initial;
  }

  .nav-toggle-label {
    display: block;
    margin-left: auto;
  }

  .header-phone {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    justify-self: stretch;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 24px;
    gap: 16px;
    display: none;
    box-shadow: var(--shadow);
  }

  .nav-toggle:checked ~ nav.main-nav {
    display: flex;
  }

  .nav-item-dropdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    overflow-x: hidden;
  }

  .nav-dropdown-menu,
  .nav-item-dropdown:hover .nav-dropdown-menu,
  .nav-item-dropdown:focus-within .nav-dropdown-menu {
    display: block;
    position: static;
    border: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: 0;
  }

  .nav-dropdown-toggle {
    display: inline-flex;
  }

  .nav-dropdown-col .nav-dropdown-brand {
    display: none;
  }

  .nav-dropdown-col.is-open .nav-dropdown-brand {
    display: block;
    padding-left: 16px;
    border-left: 2px solid var(--bg-alt);
    margin-left: 2px;
  }

  .nav-dropdown-col.is-open .nav-dropdown-toggle {
    transform: rotate(90deg);
  }

  nav.main-nav .nav-dropdown-menu a {
    padding: 6px 0;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--ink-soft);
  }

  nav.main-nav .nav-dropdown-brand-link {
    padding: 8px 0 2px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--green-dark);
  }

  nav.main-nav .nav-dropdown-brand a:not(.nav-dropdown-brand-link) {
    padding-left: 14px;
  }

  .automaatit-intro {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Automaatit: jump nav + filter bar ---------- */

.filter-bar-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 9px 0;
}

.automaatit-intro {
  max-width: 100%;
  margin: 28px 0 4px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.jump-nav-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 4px;
  padding: 0 24px;
}

section:has(#kuumajuoma-automaatit) {
  padding-top: 0;
  padding-bottom: 32px;
}

section:has(#quote-form) {
  padding-top: 24px;
}

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter-toggle-btn:hover {
  background: var(--bg-alt);
  border-color: var(--green);
}

.filter-toggle-btn.active {
  background: var(--green);
  color: #fff;
}

.filter-toggle-icon {
  flex-shrink: 0;
}

.filter-reset {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  flex-shrink: 0;
}

.filter-panel {
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.filter-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 6px;
  column-gap: 28px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding-right: 28px;
  border-right: 1px solid var(--border);
}

.filter-group:last-child {
  padding-right: 0;
  border-right: none;
}

.filter-label {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-right: 2px;
}

.filter-group label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.87rem;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.filter-group input[type="number"] {
  width: 68px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
}

.filter-group input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.filter-group input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.filter-group label:has(input:disabled) {
  color: var(--ink-soft);
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-reset {
  padding: 8px 16px;
  font-size: 0.82rem;
  align-self: flex-start;
  margin-top: 2px;
}

.filter-empty-msg {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-style: italic;
}

.product-group,
.product-card {
  scroll-margin-top: 202px;
}

@media (max-width: 860px) {
  .filter-bar-wrap {
    padding: 8px 0;
  }

  .filter-toggle-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .product-group,
  .product-card {
    scroll-margin-top: 118px;
  }
}

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 30px rgba(20, 60, 40, 0.12);
  padding: 20px 24px;
}

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  flex: 1 1 380px;
}

.cookie-banner a {
  color: var(--green-dark);
  font-weight: 600;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .cookie-banner {
    padding: 16px 20px;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.footer-legal {
  margin-top: 8px;
  font-size: 0.85rem;
}

.footer-legal a {
  color: inherit;
  text-decoration: underline;
}

.footer-legal .sep {
  margin: 0 8px;
  opacity: 0.5;
}
