/* ==========================================================================
   Tmi Tero Liukko — Rakennusliike Lapua
   Valkoinen pohja · vain logon sävy (navy #07213F). Mobile first.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Ainoa värisävy = logon navy. Muu on valkoista ja neutraalia harmaata. */
  --navy:    #07213F;   /* logon sävy */
  --navy-d:  #05192f;   /* sama sävy tummempana (overlayt, footer) */

  --ink:       #1b2329;  /* lähes musta leipäteksti (neutraali) */
  --ink-soft:  #444c52;
  --muted:     #6b747a;
  --line:      #e6e8ea;  /* neutraali ohut viiva */
  --line-soft: #eef0f1;

  --white: #ffffff;
  --paper: #f6f7f8;      /* neutraali vaalea osio-tausta (ei sinistä) */

  /* Vain virheilmoituksiin – ei muuhun käyttöön. */
  --danger:      #b3261e;
  --danger-bg:   #fdecea;
  --danger-line: #f3cbc7;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(7,33,63,.06);
  --shadow:    0 12px 32px rgba(7,33,63,.10);
  --shadow-lg: 0 26px 60px rgba(7,33,63,.16);

  --maxw: 1160px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-h: 70px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, picture { display: block; max-width: 100%; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-d); }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 3px solid rgba(7,33,63,.45); outline-offset: 2px; border-radius: 6px; }

/* ---------- Typography (Montserrat, ohut geometrinen tyyli) ---------- */
h1, h2, h3, h4 { line-height: 1.16; letter-spacing: -0.015em; color: var(--ink); font-weight: 700; overflow-wrap: break-word; }
h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.02rem; font-weight: 600; }
p  { color: var(--ink-soft); overflow-wrap: break-word; }
.lead { font-size: clamp(1.05rem, 2.3vw, 1.22rem); color: var(--ink-soft); line-height: 1.65; font-weight: 400; }
strong { color: var(--ink); font-weight: 600; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--tint { background: var(--paper); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3, .section--navy h4, .section--navy strong { color: #fff; }
.section--navy p { color: rgba(255,255,255,.82); }
.center { text-align: center; }
.measure { max-width: 58ch; }
.center .measure { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .76rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--navy); }
.section--navy .eyebrow { color: rgba(255,255,255,.9); }
.section--navy .eyebrow::before { background: rgba(255,255,255,.9); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.center.section-head { margin-inline: auto; }
.section-head p { margin-top: .9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .9rem 1.6rem; border-radius: var(--radius-pill);
  font-weight: 600; font-size: .96rem; line-height: 1; letter-spacing: .01em;
  background: var(--navy); color: #fff;
  box-shadow: 0 8px 20px rgba(7,33,63,.20);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { color: #fff; filter: brightness(1.35); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(7,33,63,.3); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.02rem; }
.btn--outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); filter: none; }
.btn--outline:hover { background: var(--navy); color: #fff; box-shadow: inset 0 0 0 2px var(--navy); filter: none; }
.btn--white { background: #fff; color: var(--navy); box-shadow: 0 10px 24px rgba(0,0,0,.18); filter: none; }
.btn--white:hover { background: #f0f1f3; color: var(--navy); filter: none; }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); filter: none; }
.btn--ghost:hover { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px #fff; filter: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn-row--center { justify-content: center; }

.textlink { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--navy); }
.textlink svg { width: 17px; height: 17px; transition: transform .15s ease; }
.textlink:hover svg { transform: translateX(3px); }

/* ---------- Skip link ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 12px 0; font-weight: 600; }
.skip-link:focus { left: 0; }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 14px; z-index: 60; margin-top: 14px; }
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: calc(100% - clamp(20px, 5vw, 44px));
  max-width: var(--maxw); margin-inline: auto;
  padding-inline: clamp(14px, 2.5vw, 24px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(7,33,63,.16);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand img { height: 54px; width: auto; }

.nav-links { display: none; align-items: center; gap: .25rem; }
.nav-links a { padding: .5rem .85rem; border-radius: var(--radius-pill); color: var(--ink-soft); font-weight: 500; font-size: .95rem; transition: background .15s ease, color .15s ease; }
.nav-links a:hover { background: var(--paper); color: var(--navy); }
.nav-links a[aria-current="page"] { background: var(--paper); color: var(--navy); }

.nav-cta { display: none; align-items: center; gap: .8rem; }
.nav-phone { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--navy); }
.nav-phone svg { width: 18px; height: 18px; color: var(--navy); }
.nav-phone:hover { color: var(--navy-d); }

.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px; color: var(--navy); background: var(--paper); }
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile drawer */
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 55; background: #fff; padding: calc(var(--header-h) + 40px) 20px 2.5rem; flex-direction: column; overflow-y: auto; animation: fade .2s ease; }
.mobile-menu.open { display: flex; }
.mobile-menu a.m-link { padding: 1rem .25rem; font-size: 1.2rem; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; }
.mobile-menu a.m-link svg { width: 20px; height: 20px; color: var(--navy); }
.mobile-menu .m-actions { margin-top: 1.6rem; display: flex; flex-direction: column; gap: .8rem; }
.mobile-menu .m-actions .btn { width: 100%; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
body.menu-open { overflow: hidden; }

/* ---------- Hero (koko taustakuva, ylös asti) ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  margin-top: -98px;
  padding-top: clamp(9rem, 17vw, 13rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
  min-height: clamp(560px, 88vh, 820px);
  display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; background: var(--navy) url("../images/banneri.jpg") center/cover no-repeat; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,33,63,.92) 0%, rgba(7,33,63,.78) 42%, rgba(7,33,63,.42) 75%, rgba(7,33,63,.30) 100%),
    linear-gradient(0deg, rgba(5,25,47,.72) 0%, rgba(5,25,47,.12) 45%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-copy { max-width: 700px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .76rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #fff; padding: .45rem .9rem; border: 1px solid rgba(255,255,255,.4); border-radius: var(--radius-pill); margin-bottom: 1.5rem; }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255,255,255,.9); margin-top: 1.1rem; max-width: 620px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.1rem 1.6rem; margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.2); }
.hero-badges li { display: inline-flex; align-items: center; gap: .55rem; font-size: .92rem; font-weight: 500; color: rgba(255,255,255,.9); }
.hero-badges svg { width: 20px; height: 20px; color: #fff; flex: none; }
.hero-badges strong { color: #fff; font-weight: 700; }

/* ---------- Trust strip ---------- */
.trust { background: var(--white); border-bottom: 1px solid var(--line); }
.trust-row { display: grid; grid-template-columns: 1fr; gap: 1.4rem; padding-block: 2rem; }
.trust-item { display: flex; align-items: center; gap: .9rem; }
.trust-item svg { width: 38px; height: 38px; color: var(--navy); flex: none; }
.trust-item strong { display: block; font-size: 1rem; font-weight: 600; }
.trust-item span { display: block; color: var(--muted); font-size: .9rem; }
.trust-badge { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; color: #fff; background: var(--navy); }

/* ---------- Service grid ---------- */
.service-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.service-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.8rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.sc-ic { width: 54px; height: 54px; border-radius: 13px; display: grid; place-items: center; background: var(--paper); color: var(--navy); margin-bottom: 1.1rem; }
.sc-ic svg { width: 28px; height: 28px; }
.service-card h3 { margin-bottom: .5rem; }
.service-card p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Pohjoista rakentamista ---------- */
.nordic-grid { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
.nordic-item { text-align: center; }
.ni-ic { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; background: var(--navy); color: #fff; }
.ni-ic svg { width: 30px; height: 30px; }
.nordic-item h3 { margin-bottom: .4rem; }
.nordic-item p { font-size: .95rem; color: var(--ink-soft); }

/* ---------- Work showcase ---------- */
.work-single { margin: 0; }
.work-single img { width: 100%; max-width: 940px; margin-inline: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
@media (min-width: 640px) { .work-single img { aspect-ratio: 16/9; } }

/* ---------- Split (Meistä) ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.feature-list { display: grid; gap: .85rem; margin-top: 1.6rem; }
.feature-list li { display: flex; gap: .75rem; align-items: flex-start; }
.feature-list svg { width: 22px; height: 22px; flex: none; color: var(--navy); margin-top: .15rem; }

.split-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem 1.2rem; text-align: center; }
.stat-num { display: block; font-size: clamp(1.9rem, 5vw, 2.5rem); font-weight: 700; color: var(--navy); line-height: 1; letter-spacing: -.02em; }
.stat-lbl { display: block; margin-top: .55rem; font-size: .9rem; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.step { display: flex; gap: 1.1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.step-n { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; color: #fff; background: var(--navy); }
.step h4 { margin-bottom: .25rem; }
.step p { font-size: .95rem; }

/* ---------- CTA band (terassilauta-pattern himmeänä taustalla) ---------- */
.cta-band {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(150deg, var(--navy), var(--navy-d));
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4rem); text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 56ch; margin: 1rem auto 0; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-list { display: grid; gap: 1.1rem; margin-top: 1.8rem; }
.contact-list li { display: flex; gap: .9rem; align-items: center; }
.ci-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--navy); }
.ci-ic svg { width: 22px; height: 22px; }
.ci-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.contact-list a, .contact-list div > span:not(.ci-label) { font-size: 1.06rem; font-weight: 600; color: var(--ink); }
.contact-list a:hover { color: var(--navy); }

.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.2rem); box-shadow: var(--shadow-sm); }
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field input, .field textarea { width: 100%; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; color: var(--ink); background: var(--paper); transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(7,33,63,.12); }
.field textarea { resize: vertical; }
.contact-form .btn { width: 100%; margin-top: .4rem; }
.form-note { margin-top: .9rem; font-size: .88rem; color: var(--muted); text-align: center; }
.hp-field { position: absolute; left: -9999px; }
.contact-form .btn[disabled] { opacity: .55; pointer-events: none; }

.form-error { display: none; margin-top: .9rem; padding: .85rem 1rem; font-size: .9rem; text-align: center; color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-line); border-radius: var(--radius); }
.form-error.show { display: block; }
.form-error a { color: inherit; font-weight: 700; text-decoration: underline; }

.form-success { display: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3rem); text-align: center; box-shadow: var(--shadow); }
.form-success.show { display: block; }
.fs-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.2rem; color: #fff; background: var(--navy); }
.fs-ic svg { width: 32px; height: 32px; }
.form-success h3 { margin-bottom: .5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.78); padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.2rem; padding-bottom: 2.2rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.brand--footer { display: inline-flex; background: #fff; padding: .7rem 1rem; border-radius: 14px; }
.brand--footer img { height: 76px; width: auto; }
.site-footer p { color: rgba(255,255,255,.72); margin-top: 1rem; max-width: 42ch; font-size: .95rem; }
.footer-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.fb-badge { font-size: .76rem; font-weight: 600; color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius-pill); padding: .35rem .8rem; }
.footer-col h4 { color: #fff; margin-bottom: 1rem; }
.footer-col ul { display: grid; gap: .6rem; }
.footer-col a { color: rgba(255,255,255,.72); font-size: .95rem; }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; color: rgba(255,255,255,.72); font-size: .95rem; }
.footer-contact svg { width: 18px; height: 18px; color: #fff; flex: none; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; padding-top: 1.5rem; font-size: .85rem; color: rgba(255,255,255,.55); }
.footer-bottom a { color: rgba(255,255,255,.85); text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: #fff; }
.footer-credit { font-weight: 500; }

/* ---------- Reveal animation ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .trust-row { grid-template-columns: repeat(3, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .nordic-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; gap: 1.1rem; }
}
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-cta { display: flex; }
  .nav-toggle { display: none; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .nordic-grid { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 1.05fr .95fr; }
  .contact-wrap { grid-template-columns: .9fr 1.1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1.2fr; }
}
