/*
Theme Name: Well Water Compass
Theme URI: https://wellwatercompass.com/
Author: Well Water Compass
Description: Lightweight editorial theme for private-well troubleshooting and treatment decisions.
Version: 1.0.0
Text Domain: well-water-compass
*/

:root {
  --ink: #102e3a;
  --ink-soft: #3d5660;
  --teal: #176c69;
  --teal-dark: #0e5553;
  --aqua: #e4f3f0;
  --aqua-2: #f2faf8;
  --rust: #bc5b2d;
  --gold: #d9a43b;
  --paper: #fffdf8;
  --white: #ffffff;
  --line: #d9e4e2;
  --shadow: 0 18px 50px rgba(15, 46, 58, .10);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-dark); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--rust); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0 0 .55em; line-height: 1.14; letter-spacing: -.025em; }
h1 { font-size: clamp(2.6rem, 6vw, 5.25rem); }
h2 { font-size: clamp(2rem, 4vw, 3.15rem); }
h3 { font-size: 1.35rem; }
p, ul, ol, table { margin: 0 0 1.25rem; }

.wrap { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 36px), 780px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-soft { background: var(--aqua-2); border-block: 1px solid var(--line); }
.eyebrow { margin-bottom: 16px; color: var(--teal-dark); font-size: .78rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.lede { max-width: 760px; color: var(--ink-soft); font-size: clamp(1.12rem, 2vw, 1.35rem); }
.muted { color: var(--ink-soft); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 9999; padding: 10px 14px; background: var(--white); }
.skip-link:focus { left: 8px; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,253,248,.95); border-bottom: 1px solid rgba(217,228,226,.9); backdrop-filter: blur(12px); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; width: 42px; height: 42px; flex: 0 0 42px; border: 2px solid var(--teal); border-radius: 50%; background: var(--aqua); }
.brand-mark::before { content: ""; position: absolute; width: 3px; height: 25px; left: 18px; top: 6px; background: var(--rust); border-radius: 3px; transform: rotate(35deg); }
.brand-mark::after { content: ""; position: absolute; left: 22px; top: 5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid var(--rust); transform: rotate(35deg); }
.brand-name { display: block; font-weight: 850; letter-spacing: -.02em; line-height: 1; }
.brand-tag { display: block; margin-top: 5px; color: var(--ink-soft); font-size: .72rem; line-height: 1; }
.menu { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.menu a { color: var(--ink); font-size: .94rem; font-weight: 700; text-decoration: none; }
.menu a:hover { color: var(--teal); }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--white); color: var(--ink); font-weight: 700; }

.hero { overflow: hidden; padding: clamp(74px, 11vw, 132px) 0 90px; background: radial-gradient(circle at 82% 12%, #cce9e3 0, transparent 35%), linear-gradient(145deg, var(--paper), #edf8f5); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(42px, 8vw, 100px); }
.hero h1 { max-width: 860px; }
.hero h1 span { color: var(--teal); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 20px; border: 2px solid var(--teal); border-radius: 999px; background: var(--teal); color: #fff; font-weight: 800; text-decoration: none; transition: transform .2s, background .2s; }
.button:hover { color: #fff; background: var(--teal-dark); transform: translateY(-2px); }
.button-secondary { background: transparent; color: var(--teal-dark); }
.button-secondary:hover { color: #fff; }
.compass-panel { position: relative; min-height: 390px; display: grid; place-items: center; }
.compass-disc { width: min(100%, 360px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #9fcac2; border-radius: 50%; background: rgba(255,255,255,.78); box-shadow: var(--shadow), inset 0 0 0 18px rgba(228,243,240,.8); }
.compass-disc::before { content: ""; width: 7px; height: 70%; border-radius: 99px; background: linear-gradient(var(--rust) 0 50%, var(--teal) 50%); transform: rotate(35deg); box-shadow: 0 0 0 8px var(--white); }
.compass-note { position: absolute; right: 0; bottom: 16px; max-width: 220px; padding: 15px 17px; border-left: 4px solid var(--rust); border-radius: 10px; background: var(--white); box-shadow: var(--shadow); font-size: .88rem; font-weight: 700; }

.problem-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.problem-card { min-height: 220px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; }
.problem-card:hover { transform: translateY(-5px); border-color: #90bdb5; box-shadow: var(--shadow); color: var(--ink); }
.problem-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 14px; background: var(--aqua); color: var(--teal-dark); font-size: 1.05rem; font-weight: 900; }
.problem-card.orange .problem-icon { color: #8b3c1f; background: #f9dfd0; }
.problem-card.dark .problem-icon { color: #fff; background: var(--ink); }
.problem-card.scale .problem-icon { color: #67522d; background: #f4e8c6; }
.problem-card p { margin-bottom: 0; color: var(--ink-soft); font-size: .93rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; counter-reset: steps; }
.step { position: relative; padding-left: 64px; }
.step::before { counter-increment: steps; content: counter(steps); position: absolute; left: 0; top: 0; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--teal); border-radius: 50%; color: var(--teal-dark); font-weight: 900; }
.step h3 { margin-top: 7px; }

.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.guide-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 28px rgba(15,46,58,.06); }
.guide-band { height: 9px; background: var(--teal); }
.guide-card:nth-child(1) .guide-band { background: var(--rust); }
.guide-card:nth-child(2) .guide-band { background: var(--gold); }
.guide-card-body { display: flex; flex: 1; flex-direction: column; padding: 27px; }
.guide-card .topic { color: var(--teal-dark); font-size: .75rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.guide-card p { color: var(--ink-soft); }
.guide-card .text-link { margin-top: auto; font-weight: 800; }

.trust-panel { display: grid; grid-template-columns: .9fr 1.1fr; gap: 54px; padding: clamp(36px, 6vw, 68px); border-radius: 28px; background: var(--ink); color: #fff; }
.trust-panel h2 { color: #fff; }
.trust-panel p { color: #d7e5e8; }
.trust-list { margin: 0; padding: 0; list-style: none; }
.trust-list li { position: relative; padding: 0 0 18px 30px; }
.trust-list li::before { content: "✓"; position: absolute; left: 0; color: #7ed1c6; font-weight: 900; }
.trust-panel a { color: #aee5dc; }

.compare-strip { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; padding: 38px 42px; border: 1px solid #e3bd99; border-radius: var(--radius); background: #fff3e8; }
.compare-strip h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }

.article-hero { padding: clamp(60px, 8vw, 94px) 0 54px; background: linear-gradient(180deg, var(--aqua-2), var(--paper)); border-bottom: 1px solid var(--line); }
.article-hero h1 { max-width: 920px; font-size: clamp(2.45rem, 5vw, 4.4rem); }
.article-meta { color: var(--ink-soft); font-size: .9rem; font-weight: 650; }
.article-shell { display: grid; grid-template-columns: minmax(0, 760px) 260px; gap: 70px; align-items: start; padding: 64px 0 100px; }
.article-content h2 { margin-top: 2.2em; padding-top: .35em; font-size: clamp(1.75rem, 3vw, 2.35rem); }
.article-content h3 { margin-top: 1.8em; }
.article-content a { font-weight: 650; }
.article-content blockquote, .callout { margin: 28px 0; padding: 22px 24px; border-left: 5px solid var(--teal); background: var(--aqua-2); }
.article-content .warning { border-left-color: var(--rust); background: #fff1e9; }
.article-content table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.article-content th, .article-content td { padding: 13px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-content th { background: var(--aqua); }
.toc { position: sticky; top: 105px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); font-size: .87rem; }
.toc strong { display: block; margin-bottom: 10px; }
.toc a { display: block; margin: 8px 0; text-decoration: none; }
.source-list { padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.affiliate-note { padding: 16px 18px; border: 1px solid #e3bd99; border-radius: 12px; background: #fff7ef; font-size: .9rem; }

.site-footer { padding: 64px 0 28px; background: #0b242e; color: #d8e4e6; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 50px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-tag { color: #b9cbcf; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.footer-menu { margin: 0; padding: 0; list-style: none; }
.footer-menu li { margin: 8px 0; }
.site-footer a { color: #d8e4e6; }
.footer-bottom { margin-top: 50px; padding-top: 22px; border-top: 1px solid #29434c; color: #a9bdc2; font-size: .78rem; }

@media (max-width: 900px) {
  .hero-grid, .trust-panel, .article-shell { grid-template-columns: 1fr; }
  .problem-grid, .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .article-shell { gap: 20px; }
  .toc { position: static; order: -1; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; inset: 78px 0 auto; padding: 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .primary-nav.open { display: block; }
  .primary-nav .menu { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; align-items: stretch; flex-direction: column; gap: 8px; }
  .primary-nav a { display: block; padding: 8px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .brand-tag { display: none; }
  .problem-head { align-items: start; flex-direction: column; }
  .problem-grid, .guide-grid, .footer-grid { grid-template-columns: 1fr; }
  .compass-panel { min-height: 300px; }
  .compass-disc { width: 270px; }
  .compare-strip { grid-template-columns: 1fr; padding: 28px; }
  .article-content table { display: block; overflow-x: auto; }
}

