/* Tidewell Advisors. One stylesheet for every page.
   Layout: tide-table ledger. Left-aligned editorial column; the home hero pairs the
   thesis with a 13-week forecast drawn like a tide chart. */
:root {
  --paper: #f3f7f6;
  --panel: #e6eeec;
  --ink: #0f2b2a;
  --muted: #4c6462;
  --line: #c6d5d2;
  --tide: #1d6f69;
  --tide-soft: rgba(29, 111, 105, 0.14);
  --low: #a8691a;
  --on-tide: #f3f7f6;

  --display: "Petrona", Georgia, "Times New Roman", serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;

  --s-xs: 0.8125rem;
  --s-sm: 0.9375rem;
  --s-md: 1.0625rem;
  --s-lg: 1.375rem;
  --s-xl: 2rem;
  --s-xxl: clamp(2.4rem, 5.5vw, 3.9rem);
  --wrap: 68rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1a1a;
    --panel: #132625;
    --ink: #e4eeec;
    --muted: #9db3b0;
    --line: #28403e;
    --tide: #5cbdb3;
    --tide-soft: rgba(92, 189, 179, 0.16);
    --low: #e0a44e;
    --on-tide: #0c1a1a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--s-md);
  line-height: 1.6;
  padding-inline: 20px;
}
.wrap { max-width: var(--wrap); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--tide); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--tide); outline-offset: 3px; }
.label {
  font-family: var(--mono); font-size: var(--s-xs); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

/* header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: var(--s-lg); font-weight: 700; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: var(--s-sm); }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-block: 48px 64px; }
.hero h1 { font-size: var(--s-xxl); letter-spacing: -0.01em; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--tide); }
.hero .lede { margin-top: 20px; font-size: var(--s-lg); line-height: 1.45; color: var(--muted); max-width: 32rem; font-family: var(--display); }
.cta-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-block; background: var(--tide); color: var(--on-tide); border: 0;
  font: 600 var(--s-sm) var(--body); padding: 13px 22px; border-radius: 3px;
  text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.cta-note { font-size: var(--s-sm); color: var(--muted); }

.chart { margin: 0; border-top: 2px solid var(--ink); padding-top: 14px; }
.chart-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chart-head .warn { color: var(--low); }
.chart svg { width: 100%; height: auto; display: block; margin-top: 8px; }
.chart svg text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.chart svg .low-text { fill: var(--low); font-weight: 500; }
.chart-foot { font-size: var(--s-xs); color: var(--muted); margin-top: 6px; }

/* sections */
section { padding-block: 64px; border-top: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: 14rem 1fr; gap: 32px; margin-bottom: 36px; }
.sec-head h2 { font-size: var(--s-xl); }
.sec-head p { color: var(--muted); max-width: 38rem; margin-top: 10px; }

.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 48px; margin-left: calc(14rem + 32px); }
.svc h3 { font-size: var(--s-lg); }
.svc p { margin-top: 8px; color: var(--muted); max-width: 30rem; }
.svc .label { display: block; margin-bottom: 8px; color: var(--tide); }

.steps { list-style: none; padding: 0; margin: 0 0 0 calc(14rem + 32px); display: grid; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 3rem 1fr; gap: 16px; padding-block: 20px; border-bottom: 1px solid var(--line); counter-increment: step; }
.steps li:first-child { border-top: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); color: var(--tide); font-size: var(--s-sm); padding-top: 3px; }
.steps h3 { font-size: var(--s-lg); }
.steps p { color: var(--muted); margin-top: 4px; max-width: 38rem; }

.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-left: calc(14rem + 32px); }
.fit h3 { font-size: var(--s-lg); margin-bottom: 12px; }
.fit ul { margin: 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: 6px; }
.boundary { background: var(--panel); padding: 24px 26px; border-radius: 3px; }
.boundary p + p { margin-top: 10px; color: var(--muted); }

/* contact */
.contact { display: grid; grid-template-columns: 14rem 1fr; gap: 32px; }
.contact h2 { font-size: var(--s-xl); margin-top: 10px; }
.contact .intro { color: var(--muted); margin-top: 10px; }
.formwrap { max-width: 44rem; }
.form-pending { background: var(--panel); padding: 24px 26px; border-radius: 3px; color: var(--muted); }

/* legal pages */
.doc { max-width: 44rem; border-top: 2px solid var(--ink); padding-block: 28px 16px; margin-top: 12px; line-height: 1.65; }
.doc h1 { font-size: 2.25rem; }
.doc h2 { font-size: 1.3125rem; margin-top: 36px; }
.doc h3 { font-family: var(--body); font-size: var(--s-md); font-weight: 600; margin-top: 22px; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { padding-left: 1.2rem; display: grid; gap: 8px; }
.doc .updated { font-family: var(--mono); font-size: var(--s-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.doc .key { background: var(--panel); padding: 18px 22px; border-radius: 3px; margin-top: 16px; }
.doc .key p:first-child { margin-top: 0; }
.doc blockquote { margin: 14px 0 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--tide); color: var(--muted); }

footer { border-top: 1px solid var(--line); margin-top: 24px; padding-block: 28px 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--s-sm); color: var(--muted); }
footer nav { display: flex; gap: 20px; }
footer a { color: var(--muted); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 28px 48px; }
  .sec-head, .contact { grid-template-columns: 1fr; gap: 8px; }
  .services, .steps, .fit { margin-left: 0; }
}
@media (max-width: 620px) {
  .services, .fit { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  section { padding-block: 48px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tideline { stroke-dasharray: 900; stroke-dashoffset: 0; animation: draw 1.6s ease-out; }
  @keyframes draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* SVG colors go through classes, not presentation attributes, so they follow the theme */
.mark-a { fill: none; stroke: var(--tide); stroke-width: 2.4; stroke-linecap: round; }
.mark-b { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.grid line { stroke: var(--line); stroke-width: 1; }
.grid .base { stroke: var(--muted); }
.area { fill: var(--tide-soft); }
.floor { stroke: var(--low); stroke-width: 1.4; stroke-dasharray: 5 4; }
.tideline { fill: none; stroke: var(--tide); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.lowdot { fill: var(--low); stroke: var(--paper); stroke-width: 2; }
