/* rwt-layout.css — structural layout: containers, nav, footer, sections */

/* === CONTAINERS === */
.rwt-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

.rwt-container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}

.rwt-container--wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 48px);
}

/* === SECTION WRAPPERS === */
.rwt-section {
  padding: var(--rwt-space-3xl) 0;
}
.rwt-section--sm {
  padding: var(--rwt-space-2xl) 0;
}
.rwt-section--xl {
  padding: var(--rwt-space-4xl) 0;
}

/* Section backgrounds */
.rwt-section--light {
  background: var(--rwt-bg-light);
  color: var(--rwt-fg-light-primary);
}
.rwt-section--white {
  background: var(--rwt-bg-white);
  color: var(--rwt-fg-light-primary);
}
.rwt-section--cream {
  background: var(--rwt-bg-cream);
  color: var(--rwt-fg-light-primary);
}
.rwt-section--dark {
  background: var(--rwt-bg-dark);
  color: var(--rwt-fg-dark-primary);
  position: relative;
  overflow: hidden;
}
.rwt-section--dark-alt {
  background: var(--rwt-bg-dark-alt);
  color: var(--rwt-fg-dark-primary);
  position: relative;
  overflow: hidden;
}

/* Section text colors */
.rwt-section--light h1, .rwt-section--light h2, .rwt-section--light h3,
.rwt-section--white h1, .rwt-section--white h2, .rwt-section--white h3,
.rwt-section--cream h1, .rwt-section--cream h2, .rwt-section--cream h3 {
  color: var(--rwt-fg-light-primary);
}
.rwt-section--light p, .rwt-section--light li,
.rwt-section--white p, .rwt-section--white li,
.rwt-section--cream p, .rwt-section--cream li {
  color: var(--rwt-fg-light-secondary);
}
.rwt-section--dark h1, .rwt-section--dark h2, .rwt-section--dark h3,
.rwt-section--dark-alt h1, .rwt-section--dark-alt h2, .rwt-section--dark-alt h3 {
  color: var(--rwt-fg-dark-primary);
}
.rwt-section--dark p, .rwt-section--dark li,
.rwt-section--dark-alt p, .rwt-section--dark-alt li {
  color: var(--rwt-fg-dark-secondary);
}

/* Section heading overrides on dark for h1/h2/h3 */
.rwt-section--dark .rwt-section__heading,
.rwt-section--dark-alt .rwt-section__heading {
  color: var(--rwt-fg-dark-primary);
}

/* === SECTION HEADER === */
.rwt-section__header {
  margin-bottom: var(--rwt-space-2xl);
}
.rwt-section__header--centered {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--rwt-space-2xl);
}
.rwt-section__lead {
  font-size: 1.125rem;
  margin-top: 1rem;
  max-width: 620px;
}
.rwt-section__header--centered .rwt-section__lead {
  margin-left: auto;
  margin-right: auto;
}

/* === NAVIGATION === */
.rwt-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background var(--rwt-transition), box-shadow var(--rwt-transition);
  padding: 0;
}

/* Dark-top pages: nav starts transparent, switches on scroll */
body.rwt-page--dark-top .rwt-nav {
  background: transparent;
}
body.rwt-page--dark-top .rwt-nav.is-scrolled {
  background: var(--rwt-navy);
  box-shadow: 0 2px 16px rgba(15,28,45,0.35);
}

/* Light-top pages and blog/legal: nav always solid navy */
body.rwt-page--light-top .rwt-nav {
  background: var(--rwt-navy);
  box-shadow: 0 1px 0 rgba(245,240,232,0.08);
}

.rwt-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
  height: 68px;
  display: flex;
  align-items: center;
  gap: var(--rwt-space-xl);
}

.rwt-nav__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.rwt-nav__logo img {
  height: 36px;
  width: auto;
  max-width: 180px;
}

.rwt-nav__links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Nav link text: always white (navy bg) */
.rwt-nav__link {
  font-family: var(--rwt-font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(245,240,232,0.88);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--rwt-radius-md);
  transition: color var(--rwt-transition), background var(--rwt-transition);
  white-space: nowrap;
}
.rwt-nav__link:hover,
.rwt-nav__link.is-active {
  color: var(--rwt-fg-dark-primary);
  background: rgba(245,240,232,0.1);
}

/* Dropdown */
.rwt-nav__dropdown {
  position: relative;
}
.rwt-nav__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  font-family: var(--rwt-font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(245,240,232,0.88);
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--rwt-radius-md);
  transition: color var(--rwt-transition), background var(--rwt-transition);
  white-space: nowrap;
}
.rwt-nav__dropdown-toggle:hover,
.rwt-nav__dropdown.is-open .rwt-nav__dropdown-toggle {
  color: var(--rwt-fg-dark-primary);
  background: rgba(245,240,232,0.1);
}
.rwt-nav__dropdown-toggle .rwt-nav__chevron {
  font-size: 0.65rem;
  transition: transform var(--rwt-transition);
}
.rwt-nav__dropdown.is-open .rwt-nav__chevron {
  transform: rotate(180deg);
}

.rwt-nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--rwt-navy);
  border: 1px solid rgba(245,240,232,0.12);
  border-radius: var(--rwt-radius-lg);
  padding: 8px;
  box-shadow: 0 8px 24px rgba(15,28,45,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--rwt-transition), visibility var(--rwt-transition), transform var(--rwt-transition);
  z-index: 100;
  list-style: none;
}
.rwt-nav__dropdown.is-open .rwt-nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.rwt-nav__dropdown-menu li { margin: 0; }
.rwt-nav__dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--rwt-radius-md);
  color: rgba(245,240,232,0.82);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--rwt-transition), color var(--rwt-transition);
}
.rwt-nav__dropdown-menu a:hover {
  background: rgba(245,240,232,0.1);
  color: var(--rwt-fg-dark-primary);
}

/* CTA in nav */
.rwt-nav__cta {
  flex-shrink: 0;
}

/* Mobile hamburger */
.rwt-nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.rwt-nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--rwt-fg-dark-primary);
  border-radius: 2px;
  transition: transform var(--rwt-transition), opacity var(--rwt-transition);
}

/* Mobile nav overlay */
.rwt-nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--rwt-navy);
  z-index: 999;
  padding: 80px 32px 32px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.rwt-nav__mobile.is-open {
  display: flex;
}
.rwt-nav__mobile-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--rwt-fg-dark-primary);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245,240,232,0.1);
}
.rwt-nav__mobile-link:hover {
  color: var(--rwt-amber-aa-dk);
}
.rwt-nav__mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--rwt-fg-dark-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 1024px) {
  .rwt-nav__links,
  .rwt-nav__cta { display: none; }
  .rwt-nav__hamburger { display: flex; }
}

/* === HERO — DARK === */
.rwt-hero--dark {
  background: var(--rwt-bg-dark);
  color: var(--rwt-fg-dark-primary);
  position: relative;
  overflow: hidden;
  padding: calc(68px + var(--rwt-space-3xl)) 0 var(--rwt-space-3xl);
}

.rwt-hero--dark h1 {
  color: var(--rwt-fg-dark-primary);
}
.rwt-hero--dark p {
  color: var(--rwt-fg-dark-secondary);
}

.rwt-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--rwt-space-3xl);
  align-items: center;
}

.rwt-hero__content {
  position: relative;
  z-index: 2;
}

.rwt-hero__visual {
  position: relative;
  z-index: 2;
}

.rwt-hero__lead {
  font-size: 1.1875rem;
  color: var(--rwt-fg-dark-secondary);
  margin: 1.25rem 0 2rem;
  max-width: 500px;
  line-height: 1.7;
}

.rwt-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

/* Topo SVG background overlay */
.rwt-hero__topo-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

/* Sub-page hero (light-top) */
.rwt-subhero--light {
  background: var(--rwt-bg-light);
  color: var(--rwt-fg-light-primary);
  padding: calc(68px + var(--rwt-space-2xl)) 0 var(--rwt-space-2xl);
  position: relative;
  overflow: hidden;
}
.rwt-subhero--light h1 {
  color: var(--rwt-fg-light-primary);
}
.rwt-subhero--light p {
  color: var(--rwt-fg-light-secondary);
}

/* Sub-page hero (dark) */
.rwt-subhero--dark {
  background: var(--rwt-bg-dark);
  color: var(--rwt-fg-dark-primary);
  padding: calc(68px + var(--rwt-space-2xl)) 0 var(--rwt-space-2xl);
  position: relative;
  overflow: hidden;
}
.rwt-subhero--dark h1 {
  color: var(--rwt-fg-dark-primary);
}
.rwt-subhero--dark p {
  color: var(--rwt-fg-dark-secondary);
}

.rwt-subhero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--rwt-space-2xl);
  align-items: center;
}
.rwt-subhero__content {
  position: relative;
  z-index: 1;
}
.rwt-subhero__visual {
  position: relative;
  z-index: 1;
}
.rwt-subhero__lead {
  font-size: 1.125rem;
  margin: 1.25rem 0 2rem;
  max-width: 520px;
  line-height: 1.7;
}
.rwt-subhero--light .rwt-subhero__lead {
  color: var(--rwt-fg-light-secondary);
}
.rwt-subhero--dark .rwt-subhero__lead {
  color: var(--rwt-fg-dark-secondary);
}
.rwt-subhero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

@media (max-width: 900px) {
  .rwt-hero__inner,
  .rwt-subhero__inner {
    grid-template-columns: 1fr;
  }
  .rwt-hero__visual,
  .rwt-subhero__visual {
    order: -1;
  }
}

/* === FOOTER === */
.rwt-footer {
  background: var(--rwt-navy-deep);
  color: var(--rwt-fg-dark-secondary);
  padding: var(--rwt-space-3xl) 0 var(--rwt-space-xl);
}

.rwt-footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--rwt-space-3xl);
  margin-bottom: var(--rwt-space-2xl);
}

.rwt-footer__brand-col {}

.rwt-footer__logo {
  margin-bottom: var(--rwt-space-md);
}
.rwt-footer__logo img {
  height: 32px;
  width: auto;
}

.rwt-footer__tagline {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--rwt-fg-dark-secondary);
  max-width: 280px;
  margin-bottom: var(--rwt-space-lg);
}

.rwt-footer__contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--rwt-fg-dark-secondary);
  text-decoration: none;
  margin-bottom: 6px;
  transition: color var(--rwt-transition);
}
.rwt-footer__contact a:hover {
  color: var(--rwt-fg-dark-primary);
}
.rwt-footer__contact i {
  width: 14px;
  color: var(--rwt-amber-aa-dk);
  font-size: 0.75rem;
}

.rwt-footer__col-heading {
  font-family: var(--rwt-font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rwt-fg-dark-primary);
  margin-bottom: var(--rwt-space-md);
}

.rwt-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rwt-footer__links li {
  margin-bottom: 8px;
}
.rwt-footer__links a {
  font-size: 0.875rem;
  color: var(--rwt-fg-dark-secondary);
  text-decoration: none;
  transition: color var(--rwt-transition);
}
.rwt-footer__links a:hover {
  color: var(--rwt-fg-dark-primary);
}

.rwt-footer__bottom {
  border-top: 1px solid rgba(245,240,232,0.08);
  padding-top: var(--rwt-space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--rwt-space-md);
}

.rwt-footer__copy {
  font-size: 0.8125rem;
  color: rgba(168,184,204,0.65);
}

.rwt-footer__legal-links {
  display: flex;
  gap: var(--rwt-space-xl);
  list-style: none;
  padding: 0;
  margin: 0;
}
.rwt-footer__legal-links a {
  font-size: 0.8125rem;
  color: rgba(168,184,204,0.65);
  text-decoration: none;
  transition: color var(--rwt-transition);
}
.rwt-footer__legal-links a:hover {
  color: var(--rwt-fg-dark-secondary);
}

@media (max-width: 860px) {
  .rwt-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: var(--rwt-space-2xl);
  }
  .rwt-footer__brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .rwt-footer__top {
    grid-template-columns: 1fr;
  }
  .rwt-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* === 2-COL SPLIT GRIDS === */
.rwt-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--rwt-space-2xl);
}
.rwt-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--rwt-space-xl);
}
.rwt-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--rwt-space-xl);
}

@media (max-width: 900px) {
  .rwt-grid-2 { grid-template-columns: 1fr; }
  .rwt-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .rwt-grid-3,
  .rwt-grid-4 { grid-template-columns: 1fr; }
}

/* === LEGAL PAGE LAYOUT === */
.rwt-legal-page {
  background: var(--rwt-bg-white);
}

.rwt-legal-hero {
  background: var(--rwt-bg-light);
  padding: calc(68px + var(--rwt-space-xl)) 0 var(--rwt-space-xl);
}

.rwt-legal-body {
  padding: var(--rwt-space-3xl) 0;
}

.legal-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
}
.legal-header {
  margin-bottom: var(--rwt-space-2xl);
}
.legal-header h1 {
  font-family: var(--rwt-font-serif);
  color: var(--rwt-fg-light-primary);
  margin-bottom: 8px;
}
.legal-meta {
  font-size: 0.875rem;
  color: var(--rwt-fg-light-secondary);
  margin-bottom: 4px;
}
.legal-article section {
  margin-bottom: var(--rwt-space-2xl);
}
.legal-article h2 {
  font-size: 1.25rem;
  color: var(--rwt-fg-light-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rwt-bg-cream);
}
.legal-article h3 {
  font-size: 1rem;
  color: var(--rwt-fg-light-primary);
  margin: 1.25rem 0 0.75rem;
}
.legal-article p {
  color: var(--rwt-fg-light-secondary);
  line-height: 1.75;
}
.legal-article ul {
  color: var(--rwt-fg-light-secondary);
  line-height: 1.75;
}
.legal-article address {
  font-style: normal;
  color: var(--rwt-fg-light-secondary);
  line-height: 1.75;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}
.legal-table th,
.legal-table td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid rgba(26,43,69,0.12);
  color: var(--rwt-fg-light-secondary);
}
.legal-table th {
  background: var(--rwt-bg-light);
  font-weight: 600;
  color: var(--rwt-fg-light-primary);
}
