/*
Theme Name: Microstore
Theme URI: https://microstore.fi
Author: Microstore Mikkeli Ky
Author URI: https://microstore.fi
Description: Selkeä, suomenkielinen yritysteema Microstore Mikkeli Ky:lle. Valkoinen/vaaleanharmaa pohja, syvänsininen korostus.
Version: 1.3.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: microstore
Tags: custom-menu, custom-logo, one-column, accessibility-ready
*/

:root {
  --navy: #111111;
  --navy-2: #2b2b2b;
  --ink: #1c2430;
  --muted: #5a6472;
  --line: #e4e7ec;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --accent: #b6322d;
  --accent-hover: #8f2622;
  --accent-soft: #f6e7e6;
  --cta: #b6322d;
  --cta-hover: #8f2622;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  --header-h: 4.5rem;
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 70rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 0.8rem;
  z-index: 100;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
  position: relative;
}

.site-logo,
.custom-logo-link {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--navy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--accent); }

.site-logo::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  background: var(--cta);
  border-radius: 2px;
}

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.nav-burger {
  display: none;
  margin-left: auto;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  place-items: center;
}
.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--navy);
  position: relative;
}
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-burger span::before { top: -6px; }
.nav-burger span::after { top: 6px; }

.nav-primary { margin-left: auto; }
.nav-primary ul,
.nav-fallback {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem 1.15rem;
  flex-wrap: wrap;
}
.nav-primary a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
}
.nav-primary a:hover,
.nav-primary .current-menu-item > a,
.nav-primary .current_page_item > a { color: var(--accent); }

.nav-primary li { position: relative; }
.nav-primary .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  min-width: 14rem;
  flex-direction: column;
  gap: 0;
  z-index: 20;
}
.nav-primary li:hover > .sub-menu,
.nav-primary li:focus-within > .sub-menu { display: flex; }
.nav-primary .sub-menu a { display: block; padding: 0.45rem 0.9rem; }

.has-dropdown > a::after { content: " ▾"; font-size: 0.75em; }

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.header-phone {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-accent { background: var(--cta); color: #fff; }
.btn-accent:hover { background: var(--cta-hover); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.1); color: #fff; }

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

.hero {
  background:
    radial-gradient(900px 400px at 85% 0%, rgba(26, 77, 140, 0.35), transparent 50%),
    linear-gradient(160deg, #111111 0%, #2b2b2b 58%, #3a3a3a 100%);
  color: #fff;
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
  max-width: 14ch;
}
.hero .lead {
  font-size: 1.2rem;
  max-width: 38rem;
  color: #dddddd;
  margin: 0 0 1.6rem;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 0.7rem;
  color: #f0b9b5;
}
.kicker-dark { color: var(--cta); }

.page-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3.4rem) 0;
}
.page-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
  line-height: 1.15;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }

.section { padding: clamp(2.2rem, 5vw, 3.8rem) 0; }
.section-tight { padding-top: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }

h2 { letter-spacing: -0.02em; line-height: 1.25; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.1rem;
}
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.25rem;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 0.45rem; font-size: 1.25rem; }
.card p { margin: 0; color: var(--muted); }

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card-link:hover {
  transform: translateY(-3px);
  border-color: #d0d0d0;
  color: inherit;
}
.more {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.teaser {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.4rem;
  box-shadow: var(--shadow);
}
.teaser h2 { margin: 0 0 0.4rem; }
.teaser p { margin: 0; color: var(--muted); }

.partner-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}
.partner {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.cta-band {
  background: var(--navy);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.2rem) 0;
}
.cta-band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.4rem;
}
.cta-band h2 { margin: 0 0 0.35rem; }
.cta-band p { margin: 0; color: #d0d0d0; }

.section-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.7rem; }

.prose-wrap { max-width: 44rem; }
.prose-wrap h2 { margin-top: 1.8rem; }
.prose-wrap ul { padding-left: 1.2rem; }
.prose-wrap li { margin: 0.35rem 0; }

.price-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow);
  margin: 0.5rem 0 2rem;
  max-width: 28rem;
}
.price {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.2rem 0 0.4rem;
  color: var(--navy);
}
.price span { font-size: 1.05rem; font-weight: 600; color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: minmax(16rem, 0.85fr) minmax(20rem, 1.15fr);
  gap: 2.2rem;
}

.contact-list { list-style: none; padding: 0; }
.contact-list li { margin: 0.7rem 0; }
.contact-list span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin: 0.8rem 0 2rem;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.contact-form .full { grid-column: 1 / -1; }
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.6rem 0.7rem;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.site-footer {
  background: var(--navy);
  color: #d9d9d9;
  padding: 2.6rem 0 1.4rem;
  margin-top: auto;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}
.site-footer h2 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 0.7rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.35rem 0; }
.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}
.footer-meta {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 1.8rem;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.site-main { min-height: 50vh; }
.entry { background: #fff; }
.entry-body { padding: 2rem 0 3rem; }
.post-list { list-style: none; padding: 0; }
.post-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
}

.static-page { scroll-margin-top: 3.2rem; }
.static-page + .static-page { border-top: 10px solid var(--navy); }

.preview-bar {
  background: #0a0a0a;
  color: #dddddd;
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 2px solid var(--cta);
}
.preview-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  padding: 0.55rem 0;
  align-items: center;
}
.preview-bar strong { color: #fff; margin-right: 0.4rem; }
.preview-bar a {
  color: #dddddd;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.preview-bar a:hover { color: #fff; }

body.has-preview-bar .site-header { top: 0; position: relative; }

@media (max-width: 860px) {
  .nav-burger { display: grid; }
  .nav-primary,
  .header-cta .btn { display: none; }
  .nav-toggle:checked ~ .nav-primary {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1rem 1rem;
    box-shadow: var(--shadow);
  }
  .nav-toggle:checked ~ .nav-primary ul,
  .nav-toggle:checked ~ .nav-primary .nav-fallback {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-primary .sub-menu {
    position: static;
    display: flex;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 0.8rem;
  }
  .teaser,
  .cta-band .wrap,
  .split,
  .footer-grid { display: block; }
  .contact-form { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .header-inner { flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .header-phone { font-size: 0.92rem; }
}

@media print {
  .site-header,
  .preview-bar,
  .header-cta,
  .nav-burger { display: none !important; }
  body { background: #fff; }
}

.site-logo::before { display: none; }
.site-logo img, .custom-logo-link img { display: block; height: 2.1rem; width: auto; }
.footer-brand { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.footer-brand .fb-micro { color: #fff; }
.footer-brand .fb-store { color: #e0524c; }

.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { grid-column: 1 / -1; padding: 0.8rem 1rem; border-radius: 8px; margin: 0; font-weight: 600; }
.form-ok { background: #e7f4ea; color: #1e5b2c; }
.form-error { background: var(--accent-soft); color: var(--accent-hover); }

.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200; }
.cookie-banner[hidden] { display: none; }
.cookie-inner { max-width: 46rem; margin: 0 auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,0.18); padding: 1rem 1.2rem; display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: center; }
.cookie-inner p { margin: 0; flex: 1 1 22rem; font-size: 0.95rem; }
.cookie-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Uutta-nosto etusivulla */
.news-strip { background: #b6322d; color: #fff; }
.news-strip .wrap { padding-top: .7rem; padding-bottom: .7rem; text-align: center; }
.news-link { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.05rem; flex-wrap: wrap; justify-content: center; }
.news-link:hover, .news-link:focus { color: #fff; text-decoration: underline; }
.news-badge { background: #111; color: #fff; padding: .15rem .6rem; border-radius: 999px; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.news-arrow { transition: transform .2s; }
.news-link:hover .news-arrow { transform: translateX(4px); }

/* Digiapu-ympyrä etusivun herossa */
.hero-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; }
.hero-circle {
  width: 250px; height: 250px; border-radius: 50%;
  background: #b6322d; color: #fff; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 1.5rem; box-shadow: 0 0 0 10px rgba(182,50,45,.18), 0 18px 40px rgba(0,0,0,.35);
  transition: transform .2s, background .2s; margin-right: 2rem;
}
.hero-circle:hover, .hero-circle:focus { background: #8f2622; color: #fff; transform: scale(1.04); }
.hc-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; opacity: .85; }
.hc-title { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: .25rem 0 .35rem; }
.hc-text { font-size: .98rem; line-height: 1.35; max-width: 11rem; }
.hc-more { margin-top: .7rem; font-weight: 700; font-size: .9rem; border-bottom: 2px solid rgba(255,255,255,.6); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-circle { width: 190px; height: 190px; margin: .5rem auto 0; padding: 1rem; }
  .hc-title { font-size: 1.7rem; }
  .hc-text { font-size: .88rem; }
}
