/* Riha Technology - design tokens + layout, restyled 2026-08-14 to
   match the structural/visual language of prospects/mwta (navy + red,
   serif headings, system fonts, boxed sections) per direct request.
   All page styling lives here - never in a style="" attribute in the
   HTML, so the CSP can stay at style-src-attr 'none' with zero hashes. */

:root {
  /* Charcoal + amber palette, changed 2026-08-14. Variable names below
     (--navy/--red) are historical from the navy/red version - kept as-is
     rather than renamed everywhere to avoid touching 40+ call sites for
     a cosmetic rename. --navy is charcoal now, --red is amber. */
  --navy: #2b2b2b;
  --navy-dark: #1a1a1a;
  --red: #8a6a1a;
  --red-dark: #6d5414;
  --ink: #1c1c1c;
  --gray-600: #63605a;
  --gray-200: #ddd9d0;
  --gray-100: #eeece7;
  --white: #faf9f7;
  --radius: 12px;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  margin: 0 0 0.5em;
  color: var(--navy-dark);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.55rem; border-bottom: 3px solid var(--red); padding-bottom: 8px; display: inline-block; }
h3 { font-size: 1.15rem; color: var(--ink); }

p { margin: 0 0 1em; max-width: 72ch; }

a { color: var(--red); text-decoration: underline; }
a:hover { color: var(--red-dark); }
a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.topbar {
  background: var(--white);
  border-bottom: 4px solid var(--navy);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-dark);
  text-decoration: none;
}

.brand .mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-pop), background 0.2s ease;
}

.brand:hover .mark {
  transform: rotate(-6deg) scale(1.08);
  background: var(--red);
}

.brand strong {
  display: block;
  font-size: 1.15rem;
}

.brand small {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--gray-600);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-toggle:hover { background: var(--gray-100); border-color: var(--navy); }

.nav-toggle .bars {
  display: block;
  width: 20px;
  height: 14px;
  position: relative;
}

.nav-toggle .bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--navy-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.navlinks {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding-top: 12px;
  padding-left: 0;
  padding-right: 0;
  border-top: 1px solid var(--gray-200);
  margin-top: 4px;
}

.navlinks.open { display: flex; }

.navlinks a {
  display: block;
  color: var(--navy-dark);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: var(--radius);
}

.navlinks a:hover { background: var(--gray-100); }
.navlinks a.active { background: var(--navy); color: var(--white); }

.topbar-phone {
  display: none;
  color: var(--navy-dark) !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-phone:hover { color: var(--red) !important; }

@media (min-width: 781px) {
  .nav { justify-content: space-between; flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .topbar-phone { display: inline-block; margin-left: auto; margin-right: 8px; }
  .navlinks {
    display: flex;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }
  .navlinks a { padding: 8px 14px; font-size: 0.92rem; }
}

/* ---------- Page banner ---------- */

.banner {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px) 0 0 / 22px 22px,
    var(--navy);
  color: var(--white);
  padding: 52px 0;
}

.banner h1 { color: var(--white); margin: 0; }
.banner p { color: #cdd9e6; margin: 10px 0 0; max-width: 62ch; }

/* ---------- Sections ---------- */

section { padding: 44px 0; }
section.alt { background: var(--gray-100); }
section + section { border-top: 1px solid var(--gray-200); }

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 760px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
}

/* ---------- Boxes ---------- */

.box {
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px 22px;
  transition: transform 0.25s var(--ease-pop), box-shadow 0.25s ease, border-top-color 0.2s ease;
}

.box:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px -12px rgba(28, 58, 94, 0.35);
  border-top-color: var(--red);
}

.box h3 { margin-top: 0; }

.card-icon {
  width: 40px;
  height: 40px;
  color: var(--navy);
  margin-bottom: 12px;
  transition: color 0.2s ease, transform 0.25s var(--ease-pop);
}

.box:hover .card-icon {
  color: var(--red);
  transform: scale(1.1) rotate(-4deg);
}

.trust-strip {
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--red);
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.trust-strip .card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
  color: var(--red);
}

.trust-strip p {
  margin: 0;
  max-width: none;
}

.about-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 22px;
  align-items: flex-start;
}

.about-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.6rem;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .about-row { grid-template-columns: 1fr; }
  .about-photo { width: 64px; height: 64px; font-size: 1.2rem; }
}

.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 4px 20px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 600;
  color: var(--navy-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: Georgia, serif;
  font-size: 1.3rem;
  color: var(--red);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-pop);
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding-bottom: 16px;
  margin: -4px 0 0;
}

.float-cta {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  text-align: center;
  box-shadow: 0 10px 24px -8px rgba(20, 41, 67, 0.45);
}

@media (max-width: 780px) {
  .float-cta { display: block; }
  body { padding-bottom: 72px; }
}

.notice {
  border: 1px solid #e0b7ab;
  background: #faf1ee;
  border-radius: var(--radius);
  padding: 16px 18px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--white) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 18px;
  border-radius: var(--radius);
  text-decoration: none !important;
  border: 1px solid var(--navy);
  cursor: pointer;
  transition: transform 0.15s var(--ease-pop), background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--navy-dark); transform: translateY(-2px); box-shadow: 0 6px 14px -6px rgba(20, 41, 67, 0.5); }
.btn:active { transform: scale(0.96) translateY(0); }

.btn-red {
  background: var(--red);
  border-color: var(--red);
}
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-outline {
  background: transparent;
  color: var(--navy) !important;
  border: 1px solid var(--navy);
}
.btn-outline:hover { background: var(--gray-100); }

.btn-outline-inverse {
  background: transparent;
  color: var(--white) !important;
  border: 1px solid var(--white);
}
.btn-outline-inverse:hover { background: rgba(255, 255, 255, 0.1); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Spec list (used on contact page) ---------- */

.spec { margin: 0; }
.spec > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--gray-200);
}
.spec > div:first-child { border-top: none; padding-top: 0; }
.spec dt { color: var(--gray-600); font-size: 0.85rem; }
.spec dd { margin: 0; font-weight: 600; text-align: right; }
.spec dd a { text-decoration: none; }
.spec dd a:hover { text-decoration: underline; }

/* ---------- Forms ---------- */

form { display: flex; flex-direction: column; gap: 16px; }

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

input, textarea, select {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.7em 0.85em;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}

input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  border-color: var(--navy);
}

textarea { resize: vertical; min-height: 120px; }

.form-status { font-size: 0.88rem; min-height: 1.4em; }
.form-status.ok { color: #2e7d32; }
.form-status.err { color: var(--red-dark); }

/* ---------- Footer ---------- */

footer {
  background: var(--navy-dark);
  color: #c7d2dd;
  padding: 32px 0;
  margin-top: 20px;
}
footer a { color: #dfe7ee; }
footer a:hover { color: var(--white); }

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  list-style: none;
  padding: 0;
}

.footer-bottom {
  font-size: 0.85rem;
  border-top: 1px solid #2c4a6c;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.text-muted { color: var(--gray-600); }
.small { font-size: 0.88rem; }
.mt-0 { margin-top: 0; }

.cta-box { text-align: center; }
.no-border { border: none; }
.wide { max-width: none; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 0.85rem;
  margin-right: 6px;
  transition: transform 0.3s var(--ease-pop);
}

.cols-3 > div:hover .step-num {
  transform: scale(1.2) rotate(-8deg);
}
