/* TNK Electric Oy */

:root {
  --pine: #111a14;
  --pine-2: #1c2a20;
  --olive: #56613f;
  --signal: #c4331f;
  --signal-dark: #a02916;
  --lime: #8dc63f;
  --snow: #f3f5f2;
  --white: #ffffff;
  --ink: #161a17;
  --steel: #59615a;
  --line: #dde2da;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", Arial, sans-serif;

  --wrap: 78rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --radius: 14px;
  --header-h: 5rem;
}

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

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

body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}

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

a { color: var(--signal-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--signal); }

:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.02;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h3 { font-size: 1.7rem; }

p { margin: 0 0 1em; max-width: 38em; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--white);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 1rem; }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 1.6rem;
  border: 2px solid var(--signal);
  border-radius: 999px;
  background: var(--signal);
  color: var(--white);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.button:hover { background: var(--signal-dark); border-color: var(--signal-dark); color: var(--white); }

.button.ghost { background: transparent; border-color: rgba(255, 255, 255, 0.7); }
.button.ghost:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

.button.dark { background: var(--ink); border-color: var(--ink); }
.button.dark:hover { background: var(--pine-2); border-color: var(--pine-2); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Header: floats over the image at the top, turns solid on scroll */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--white);
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.site-header.scrolled,
.site-header.open {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: block;
  flex: none;
  background: var(--white);
  border-radius: 10px;
  padding: 4px 8px;
}
.brand img { width: 62px; }

.nav ul {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  color: inherit;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover { border-bottom-color: currentColor; color: inherit; }
.nav a[aria-current="page"] { border-bottom-color: var(--signal); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s;
}
.menu-toggle-bars { position: relative; }
.menu-toggle-bars::before,
.menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }

.open .menu-toggle-bars { background: transparent; }
.open .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.open .menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 52rem) {
  .menu-toggle { display: inline-flex; }
  .site-header .wrap { flex-wrap: wrap; }
  .nav { display: none; flex-basis: 100%; padding-bottom: 1.25rem; }
  .open .nav { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li + li { border-top: 1px solid var(--line); }
  .nav a { padding: 0.8rem 0; font-size: 1.5rem; border-bottom: 0; }
  .nav a[aria-current="page"] { color: var(--signal-dark); }
}

/* Image heroes */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2rem) 0 clamp(3rem, 9vh, 6rem);
  overflow: hidden;
  background: var(--pine);
  color: var(--white);
  isolation: isolate;
}

.hero.page { min-height: clamp(24rem, 58vh, 36rem); }

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

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(10, 16, 12, 0.92) 0%, rgba(10, 16, 12, 0.55) 45%, rgba(10, 16, 12, 0.15) 75%, rgba(10, 16, 12, 0.45) 100%);
}

.hero h1 {
  font-size: clamp(4rem, 13vw, 10.5rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.015em;
  margin: 0;
}

.hero.page h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: 0.95; }

.hero-slogan {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  color: var(--lime);
  margin: 0.8rem 0 0;
}

.hero-text {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: #dfe6dc;
  max-width: 32em;
  margin: 1.25rem 0 2rem;
}

.hero.page .hero-text { margin-bottom: 0; }

@media (prefers-reduced-motion: no-preference) {
  .hero-bg { animation: settle 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes settle { from { transform: scale(1.08); } to { transform: none; } }
}

/* Sections */

.section { padding: clamp(4rem, 10vw, 7.5rem) 0; }
.section.white { background: var(--white); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--steel); font-size: 1.2rem; }

/* Product cards (home) */

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
}

.card-photo {
  padding: 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  transition: transform 0.35s;
}

.card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 0.4rem; font-size: 1.75rem; overflow-wrap: break-word; hyphens: manual; }
.card p { margin: 0 0 1.2rem; color: var(--steel); font-size: 1.02rem; }
.card-more {
  margin-top: auto;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--signal-dark);
}

.card:hover { color: var(--ink); }
.card:hover .card-photo img { transform: scale(1.04); }
.card:hover .card-more { text-decoration: underline; }

.card.dark { background: var(--pine-2); color: var(--white); }
.card.dark:hover { color: var(--white); }
.card.dark p { color: #c3cdc0; }
.card.dark .card-more { color: var(--lime); }
.card.dark ul { margin: 0 0 1.2rem; padding-left: 1.1em; color: #dfe6dc; font-size: 1.02rem; }
.card.dark li::marker { color: var(--lime); }
.card.dark .card-body { padding-top: 2rem; }

/* Split: image + text */

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .split.flip > :first-child { order: 2; }
}

.split-photo img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 5 / 3.4;
  object-fit: cover;
}

.lead { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.5; }

/* Service list (company page) */

.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.service-list li { border-bottom: 1px solid var(--line); }
.service-list a {
  display: grid;
  gap: 0.15rem;
  padding: 1.1rem 0;
  color: var(--ink);
  text-decoration: none;
}
.service-list strong { font-family: var(--display); font-size: 1.5rem; font-weight: 600; line-height: 1.15; }
.service-list span { color: var(--steel); font-size: 1rem; }
.service-list a:hover strong { color: var(--signal-dark); text-decoration: underline; }

/* Products page */

.product {
  display: grid;
  gap: 2rem clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.product + .product { margin-top: clamp(4rem, 10vw, 7rem); }

@media (min-width: 56rem) {
  .product { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .product:nth-child(even) .product-photo { order: 2; }
  .product:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}

.product-photo {
  margin: 0;
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 3rem);
}
.product-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }

.product-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--olive);
  opacity: 0.45;
  margin-bottom: 0.5rem;
}

.product h2 { font-size: clamp(2rem, 4vw, 3rem); }

.product.feature {
  background: var(--pine-2);
  color: var(--white);
  border-radius: var(--radius);
  padding: clamp(2rem, 6vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
}
.product.feature .product-num { color: var(--lime); opacity: 0.7; }
.product.feature p { color: #dfe6dc; }
.product.feature ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.product.feature li {
  border-top: 2px solid var(--lime);
  padding-top: 0.6rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.2;
}

/* Contact page */

.contact-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 56rem) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
}

.contact-lines { display: grid; gap: 1.5rem; margin: 2rem 0; }
.contact-lines div { border-top: 1px solid var(--line); padding-top: 0.9rem; }
.contact-lines dt { color: var(--steel); font-size: 1rem; }
.contact-lines dd { margin: 0; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; line-height: 1.2; overflow-wrap: break-word; }
.contact-lines a { color: var(--ink); text-decoration: none; }
.contact-lines a:hover { color: var(--signal-dark); text-decoration: underline; }

.map {
  display: block;
  width: 100%;
  height: clamp(22rem, 60vh, 34rem);
  border: 0;
  border-radius: var(--radius);
  background: var(--line);
}

/* Extranet */

.steps { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.steps > div { background: var(--white); border-radius: var(--radius); padding: 2rem; }
.steps h2 { font-size: 1.7rem; margin-bottom: 0.6rem; }
.steps p { font-size: 1.25rem; margin: 0; overflow-wrap: break-word; }

/* CTA band */

.cta {
  background: var(--pine);
  color: var(--white);
  padding: clamp(4rem, 10vw, 7rem) 0;
}
.cta .wrap {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 56rem) {
  .cta .wrap { grid-template-columns: minmax(0, 1fr) auto; }
}
.cta h2 { margin-bottom: 0.3em; }
.cta p { color: #c9d2c6; font-size: 1.25rem; }

/* Rating plate: the site's contact card */

.plate {
  position: relative;
  background: #0c0f0d;
  color: #e9ece7;
  padding: 1.9rem 2.1rem 1.7rem;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #2d332d, inset 0 0 0 6px #0c0f0d, inset 0 0 0 7px #3a413a, 0 20px 50px rgba(0, 0, 0, 0.35);
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.45;
  width: 100%;
  max-width: 27rem;
}

/* screw heads in the corners */
.plate::before {
  content: "";
  position: absolute;
  inset: 0.7rem;
  pointer-events: none;
  background:
    radial-gradient(circle at 5px 5px, #8d948b 0 3px, #4d534c 3.5px 5px, transparent 5.5px) top left / 10px 10px no-repeat,
    radial-gradient(circle at 5px 5px, #8d948b 0 3px, #4d534c 3.5px 5px, transparent 5.5px) top right / 10px 10px no-repeat,
    radial-gradient(circle at 5px 5px, #8d948b 0 3px, #4d534c 3.5px 5px, transparent 5.5px) bottom left / 10px 10px no-repeat,
    radial-gradient(circle at 5px 5px, #8d948b 0 3px, #4d534c 3.5px 5px, transparent 5.5px) bottom right / 10px 10px no-repeat;
}

.plate h2 {
  font-size: 1.55rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #3a413a;
}

.plate dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.15rem 1rem;
  margin: 0;
}
.plate dt { color: #9aa498; }
.plate dd { margin: 0; overflow-wrap: break-word; }
.plate a { color: #e9ece7; text-decoration-color: var(--lime); }
.plate a:hover { color: var(--lime); }

.plate-mark {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  color: var(--lime);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Footer */

.site-footer {
  background: #0b110d;
  color: #9faa9c;
  padding: 2rem 0;
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: #dfe6dc; text-decoration: none; }
.footer-nav a:hover { color: var(--lime); text-decoration: underline; }
.site-footer p { margin: 0; }
