/*
Theme Name: Rowhouse Systems
Theme URI: https://rowhousesystems.com
Author: Rowhouse Systems
Description: The Rowhouse Systems website theme. Navy and brass, Manrope. Pages are generated from docs/copy by site/build.py.
Requires at least: 6.6
Requires PHP: 8.1
Version: 0.3.0
License: Proprietary (theme code); Manrope is under the SIL Open Font License 1.1, see assets/fonts/OFL.txt
Text Domain: rowhouse
*/

/* ---------------------------------------------------------------- base */
:root {
  --rh-navy: var(--wp--preset--color--navy, #1C2B45);
  --rh-brass: var(--wp--preset--color--brass, #D4962F);
  --rh-brass-dark: var(--wp--preset--color--brass-dark, #9A6A17);
  --rh-brass-soft: var(--wp--preset--color--brass-soft, #FBF3E4);
  --rh-ink: var(--wp--preset--color--ink, #273246);
  --rh-muted: var(--wp--preset--color--muted, #5E687A);
  --rh-line: var(--wp--preset--color--line, #DCE0E7);
  --rh-paper: var(--wp--preset--color--paper, #F5F6F8);
  --rh-red: #B5442E;
  --rh-green: #2F7D5B;
  --rh-radius: 12px;
}
.rh-main *, .rh-header *, .rh-footer * { box-sizing: border-box; }
.rh-main, .rh-header, .rh-footer { font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; }
.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > * { margin-block-start: 0 !important; }

.rh-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.rh-wrap--narrow { max-width: 760px; }
.rh-main h1, .rh-main h2, .rh-main h3 { color: var(--rh-navy); line-height: 1.18; letter-spacing: -0.01em; }
.rh-main h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 750; margin: 0 0 1rem; }
.rh-main h2::before {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 2px;
  background: var(--rh-brass); margin-bottom: 1rem;
}
.rh-main h3 { font-size: 1.15rem; font-weight: 700; margin: 1.6rem 0 0.5rem; }
.rh-main p { margin: 0 0 1rem; }
.rh-main a { color: var(--rh-navy); }
.rh-main strong { color: var(--rh-navy); font-weight: 700; }

/* ------------------------------------------------------------- header */
.rh-header { background: #fff; border-bottom: 1px solid var(--rh-line); position: sticky; top: 0; z-index: 50; }
.admin-bar .rh-header { top: 32px; }
.rh-header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.rh-header__logo img { display: block; height: 40px; width: auto; }
.rh-nav { display: flex; align-items: center; gap: 22px; }
.rh-nav a:not(.rh-btn) {
  color: var(--rh-ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.rh-nav a:not(.rh-btn):hover { border-bottom-color: var(--rh-line); }
.rh-nav a.is-active { color: var(--rh-navy); border-bottom-color: var(--rh-brass); }
.rh-menu { display: none; position: relative; }
.rh-menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 10px; border-radius: 8px; }
.rh-menu summary::-webkit-details-marker { display: none; }
.rh-menu summary span { display: block; height: 2px; background: var(--rh-navy); border-radius: 2px; }
.rh-menu[open] summary { background: var(--rh-paper); }
.rh-menu nav {
  position: absolute; right: 0; top: 52px; width: min(300px, 86vw); background: #fff;
  border: 1px solid var(--rh-line); border-radius: var(--rh-radius); box-shadow: 0 12px 32px rgba(28, 43, 69, 0.14);
  padding: 10px; display: flex; flex-direction: column;
}
.rh-menu nav a { padding: 12px 12px; color: var(--rh-ink); text-decoration: none; font-weight: 600; border-radius: 8px; }
.rh-menu nav a.is-active { background: var(--rh-brass-soft); color: var(--rh-navy); }
.rh-menu nav .rh-btn { margin-top: 8px; text-align: center; }
@media (max-width: 1140px) {
  .rh-nav { display: none; }
  .rh-menu { display: block; }
  .rh-header__inner { height: 64px; }
  .rh-header__logo img { height: 34px; }
}

/* ------------------------------------------------------------ buttons */
.rh-btn {
  display: inline-block; background: var(--rh-navy); color: #fff !important; text-decoration: none;
  font-weight: 700; font-size: 1rem; padding: 14px 22px; border-radius: 10px; line-height: 1.2;
  border: 2px solid var(--rh-navy); transition: background 0.15s, border-color 0.15s;
}
.rh-btn:hover { background: #2a3d5e; border-color: #2a3d5e; }
.rh-btn--small { padding: 9px 16px; font-size: 0.9rem; }
.rh-btn--outline { background: #fff; color: var(--rh-navy) !important; }
.rh-btn--outline:hover { background: var(--rh-paper); border-color: var(--rh-navy); }
.rh-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6rem 0 0; }
.rh-actions .rh-btn + .rh-btn { background: #fff; color: var(--rh-navy) !important; }
.rh-actions .rh-btn + .rh-btn:hover { background: var(--rh-paper); }
.rh-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0.4rem 0 1rem; align-items: baseline; }
.rh-link { font-weight: 700; color: var(--rh-navy); text-decoration: none; border-bottom: 2px solid var(--rh-brass); }
.rh-link:hover { border-bottom-color: var(--rh-navy); }
.rh-links .rh-link::after { content: " \2192"; }
.rh-link--pdf::after { content: none !important; }
.rh-pdf {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em; color: var(--rh-brass-dark);
  border: 1px solid var(--rh-brass); border-radius: 4px; padding: 1px 5px; margin-left: 8px; vertical-align: 2px;
}
.rh-link-note { color: var(--rh-muted); font-size: 0.92rem; }
.rh-soon-link { color: var(--rh-muted); font-weight: 600; }
.rh-soon-link em { font-style: normal; font-size: 0.85rem; color: var(--rh-brass-dark); }

/* ----------------------------------------------------------- sections */
.rh-sec { padding: clamp(56px, 8vw, 96px) 0; }
.rh-sec--alt { background: var(--rh-paper); }
.rh-hero { padding: clamp(64px, 10vw, 120px) 0 clamp(56px, 8vw, 96px); background: #fff; }
.rh-hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.06; margin: 0 0 1.4rem; }
.rh-hero__lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.55; color: var(--rh-ink); }
.rh-hero__promise {
  font-size: 1.02rem; color: var(--rh-ink); background: var(--rh-brass-soft);
  border-left: 4px solid var(--rh-brass); padding: 14px 18px; border-radius: 0 10px 10px 0; margin-top: 1.4rem;
}
/* A person's photo in a page's opening (About, 0.2.4): round, beside the
   first paragraphs on wide screens, above them on a phone. */
.rh-photo { margin: 0 0 1.6rem; }
.rh-photo img { display: block; width: 180px; height: 180px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 4px 18px rgba(28, 43, 69, 0.16); }
@media (min-width: 721px) {
  .rh-hero .rh-photo { float: right; margin: 0.4rem 0 1rem 2rem; }
  .rh-hero .rh-photo img { width: 240px; height: 240px; }
  .rh-hero .rh-wrap::after { content: ""; display: block; clear: both; }
}
.rh-cta { background: var(--rh-navy); text-align: left; }
.rh-cta h2 { color: #fff !important; }
.rh-cta .rh-btn { background: var(--rh-brass); border-color: var(--rh-brass); color: var(--rh-navy) !important; }
.rh-cta .rh-btn + .rh-btn { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, 0.6); }

/* -------------------------------------------------------------- cards */
.rh-cards { display: grid; gap: 20px; margin-top: 1.6rem; }
.rh-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rh-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rh-card { background: #fff; border: 1px solid var(--rh-line); border-radius: var(--rh-radius); padding: 24px; display: flex; flex-direction: column; }
.rh-sec--alt .rh-card { box-shadow: 0 1px 0 rgba(28, 43, 69, 0.04); }
.rh-main .rh-card__title { margin: 0 0 0.4rem; font-size: 1.25rem; }
.rh-card__lead { font-weight: 700; color: var(--rh-brass-dark); margin-bottom: 0.8rem !important; }
.rh-card p:last-child, .rh-card .rh-links:last-child { margin-bottom: 0; }
.rh-card .rh-links { margin-top: auto; padding-top: 0.6rem; }
@media (max-width: 860px) { .rh-cards--2, .rh-cards--3 { grid-template-columns: 1fr; } }

/* -------------------------------------------------------- lists, tables */
.rh-list { padding-left: 1.3rem; margin: 0 0 1rem; }
.rh-list li { margin-bottom: 0.6rem; padding-left: 0.2rem; }
ol.rh-list li::marker { font-weight: 800; color: var(--rh-brass-dark); }
ul.rh-list li::marker { color: var(--rh-brass); }
.rh-table-wrap { overflow-x: auto; margin: 1.2rem 0 1.4rem; }
.rh-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--rh-radius); overflow: hidden; font-size: 0.98rem; }
.rh-table th { text-align: left; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rh-muted); padding: 14px 16px; border-bottom: 2px solid var(--rh-navy); }
.rh-table td { padding: 14px 16px; border-bottom: 1px solid var(--rh-line); vertical-align: top; }
.rh-table tr:last-child td { border-bottom: none; }
.rh-table td:first-child { font-weight: 600; color: var(--rh-navy); }

/* ---------------------------------------------------------------- FAQ */
.rh-faqs { margin-top: 1.2rem; border-top: 1px solid var(--rh-line); }
.rh-faq { border-bottom: 1px solid var(--rh-line); }
.rh-faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 700; color: var(--rh-navy); position: relative; font-size: 1.05rem; }
.rh-faq summary::-webkit-details-marker { display: none; }
.rh-faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.5rem; color: var(--rh-brass-dark); font-weight: 600; }
.rh-faq[open] summary::after { content: "\2212"; }
.rh-faq > div { padding: 0 0 12px; }

/* --------------------------------------------------------- flowcharts */
.rh-flows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 1.6rem 0 1rem; }
.rh-flow { margin: 0; background: #fff; border: 1px solid var(--rh-line); border-radius: var(--rh-radius); padding: 18px; }
.rh-flow figcaption { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rh-brass-dark); margin-bottom: 10px; }
.rh-flow svg { width: 100%; height: auto; display: block; }
.rh-legend { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: 0.86rem; line-height: 1.4; }
.rh-legend li { display: flex; gap: 8px; align-items: flex-start; }
.rh-dot { flex: 0 0 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 0.72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.rh-dot--trouble { background: var(--rh-red); }
.rh-dot--fixed { background: var(--rh-green); }
@media (max-width: 860px) { .rh-flows { grid-template-columns: 1fr; } }

/* ------------------------------------------------- notes for David */
.rh-todo { background: #FFF1B8; color: #6B4E00; border-radius: 4px; padding: 0 4px; font-weight: 600; }
.rh-form-preview { border: 2px dashed var(--rh-line); border-radius: var(--rh-radius); padding: 28px; color: var(--rh-muted); background: #fff; margin: 1rem 0; }
.rh-form-closed { border: 1px solid var(--rh-line); border-radius: var(--rh-radius); padding: 24px; background: var(--rh-brass-soft); margin: 1rem 0; }

/* ------------------------------------------------------ request form */
/* The desk's form (desk/, [rhs_request_form]) brings layout rules only;
   the look is the site's. Every rule starts with .rh-main so it outranks
   the plugin's own inline rules whichever loads first (0.2.2). The field
   border is darker than --rh-line so a field's edge stays visible (3:1). */
.rh-main .rhs-desk-form label,
.rh-main .rhs-desk-form legend { color: var(--rh-navy); }
.rh-main .rhs-desk-form input[type=text],
.rh-main .rhs-desk-form input[type=email],
.rh-main .rhs-desk-form textarea {
  margin-top: 6px; padding: 12px 14px; background: #fff; color: var(--rh-ink);
  border: 1px solid #8A93A3; border-radius: 10px; transition: border-color 0.15s, box-shadow 0.15s;
}
.rh-main .rhs-desk-form textarea { resize: vertical; }
.rh-main .rhs-desk-form input[type=text]:focus,
.rh-main .rhs-desk-form input[type=email]:focus,
.rh-main .rhs-desk-form textarea:focus {
  outline: none; border-color: var(--rh-navy); box-shadow: 0 0 0 3px rgba(212, 150, 47, 0.4);
}
.rh-main .rhs-desk-form fieldset label { display: flex; align-items: center; gap: 10px; color: var(--rh-ink); margin: 0 0 10px; cursor: pointer; }
.rh-main .rhs-desk-form input[type=radio] { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--rh-navy); cursor: pointer; }
.rh-main .rhs-desk-form button[type=submit] {
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; min-height: 48px; padding: 14px 28px;
  background: var(--rh-navy); color: #fff; border: 2px solid var(--rh-navy); border-radius: 10px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.rh-main .rhs-desk-form button[type=submit]:hover { background: #2a3d5e; border-color: #2a3d5e; }
.rh-main .rhs-desk-form button[type=submit]:focus-visible,
.rh-main .rhs-desk-form input[type=radio]:focus-visible { outline: 3px solid var(--rh-brass); outline-offset: 2px; }
@media (max-width: 600px) { .rh-main .rhs-desk-form button[type=submit] { width: 100%; } }

/* ------------------------------------------------------------- footer */
.rh-footer { background: var(--rh-navy); color: #C9D1DE; padding: 56px 0 24px; }
.rh-footer__grid { display: grid; grid-template-columns: 1.6fr; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 32px; }
.rh-footer__brand img { height: 40px; width: auto; display: block; margin-bottom: 14px; }
.rh-footer p { margin: 0 0 0.5rem; }
.rh-footer__small { font-size: 0.85rem; color: #9FAAC0; }
.rh-footer h4 { color: #fff; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 12px; }
.rh-footer ul { list-style: none; margin: 0; padding: 0; }
.rh-footer li { margin-bottom: 8px; }
.rh-footer a { color: #E6EAF1; text-decoration: none; }
.rh-footer a:hover { color: #fff; text-decoration: underline; }
.rh-footer__base { border-top: 1px solid rgba(255, 255, 255, 0.14); margin-top: 36px; padding-top: 18px; font-size: 0.82rem; color: #9FAAC0; }
@media (max-width: 760px) { .rh-footer__grid { grid-template-columns: 1fr; grid-auto-flow: row; } }
/* Industry pages (0.3.0): the review date under the hero, and the banner on a draft in the preview. */
.rh-reviewed { color: var(--rh-muted); font-size: 0.92rem; margin-top: 0.75rem; }
.rh-draft { background: #FBF3E4; border-bottom: 2px solid #D4962F; color: #1C2B45; font-weight: 600; padding: 10px 16px; text-align: center; }

/* -------------------------------------------- coming-soon page (patterns/coming-soon.php) */
.rh-soon {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(2rem, 8vh, 6rem) 1.5rem 2rem; box-sizing: border-box;
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.rh-soon__inner { max-width: 640px; margin: 0 auto; width: 100%; }
.rh-soon__logo { width: 240px; max-width: 70%; height: auto; display: block; }
.rh-soon__rule { width: 44px; height: 4px; border-radius: 2px; background: var(--rh-brass); margin: clamp(2.5rem, 9vh, 5rem) 0 1.4rem; }
.rh-soon h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 750; color: var(--rh-navy); margin: 0 0 1.2rem; }
.rh-soon__lead { font-size: clamp(1.05rem, 2.2vw, 1.2rem); line-height: 1.6; color: var(--rh-ink); margin: 0 0 1.6rem; max-width: 34em; }
.rh-soon__note {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--rh-brass-dark); border: 1.5px solid var(--rh-brass); border-radius: 6px; padding: 0.45rem 0.8rem;
}
.rh-soon__foot { max-width: 640px; margin: 3rem auto 0; width: 100%; font-size: 0.82rem; color: var(--rh-muted); }
