/*
 * Wealthy & Wise: page shell, header, footer, plain page content.
 * Front end only.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--ww-paper);
  color: var(--ww-ink);
  font-family: var(--ww-sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

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

.ww-skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 2000;
  background: var(--ww-ink);
  color: var(--ww-paper);
  padding: 10px 16px;
  font-size: 15px;
}

.ww-skip:focus {
  top: 12px;
}

body.ww-modal-open {
  overflow: hidden;
}

/* ---------- Shell ---------- */
.ww-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ww-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ww-page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.ww-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 2.4vw, 20px) clamp(20px, 4vw, 46px);
  border-bottom: 1px solid var(--ww-rule);
}

.ww-header__logo {
  display: flex;
}

.ww-header__logo img {
  width: clamp(150px, 14vw, 170px);
  height: auto;
  display: block;
}

/* ---------- Plain page content (anything that isn't a W&W block) ---------- */
.ww-page > :not(.ww-block) {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.ww-page > p,
.ww-page > ul,
.ww-page > ol {
  font-size: 18px;
  line-height: 1.6;
}

.ww-page > :not(.ww-block):first-child {
  margin-top: clamp(40px, 6vw, 80px);
}

.ww-page > :not(.ww-block):last-child {
  margin-bottom: clamp(40px, 6vw, 80px);
}

.ww-page > h1,
.ww-page > h2,
.ww-page > h3 {
  font-family: var(--ww-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ww-page > h1 { font-size: clamp(36px, 4.5vw, 56px); }
.ww-page > h2 { font-size: clamp(28px, 3vw, 38px); }
.ww-page > h3 { font-size: clamp(22px, 2.2vw, 28px); }

.ww-page > p a,
.ww-page > ul a,
.ww-page > ol a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */
.ww-footer {
  background: var(--ww-footer);
  color: var(--ww-paper);
  border-top: 3px solid var(--ww-rule);
}

.ww-footer__nav {
  display: flex;
  color: var(--ww-footer-link);
}

.ww-footer__nav a {
  transition: color .2s;
}

.ww-footer__nav a:hover {
  color: #ffffff;
}

.ww-footer__desktop {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 46px 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.ww-footer__desktop .ww-footer__brand {
  width: 180px;
  height: auto;
  display: block;
  margin-bottom: 14px;
}

.ww-footer__desktop .ww-footer__nav {
  gap: 28px;
  font-size: 15px;
}

.ww-footer__desktop .ww-footer__network {
  width: 150px;
  height: auto;
  display: block;
  margin-bottom: 24px;
}

.ww-footer__mobile {
  display: none;
  padding: 36px 20px 40px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ww-footer__mobile .ww-footer__brand {
  width: 230px;
  max-width: 75%;
  height: auto;
  display: block;
  margin-bottom: 26px;
}

.ww-footer__mobile .ww-footer__network {
  width: 145px;
  height: auto;
  display: block;
}

.ww-footer__mobile .ww-footer__nav {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  font-size: 14px;
  margin-top: 36px;
}

@media (max-width: 859.98px) {
  .ww-footer__desktop { display: none; }
  .ww-footer__mobile { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
