/* =================================================================
   Rakennus Veikko — patterns.css
   Section-specific layout. Asymmetric-by-default, hairline-divided,
   never 3 equal cards.
   ================================================================= */

/* =================================================================
   TOPBAR / HEADER
   ================================================================= */
.rv-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253,251,247,0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--stone-200);
  /* Outer edge padding — overrides theme.json useRootPaddingAwareAlignments=0 */
  padding-inline: var(--s-6);
  padding-block: 0;
}
@media (min-width: 768px) {
  .rv-topbar { padding-inline: var(--s-10); }
}
@media (min-width: 1280px) {
  .rv-topbar { padding-inline: var(--s-12); }
}
.rv-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding-block: var(--s-3);
  padding-inline: 0;
  flex-wrap: wrap;
}
@media (min-width: 768px) {
  .rv-topbar-inner { flex-wrap: nowrap; padding-block: var(--s-4); }
}
.rv-topbar-brand-wrap {
  margin: 0;
  margin-right: auto;
  flex-shrink: 0;
}
.rv-topbar-brand {
  font-family: var(--font-sans);
  font-weight: var(--fw-extrabold);
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.rv-topbar-phone-wrap {
  margin: 0;
}
.rv-topbar-nav {
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.rv-topbar-nav a {
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-medium);
  color: var(--stone-700);
  text-decoration: none;
  transition: color var(--t-fast) var(--rv-ease);
}
.rv-topbar-nav a:hover { color: var(--ink); }
.rv-topbar-cta {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.rv-topbar-phone {
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.rv-topbar-phone:hover { color: var(--orange); }
@media (max-width: 640px) {
  .rv-topbar-nav { width: 100%; order: 3; justify-content: center; }
}

/* =================================================================
   HERO  §00  — split 3fr/2fr asymmetric, blob ornaments right
   ================================================================= */
.rv-hero {
  position: relative;
  overflow: hidden;
  padding: var(--s-12) var(--s-6) var(--s-16);
}
@media (min-width: 768px) {
  .rv-hero { padding: var(--s-20) var(--s-10) var(--s-24); }
}
.rv-hero-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-12);
  position: relative;
  z-index: 1;
}
@media (min-width: 900px) {
  .rv-hero-grid { grid-template-columns: 3fr 2fr; gap: var(--s-16); align-items: center; }
}
.rv-hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: var(--fw-black);
  line-height: 1.05;
  letter-spacing: var(--ls-display);
  color: var(--ink);
  margin: var(--s-4) 0 var(--s-5);
}
.rv-hero-lead {
  font-size: var(--fs-body-lg);
  line-height: 1.6;
  color: var(--stone-700);
  max-width: 50ch;
  margin: 0 0 var(--s-8);
}
.rv-hero-ctas {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--s-10);
}

/* Trust strip — hairline-divided */
.rv-hero-trust {
  display: flex;
  gap: var(--s-6);
  flex-wrap: wrap;
  align-items: stretch;
  border-top: 1px solid var(--stone-200);
  padding-top: var(--s-6);
}
.rv-hero-trust-item {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding-right: var(--s-6);
}
.rv-hero-trust-item + .rv-hero-trust-item { border-left: 1px solid var(--stone-200); padding-left: var(--s-6); }
.rv-hero-trust-num {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  color: var(--ink);
  letter-spacing: var(--ls-snug);
}
.rv-hero-trust-cap {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 11px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--stone-500);
}

/* Hero stage — blob ornaments + brand mark */
.rv-hero-stage {
  position: relative;
  min-height: 360px;
  border-radius: var(--r-xl);
  background: var(--mesh-bg);
  border: 1px solid var(--stone-200);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv-hero-stage::before,
.rv-hero-stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  z-index: 0;
}
.rv-hero-stage::before {
  width: 320px; height: 320px;
  background: var(--blob-yellow);
  top: -60px; right: -40px;
}
.rv-hero-stage::after {
  width: 260px; height: 260px;
  background: var(--blob-orange);
  bottom: -40px; left: -50px;
}
/* Hero image — sits above blob ornaments, breathes inside the stage with padding */
.rv-hero-stage {
  padding: var(--s-8);
}
@media (min-width: 900px) {
  .rv-hero-stage { padding: var(--s-10); }
}
.rv-hero-stage .rv-hero-stage-img,
.rv-hero-stage .wp-block-image {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv-hero-stage .rv-hero-stage-img img,
.rv-hero-stage .wp-block-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 320px;
  object-fit: contain;
  object-position: center;
}
@media (min-width: 1200px) {
  .rv-hero-stage .rv-hero-stage-img img,
  .rv-hero-stage .wp-block-image img {
    max-height: 360px;
    max-width: 65%;
  }
}

/* Stage corner label — spec-chip card. Cream/blur background, hairline border, soft shadow. */
.rv-hero-stage .stage-corner {
  position: absolute;
  z-index: 2;
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: var(--ls-eyebrow, 0.12em);
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border: 1px solid var(--stone-200);
  border-radius: var(--r-md);
  padding: var(--s-2) var(--s-3);
  box-shadow: var(--shadow-md);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rv-hero-stage .stage-corner.bl { bottom: var(--s-4); left: var(--s-4); }
.rv-hero-stage .stage-corner.tl { top: var(--s-4); left: var(--s-4); }
.rv-hero-stage .stage-corner.tr { top: var(--s-4); right: var(--s-4); }
.rv-hero-stage .stage-corner.br { bottom: var(--s-4); right: var(--s-4); }
@media (max-width: 600px) {
  .rv-hero-stage .stage-corner {
    font-size: 10px;
    padding: var(--s-1) var(--s-2);
  }
  .rv-hero-stage .stage-corner.bl { bottom: var(--s-3); left: var(--s-3); }
}

/* =================================================================
   GENERIC SECTION HEAD
   ================================================================= */
.rv-sec-head {
  max-width: 1280px;
  margin: 0 auto var(--s-12);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 900px) {
  .rv-sec-head { grid-template-columns: 1fr 1fr; gap: var(--s-12); align-items: end; }
}
.rv-sec-head h2 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: var(--ls-tight);
  line-height: 1.08;
}
.rv-sec-head p {
  color: var(--stone-600);
  font-size: var(--fs-body-lg);
  line-height: 1.6;
  max-width: 52ch;
}

/* =================================================================
   §01 PALVELUT — 1 large featured + 2 stacked beside (asymmetric bento)
   ================================================================= */
.rv-services-section { padding: var(--s-20) var(--s-6); }
@media (min-width: 768px) { .rv-services-section { padding: var(--s-24) var(--s-10); } }

.rv-services {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-1);
  border: 1px solid var(--stone-200);
  border-radius: var(--r-lg);
  background: var(--white);
  overflow: hidden;
}
@media (min-width: 900px) {
  .rv-services {
    grid-template-columns: 7fr 5fr;
    grid-template-rows: 1fr 1fr;
  }
}
.rv-service {
  background: var(--white);
  padding: var(--s-8);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  position: relative;
}
@media (min-width: 900px) {
  .rv-service { padding: var(--s-10) var(--s-12); }
  .rv-service--featured {
    grid-row: 1 / span 2;
    background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
    border-right: 1px solid var(--stone-200);
  }
  .rv-service--alt {
    border-bottom: 1px solid var(--stone-200);
  }
}
.rv-service h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 0 0 var(--s-2);
}
.rv-service--featured h3 { font-size: clamp(26px, 3vw, 36px); }
.rv-service p {
  color: var(--stone-600);
  max-width: 56ch;
}
.rv-service-num {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 11px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: var(--s-2);
}

/* =================================================================
   §02 LUPAUKSET — hairline rows, leading number + heading + body
   ================================================================= */
.rv-promises-section { padding: var(--s-20) var(--s-6); background: var(--mesh-bg); }
@media (min-width: 768px) { .rv-promises-section { padding: var(--s-24) var(--s-10); } }

.rv-promises {
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--stone-300);
}
.rv-promise {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
  padding: var(--s-8) 0;
  border-bottom: 1px solid var(--stone-300);
}
@media (min-width: 768px) {
  .rv-promise {
    grid-template-columns: 80px 1fr 1.6fr;
    gap: var(--s-8);
    align-items: start;
  }
}
.rv-promise-num {
  font-family: var(--font-sans);
  font-weight: var(--fw-black);
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: var(--ls-tight);
}
.rv-promise h3 {
  font-size: var(--fs-h3);
  margin: 0;
  letter-spacing: var(--ls-snug);
}
.rv-promise p {
  margin: 0;
  color: var(--stone-600);
  font-size: var(--fs-body);
  line-height: 1.6;
}

/* =================================================================
   §03 PROSESSI — numbered rows, big numbers
   ================================================================= */
.rv-process-section { padding: var(--s-20) var(--s-6); }
@media (min-width: 768px) { .rv-process-section { padding: var(--s-24) var(--s-10); } }

.rv-process {
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--stone-200);
}
.rv-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  padding: var(--s-10) 0;
  border-bottom: 1px solid var(--stone-200);
  align-items: start;
}
@media (min-width: 768px) {
  .rv-step {
    grid-template-columns: 140px 1fr;
    gap: var(--s-10);
  }
}
.rv-step-num {
  font-family: var(--font-sans);
  font-weight: var(--fw-black);
  font-size: clamp(56px, 8vw, 96px);
  line-height: .92;
  letter-spacing: var(--ls-display);
  color: var(--ink);
}
.rv-step-num span { color: var(--orange); }
.rv-step-body h3 {
  font-size: var(--fs-h3);
  margin: 0 0 var(--s-3);
}
.rv-step-body p {
  margin: 0;
  color: var(--stone-600);
  font-size: var(--fs-body-lg);
  line-height: 1.55;
  max-width: 56ch;
}

/* =================================================================
   §04 TESTIMONIALS — 2-col asymmetric, 3rd offset
   ================================================================= */
.rv-testimonials-section { padding: var(--s-20) var(--s-6); background: var(--mesh-bg); }
@media (min-width: 768px) { .rv-testimonials-section { padding: var(--s-24) var(--s-10); } }

.rv-testimonials {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}
@media (min-width: 900px) {
  .rv-testimonials {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-10);
  }
  .rv-testimonial:nth-child(3) {
    grid-column: 1 / -1;
    margin-left: auto;
    width: calc(50% - var(--s-5));
  }
}
.rv-testimonial {
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  box-shadow: var(--shadow-sm);
}
.rv-testimonial-stars {
  font-family: var(--font-sans);
  font-size: 18px;
  letter-spacing: 0.18em;
  color: var(--orange);
}
.rv-testimonial-quote {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body-lg);
  line-height: 1.55;
  color: var(--stone-700);
  margin: 0;
  text-wrap: pretty;
}
.rv-testimonial-attribution {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--stone-500);
  border-top: 1px solid var(--stone-200);
  padding-top: var(--s-4);
}

/* =================================================================
   §05 CONTACT — split, hairline rows + form
   ================================================================= */
.rv-contact-section { padding: var(--s-20) var(--s-6); }
@media (min-width: 768px) { .rv-contact-section { padding: var(--s-24) var(--s-10); } }

.rv-contact {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-12);
}
@media (min-width: 900px) {
  .rv-contact { grid-template-columns: 5fr 7fr; gap: var(--s-16); }
}

.rv-contact-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--stone-200);
  margin-top: var(--s-8);
}
.rv-contact-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-1);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--stone-200);
}
.rv-contact-row strong {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body-lg);
  color: var(--ink);
  letter-spacing: var(--ls-snug);
}
.rv-contact-row strong a {
  color: inherit;
  text-decoration: none;
}
.rv-contact-row strong a:hover { color: var(--orange); }
.rv-contact-row span {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--stone-500);
}

/* Form */
.rv-form {
  display: grid;
  gap: var(--s-5);
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  box-shadow: var(--shadow-sm);
}
.rv-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 640px) {
  .rv-form-row--2 { grid-template-columns: 1fr 1fr; }
}
.rv-form-field { display: flex; flex-direction: column; }
.rv-form button[type="submit"] {
  --btn-underbar: var(--btn-underbar-rest);
  --btn-underbar-color: var(--ink);
  background: var(--rv-grad-button-primary);
  color: var(--ink);
  border: 1px solid rgba(10,9,8,0.12);
  border-radius: var(--r-sm);
  padding: var(--s-4) var(--s-6);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: inset 0 calc(var(--btn-underbar) * -1) 0 0 var(--btn-underbar-color);
  transition: box-shadow var(--t-fast) var(--rv-ease), background var(--t-fast) var(--rv-ease), transform var(--t-fast) var(--rv-ease);
  width: auto;
  justify-self: start;
}
.rv-form button[type="submit"]:hover { --btn-underbar: var(--btn-underbar-active); background: var(--rv-grad-button-primary-h); }
.rv-form button[type="submit"]:active { --btn-underbar: var(--btn-underbar-press); transform: translateY(1px); }
.rv-form button[type="submit"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* =================================================================
   FOOTER — dark ink-800 surface, 4-col, warm radial glow
   ================================================================= */
.rv-footer {
  background: var(--ink-800);
  color: var(--white);
  padding: var(--s-20) var(--s-6) var(--s-10);
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .rv-footer { padding: var(--s-24) var(--s-10) var(--s-12); }
}
.rv-footer::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 240px;
  background: radial-gradient(ellipse at center, rgba(250,220,87,0.12) 0%, rgba(250,220,87,0) 70%);
  pointer-events: none;
}
.rv-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.rv-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-10);
  padding-bottom: var(--s-12);
  border-bottom: 1px solid var(--hairline-on-ink);
}
@media (min-width: 700px) {
  .rv-footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .rv-footer-grid { grid-template-columns: 2.4fr 1fr 1.2fr 1fr; }
}
.rv-footer h4 {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--stone-400);
  margin: 0 0 var(--s-4);
}
.rv-footer-brand {
  font-family: var(--font-sans);
  font-weight: var(--fw-extrabold);
  font-size: 22px;
  color: var(--white);
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-3);
}
.rv-footer-tagline {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-body-sm);
  line-height: 1.55;
  max-width: 38ch;
}
.rv-footer ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.rv-footer ul a, .rv-footer p a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: var(--fs-body-sm);
  transition: color var(--t-fast) var(--rv-ease);
}
.rv-footer ul a:hover, .rv-footer p a:hover { color: var(--yellow); }
.rv-footer-contact p {
  color: rgba(255,255,255,0.8);
  font-size: var(--fs-body-sm);
  line-height: 1.7;
  margin: 0;
}
.rv-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-4);
  padding-top: var(--s-6);
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.rv-footer-bottom a { color: rgba(255,255,255,0.6); text-decoration: none; }
.rv-footer-bottom a:hover { color: var(--yellow); }

/* =================================================================
   PAGE HERO — shared by static pages & archives. Hairline divider, eyebrow, big headline, lead.
   ================================================================= */
.rv-page-hero {
  padding: var(--s-16) var(--s-6) var(--s-12);
  border-bottom: 1px solid var(--stone-200);
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .rv-page-hero { padding: var(--s-20) var(--s-10) var(--s-16); }
}
.rv-page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}
@media (min-width: 900px) {
  .rv-page-hero-inner { grid-template-columns: 7fr 5fr; gap: var(--s-16); align-items: end; }
}
.rv-page-hero .rv-eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin: 0 0 var(--s-4);
}
.rv-page-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: var(--fw-extrabold);
  line-height: 1.06;
  letter-spacing: var(--ls-display);
  color: var(--ink);
  margin: 0 0 var(--s-5);
}
.rv-page-hero p {
  font-size: var(--fs-body-lg);
  line-height: 1.6;
  color: var(--stone-600);
  max-width: 56ch;
  margin: 0;
}

/* =================================================================
   BLOG ARCHIVE  — asymmetric: lead post wide, rest in 2-col list
   ================================================================= */
.rv-blog-section { padding: var(--s-16) var(--s-6) var(--s-24); }
@media (min-width: 768px) { .rv-blog-section { padding: var(--s-20) var(--s-10) var(--s-32); } }

.rv-blog-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--stone-200);
}
.rv-blog-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  padding: var(--s-8) 0;
  border-bottom: 1px solid var(--stone-200);
  align-items: start;
}
@media (min-width: 768px) {
  .rv-blog-card { grid-template-columns: 200px 1fr 220px; gap: var(--s-10); padding: var(--s-10) 0; }
}
.rv-blog-card-meta {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-500);
}
.rv-blog-card-body h2,
.rv-blog-card-body h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: var(--ls-snug);
  margin: 0 0 var(--s-3);
  line-height: 1.18;
}
.rv-blog-card-body h2 a,
.rv-blog-card-body h3 a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--orange), var(--orange));
  background-size: 0 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rv-blog-card-body h2 a:hover,
.rv-blog-card-body h3 a:hover { background-size: 100% 1.5px; }
.rv-blog-card-body p {
  color: var(--stone-600);
  font-size: var(--fs-body);
  line-height: 1.6;
  margin: 0;
  max-width: 65ch;
}
.rv-blog-card-thumb {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--stone-100);
  aspect-ratio: 4 / 3;
}
.rv-blog-card-thumb img,
.rv-blog-card-thumb .wp-post-image {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Single post — editorial body */
.rv-single { padding: var(--s-12) var(--s-6) var(--s-24); }
@media (min-width: 768px) { .rv-single { padding: var(--s-16) var(--s-10) var(--s-32); } }
.rv-single-inner { max-width: 1280px; margin: 0 auto; }
.rv-single-meta {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin: 0 0 var(--s-4);
}
.rv-single-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: var(--fw-extrabold);
  line-height: 1.08;
  letter-spacing: var(--ls-display);
  color: var(--ink);
  margin: 0 0 var(--s-8);
  max-width: 22ch;
}
.rv-single-featured {
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 0 0 var(--s-12);
  background: var(--stone-100);
}
.rv-single-featured img { width: 100%; height: auto; display: block; }
.rv-single-body {
  max-width: 70ch;
  font-size: var(--fs-body-lg);
  line-height: 1.7;
  color: var(--stone-700);
}
.rv-single-body p { margin: 0 0 var(--s-5); max-width: 70ch; }
.rv-single-body h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: var(--ls-snug);
  color: var(--ink);
  margin: var(--s-10) 0 var(--s-4);
}
.rv-single-body h3 {
  font-size: clamp(20px, 2.1vw, 24px);
  letter-spacing: var(--ls-snug);
  color: var(--ink);
  margin: var(--s-8) 0 var(--s-3);
}
.rv-single-body ul, .rv-single-body ol {
  margin: 0 0 var(--s-5);
  padding-left: var(--s-6);
}
.rv-single-body li { margin: 0 0 var(--s-2); max-width: 65ch; }
.rv-single-back {
  display: inline-block;
  margin-top: var(--s-12);
  padding-top: var(--s-6);
  border-top: 1px solid var(--stone-200);
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body-sm);
  color: var(--stone-700);
  text-decoration: none;
}
.rv-single-back:hover { color: var(--orange); }

/* =================================================================
   REFERENSSIT — 2-col zig-zag (alt projects flip image side)
   ================================================================= */
.rv-ref-section { padding: var(--s-16) var(--s-6) var(--s-24); background: var(--mesh-bg); }
@media (min-width: 768px) { .rv-ref-section { padding: var(--s-20) var(--s-10) var(--s-32); } }

.rv-ref-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-12);
}
@media (min-width: 900px) {
  .rv-ref-grid { grid-template-columns: 1fr 1fr; gap: var(--s-16); }
}
.rv-ref-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-default, 320ms) cubic-bezier(0.16, 1, 0.3, 1), box-shadow var(--t-default, 320ms) cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}
.rv-ref-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
@media (min-width: 900px) {
  .rv-ref-grid > .rv-ref-card:nth-child(4n+1) { margin-top: 0; }
  .rv-ref-grid > .rv-ref-card:nth-child(4n+2) { margin-top: var(--s-16); }
  .rv-ref-grid > .rv-ref-card:nth-child(4n+3) { margin-top: 0; }
  .rv-ref-grid > .rv-ref-card:nth-child(4n+4) { margin-top: var(--s-16); }
}
.rv-ref-card-thumb {
  aspect-ratio: 4 / 3;
  background: var(--stone-100);
  overflow: hidden;
}
.rv-ref-card-thumb img,
.rv-ref-card-thumb .wp-post-image {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 480ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rv-ref-card:hover .rv-ref-card-thumb img,
.rv-ref-card:hover .rv-ref-card-thumb .wp-post-image { transform: scale(1.03); }
.rv-ref-card-body {
  padding: var(--s-6) var(--s-8) var(--s-8);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.rv-ref-card-meta {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-500);
}
.rv-ref-card h2,
.rv-ref-card h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  margin: 0;
  letter-spacing: var(--ls-snug);
  line-height: 1.18;
}
.rv-ref-card h2 a,
.rv-ref-card h3 a { color: var(--ink); text-decoration: none; }
.rv-ref-card h2 a:hover,
.rv-ref-card h3 a:hover { color: var(--orange); }
.rv-ref-card p {
  margin: 0;
  color: var(--stone-600);
  font-size: var(--fs-body);
  line-height: 1.55;
}

/* Single referenssi — hero featured + body + meta */
.rv-ref-single { padding: var(--s-12) var(--s-6) var(--s-24); }
@media (min-width: 768px) { .rv-ref-single { padding: var(--s-16) var(--s-10) var(--s-32); } }
.rv-ref-single-inner { max-width: 1280px; margin: 0 auto; }
.rv-ref-single-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-12);
}
@media (min-width: 900px) {
  .rv-ref-single-head { grid-template-columns: 7fr 5fr; gap: var(--s-16); align-items: end; }
}
.rv-ref-single-meta {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  border-top: 1px solid var(--stone-200);
  padding-top: var(--s-6);
}
.rv-ref-single-meta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-1);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--stone-200);
}
.rv-ref-single-meta-row strong {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  color: var(--ink);
}
.rv-ref-single-meta-row span {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-500);
}
.rv-ref-single-featured {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--stone-100);
  margin: 0 0 var(--s-12);
}
.rv-ref-single-featured img { width: 100%; height: auto; display: block; }
.rv-ref-single-body {
  max-width: 70ch;
  font-size: var(--fs-body-lg);
  line-height: 1.7;
  color: var(--stone-700);
}
.rv-ref-single-body p { margin: 0 0 var(--s-5); max-width: 70ch; }
.rv-ref-single-body h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin: var(--s-8) 0 var(--s-3);
  color: var(--ink);
}
.rv-ref-single-body .wp-block-gallery {
  margin: var(--s-10) 0;
  max-width: none;
}

/* =================================================================
   PALVELUT page — service detail blocks (hairline divider, asymmetric body)
   ================================================================= */
.rv-service-detail-section {
  padding: var(--s-16) var(--s-6);
  border-bottom: 1px solid var(--stone-200);
}
@media (min-width: 768px) { .rv-service-detail-section { padding: var(--s-20) var(--s-10); } }
.rv-service-detail {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
}
@media (min-width: 900px) {
  .rv-service-detail { grid-template-columns: 4fr 7fr; gap: var(--s-16); align-items: start; }
}
.rv-service-detail-num {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin: 0 0 var(--s-3);
}
.rv-service-detail h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 0 0 var(--s-4);
  letter-spacing: var(--ls-tight);
}
.rv-service-detail-lead {
  font-size: var(--fs-body-lg);
  line-height: 1.6;
  color: var(--stone-600);
  margin: 0 0 var(--s-6);
  max-width: 56ch;
}
.rv-service-detail-body p {
  color: var(--stone-700);
  font-size: var(--fs-body);
  line-height: 1.7;
  margin: 0 0 var(--s-4);
  max-width: 65ch;
}
.rv-service-detail-body h3 {
  font-size: var(--fs-h4);
  margin: var(--s-6) 0 var(--s-3);
  color: var(--ink);
}
.rv-service-detail-body ul {
  list-style: none;
  margin: 0 0 var(--s-6);
  padding: 0;
  border-top: 1px solid var(--stone-200);
}
.rv-service-detail-body ul li {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--stone-200);
  font-size: var(--fs-body);
  color: var(--stone-700);
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--s-3);
  align-items: baseline;
}
.rv-service-detail-body ul li::before {
  content: "—";
  color: var(--orange);
  font-weight: var(--fw-bold);
}

/* =================================================================
   YHTEYSTIEDOT page — opening hours (hairline rows), business info, map placeholder
   ================================================================= */
.rv-meta-section { padding: var(--s-16) var(--s-6); }
@media (min-width: 768px) { .rv-meta-section { padding: var(--s-20) var(--s-10); } }
.rv-meta-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-12);
}
@media (min-width: 900px) {
  .rv-meta-grid { grid-template-columns: 5fr 7fr; gap: var(--s-16); align-items: start; }
}
.rv-hours, .rv-business {
  border-top: 1px solid var(--stone-200);
}
.rv-hours h3, .rv-business h3 {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin: var(--s-6) 0 var(--s-2);
}
.rv-hours-row, .rv-business-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--stone-200);
  align-items: baseline;
}
.rv-hours-row strong, .rv-business-row strong {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  color: var(--ink);
}
.rv-hours-row span, .rv-business-row span {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  color: var(--stone-700);
  text-align: right;
}

.rv-map-placeholder {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--stone-200);
  background:
    linear-gradient(180deg, #FAF8F2 0%, #F5F3EE 100%);
  display: flex;
  align-items: flex-end;
  padding: var(--s-6);
}
.rv-map-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(10,9,8,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,9,8,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.rv-map-placeholder::after {
  content: "";
  position: absolute;
  top: 38%;
  left: 46%;
  width: 18px;
  height: 18px;
  background: var(--rv-grad-signature);
  border: 2px solid var(--ink);
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -100%) rotate(-45deg);
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.rv-map-placeholder-label {
  position: relative;
  z-index: 3;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  box-shadow: var(--shadow-sm);
}
.rv-map-placeholder-label strong {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  color: var(--ink);
}
.rv-map-placeholder-label span {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-500);
}

/* =================================================================
   EDITOR-SAFE OVERRIDES — make patterns readable in Gutenberg canvas
   ================================================================= */
.editor-styles-wrapper .rv-hero,
.editor-styles-wrapper .rv-services-section,
.editor-styles-wrapper .rv-promises-section,
.editor-styles-wrapper .rv-process-section,
.editor-styles-wrapper .rv-testimonials-section,
.editor-styles-wrapper .rv-contact-section,
.editor-styles-wrapper .rv-page-hero,
.editor-styles-wrapper .rv-blog-section,
.editor-styles-wrapper .rv-ref-section,
.editor-styles-wrapper .rv-single,
.editor-styles-wrapper .rv-ref-single,
.editor-styles-wrapper .rv-service-detail-section,
.editor-styles-wrapper .rv-meta-section,
.editor-styles-wrapper .rv-footer {
  padding-left: var(--s-6);
  padding-right: var(--s-6);
}

/* =================================================================
   HEADER — Site Editor customized rv-nav-* classes
   (User customized header.html in Site Editor; classes differ from
   the original rv-topbar template.)
   ================================================================= */
.rv-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253,251,247,0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--stone-200);
  padding-inline: var(--s-6);
  padding-block: 0;
}
@media (min-width: 768px) {
  .rv-nav { padding-inline: var(--s-10); }
}
@media (min-width: 1280px) {
  .rv-nav { padding-inline: var(--s-12); }
}
.rv-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding-block: var(--s-3);
  padding-inline: 0;
}
@media (min-width: 768px) {
  .rv-nav-inner { padding-block: var(--s-4); }
}
.rv-nav-logo { flex-shrink: 0; margin-right: auto; }
.rv-nav-logo img,
.rv-nav-logo .custom-logo {
  display: block;
  height: auto;
  max-height: 48px;
  width: auto;
}
.rv-nav-cta {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.rv-nav-cta p { margin: 0; }
.rv-nav-cta a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.rv-nav-cta a:hover { color: var(--orange); }
.rv-topstrip { display: none; }

/* =================================================================
   CONTACT FORM 7 — match brand .rv-form aesthetic
   Targets CF7's default markup (.wpcf7, .wpcf7-form, .wpcf7-form-control,
   .wpcf7-not-valid-tip, .wpcf7-response-output, .wpcf7-spinner).
   Plug-and-play: just paste a CF7 shortcode anywhere; styles take care
   of the rest. Use .rv-form-wrap around the shortcode for the white card.
   ================================================================= */

/* Card wrapper around the CF7 shortcode (optional but recommended) */
.rv-form-wrap {
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  .rv-form-wrap { padding: var(--s-6); }
}

/* CF7 form wrapper */
.wpcf7 { font-family: var(--font-sans); color: var(--ink); }

/* Strip default <p> margins inside CF7 — replace with consistent gap */
.wpcf7-form > p {
  margin: 0 0 var(--s-5) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.wpcf7-form > p:last-of-type { margin-bottom: 0; }

/* Labels (CF7 wraps input inside <label> by default) */
.wpcf7-form label {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  margin: 0;
}

/* Inputs / selects / textareas — match global form controls */
.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-email,
.wpcf7-form-control.wpcf7-tel,
.wpcf7-form-control.wpcf7-url,
.wpcf7-form-control.wpcf7-number,
.wpcf7-form-control.wpcf7-textarea,
.wpcf7-form-control.wpcf7-select,
.wpcf7-form-control.wpcf7-date {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--stone-300);
  border-radius: var(--r-sm);
  padding: var(--s-3) var(--s-4);
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--t-fast) var(--rv-ease), box-shadow var(--t-fast) var(--rv-ease);
}
.wpcf7-form-control:focus-visible {
  border-color: var(--ink);
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
.wpcf7-form-control.wpcf7-textarea { min-height: 120px; resize: vertical; }
.wpcf7-form-control.wpcf7-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2.5 4.5l3.5 3 3.5-3' fill='none' stroke='%230A0908' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right var(--s-4) center;
  padding-right: var(--s-10);
}
.wpcf7-form-control::placeholder { color: var(--stone-400); }

/* Radio / checkbox lists */
.wpcf7-list-item { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0 var(--s-4) var(--s-2) 0; }
.wpcf7-list-item input[type="radio"],
.wpcf7-list-item input[type="checkbox"] { accent-color: var(--ink); width: 16px; height: 16px; }

/* Acceptance checkbox (consent) */
.wpcf7-acceptance .wpcf7-list-item { display: flex; align-items: flex-start; }
.wpcf7-acceptance .wpcf7-list-item-label { font-size: var(--fs-body-sm); color: var(--stone-600); line-height: 1.5; }

/* Submit button — material primary, matches .is-style-rv-primary */
.wpcf7-form .wpcf7-submit {
  --btn-underbar: var(--btn-underbar-rest);
  --btn-underbar-color: var(--ink);
  background: var(--rv-grad-button-primary);
  color: var(--ink);
  border: 1px solid rgba(10, 9, 8, 0.12);
  border-radius: var(--r-sm);
  padding: var(--s-4) var(--s-6);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: inset 0 calc(var(--btn-underbar) * -1) 0 0 var(--btn-underbar-color);
  transition: box-shadow var(--t-fast) var(--rv-ease), background var(--t-fast) var(--rv-ease), transform var(--t-fast) var(--rv-ease);
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.wpcf7-form .wpcf7-submit:hover { --btn-underbar: var(--btn-underbar-active); background: var(--rv-grad-button-primary-h); }
.wpcf7-form .wpcf7-submit:active { --btn-underbar: var(--btn-underbar-press); transform: translateY(1px); }
.wpcf7-form .wpcf7-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wpcf7-form .wpcf7-submit:disabled { opacity: 0.45; cursor: not-allowed; }

/* Spinner — small loading dot next to submit */
.wpcf7-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--stone-300);
  border-top-color: var(--ink);
  margin: 0 0 0 var(--s-3);
  vertical-align: middle;
  background: none;
  animation: rv-spin 0.7s linear infinite;
}
.wpcf7-form.submitting .wpcf7-spinner { visibility: visible; }
@keyframes rv-spin { to { transform: rotate(360deg); } }

/* Inline field errors */
.wpcf7-not-valid-tip {
  display: block;
  margin-top: var(--s-1);
  font-size: var(--fs-body-sm);
  color: var(--error-text, #991B1B);
  font-weight: var(--fw-medium);
}
.wpcf7-form-control.wpcf7-not-valid {
  border-color: var(--error, #DC2626);
  box-shadow: 0 0 0 1px var(--error, #DC2626) inset;
}

/* Form-level response (success / error / spam / validation summary) */
.wpcf7 .wpcf7-response-output,
.wpcf7-response-output {
  margin: var(--s-6) 0 0 0;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body-sm);
  border: 1px solid var(--stone-200);
  background: var(--stone-100);
  color: var(--ink);
}
.wpcf7-form.sent .wpcf7-response-output {
  background: var(--success-bg, #F0FDF4);
  border-color: var(--success-border, #BBF7D0);
  color: var(--success-text, #166534);
}
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.aborted .wpcf7-response-output {
  background: var(--error-bg, #FEF2F2);
  border-color: var(--error-border, #FECACA);
  color: var(--error-text, #991B1B);
}
.wpcf7-form.spam .wpcf7-response-output {
  background: var(--warning-bg, #FFFBEB);
  border-color: var(--warning-border, #FDE68A);
  color: var(--warning-text, #92400E);
}
