/*
Theme Name: Reviving A Home
Theme URI: https://example.com/reviving-a-home
Author: Reviving A Home
Description: A premium cream-and-brown editorial WordPress theme designed for WPBakery Page Builder. Includes custom WPBakery elements, starter templates, renovation journal layouts and a reusable recommended-products system.
Version: 3.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: reviving-a-home
Tags: custom-logo, custom-menu, featured-images, blog, full-width-template, theme-options
*/

:root {
  --rah-cream: #f4f0e6;
  --rah-paper: #fbf8f0;
  --rah-brown: #38271f;
  --rah-brown-soft: #675247;
  --rah-taupe: #a99886;
  --rah-line: rgba(56,39,31,.16);
  --rah-line-strong: rgba(56,39,31,.28);
  --rah-shadow: 0 24px 70px rgba(56,39,31,.10);
  --rah-shadow-soft: 0 12px 36px rgba(56,39,31,.07);
  --rah-content: 1180px;
  --rah-narrow: 780px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rah-cream);
  color: var(--rah-brown);
  font-family: Baskerville, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 18px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--rah-brown); text-decoration-color: rgba(56,39,31,.45); text-underline-offset: 3px; }
a:hover { color: var(--rah-brown-soft); }
button, input, textarea, select { font: inherit; }

.rah-wrap { width: min(calc(100% - 48px), var(--rah-content)); margin-inline: auto; }
.rah-narrow { width: min(calc(100% - 48px), var(--rah-narrow)); margin-inline: auto; }
.rah-site { min-height: 100vh; display: flex; flex-direction: column; }
.rah-site-main { flex: 1; }
.rah-sans { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }

/* Header */
.rah-site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(244,240,230,.95);
  border-bottom: 1px solid var(--rah-line);
  backdrop-filter: blur(14px);
}
.admin-bar .rah-site-header { top: 32px; }
.rah-header-inner {
  min-height: 100px;
  display: flex;
  align-items: center;
  gap: 34px;
}
.rah-brand { flex: 0 0 auto; display: flex; align-items: center; text-decoration: none; }
.rah-brand img, .custom-logo-link img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(310px, 32vw);
  max-height: 70px;
  object-fit: contain;
}
.rah-branding .custom-logo-link { display: flex; align-items: center; }
.rah-primary-nav { margin-left: auto; }
.rah-primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 25px; }
.rah-primary-nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .11em;
  font: 700 .72rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.rah-primary-nav .current-menu-item > a, .rah-primary-nav a:hover { color: var(--rah-brown-soft); }
.rah-header-cta { flex: 0 0 auto; }
.rah-menu-toggle { display: none; border: 1px solid var(--rah-line-strong); background: transparent; color: var(--rah-brown); padding: 10px 13px; }

/* Buttons */
.rah-button,
.rah-site .vc_btn3-container .vc_btn3,
.rah-site .wpb_button,
.rah-product-button {
  display: inline-block;
  background: var(--rah-brown) !important;
  color: var(--rah-cream) !important;
  border: 1px solid var(--rah-brown) !important;
  border-radius: 2px !important;
  padding: 13px 21px !important;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: .11em;
  font: 700 .72rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.rah-button:hover,
.rah-site .vc_btn3-container .vc_btn3:hover,
.rah-site .wpb_button:hover,
.rah-product-button:hover { background: var(--rah-brown-soft) !important; border-color: var(--rah-brown-soft) !important; transform: translateY(-1px); }
.rah-button--outline { background: transparent !important; color: var(--rah-brown) !important; }
.rah-button--outline:hover { background: var(--rah-brown) !important; color: var(--rah-cream) !important; }

/* Typography / editorial details */
.rah-kicker {
  margin: 0 0 14px;
  color: var(--rah-brown-soft);
  text-transform: uppercase;
  letter-spacing: .2em;
  font: 700 .72rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.rah-display { margin: 0; font-weight: 500; font-size: clamp(3.4rem, 7vw, 7.2rem); line-height: .94; letter-spacing: -.045em; text-wrap: balance; }
.rah-heading { margin: 0; font-weight: 500; font-size: clamp(2.3rem, 4.5vw, 4.4rem); line-height: 1; letter-spacing: -.035em; text-wrap: balance; }
.rah-lede { margin: 24px 0 0; max-width: 700px; color: var(--rah-brown-soft); font-size: clamp(1.08rem, 1.6vw, 1.32rem); }
.rah-rule { border-top: 1px solid var(--rah-line); }

/* WPBakery page canvas */
.rah-wpbakery-content > .vc_row { margin-left: 0; margin-right: 0; }
.rah-wpbakery-content .vc_row[data-vc-full-width] { overflow: visible; }
.rah-vc-section {
  padding-top: 92px !important;
  padding-bottom: 92px !important;
  padding-left: max(24px, calc((100vw - var(--rah-content)) / 2)) !important;
  padding-right: max(24px, calc((100vw - var(--rah-content)) / 2)) !important;
}
.rah-vc-section--paper { background: var(--rah-paper); border-block: 1px solid var(--rah-line); }
.rah-vc-section--cream { background: var(--rah-cream); }
.rah-vc-inner { width: min(calc(100% - 48px), var(--rah-content)); margin-inline: auto; }
.rah-vc-narrow { width: min(calc(100% - 48px), var(--rah-narrow)); margin-inline: auto; }
.wpb_content_element { margin-bottom: 28px; }
.vc_separator.vc_sep_color_grey .vc_sep_line { border-color: var(--rah-line); }

/* Hero element */
.rah-hero { padding: 64px 0 54px; overflow: hidden; border-bottom: 1px solid var(--rah-line); }
.rah-hero__grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 58px; align-items: center; }
.rah-hero__copy { position: relative; z-index: 2; }
.rah-hero__actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.rah-hero__art { position: relative; min-height: 430px; display: flex; align-items: center; justify-content: center; isolation: isolate; }
.rah-hero__art::before { content: ""; position: absolute; inset: 8% 0 2% 7%; z-index: -1; background: var(--rah-paper); border: 1px solid var(--rah-line); box-shadow: var(--rah-shadow); }
.rah-hero__art img { display: block; width: 112%; max-width: none; margin-left: -6%; mix-blend-mode: multiply; }

/* Section heading */
.rah-section-heading { max-width: 820px; margin-bottom: 38px; }
.rah-section-heading--center { text-align: center; margin-inline: auto; }
.rah-section-heading--center .rah-lede { margin-inline: auto; }

/* Story stats */
.rah-stats { border-block: 1px solid var(--rah-line); }
.rah-stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.rah-stat { padding: 28px 32px; border-right: 1px solid var(--rah-line); }
.rah-stat:last-child { border-right: 0; }
.rah-stat strong { display: block; font-size: 1.7rem; font-weight: 500; line-height: 1.15; }
.rah-stat span { display: block; margin-top: 6px; color: var(--rah-brown-soft); font-size: .92rem; }

/* Cards / journal */
.rah-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 25px; }
.rah-post-card, .rah-product-card { height: 100%; background: var(--rah-paper); border: 1px solid var(--rah-line); transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.rah-post-card:hover, .rah-product-card:hover { transform: translateY(-4px); box-shadow: var(--rah-shadow-soft); border-color: var(--rah-line-strong); }
.rah-post-card__image, .rah-product-card__image { display: block; aspect-ratio: 4/3; overflow: hidden; background: #e9e0d3; }
.rah-post-card__image img, .rah-product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.rah-post-card:hover .rah-post-card__image img, .rah-product-card:hover .rah-product-card__image img { transform: scale(1.025); }
.rah-post-card__body, .rah-product-card__body { padding: 25px; }
.rah-meta { color: var(--rah-brown-soft); text-transform: uppercase; letter-spacing: .13em; font: 700 .68rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
.rah-post-card h2, .rah-post-card h3, .rah-product-card h3 { margin: 10px 0 12px; font-size: 1.55rem; line-height: 1.12; font-weight: 500; }
.rah-post-card h2 a, .rah-post-card h3 a, .rah-product-card h3 a { text-decoration: none; }
.rah-post-card p, .rah-product-card p { margin: 0; color: var(--rah-brown-soft); font-size: .96rem; }
.rah-product-card__details { margin: 20px 0; padding-top: 15px; border-top: 1px solid var(--rah-line); color: var(--rah-brown-soft); font-size: .88rem; }
.rah-product-card__details div + div { margin-top: 4px; }
.rah-product-disclosure { margin: 0 0 28px; padding: 16px 18px; background: rgba(56,39,31,.05); border-left: 2px solid var(--rah-taupe); color: var(--rah-brown-soft); font-size: .9rem; }

/* Before / after */
.rah-before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rah-before-after__item { margin: 0; }
.rah-before-after__item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.rah-before-after__label { margin: 10px 0 0; color: var(--rah-brown-soft); text-transform: uppercase; letter-spacing: .14em; font: 700 .7rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }

/* Timeline */
.rah-timeline { margin: 36px 0 0 10px; padding-left: 34px; border-left: 1px solid var(--rah-taupe); }
.rah-timeline__item { position: relative; padding-bottom: 28px; }
.rah-timeline__item:last-child { padding-bottom: 0; }
.rah-timeline__item::before { content: ""; width: 10px; height: 10px; border-radius: 50%; position: absolute; left: -40px; top: 8px; background: var(--rah-cream); border: 2px solid var(--rah-brown); }
.rah-timeline__item h3 { margin: 0 0 5px; font-size: 1.35rem; font-weight: 500; }
.rah-timeline__item p { margin: 0; color: var(--rah-brown-soft); }

/* Standard page / posts */
.rah-page-hero { padding: 75px 0 46px; border-bottom: 1px solid var(--rah-line); }
.rah-page-title { margin: 0; max-width: 950px; font-weight: 500; font-size: clamp(3rem, 6vw, 5.6rem); line-height: .98; letter-spacing: -.04em; }
.rah-entry { padding: 60px 0 92px; }
.rah-entry-content > *:first-child { margin-top: 0; }
.rah-entry-content h2, .rah-entry-content h3 { line-height: 1.1; font-weight: 500; margin-top: 1.7em; }
.rah-entry-content blockquote { margin-inline: 0; padding-left: 22px; border-left: 3px solid var(--rah-taupe); color: var(--rah-brown-soft); font-size: 1.2rem; }
.rah-featured { width: min(calc(100% - 48px), var(--rah-content)); margin: 0 auto 48px; }
.rah-featured img { width: 100%; max-height: 760px; object-fit: cover; }
.rah-archive { padding: 70px 0 90px; }
.rah-pagination { margin-top: 40px; }
.rah-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.rah-pagination .page-numbers { padding: 8px 12px; border: 1px solid var(--rah-line); text-decoration: none; }
.rah-pagination .current { background: var(--rah-brown); color: var(--rah-cream); }

/* Footer */
.rah-site-footer { margin-top: auto; padding: 62px 0 28px; background: #ebe3d7; border-top: 1px solid var(--rah-line); }
.rah-footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 50px; }
.rah-footer-logo { display: block; width: min(300px, 72vw); height: auto; margin-bottom: 18px; }
.rah-footer-text { max-width: 520px; color: var(--rah-brown-soft); }
.rah-footer-title { margin: 0 0 13px; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
.rah-footer-menu { list-style: none; padding: 0; margin: 0; }
.rah-footer-menu li + li { margin-top: 7px; }
.rah-footer-menu a { text-decoration: none; }
.rah-footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--rah-line); display: flex; justify-content: space-between; gap: 20px; color: var(--rah-brown-soft); font-size: .8rem; }

/* WPBakery editor-friendly helpers */
.rah-soft-panel { padding: 36px; background: var(--rah-paper); border: 1px solid var(--rah-line); box-shadow: var(--rah-shadow-soft); }
.rah-dark-panel { padding: 44px; background: var(--rah-brown); color: var(--rah-cream); }
.rah-dark-panel p { color: rgba(244,240,230,.82); }
.rah-dark-panel a:not(.rah-button) { color: var(--rah-cream); }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1000px) {
  .rah-header-inner { min-height: 88px; }
  .rah-brand img, .custom-logo-link img { max-width: min(275px, 52vw); max-height: 62px; }
  .rah-header-cta { display: none; }
  .rah-hero__grid { grid-template-columns: 1fr; }
  .rah-hero__art { min-height: 340px; }
  .rah-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 782px) {
  .admin-bar .rah-site-header { top: 46px; }
  .rah-wrap, .rah-narrow, .rah-vc-inner, .rah-vc-narrow { width: min(calc(100% - 30px), var(--rah-content)); }
  .rah-header-inner { min-height: 80px; gap: 16px; }
  .rah-brand img, .custom-logo-link img { max-width: min(235px, 65vw); max-height: 56px; }
  .rah-menu-toggle { display: block; margin-left: auto; }
  .rah-primary-nav { display: none; position: absolute; top: 80px; left: 0; right: 0; margin: 0; padding: 20px; background: var(--rah-cream); border-bottom: 1px solid var(--rah-line); }
  .rah-primary-nav.is-open { display: block; }
  .rah-primary-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; width: min(calc(100% - 30px), var(--rah-content)); margin-inline: auto; }
  .rah-hero { padding: 46px 0 38px; }
  .rah-hero__grid { gap: 30px; }
  .rah-hero__art { min-height: 260px; }
  .rah-hero__art::before { inset: 10% 0 0 0; }
  .rah-hero__art img { width: 104%; margin-left: -2%; }
  .rah-vc-section { padding-top: 65px !important; padding-bottom: 65px !important; padding-left: 15px !important; padding-right: 15px !important; }
  .rah-stats__grid, .rah-card-grid, .rah-before-after, .rah-footer-grid { grid-template-columns: 1fr; }
  .rah-stat { border-right: 0; border-bottom: 1px solid var(--rah-line); }
  .rah-stat:last-child { border-bottom: 0; }
  .rah-footer-bottom { display: block; }
}
