:root {
  --bg: #f7f3ed;
  --surface: #fffdf9;
  --text: #1b1a17;
  --muted: #6e675e;
  --line: #ddd3c7;
  --accent: #0f3b5f;
  --accent-dark: #0a2b45;
  --max-width: 1200px;
  --font-body: "Barlow", Arial, sans-serif;
  --font-heading: "Barlow Condensed", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: linear-gradient(180deg, #f8f1e8 0%, var(--bg) 100%);
}

main {
  background: #ffffff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 253, 249, 0.72);
  border-bottom: 1px solid rgba(186, 173, 157, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(10, 26, 40, 0.05);
}

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 32px;
}

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

.site-logo {
  width: 220px;
  height: auto;
}

.site-nav {
  display: flex;
  justify-content: center;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu a {
  position: relative;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  transition: color 0.2s ease;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.menu a:hover {
  color: #2b587d;
}

.menu a:hover::after,
.menu a.active::after {
  transform: scaleX(1);
}

.header-button {
  justify-self: end;
  padding: 12px 18px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  transition: background-color 0.2s ease;
}

.header-button:hover {
  background: var(--accent-dark);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  margin: 6px 0;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 84vh;
  margin-bottom: 28px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}

.hero-home {
  display: flex;
  align-items: center;
  padding: 48px 24px;
  background-image: url("../images/hero2.webp");
}

.hero-subpage {
  display: flex;
  align-items: center;
  min-height: 62vh;
  padding: 44px 24px;
}

.hero-services {
  background-image: url("../images/navifix-vene-etusivu1.jpg");
}

.hero-about {
  background-image: url("../images/navifix-vene-2.jpeg");
}

.hero-contact {
  background-image: url("../images/navifix-vene-3.jpeg");
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 8, 8, 0.78) 0%, rgba(8, 8, 8, 0.42) 42%, rgba(8, 8, 8, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 32px;
}

.hero-content > * {
  max-width: 520px;
}

.hero .eyebrow {
  position: relative;
  top: 17px;
  margin: 0 0 35px;
  color: #ffffff;
  font-size: 1.28rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.hero-highlight {
  display: inline-block;
  color: #d9822b;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(217, 130, 43, 0.22);
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  animation: heroHighlightReveal 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

@keyframes heroHighlightReveal {
  0% {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 44px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  background: #ffffff;
  color: #141414;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  border-radius: 0;
  transition: background-color 0.2s ease;
}

.hero-button:hover {
  background: #e8e8e8;
}

@media (prefers-reduced-motion: reduce) {
  .hero-highlight {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }
}

.services-feature {
  background: #fffdf9;
}

.services-feature-inner {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(300px, 0.95fr);
  align-items: stretch;
  gap: 56px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 34px;
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid rgba(15, 59, 95, 0.09);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(12, 34, 52, 0.06);
}

.services-feature-media {
  height: 100%;
  min-height: 0;
  border-radius: 14px;
  background-image:
    linear-gradient(135deg, rgba(5, 12, 18, 0.32), rgba(9, 42, 58, 0.08)),
    url("../images/navifix-vene-etusivu1.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 34px rgba(11, 43, 69, 0.12);
}

.services-feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 540px;
}

.services-feature-eyebrow {
  margin: 0 0 14px;
  display: block;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services-feature-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 12px;
  margin-bottom: 0.28em;
  background: #d9822b;
  vertical-align: middle;
}

.services-feature-copy h2 {
  margin: 0 0 20px;
  color: #123a57;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.02;
}

.services-feature-highlight {
  color: #d9822b;
}

.services-feature-list {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.services-feature-list li {
  position: relative;
  margin-bottom: 14px;
  padding-left: 32px;
  color: #294866;
  font-size: 1.02rem;
  line-height: 1.5;
}

.services-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: inset 0 0 0 4px #fffdf9;
}

.services-feature-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  width: fit-content;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 0;
  transition: background-color 0.2s ease;
}

.services-feature-button:hover {
  background: var(--accent-dark);
}

.services-showcase {
  padding: 6px 0 34px;
  background: #fffdf9;
}

.services-showcase-inner {
  display: grid;
  grid-template-columns: minmax(320px, 35vw) minmax(0, 1fr);
  align-items: stretch;
  gap: 56px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 34px;
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid rgba(15, 59, 95, 0.09);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(12, 34, 52, 0.06);
}

.services-showcase-media {
  min-height: 760px;
  border-radius: 16px;
  background-image:
    linear-gradient(160deg, rgba(5, 12, 18, 0.16), rgba(9, 42, 58, 0.05)),
    url("../images/navifix-vene-etusivu1.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 34px rgba(11, 43, 69, 0.12);
}

.services-showcase-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 860px;
  padding: 26px 0;
}

.services-showcase-eyebrow {
  margin: 0 0 14px;
  display: block;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services-showcase-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 12px;
  margin-bottom: 0.28em;
  background: #d9822b;
  vertical-align: middle;
}

.services-showcase-copy h2 {
  margin: 0 0 20px;
  color: #123a57;
  font-size: clamp(2.5rem, 4.8vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.services-showcase-text {
  margin: 0 0 26px;
  max-width: 780px;
  color: #294866;
  font-size: 1.04rem;
  line-height: 1.7;
}

.services-showcase-list {
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(15, 59, 95, 0.12);
}

.services-showcase-list li {
  position: relative;
  margin: 0;
  padding: 18px 0 18px 34px;
  border-bottom: 1px solid rgba(15, 59, 95, 0.12);
  color: #20384f;
  font-size: 1.1rem;
  line-height: 1.5;
}

.services-showcase-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.55rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d9822b;
}

.services-showcase-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 56px;
  padding: 0 28px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
  transition: background-color 0.2s ease;
}

.services-showcase-button:hover {
  background: var(--accent-dark);
}

.company-feature {
  background: linear-gradient(180deg, #fffdf9 0%, #f9f5ef 100%);
  padding: 16px 0;
}

.company-feature-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: stretch;
  gap: 56px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 34px;
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid rgba(15, 59, 95, 0.09);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(12, 34, 52, 0.06);
}

.company-feature-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.company-feature-eyebrow {
  margin: 0 0 14px;
  display: block;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.company-feature-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 12px;
  margin-bottom: 0.28em;
  background: #d9822b;
  vertical-align: middle;
}

.company-feature-copy h2 {
  margin: 0 0 18px;
  max-width: 18ch;
  color: var(--accent);
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 0.98;
}

.company-feature-highlight {
  color: #d9822b;
}

.company-feature-text {
  margin: 0 0 34px;
  max-width: 60ch;
  color: #34516d;
  font-size: 1.03rem;
  line-height: 1.65;
}

.company-feature-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(15, 59, 95, 0.08);
}

.company-feature-point {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.company-feature-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.company-feature-icon svg {
  width: 100%;
  height: 100%;
}

.company-feature-point h3 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.company-feature-point p {
  margin: 0;
  color: #45627d;
  font-size: 0.96rem;
  line-height: 1.55;
}

.company-feature-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.company-feature-image {
  flex: 1 1 auto;
  min-height: 288px;
  border-radius: 18px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(7, 16, 23, 0.34)),
    url("../images/Jani/jani1 1.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 34px rgba(11, 43, 69, 0.12);
}

.company-feature-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  width: fit-content;
  padding: 0 26px;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  transition: background-color 0.2s ease;
}

.company-feature-button:hover {
  background: var(--accent-dark);
}

.references-strip {
  background: #fffdf9;
  padding: 28px 0 40px;
}

.references-inner {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(760px, 1fr);
  grid-template-areas:
    "copy gallery"
    "link gallery";
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 270px;
  padding: 34px;
}

.references-copy .references-eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.references-copy .references-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 12px;
  margin-bottom: 0.28em;
  background: #d9822b;
  vertical-align: middle;
}

.references-copy h2 {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 0.98;
}

.references-title-highlight {
  color: #d9822b;
}

.references-copy p:not(.references-eyebrow) {
  margin: 0;
  color: #294866;
  font-size: 1.02rem;
  line-height: 1.5;
}

.references-copy {
  grid-area: copy;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.references-gallery {
  grid-area: gallery;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  align-self: end;
  gap: 12px;
  width: 100%;
  min-width: 0;
  justify-self: end;
}

.reference-card {
  min-height: 138px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 28px rgba(11, 43, 69, 0.1);
}

.reference-card-1 {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(12, 28, 41, 0.18)),
    url("../images/navifix-vene-etusivu1.jpg");
}

.reference-card-2 {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(18, 31, 42, 0.16)),
    url("../images/navifix-vene-2.jpeg");
}

.reference-card-3 {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(36, 31, 21, 0.12)),
    url("../images/navifix-vene-3.jpeg");
}

.reference-card-4 {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(25, 22, 19, 0.2)),
    url("../images/Navifix-66.webp");
}

.references-link {
  grid-area: link;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.references-link:hover {
  background: var(--accent-dark);
}

.contact-form-section {
  background: #fffdf9;
  padding: 20px 0 44px;
}

.contact-form-inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 36px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 34px;
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid rgba(15, 59, 95, 0.09);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(12, 34, 52, 0.06);
}

.contact-form-copy {
  min-width: 0;
}

.contact-form-eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 12px;
  margin-bottom: 0.28em;
  background: #d9822b;
  vertical-align: middle;
}

.contact-form-copy h2 {
  margin: 0 0 16px;
  max-width: 12ch;
  color: var(--accent);
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 0.98;
}

.contact-form-highlight {
  color: #d9822b;
}

.contact-form-copy p {
  margin: 0;
  max-width: 52ch;
  color: #34516d;
  font-size: 1.02rem;
  line-height: 1.65;
}

.contact-form-details {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.contact-form-details a {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
}

.contact-form-card {
  min-width: 0;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.contact-form-grid label {
  display: grid;
  gap: 8px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.contact-form-grid input,
.contact-form-grid textarea {
  width: 100%;
  border: 1px solid rgba(15, 59, 95, 0.16);
  border-radius: 12px;
  background: #fffdf9;
  padding: 14px 16px;
  color: #294866;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-grid input:focus,
.contact-form-grid textarea:focus {
  outline: none;
  border-color: rgba(15, 59, 95, 0.35);
  box-shadow: 0 0 0 3px rgba(15, 59, 95, 0.08);
}

.contact-form-grid textarea {
  resize: vertical;
  min-height: 144px;
}

.contact-form-message {
  grid-column: 1 / -1;
}

.contact-form-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.contact-form-button:hover {
  background: var(--accent-dark);
}

.form-status-message {
  display: block;
  margin: 16px 0 0;
  font-weight: 600;
}

.contact-card-section {
  padding: 6px 0 34px;
  background: #fffdf9;
}

.contact-card-shell {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(240px, 0.8fr) minmax(420px, 1.45fr);
  gap: 36px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 34px;
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid rgba(15, 59, 95, 0.09);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(12, 34, 52, 0.06);
}

.contact-card-intro {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0;
}

.contact-card-eyebrow {
  margin: 0 0 14px;
  display: block;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-card-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 12px;
  margin-bottom: 0.28em;
  background: #d9822b;
  vertical-align: middle;
}

.contact-card-intro h2 {
  margin: 0 0 20px;
  color: #123a57;
  font-size: clamp(2rem, 3.6vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.contact-card-highlight {
  color: #d9822b;
}

.contact-card-text {
  margin: 0 0 28px;
  max-width: 320px;
  color: #294866;
  font-size: 1.02rem;
  line-height: 1.65;
}

.contact-card-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.contact-card-details span {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 700;
}

.contact-card-details a {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 700;
}

.contact-card-person {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: end;
  gap: 14px;
  padding: 4px 0 0;
}

.contact-card-portrait {
  min-height: 360px;
  border-radius: 18px;
  background-image:
    linear-gradient(160deg, rgba(5, 12, 18, 0.08), rgba(9, 42, 58, 0.04)),
    url("../images/Jani/jani2 1.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 34px rgba(11, 43, 69, 0.12);
}

.contact-card-person-copy h3 {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 2rem;
  line-height: 0.98;
}

.contact-card-person-copy p {
  margin: 0 0 -5px;
  color: #45627d;
  font-size: 1.02rem;
  line-height: 1.6;
}

.contact-card-form {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-self: end;
  padding-left: 36px;
  border-left: 1px solid rgba(15, 59, 95, 0.12);
}

.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.contact-card-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #183a57;
  font-size: 0.98rem;
  font-weight: 700;
}

.contact-card-grid input,
.contact-card-grid textarea {
  width: 100%;
  border: 1px solid rgba(15, 59, 95, 0.16);
  border-radius: 14px;
  padding: 16px 16px;
  background: #ffffff;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-card-grid input:focus,
.contact-card-grid textarea:focus {
  border-color: rgba(15, 59, 95, 0.48);
  box-shadow: 0 0 0 4px rgba(15, 59, 95, 0.08);
}

.contact-card-grid textarea {
  min-height: 138px;
  resize: vertical;
}

.contact-card-message {
  grid-column: 1 / -1;
}

.contact-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 56px;
  margin-top: 18px;
  padding: 0 28px;
  border: 0;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.contact-card-button:hover {
  background: var(--accent-dark);
}

.references-page {
  background: #fffdf9;
  padding: 18px 0 44px;
}

.references-page-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
}

.references-page-intro {
  max-width: 760px;
  margin-bottom: 30px;
}

.references-page-intro .references-page-eyebrow {
  margin: 0 0 14px;
  display: block;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.references-page-intro .references-page-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 12px;
  margin-bottom: 0.28em;
  background: #d9822b;
  vertical-align: middle;
}

.references-page-intro h2 {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  line-height: 0.96;
}

.references-page-intro p:not(.references-page-eyebrow) {
  margin: 0;
  color: #34516d;
  font-size: 1.04rem;
  line-height: 1.7;
}

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

.reference-project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.reference-project-image {
  width: 100%;
  min-height: 280px;
  border: 0;
  border-radius: 16px;
  padding: 0;
  background-size: cover;
  background-position: center;
  background-color: #d7dde4;
  box-shadow: 0 18px 34px rgba(11, 43, 69, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.reference-project-image:hover,
.reference-project-image:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px rgba(11, 43, 69, 0.18);
}

.reference-project-image:focus-visible {
  outline: 3px solid rgba(15, 59, 95, 0.28);
  outline-offset: 4px;
}

.reference-project-image-1 {
  background-image: url("../images/kojelauta3.webp");
}

.reference-project-image-2 {
  background-image: url("../images/avotilan-puhdistus/avotilan-puhdistus1.webp");
}

.reference-project-image-3 {
  background-image: url("../images/lasinvaihto/lasinvaihto1.webp");
}

.reference-project-image-4 {
  background-image: url("../images/Kiillotustyo/Kiillotustyo1.webp");
}

.reference-project-image-5 {
  background-image: url("../images/lasikuitutyo/lasikuitutyo1.webp");
}

.reference-project-image-6 {
  background-image: url("../images/sahkotyot/sahkotyotchapparal1.webp");
}

.reference-project-copy {
  padding-top: 18px;
}

.reference-project-copy h3 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 2rem;
  line-height: 0.98;
}

.reference-project-copy p {
  margin: 0;
  color: #45627d;
  font-size: 1.02rem;
  line-height: 1.7;
}

body.modal-open {
  overflow: hidden;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 19, 31, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gallery-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  max-height: calc(100vh - 48px);
  padding: 28px;
  border-radius: 24px;
  background: #fdfbf7;
  box-shadow: 0 28px 80px rgba(5, 19, 31, 0.28);
  overflow: auto;
}

.gallery-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 59, 95, 0.1);
  color: var(--accent);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-icon {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.gallery-icon-close {
  width: 22px;
  height: 22px;
}

.gallery-icon-arrow {
  width: 22px;
  height: 22px;
}

.gallery-modal-header {
  padding-right: 60px;
}

.gallery-modal-kicker {
  margin: 0 0 8px;
  color: #d9822b;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-modal-header h2 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.95;
}

.gallery-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
}

.gallery-figure {
  margin: 0;
}

.gallery-modal-image {
  width: 100%;
  max-height: 70vh;
  border-radius: 18px;
  object-fit: contain;
  background: #edf1f4;
}

.gallery-caption {
  margin-top: 14px;
  color: #45627d;
  font-size: 0.98rem;
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #0f3b5f;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.gallery-nav:hover,
.gallery-nav:focus-visible,
.gallery-close:hover,
.gallery-close:focus-visible {
  transform: scale(1.04);
}

.gallery-nav:hover,
.gallery-nav:focus-visible {
  background: var(--accent-dark);
}

.gallery-nav[disabled] {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.gallery-thumbnail {
  min-height: 76px;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0;
  background-size: cover;
  background-position: center;
  background-color: #d7dde4;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.gallery-thumbnail.is-active {
  border-color: #d9822b;
  box-shadow: 0 0 0 3px rgba(217, 130, 43, 0.18);
}

.site-footer {
  background: linear-gradient(135deg, #0e4b59 0%, #0b3f4a 100%);
  color: rgba(255, 255, 255, 0.92);
}

.footer-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 28px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.9fr;
  gap: 40px;
}

.footer-cell {
  min-width: 0;
  align-self: start;
}

.footer-logo {
  width: 210px;
  max-width: 100%;
  filter: brightness(0) invert(1);
}

.footer-brand {
  position: relative;
  top: -26px;
}

.footer-tagline {
  margin: 18px 0 12px;
  font-size: 1rem;
  font-style: italic;
  font-weight: 600;
}

.footer-text {
  margin: 0;
  max-width: 250px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.5;
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.footer-heading-link {
  color: inherit;
  text-decoration: none;
}

.footer-heading-link:hover {
  color: inherit;
}

.footer-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.95);
}

.footer-icon svg {
  width: 100%;
  height: 100%;
}

.footer-link {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.6;
}

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

.footer-social .footer-link {
  display: inline-block;
  margin-top: 2px;
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 600;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .site-logo {
    width: 110px;
  }

  .header-inner {
    grid-template-columns: 140px 1fr auto;
    gap: 18px;
    min-height: 64px;
    padding: 0 20px;
  }

  .menu {
    gap: 24px;
  }

  .menu a {
    font-size: 0.85rem;
  }

  .header-button {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .hero {
    min-height: 71.4vh;
    margin-bottom: 22px;
  }

  .hero-home {
    padding: 40px 20px;
  }

  .hero-subpage {
    min-height: 56vh;
    padding: 36px 20px;
  }

  .hero-content {
    padding-left: 22px;
  }

  .hero-content > * {
    max-width: 460px;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 4.8vw, 4rem);
  }

  .services-feature-inner {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 28px;
    padding: 28px;
  }

  .services-feature-media {
    height: auto;
    min-height: 300px;
  }

  .services-showcase-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px;
  }

  .services-showcase-media {
    min-height: 420px;
  }

  .services-showcase-copy {
    max-width: none;
    padding: 0;
  }

  .services-showcase-copy h2 {
    font-size: clamp(2.3rem, 4.8vw, 4rem);
  }

  .company-feature-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px;
  }

  .company-feature-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .company-feature-image {
    flex: 0 0 auto;
    min-height: 260px;
  }

  .references-strip {
    padding: 22px 0 30px;
  }

  .references-inner {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "gallery"
      "link";
    gap: 24px;
    padding: 28px;
  }

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

  .references-link {
    justify-self: start;
  }

  .contact-form-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px;
  }

  .contact-form-copy h2 {
    max-width: none;
  }

  .contact-card-shell {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 28px;
  }

  .contact-card-intro {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .contact-card-text {
    max-width: none;
  }

  .contact-card-portrait {
    min-height: 320px;
  }

  .contact-card-form {
    align-self: auto;
    padding-left: 0;
    border-left: 0;
    grid-column: 1 / -1;
    border-top: 1px solid rgba(15, 59, 95, 0.12);
    padding-top: 28px;
  }

  .references-page {
    padding: 14px 0 36px;
  }

  .references-page-inner {
    padding: 0 20px;
  }

  .references-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .reference-project-image {
    min-height: 240px;
  }

  .gallery-modal {
    padding: 20px;
  }

  .gallery-modal-panel {
    padding: 24px;
    max-height: calc(100vh - 40px);
  }

  .gallery-stage {
    position: relative;
    grid-template-columns: 1fr;
  }

  .gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
  }

  .gallery-nav:hover,
  .gallery-nav:focus-visible {
    transform: translateY(-50%) scale(1.04);
  }

  .gallery-nav-prev {
    left: 18px;
  }

  .gallery-nav-next {
    right: 18px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 28px;
  }
}

@media (max-width: 767px) {
  body {
    font-weight: 500;
  }

  .site-logo {
    width: 110px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 16px;
    min-height: 62px;
    padding: 0 16px;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
    z-index: 21;
  }

  .header-button {
    display: none;
  }

  .menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
    margin-top: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 14px 32px rgba(15, 59, 95, 0.12);
  }

  .menu.is-open {
    display: flex;
  }

  .menu a::after {
    bottom: -4px;
  }

  .hero {
    min-height: 69.6vh;
    margin-bottom: 18px;
  }

  .hero-home {
    align-items: center;
    padding: 32px 18px;
    background-position: 62% center;
  }

  .hero-subpage {
    min-height: 48vh;
    padding: 28px 18px;
    background-position: center;
  }

  .hero-content {
    padding-left: 8px;
  }

  .hero-content > * {
    max-width: min(100%, 340px);
  }

  .hero .eyebrow {
    margin-bottom: 22px;
    font-size: 1.12rem;
  }

  .hero h1 {
    margin-bottom: 18px;
    font-size: clamp(2.1rem, 10vw, 3.2rem);
    line-height: 0.98;
  }

  .hero p {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .hero-actions {
    margin-top: 30px;
  }

  .hero-button {
    min-height: 48px;
    padding: 0 22px;
    font-size: 0.82rem;
  }

  .services-feature-inner {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 22px;
    padding: 22px 18px;
    border-radius: 16px;
  }

  .services-feature-media {
    height: auto;
    min-height: 220px;
    border-radius: 12px;
  }

  .services-showcase {
    padding: 10px 0 28px;
  }

  .services-showcase-inner {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px 18px;
    border-radius: 16px;
  }

  .services-showcase-media {
    min-height: 320px;
    border-radius: 12px;
  }

  .services-showcase-copy {
    padding: 0;
  }

  .services-showcase-copy h2 {
    font-size: 2rem;
  }

  .services-showcase-text {
    margin-bottom: 22px;
    font-size: 0.98rem;
  }

  .services-showcase-list {
    margin-bottom: 26px;
  }

  .services-showcase-list li {
    padding: 16px 0 16px 28px;
    font-size: 0.98rem;
  }

  .services-showcase-list li::before {
    top: 1.4rem;
    width: 8px;
    height: 8px;
  }

  .services-showcase-button {
    width: 100%;
    min-height: 50px;
  }

  .services-feature-copy h2 {
    font-size: 1.9rem;
  }

  .services-feature-list li {
    padding-left: 28px;
    font-size: 0.98rem;
  }

  .services-feature-button {
    width: 100%;
    min-height: 50px;
  }

  .company-feature-inner {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 18px;
    border-radius: 16px;
  }

  .company-feature-copy h2 {
    max-width: none;
    font-size: 2rem;
  }

  .company-feature-text {
    margin-bottom: 26px;
    font-size: 0.98rem;
  }

  .company-feature-points {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 20px;
  }

  .company-feature-image {
    flex: 0 0 auto;
    min-height: 210px;
    border-radius: 14px;
  }

  .company-feature-button {
    width: 100%;
    min-height: 50px;
  }

  .references-strip {
    padding: 14px 0 30px;
    background: #fffdf9;
  }

  .references-inner {
    min-height: 0;
    padding: 22px 18px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "gallery"
      "link";
    gap: 20px;
    border-radius: 16px;
  }

  .references-copy h2 {
    font-size: 1.8rem;
  }

  .references-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .reference-card {
    min-height: 110px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(11, 43, 69, 0.08);
  }

  .references-link {
    width: 100%;
    min-height: 52px;
  }

  .contact-form-section {
    padding: 18px 0 34px;
  }

  .contact-form-inner {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px 18px;
    border-radius: 16px;
  }

  .contact-form-copy h2 {
    font-size: 2rem;
  }

  .contact-form-copy p {
    font-size: 0.98rem;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-form-button {
    width: 100%;
    min-height: 50px;
  }

  .contact-card-section {
    padding: 10px 0 28px;
  }

  .contact-card-shell {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px 18px;
    border-radius: 16px;
  }

  .contact-card-intro h2 {
    font-size: 2rem;
  }

  .contact-card-text {
    max-width: none;
    margin-bottom: 22px;
    font-size: 0.98rem;
  }

  .contact-card-person {
    align-self: auto;
    gap: 12px;
    padding-top: 0;
  }

  .contact-card-portrait {
    min-height: 280px;
    border-radius: 14px;
  }

  .contact-card-person-copy h3 {
    font-size: 1.7rem;
  }

  .contact-card-person-copy p {
    font-size: 0.98rem;
  }

  .contact-card-form {
    align-self: auto;
    padding-left: 0;
    padding-top: 0;
    border-left: 0;
    border-top: 0;
  }

  .contact-card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-card-button {
    width: 100%;
    min-height: 50px;
  }

  .references-page {
    padding: 10px 0 28px;
  }

  .references-page-inner {
    padding: 0 16px;
  }

  .references-page-intro {
    margin-bottom: 24px;
  }

  .references-page-intro h2 {
    font-size: 2.2rem;
  }

  .references-page-intro p {
    font-size: 0.98rem;
  }

  .references-page-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .reference-project-image {
    min-height: 220px;
    border-radius: 14px;
  }

  .gallery-modal {
    padding: 12px;
  }

  .gallery-modal-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 18px 14px 14px;
    border-radius: 18px;
  }

  .gallery-close {
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
  }

  .gallery-modal-header {
    padding-right: 46px;
  }

  .gallery-stage {
    position: relative;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gallery-modal-image {
    max-height: 56vh;
    border-radius: 14px;
  }

  .gallery-nav {
    position: absolute;
    top: calc(50% - 18px);
    z-index: 2;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
  }

  .gallery-nav:hover,
  .gallery-nav:focus-visible {
    transform: translateY(-50%) scale(1.04);
  }

  .gallery-nav-prev {
    left: 8px;
  }

  .gallery-nav-next {
    right: 8px;
  }

  .gallery-thumbnails {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .gallery-thumbnail {
    min-height: 64px;
  }

  .reference-project-copy {
    padding-top: 14px;
  }

  .reference-project-copy h3 {
    font-size: 1.7rem;
  }

  .reference-project-copy p {
    font-size: 0.98rem;
  }

  .footer-inner {
    padding: 40px 16px 24px;
  }

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

  .footer-logo {
    width: 170px;
  }

  .footer-heading h2 {
    font-size: 1.2rem;
  }
}
