/* Saranco – yhteinen tyylitiedosto */

:root {
  --orange: #e8730c;
  --orange-dark: #c25f06;
  --ink: #1d232b;
  --ink-soft: #3c4650;
  --muted: #6b7682;
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --line: #e1e4e8;
  --dark: #181d23;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 28, 38, 0.08);
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--orange-dark); }
a:hover { color: var(--orange); }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--orange);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--dark);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand { display: flex; align-items: center; gap: 18px; }
.brand img { height: 34px; width: auto; }

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

.nav a {
  color: #e9edf1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav a[aria-current="page"] { color: var(--orange); }

.menu-btn {
  display: none;
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  position: relative;
  content: "";
  transition: transform 0.2s, top 0.2s;
}
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--dark);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 20px 20px;
    gap: 0;
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid rgba(255, 255, 255, 0.07); border-radius: 0; }
}

/* Alavalikko */

.dropdown { position: relative; display: flex; align-items: center; }
.dropdown > .drop-link { padding-right: 6px; }

.drop-toggle {
  width: 28px;
  height: 36px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: #e9edf1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.drop-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}
.drop-toggle:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.dropdown.open .drop-toggle::after { transform: rotate(225deg) translateY(-2px); }

.submenu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 60;
}
.submenu a { display: block; white-space: nowrap; }

.dropdown.open .submenu { display: block; }

/* Työpöytä: alavalikko aukeaa kursorin mennessä päälle (ja näppäimistöllä) */
@media (hover: hover) and (min-width: 861px) {
  .dropdown:hover .submenu { display: block; }
}
@media (min-width: 861px) {
  .dropdown:has(:focus-visible) .submenu { display: block; }
}

/* Mobiili: Tuotteet-linkki vie sivulle, nuoli avaa alavalikon */
@media (max-width: 860px) {
  .dropdown { flex-wrap: wrap; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
  .dropdown > .drop-link { flex: 1; border-bottom: 0; padding-right: 8px; }
  .drop-toggle { width: 52px; height: 52px; }
  .submenu { position: static; flex-basis: 100%; background: none; border: 0; box-shadow: none; padding: 0 0 8px 16px; }
  .submenu a { font-size: 1rem; border-bottom: 0; padding: 12px 8px; }
}

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

.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(232, 115, 12, 0.35), transparent 60%),
    linear-gradient(135deg, #1b222b 0%, #11161c 100%);
  color: #d5dbe2;
  padding: clamp(56px, 10vw, 112px) 0;
}

.hero h1 { color: #fff; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 46ch; color: #c3ccd6; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.page-hero { padding: clamp(40px, 7vw, 72px) 0; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: none; margin-bottom: 0.2em; }
.page-hero p.lead { margin: 0; }

/* Etusivun pääkuva (peilattu, jotta teksti jää tummalle puolelle) */

.hero-photo { position: relative; overflow: hidden; isolation: isolate; }
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("img/paakuva.jpg") center / cover no-repeat;
  transform: scaleX(-1);
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 320px at 90% 0%, rgba(232, 115, 12, 0.28), transparent 65%),
    linear-gradient(90deg, rgba(17, 22, 28, 0.92) 0%, rgba(17, 22, 28, 0.7) 45%, rgba(17, 22, 28, 0.25) 100%);
}
@media (max-width: 720px) {
  .hero-photo::after { background: linear-gradient(180deg, rgba(17, 22, 28, 0.88), rgba(17, 22, 28, 0.7)); }
}

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

.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 10px;
  border: 2px solid var(--orange);
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; transform: translateY(-1px); }

.btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

.btn.outline { background: transparent; color: var(--orange-dark); }
.btn.outline:hover { background: var(--orange); color: #fff; }

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

section { padding: clamp(48px, 8vw, 88px) 0; }
section.alt { background: var(--bg-alt); }

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

.section-head { max-width: 62ch; margin-bottom: 36px; }

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: -44px;
  position: relative;
  z-index: 2;
}
.stat {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  border-top: 4px solid var(--orange);
}
.stat strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--ink); margin-bottom: 6px; }
.stat span { color: var(--muted); font-size: 0.97rem; }

.stats-section { padding: 0; }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; margin-top: -28px; }
}

/* Split blocks */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.split.reverse > :first-child { order: 2; }

.split img.photo {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}

/* Cards */

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-alt);
}

.card-body { padding: 22px 24px 26px; }
.card-body .eyebrow { margin-bottom: 4px; font-size: 0.75rem; }
.card-body h2, .card-body h3 { font-size: 1.3rem; margin-bottom: 0.4em; }
.card-body p { margin: 0; font-size: 1rem; }

/* Feature list */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.feature {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 28px 26px;
}
.feature .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(232, 115, 12, 0.12);
  color: var(--orange-dark);
  font-weight: 800;
  margin-bottom: 14px;
}
.feature h3 { margin-bottom: 0.4em; }
.feature p { margin: 0; }

/* Callout */

.callout {
  background: linear-gradient(135deg, var(--orange) 0%, #f08f2e 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.callout h2 { color: #fff; margin: 0; }
.callout p { margin: 6px 0 0; color: rgba(255, 255, 255, 0.92); }
.callout .btn { background: #fff; color: var(--orange-dark); border-color: #fff; }
.callout .btn:hover { background: var(--dark); border-color: var(--dark); color: #fff; }

/* Subnav (anchor tabs) */

.subnav { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.subnav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}
.subnav a:hover { border-color: var(--orange); color: var(--orange); }

section[id], article[id] { scroll-margin-top: 90px; }

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.contact-card h3 { margin-bottom: 0.2em; }
.contact-card .role { color: var(--muted); margin-bottom: 14px; display: block; }
.contact-card p { margin: 0 0 6px; }
.contact-card a { word-break: break-word; }
.wa { display: inline-block; margin-top: 10px; font-weight: 700; }

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

.site-footer {
  background: var(--dark);
  color: #aeb8c3;
  padding: 56px 0 28px;
  font-size: 0.98rem;
}
.site-footer a { color: #e9edf1; text-decoration: none; }
.site-footer a:hover { color: var(--orange); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr;
  gap: 36px;
}
.footer-grid img { height: 38px; width: auto; margin-bottom: 16px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 0.7em; }
.footer-grid p { margin: 0 0 12px; }
.footer-people { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .footer-people { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Tekniset tiedot */

.specs { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 24px; }
.specs div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }

.note { margin-top: 24px; color: var(--muted); font-size: 0.92rem; }

/* Tuotteet-pääsivu */

.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-link { text-decoration: none; color: inherit; }
.card-link h2 { color: var(--ink); }
.card-link .more { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--orange-dark); }
.card-link:hover .more { color: var(--orange); }

/* Kuvateksti */

.figure { margin: 0; }
.figure img.photo { max-height: 520px; object-fit: cover; object-position: center; }
.figure figcaption { margin-top: 10px; font-size: 0.92rem; color: var(--muted); }

/* Video */

.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Flex-mat-sivun pääkuva (ei peilausta) */

.hero-flexmat::before {
  background-image: url("img/flexmat-paakuva.jpg");
  background-position: center 62%;
  transform: none;
}
.hero-flexmat::after {
  background:
    linear-gradient(90deg, rgba(17, 22, 28, 0.9) 0%, rgba(17, 22, 28, 0.72) 50%, rgba(17, 22, 28, 0.45) 100%);
}
.hero-flexmat { padding: clamp(56px, 9vw, 104px) 0; }

.figures { display: grid; gap: 20px; }
.figures img.photo { aspect-ratio: 4 / 3; max-height: none; object-fit: cover; }

/* Reunaton kuvaosio (etusivun Flex-Mat) */

section.bleed { padding: 0; overflow: hidden; }
.bleed-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.bleed-text {
  padding: clamp(48px, 8vw, 96px) clamp(24px, 4vw, 64px) clamp(48px, 8vw, 96px) max(20px, calc((100vw - var(--max)) / 2 + 20px));
  align-self: center;
}
.bleed-img { position: relative; min-height: 420px; }
.bleed-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 50%;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 820px) {
  .bleed-grid { grid-template-columns: 1fr; }
  .bleed-text { padding: 48px 20px; }
  .bleed-img { min-height: 0; aspect-ratio: 3 / 2; }
}

/* Kielenvaihto */

.nav a.lang {
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  margin-left: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.nav a.lang:hover { border-color: var(--orange); color: var(--orange); background: transparent; }
@media (max-width: 860px) {
  .nav a.lang { margin: 14px 0 0; text-align: center; border-radius: 8px; border-bottom: 1.5px solid rgba(255, 255, 255, 0.35); padding: 12px 8px; }
}
