/* WA Flooring Specialist | secondary pages
 * /404, /privacy-policy, /terms-of-use and /redirect.
 * Loads after css/styles.css and reuses its tokens, buttons and type.
 */

body.pg-body { background: var(--paper); padding-bottom: 0 !important; margin: 0; }
.pg { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; position: relative; overflow: clip; }
.pg::after {
  content: ""; position: absolute; right: -6%; bottom: -6%; width: min(70vw, 900px); aspect-ratio: 224 / 72;
  background: url("/img/logo-mark.svg") center / contain no-repeat; opacity: .04; pointer-events: none;
}
.pg > * { position: relative; z-index: 1; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 5; padding: 10px 16px; border-radius: 10px; background: var(--navy); color: var(--on-dark); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--line { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--line:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }

/* header */
.pg-head {
  width: min(1280px, 100% - 2 * var(--gutter)); margin: 18px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 14px 14px 26px; background: var(--white); border-radius: 22px;
  box-shadow: 0 1px 2px rgba(11, 39, 57, .06), 0 14px 34px -16px rgba(11, 39, 57, .3);
}
.pg-head img { height: 34px; width: auto; display: block; }
.pg-head__actions { display: flex; align-items: center; gap: 18px; }
.pg-head__phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--navy); }
.pg-head__phone svg { width: 18px; height: 18px; color: var(--pecan); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* footer */
.pg-foot {
  width: min(1280px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: 22px 0 28px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; font-size: .9rem; color: var(--text-2);
}
.pg-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.pg-foot a { color: var(--navy); }
.pg-foot a[aria-current="page"] { font-weight: 600; text-decoration-color: var(--honey); text-decoration-thickness: 2px; }

/* ===== 404 ===== */
.err-main { width: min(1280px, 100% - 2 * var(--gutter)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; padding-block: clamp(48px, 8vh, 96px); }
.err-code { font-size: clamp(5rem, 13vw, 10rem); font-weight: 800; line-height: .9; letter-spacing: -0.05em; color: var(--navy-3); margin: 0 0 18px; }
.err-code em { font-style: italic; color: var(--cedar); padding-right: .04em; }
.err-copy h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.06; font-weight: 700; letter-spacing: -0.025em; color: var(--navy); margin: 0 0 16px; text-wrap: balance; }
.err-copy > p { color: var(--text-2); font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.6; margin: 0; max-width: 46ch; }
.err-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.err-floor { position: relative; margin: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-card); background: #5b3a28; }
.err-floor svg { display: block; width: 100%; height: auto; }

/* ===== legal pages ===== */
.legal-hero { width: min(1280px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); }
.legal-hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; font-weight: 800; letter-spacing: -0.035em; color: var(--navy-3); margin: 0; }
.legal-hero p { margin: 14px 0 0; color: var(--text-2); font-weight: 500; }

.legal-grid { width: min(1280px, 100% - 2 * var(--gutter)); margin: 0 auto; padding-bottom: clamp(56px, 8vw, 104px); display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: 24px; padding: 24px 22px; background: var(--white); border-radius: 20px; box-shadow: var(--shadow-card); }
.toc h2 { margin: 0 0 12px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--pecan); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 8px; margin-inline: -8px; border-radius: 10px; color: var(--navy); text-decoration: none; font-size: .95rem; line-height: 1.35; }
.toc a::before { content: counter(toc, decimal-leading-zero); min-width: 1.6em; color: var(--text-2); font-variant-numeric: tabular-nums; font-size: .85rem; padding-top: .1em; }
.toc a:hover { background: var(--stone); }

.legal { max-width: 72ch; font-size: 1.05rem; line-height: 1.7; color: var(--text); }
.legal > p:first-child { font-size: 1.15rem; line-height: 1.6; margin-top: 0; }
.legal section { scroll-margin-top: 24px; padding-top: 34px; margin-top: 34px; border-top: 1px solid var(--line); }
.legal h2 { margin: 0 0 12px; font-size: clamp(1.35rem, 2vw, 1.6rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; color: var(--navy); }
.legal p { margin: 0 0 14px; max-width: none; }
.legal p:last-child { margin-bottom: 0; }
.legal ul { margin: 0 0 14px; padding-left: 1.2em; display: grid; gap: 6px; list-style: disc; }
.legal li::marker { color: var(--honey); }
.legal a { color: var(--navy); font-weight: 500; text-decoration-color: var(--honey); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.contact-box { margin-top: 16px; padding: 22px 24px; background: var(--white); border-radius: 18px; box-shadow: var(--shadow-card); }

/* ===== contact card (/redirect) ===== */
body.card-body { background: var(--navy-3); padding-bottom: 0 !important; margin: 0; }
.card-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 28px 16px; position: relative; overflow: clip; }
.card-page::after {
  content: ""; position: absolute; left: 50%; bottom: -4%; translate: -50% 0; width: min(150vw, 1300px); aspect-ratio: 224 / 72;
  background: url("/img/logo-mark-light.svg") center / contain no-repeat; opacity: .05; pointer-events: none;
}
.biz { position: relative; z-index: 1; width: min(100%, 440px); background: var(--white); border-radius: 28px; overflow: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 40px 80px -30px rgba(0, 0, 0, .7); }
.biz-strip { height: 10px; background: linear-gradient(90deg, var(--walnut) 0 25%, var(--cedar) 25% 50%, var(--pecan) 50% 75%, var(--honey) 75%); }
.biz-head { padding: 34px 28px 22px; text-align: center; }
.biz-head img { width: 240px; height: auto; margin: 0 auto; display: block; }
.biz-head h1 { margin: 18px 0 0; font-size: 1.05rem; font-weight: 500; line-height: 1.4; color: var(--text-2); }

.biz-links { list-style: none; margin: 0; padding: 0 18px; display: grid; gap: 10px; }
.biz-links li { display: flex; gap: 8px; }
.biz-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 18px; background: var(--paper); border: 1px solid var(--stone); color: var(--navy); text-decoration: none; transition: background-color .2s, border-color .2s, transform .2s var(--ease-out); }
.biz-link:hover { background: var(--white); border-color: var(--line); }
.biz-link:active { transform: scale(.985); }
.biz-ic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--c, var(--navy)); color: var(--fg, var(--on-dark)); }
.biz-ic svg, .biz-go, .biz-text-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.biz-text { min-width: 0; display: grid; gap: 1px; }
.biz-text b { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pecan); }
.biz-text span { font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-go { margin-left: auto; flex: none; width: 18px; height: 18px; color: var(--text-2); transition: transform .25s var(--ease-out), color .2s; }
.biz-link:hover .biz-go { transform: translateX(3px); color: var(--navy); }
.biz-text-btn { flex: none; display: grid; place-items: center; align-content: center; gap: 3px; width: 72px; border-radius: 18px; background: var(--navy); color: var(--on-dark); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: background-color .2s; }
.biz-text-btn:hover { background: var(--navy-2); }

.biz-cta { padding: 22px 18px 0; }
.biz-cta .btn { width: 100%; }
.biz-foot { margin: 0; padding: 18px 24px 26px; text-align: center; font-size: .88rem; color: var(--text-2); max-width: none; }

/* ===== responsive ===== */
@media (max-width: 960px) {
  .legal-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
}
@media (max-width: 860px) {
  .err-main { grid-template-columns: 1fr; padding-top: 40px; }
  .err-floor { order: -1; max-width: 520px; }
}
@media (max-width: 560px) {
  .pg-head { padding: 12px 12px 12px 18px; }
  .pg-head img { height: 26px; }
  .pg-head__phone span { display: none; }
  .pg-head__phone { width: 44px; height: 44px; justify-content: center; border-radius: 12px; background: var(--stone); }
  .pg-head .btn { display: none; }
  .err-actions .btn { width: 100%; }
  .pg-foot { flex-direction: column; align-items: flex-start; }
  .toc ol { grid-template-columns: 1fr; }
  .legal { font-size: 1rem; }
  .biz-head { padding: 28px 20px 18px; }
  .biz-head img { width: 210px; }
  .biz-links, .biz-cta { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .biz-link, .biz-go { transition: none; }
}
