:root {
  --ink: #17181b;
  --ink-soft: #4b4b4f;
  --charcoal: #3a3a3d;
  --orange-1: #f7a823;
  --orange-2: #e8821c;
  --cream: #faf9f7;
  --white: #ffffff;
  --border: #e7e4de;
  --radius-pill: 999px;
  --radius-card: 4px;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink-soft);
  line-height: 1.6;
  background: var(--cream);
}

h1, h2 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 600;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Skip link & focus ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--orange-2);
  color: white;
  padding: 12px 20px;
  border-radius: 0 0 6px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--orange-2);
  outline-offset: 2px;
}

/* ---------- Buttons (single shape motif: pill) ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  color: var(--ink);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--orange-2), var(--orange-2)); }

.btn-dark {
  background: var(--charcoal);
  color: white;
}
.btn-dark:hover { background: #262628; }

.btn-ghost {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.btn-wide { width: 100%; text-align: center; }

/* ---------- Top nav ---------- */
.topnav {
  background: var(--ink);
  position: relative;
  z-index: 10;
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 24px;
}
.brand {
  color: white;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark { color: var(--orange-1); font-size: 1.4rem; line-height: 0; }

.topnav nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.topnav nav a {
  color: #d8d8d9;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topnav nav a:hover { color: var(--orange-1); }

.call-link {
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.call-link:hover { color: var(--orange-1); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg, #24252a, #24252a 18px, #1b1c20 18px, #1b1c20 36px
  );
}
.hero-media--photo {
  background: url('hero.jpg') center/cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15,15,17,0.92) 20%, rgba(15,15,17,0.55) 65%, rgba(15,15,17,0.35) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 24px;
}
.kicker {
  color: var(--orange-1);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 {
  color: white;
  font-size: 2.6rem;
  text-transform: uppercase;
  max-width: 620px;
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Services ---------- */
.services {
  background: linear-gradient(160deg, var(--orange-1), var(--orange-2) 85%);
  padding: 60px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.service-card {
  background: white;
  border-radius: var(--radius-card);
  overflow: hidden;
}
.service-photo {
  height: 190px;
  background-size: cover;
  background-position: center;
}
.service-photo--uudisrakentaminen { background-image: url('uudisrakentaminen.jpg'); }
.service-photo--laajennukset { background-image: url('laajennukset.jpg'); }
.service-photo--korjausrakentaminen { background-image: url('korjausrakentaminen.jpg'); }
.service-photo--huoneistoremontti { background-image: url('huoneistoremontti.jpg'); }
.service-photo--keittioremontti { background-image: url('keittioremontti.jpg'); }
.service-photo--kylpyhuone { background-image: url('kylpyhuone-sauna.jpg'); }
.service-body {
  padding: 20px;
  text-align: center;
}
.service-body h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.service-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.more-services {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(23,24,27,0.15);
  text-align: center;
}
.more-services-label {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 14px;
}
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.tag-list a {
  display: inline-block;
  background: rgba(255,255,255,0.6);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(23,24,27,0.15);
  transition: background 0.15s ease;
}
.tag-list a:hover {
  background: white;
}

/* ---------- Alternating panels ---------- */
.panels { padding: 80px 0; }
.panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: stretch;
  margin-bottom: 40px;
  min-height: 380px;
}
.panel-reverse { grid-template-columns: 1.1fr 1fr; }
.panel-reverse .panel-photo { order: -1; }

.panel-text {
  background: white;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--border);
  z-index: 1;
}
.panel:not(.panel-reverse) .panel-text { margin-right: -60px; }
.panel-reverse .panel-text { margin-left: -60px; }

.panel-text h2 { font-size: 1.6rem; }
.panel-text p { max-width: 46ch; }

.eyebrow {
  color: var(--orange-2);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel-photo {
  background-size: cover;
  background-position: center;
  min-height: 320px;
}
.panel-photo--a { background: url('about-a.jpg') center/cover; }
.panel-photo--b { background: url('about-b.jpg') center/cover; }

.panel-text .btn { align-self: flex-start; }

/* ---------- Contact section ---------- */
.contact {
  background: white;
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.contact h2 { font-size: 1.7rem; margin-bottom: 6px; }
.contact-lead { color: var(--ink-soft); margin-bottom: 30px; }

form#contactForm { display: flex; flex-direction: column; gap: 16px; max-width: 600px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 200px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }

input, textarea {
  padding: 13px 14px;
  border: 1px solid #d1cfc9;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  background: var(--cream);
}
input:focus, textarea:focus { border-color: var(--orange-2); background: white; }

.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cf-turnstile { margin: 4px 0; }

#formStatus { margin-top: 14px; font-weight: 500; }
#formStatus.success { color: #1a7a3c; }
#formStatus.error { color: #c0392b; }

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: #c9c9ca;
  padding: 50px 0 30px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 30px;
  align-items: start;
  margin-bottom: 30px;
}
.footer-brand {
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
address { font-style: normal; font-size: 0.9rem; }
address a { color: #c9c9ca; }
.footer-legal {
  font-size: 0.8rem;
  color: #8a8a8c;
  border-top: 1px solid #2c2c2f;
  padding-top: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .topnav-inner { flex-wrap: wrap; }
  .topnav nav { order: 3; width: 100%; justify-content: flex-start; gap: 18px; flex-wrap: wrap; }
  .hero h1 { font-size: 1.9rem; }
  .hero { min-height: 480px; }

  .panel, .panel-reverse {
    grid-template-columns: 1fr;
  }
  .panel-reverse .panel-photo { order: 0; }
  .panel:not(.panel-reverse) .panel-text,
  .panel-reverse .panel-text {
    margin: 0;
  }
  .panel-photo { min-height: 220px; }

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

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  html { scroll-behavior: auto; }
}
