/* Saarela Experience v2 — päätyylit */

/* WP-admin-palkki pois julkiselta sivulta */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
body.admin-bar { margin-top: 0 !important; padding-top: 0 !important; }
body.admin-bar .sx-header { top: 0 !important; }

:root {
  --sx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sx-header-h: 4.75rem;
  --sx-max: 1180px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.saarela-theme {
  margin: 0;
  background: var(--wp--preset--color--cream);
  color: var(--wp--preset--color--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* WP block-teeman oletusvälit pois */
body.saarela-theme .wp-site-blocks {
  padding: 0;
  margin: 0;
}
body.saarela-theme .wp-block-html {
  margin: 0;
  max-width: 100%;
}
body.sx-front-page .wp-block-html,
body.sx-front-page .wp-site-blocks {
  overflow-x: clip;
  max-width: 100%;
}
body.saarela-theme header.wp-block-template-part {
  margin: 0 !important;
  padding: 0 !important;
  height: 0;
  min-height: 0;
  overflow: visible;
  border: 0;
  background: transparent !important;
}

/* ===== HEADER ===== */
.sx-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--sx-header-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--sx-ease), box-shadow 0.4s var(--sx-ease), height 0.4s var(--sx-ease);
}
body.sx-front-page .sx-header,
body.is-scrolled .sx-header,
body:not(.sx-front-page) .sx-header {
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(26, 24, 20, 0.08);
}
body.is-scrolled .sx-header,
body:not(.sx-front-page) .sx-header {
  --sx-header-h: 3.75rem;
}
.sx-header__inner {
  width: min(var(--sx-max), 100% - 2rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sx-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.sx-brand__mark {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: var(--wp--preset--color--copper);
  color: #fff;
  box-shadow: 0 8px 20px rgba(198, 123, 74, 0.35);
}
.sx-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sx-brand__text strong {
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.92rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-brand__text small {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(250, 247, 242, 0.75);
  letter-spacing: 0.04em;
}
body.is-scrolled .sx-brand__text small,
body:not(.sx-front-page) .sx-brand__text small {
  color: var(--wp--preset--color--muted);
}
body.sx-front-page:not(.is-scrolled) .sx-brand__text small {
  color: var(--wp--preset--color--muted);
}
.sx-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.sx-nav a {
  text-decoration: none;
  color: var(--wp--preset--color--ink);
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  transition: background 0.25s var(--sx-ease), color 0.25s var(--sx-ease);
}
.sx-nav a:hover,
.sx-nav a.is-active {
  background: rgba(198, 123, 74, 0.15);
  color: var(--wp--preset--color--copper-dark);
}
.sx-nav-cta {
  background: var(--wp--preset--color--copper) !important;
  color: #fff !important;
  margin-left: 0.35rem;
}
.sx-nav-cta:hover {
  background: var(--wp--preset--color--copper-dark) !important;
  color: #fff !important;
}
.sx-menu-btn {
  display: none;
  border: 0;
  background: transparent;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
}
.sx-menu-btn span {
  display: block;
  height: 2px;
  background: var(--wp--preset--color--ink);
  margin: 6px 0;
  transition: transform 0.3s var(--sx-ease), opacity 0.3s;
}
body.sx-menu-open .sx-menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.sx-menu-open .sx-menu-btn span:nth-child(2) { opacity: 0; }
body.sx-menu-open .sx-menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 980px) {
  .sx-menu-btn { display: block; }
  .sx-nav {
    position: fixed;
    inset: var(--sx-header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(12px);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--sx-ease), opacity 0.3s;
  }
  body.sx-menu-open .sx-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .sx-nav a {
    padding: 0.85rem 1rem;
    font-size: 1rem;
    color: var(--wp--preset--color--ink) !important;
  }
  .sx-brand__text strong { font-size: 0.82rem; }
}

/* ===== CINEMATIC HERO ===== */
.sx-hero--cinematic {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #faf7f2;
  overflow: hidden;
}
.sx-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.sx-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 0.1s linear;
}
.sx-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 24, 20, 0.55) 0%, rgba(26, 24, 20, 0.25) 35%, rgba(26, 24, 20, 0.82) 100%),
    linear-gradient(90deg, rgba(26, 24, 20, 0.75) 0%, transparent 55%);
}
.sx-hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: overlay;
}
.sx-hero__inner {
  position: relative;
  z-index: 2;
  width: min(var(--sx-max), 100% - 2.5rem);
  margin: 0 auto;
  padding: calc(var(--sx-header-h) + 3rem) 0 2rem;
}
.sx-hero__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e8c4a8;
  margin-bottom: 1rem;
  opacity: 0;
  animation: sx-fade-up 0.8s var(--sx-ease) 0.1s forwards;
}
.sx-hero__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--hero);
  line-height: 1.02;
  margin: 0 0 1rem;
  max-width: 14ch;
  opacity: 0;
  animation: sx-fade-up 0.9s var(--sx-ease) 0.22s forwards;
}
.sx-hero__lead {
  font-size: clamp(1rem, 2vw, 1.22rem);
  max-width: 38rem;
  color: rgba(250, 247, 242, 0.9);
  margin-bottom: 2rem;
  opacity: 0;
  animation: sx-fade-up 0.9s var(--sx-ease) 0.38s forwards;
}
.sx-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  animation: sx-fade-up 0.9s var(--sx-ease) 0.52s forwards;
}
.sx-hero__brands {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.75rem;
  opacity: 0;
  animation: sx-fade-up 0.9s var(--sx-ease) 0.58s forwards;
}
.sx-hero__brand {
  position: relative;
  display: block;
  min-height: 9.5rem;
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: #faf7f2;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.sx-hero__brand--saarela { cursor: default; }
.sx-hero__brand--softworks {
  transition: transform 0.35s var(--sx-ease), box-shadow 0.35s var(--sx-ease);
}
.sx-hero__brand--softworks:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
}
.sx-hero__brand-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.sx-hero__brand--softworks .sx-hero__brand-bg {
  object-fit: cover;
  object-position: top center;
}
.sx-hero__brand-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 24, 20, 0.15) 0%, rgba(26, 24, 20, 0.88) 100%);
}
.sx-hero__brand--softworks .sx-hero__brand-overlay {
  background: linear-gradient(180deg, rgba(16, 24, 20, 0.1) 0%, rgba(16, 24, 20, 0.9) 100%);
}
.sx-hero__brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 9.5rem;
  padding: 1rem 1.1rem;
}
.sx-hero__brand-content strong {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  line-height: 1.15;
  margin-bottom: 0.25rem;
}
.sx-hero__brand-content span {
  font-size: 0.78rem;
  color: rgba(250, 247, 242, 0.82);
}
.sx-hero__brand--softworks .sx-hero__brand-content strong { color: #b8e4cc; }
@media (max-width: 700px) {
  .sx-hero__brands { grid-template-columns: 1fr; }
}
.sx-hero__stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  opacity: 0;
  animation: sx-fade-up 1s var(--sx-ease) 0.65s forwards;
}
.sx-hero__stat {
  padding: 1.25rem 1.5rem;
  background: rgba(26, 24, 20, 0.45);
  text-align: center;
}
.sx-hero__stat strong {
  display: block;
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #e8c4a8;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.sx-hero__stat span {
  font-size: 0.82rem;
  color: rgba(250, 247, 242, 0.75);
}
.sx-scroll-hint {
  position: absolute;
  right: 2rem;
  bottom: 6.5rem;
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: sx-fade-up 1s var(--sx-ease) 0.8s forwards;
}
.sx-scroll-hint::after {
  content: '';
  width: 1px;
  height: 2.5rem;
  background: currentColor;
  animation: sx-pulse-line 2s ease infinite;
}

@media (max-width: 700px) {
  .sx-hero__stats { grid-template-columns: 1fr; }
  .sx-hero__stat { text-align: left; padding: 1rem 1.25rem; }
  .sx-scroll-hint { display: none; }
  .sx-hero__title { max-width: none; }
}

/* ===== BUTTONS ===== */
.sx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--sx-ease), box-shadow 0.25s;
}
.sx-btn--primary {
  background: var(--wp--preset--color--copper);
  color: #fff;
  box-shadow: 0 12px 32px rgba(198, 123, 74, 0.35);
}
.sx-btn--primary:hover { transform: translateY(-2px); }
.sx-btn--ghost {
  background: transparent;
  color: #faf7f2;
  border: 1px solid rgba(250, 247, 242, 0.35);
}
.sx-section--ink .sx-btn--ghost,
.sx-section--stone .sx-btn--ghost {
  color: var(--wp--preset--color--ink);
  border-color: rgba(26, 24, 20, 0.2);
}

@keyframes sx-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes sx-pulse-line {
  0%, 100% { transform: scaleY(0.6); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ===== REVEAL ===== */
.sx-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s var(--sx-ease), transform 0.75s var(--sx-ease);
}
.sx-reveal.is-visible {
  opacity: 1;
  transform: none;
}
.sx-reveal--delay-1 { transition-delay: 0.1s; }
.sx-reveal--delay-2 { transition-delay: 0.2s; }
.sx-reveal--delay-3 { transition-delay: 0.3s; }

/* ===== TRUST ===== */
.sx-trust {
  padding: 2.5rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid rgba(26, 24, 20, 0.06);
  margin-top: -1px;
}
.sx-trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.sx-trust__item h3 {
  font-family: var(--wp--preset--font-family--display);
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.sx-trust__item p {
  margin: 0;
  color: var(--wp--preset--color--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.sx-trust__icon {
  display: inline-block;
  font-family: var(--wp--preset--font-family--display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wp--preset--color--copper);
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
}

@media (max-width: 800px) {
  .sx-trust__grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ===== SECTIONS ===== */
.sx-section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 1.25rem;
}
.sx-section--stone { background: var(--wp--preset--color--stone); }
.sx-section--ink {
  background: var(--wp--preset--color--ink);
  color: #faf7f2;
}
.sx-wrap {
  width: min(var(--sx-max), 100%);
  margin: 0 auto;
}
.sx-section__label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wp--preset--color--copper);
  margin-bottom: 0.75rem;
}
.sx-section--ink .sx-section__label { color: #e8c4a8; }
.sx-section__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--xl);
  margin: 0 0 1rem;
  max-width: 18ch;
}
.sx-section__lead {
  font-size: 1.1rem;
  color: var(--wp--preset--color--muted);
  max-width: 52ch;
  margin-bottom: 2.5rem;
}
.sx-section--ink .sx-section__lead { color: rgba(250, 247, 242, 0.75); }
.sx-section--ink h2,
.sx-section--ink h3 { color: #faf7f2; }

/* Marquee */
.sx-marquee {
  overflow: hidden;
  border-block: 1px solid rgba(26, 24, 20, 0.08);
  background: var(--wp--preset--color--ink);
  padding: 0.9rem 0;
}
.sx-marquee__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: sx-marquee 32s linear infinite;
}
.sx-marquee__track span {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.55);
  white-space: nowrap;
}
@keyframes sx-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .sx-marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

/* Cards */
.sx-cards {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  min-width: 0;
}
.sx-card {
  grid-column: span 4;
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(26, 24, 20, 0.06);
  transition: transform 0.4s var(--sx-ease), box-shadow 0.4s var(--sx-ease);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
}
.sx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(198, 123, 74, 0.12), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
  z-index: 1;
}
.sx-card:hover::before { opacity: 1; }
.sx-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 56px rgba(26, 24, 20, 0.14);
}
.sx-card--featured {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
}
.sx-card:not(.sx-card--featured) {
  grid-column: span 3;
}
.sx-card__media {
  aspect-ratio: 4/3;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #e7e0d6, #d4cbc0);
}
.sx-card--featured .sx-card__media {
  aspect-ratio: 16 / 10;
  min-height: 0;
  max-height: 420px;
}
.sx-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s var(--sx-ease);
}
.sx-card:hover .sx-card__media img { transform: scale(1.04); }
.sx-card__body {
  padding: 1.35rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 2;
}
.sx-card__body h3 {
  font-family: var(--wp--preset--font-family--display);
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.sx-card__body p {
  margin: 0 0 1rem;
  color: var(--wp--preset--color--muted);
  font-size: 0.95rem;
  flex: 1;
}
.sx-card__link {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--wp--preset--color--copper-dark);
}

@media (max-width: 900px) {
  .sx-card, .sx-card--featured, .sx-card:not(.sx-card--featured) { grid-column: span 12; }
  .sx-card--featured { grid-template-columns: 1fr; }
}

/* Showcase — keskitetty flex, ei vuotoa reunoille eikä päällekkäisyyttä */
.sx-showcase {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  width: min(var(--sx-max), calc(100% - 2rem));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  box-sizing: border-box;
}
.sx-showcase > * {
  flex: 1 1 50%;
  width: 50%;
  max-width: 50%;
  min-width: 0;
}
.sx-showcase.sx-section--stone {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: max(1rem, calc(50% - var(--sx-max) / 2));
  box-sizing: border-box;
}
.sx-showcase__media {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  min-width: 0;
  isolation: isolate;
  border-radius: 1rem;
}
.sx-showcase__media--video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 0;
  height: auto;
}
.sx-showcase__media:not(.sx-showcase__media--duo):not(.sx-showcase__media--video) > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}
.sx-showcase__video {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  transform: none;
}
.sx-showcase__mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26,24,20,0.2), transparent 50%);
  pointer-events: none;
}
.sx-showcase__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
  min-width: 0;
  position: relative;
  z-index: 1;
}
.sx-showcase__copy h2 {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--xl);
  margin: 0 0 1rem;
  max-width: 16ch;
}
.sx-showcase--flip .sx-showcase__media { order: 2; }
.sx-showcase--flip .sx-showcase__copy { order: 1; }

.sx-showcase__media--duo {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.35rem;
  padding: 0.35rem;
  background: rgba(26, 24, 20, 0.04);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  align-content: stretch;
}
.sx-showcase__media--duo img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0.35rem;
  transform: none;
}
.sx-showcase__media--duo .sx-showcase__img-main {
  grid-row: span 2;
  min-height: 0;
}
.sx-showcase__media--duo .sx-showcase__img-side {
  min-height: 0;
}
.sx-showcase__media--duo .sx-showcase__mask {
  background: linear-gradient(180deg, transparent 60%, rgba(26,24,20,0.15));
}

/* Gallery */
.sx-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.sx-gallery__item {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #e7e0d6, #d4cbc0);
}
.sx-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s var(--sx-ease);
}
.sx-gallery__item:hover img { transform: scale(1.04); }
.sx-gallery__item figcaption {
  position: absolute;
  left: 0.75rem;
  bottom: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(26, 24, 20, 0.72);
  color: #faf7f2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sx-gallery__item--wide {
  grid-column: span 2;
  grid-row: span 2;
}
.sx-gallery__item--tall {
  grid-row: span 2;
}

@media (max-width: 860px) {
  .sx-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
  .sx-gallery__item--wide { grid-column: span 2; }
}
@media (max-width: 520px) {
  .sx-gallery { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .sx-gallery__item--wide, .sx-gallery__item--tall { grid-column: span 1; grid-row: span 1; }
  .sx-showcase__media--duo { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sx-showcase, .sx-showcase--flip {
    flex-direction: column;
    width: min(var(--sx-max), calc(100% - 2rem));
    margin-inline: auto;
    padding-inline: 0;
  }
  .sx-showcase > *,
  .sx-showcase__media,
  .sx-showcase__copy {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }
  .sx-showcase.sx-section--stone {
    width: 100%;
    padding-inline: max(1rem, calc(50% - var(--sx-max) / 2));
  }
  .sx-showcase__media, .sx-showcase--flip .sx-showcase__media { order: -1; }
}

/* Process */
.sx-process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.sx-process__step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  background: #fff;
  border-radius: 1rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(26, 24, 20, 0.06);
  transition: transform 0.35s var(--sx-ease), box-shadow 0.35s;
}
.sx-process__step:hover {
  transform: translateX(6px);
  box-shadow: 0 12px 32px rgba(26, 24, 20, 0.08);
}
.sx-process__num {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  background: var(--wp--preset--color--copper);
  color: #fff;
  flex-shrink: 0;
}
.sx-process__step h3 {
  font-family: var(--wp--preset--font-family--display);
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}
.sx-process__step p {
  margin: 0;
  color: var(--wp--preset--color--muted);
  font-size: 0.95rem;
}

/* Stats */
.sx-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.sx-stat strong {
  display: block;
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--wp--preset--color--copper);
  line-height: 1;
}
.sx-section--ink .sx-stat strong { color: #e8c4a8; }
.sx-stat span { font-size: 0.9rem; color: var(--wp--preset--color--muted); }
.sx-section--ink .sx-stat span { color: rgba(250, 247, 242, 0.7); }

@media (max-width: 600px) {
  .sx-stats { grid-template-columns: 1fr; }
}

/* Team */
.sx-team {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.sx-person {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.25rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.sx-person__photo {
  aspect-ratio: 1;
  border-radius: 0.75rem;
  overflow: hidden;
  background: linear-gradient(145deg, #3d342c, #2a241e);
}
.sx-person__photo img { width: 100%; height: 100%; object-fit: cover; }
.sx-person h3 {
  font-family: var(--wp--preset--font-family--display);
  margin: 0 0 0.35rem;
}
.sx-person p { margin: 0; color: rgba(250, 247, 242, 0.75); font-size: 0.92rem; }

@media (max-width: 700px) {
  .sx-team { grid-template-columns: 1fr; }
  .sx-person { grid-template-columns: 88px 1fr; }
}

/* CTA */
.sx-cta {
  text-align: center;
  padding: clamp(3.5rem, 8vw, 5.5rem) 1.25rem;
  background: var(--wp--preset--gradient--copper-shine);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.sx-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15), transparent 50%);
  pointer-events: none;
}
.sx-cta h2 {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--xl);
  margin: 0 0 1rem;
  position: relative;
}
.sx-cta p { margin: 0 0 1.5rem; opacity: 0.92; position: relative; }
.sx-cta .sx-btn { position: relative; }

/* Footer */
.sx-footer {
  background: var(--wp--preset--color--ink);
  color: rgba(250, 247, 242, 0.75);
  padding: 2.5rem 1.25rem;
  font-size: 0.9rem;
}
.sx-footer__grid {
  width: min(var(--sx-max), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
.sx-footer a { color: #e8c4a8; text-decoration: none; }
.sx-footer a:hover { text-decoration: underline; }
.sx-footer__legal {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.82rem;
}

@media (max-width: 700px) {
  .sx-footer__grid { grid-template-columns: 1fr; }
}

/* Inner page */
.sx-page-hero {
  padding: calc(var(--sx-header-h) + 3rem) 1.25rem 3rem;
  background: var(--wp--preset--color--stone);
}
.sx-page-hero h1 {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--xxl);
  margin: 0;
  max-width: 16ch;
}
.sx-content {
  width: min(720px, 100% - 2.5rem);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}
.sx-content img, .sx-content video { border-radius: 1rem; max-width: 100%; }

main { padding-top: 0; }

/* ===== ERP / RPS Portaali ===== */
.sx-erp-teaser {
  background: linear-gradient(135deg, #14120f 0%, #1f2a24 55%, #1a1814 100%);
  color: #faf7f2;
}
.sx-erp-teaser .sx-section__label { color: #8ec4a8; }
.sx-erp-teaser .sx-section__lead { color: rgba(250, 247, 242, 0.82); }
.sx-erp-teaser h2 {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--xl);
  margin: 0 0 1rem;
  max-width: 16ch;
}
.sx-btn--dark {
  color: #faf7f2 !important;
  border-color: rgba(250, 247, 242, 0.35) !important;
}
.sx-erp-credit-line {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  color: var(--wp--preset--color--muted);
}
.sx-erp-credit-line strong { color: var(--wp--preset--color--copper); }
.sx-erp-teaser .sx-erp-credit-line { color: rgba(250, 247, 242, 0.7); }
.sx-erp-teaser .sx-erp-credit-line strong { color: #8ec4a8; }

.sx-erp-hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 72vh;
  padding-top: var(--sx-header-h);
  background: linear-gradient(135deg, #101816 0%, #1a1814 100%);
  color: #faf7f2;
}
.sx-erp-hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 1.25rem;
}
.sx-erp-hero h1 {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--hero);
  line-height: 1.02;
  margin: 0 0 1rem;
  max-width: 12ch;
}
.sx-erp-hero__lead {
  font-size: 1.12rem;
  max-width: 40ch;
  color: rgba(250, 247, 242, 0.88);
  margin-bottom: 1rem;
}
.sx-erp-credit-line--hero strong { color: #8ec4a8; }
.sx-erp-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 2rem 1.25rem 2rem 0;
  overflow: visible;
}
.sx-erp-hero__visual img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(68vh, 600px);
  object-fit: contain;
  object-position: center center;
  border-radius: 0.75rem;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.35);
}
.sx-showcase__media--erp {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141816;
  min-height: 280px;
}
.sx-showcase__media--erp img {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}
.sx-erp-teaser .sx-showcase__mask { display: none; }

.sx-erp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.sx-erp-feature {
  background: #fff;
  border: 1px solid rgba(26, 24, 20, 0.06);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
}
.sx-erp-feature h3 {
  font-family: var(--wp--preset--font-family--display);
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.sx-erp-feature p {
  margin: 0;
  color: var(--wp--preset--color--muted);
  font-size: 0.95rem;
}

.sx-erp-apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.sx-erp-app {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.35rem;
}
.sx-erp-app h3 {
  font-family: var(--wp--preset--font-family--display);
  margin: 0 0 0.5rem;
}
.sx-erp-app p {
  margin: 0 0 1rem;
  color: rgba(250, 247, 242, 0.78);
  font-size: 0.95rem;
}
.sx-erp-app a {
  color: #8ec4a8;
  font-weight: 700;
  text-decoration: none;
}
.sx-erp-app a:hover { text-decoration: underline; }

.sx-erp-softworks {
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem;
  background: var(--wp--preset--color--stone);
  border-block: 1px solid rgba(26, 24, 20, 0.08);
}
.sx-erp-softworks__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.sx-erp-softworks__badge {
  width: 7rem;
  height: 7rem;
  border-radius: 1.25rem;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.15;
  color: #fff;
  background: linear-gradient(145deg, #2d5a47, #1a1814);
  box-shadow: 0 16px 40px rgba(26, 24, 20, 0.15);
}

@media (max-width: 900px) {
  .sx-erp-hero { grid-template-columns: 1fr; }
  .sx-erp-hero__visual { order: -1; min-height: 220px; }
  .sx-erp-features, .sx-erp-apps { grid-template-columns: 1fr; }
  .sx-erp-softworks__inner { grid-template-columns: 1fr; }
  .sx-erp-softworks__badge { width: 5.5rem; height: 5.5rem; font-size: 0.8rem; }
}
