/* ============================================================
   patelscapital.com — single stylesheet
   Plain CSS, no build step. Edit values in :root to restyle.
   ============================================================ */

:root {
  --bg:      #fdfcf9;   /* page background, warm off-white */
  --ink:     #1c1c1a;   /* body text */
  --muted:   #5f5f58;   /* secondary text, captions */
  --accent:  #2c4a63;   /* links, rules of emphasis */
  --rule:    #e2ded5;   /* hairlines */
  --panel:   #f6f4ee;   /* tinted blocks */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 37rem;     /* reading column width */
  --wide:    37rem;     /* header/footer width - matches --measure so every
                           left edge on the page lines up */
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout ---------- */

.wrap   { max-width: var(--wide);    margin: 0 auto; padding: 0 1.5rem; }
.column { max-width: var(--measure); }

/* ---------- header ---------- */

header {
  border-bottom: 1px solid var(--rule);
  padding: 2.25rem 0 1.35rem;
  margin-bottom: 3.5rem;
}
header .inner {                  /* deliberately stacked: wordmark, then nav */
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.firm {
  display: block;
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
nav {
  font-family: var(--sans);
  font-size: 0.875rem;
  margin-top: 1.05rem;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
}
nav a:first-child { margin-left: 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
nav a[aria-current="page"] { border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* ---------- typography ---------- */

h1 {
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
  max-width: 24ch;
}
h2 {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 3rem 0 1rem;
}
h1 + h2 {                        /* a subhead belongs to the headline above it */
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}
/* The first section heading follows the table, whose own border already marks
   the boundary - so no second rule here, and less air above it. */
.compare-note + h2[id] { border-top: none; padding-top: 0; margin-top: 2.4rem; }

h2[id] {                         /* section headings on long pages */
  font-size: 1.375rem;
  margin: 4rem 0 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}
h3 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3rem 0 1.25rem;
}
p { margin: 0 0 1.35rem; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
/* ---------- homepage opening (index.html only) ----------
   Order: firm intro first (the page's h1, so it describes the firm for search),
   then the headline and subhead, which carry the visual emphasis.
   Sizes: headline 1.4375rem (1.625rem on phones) > intro 1.125rem > subhead 1.125rem > body 1.0625rem.
   The intro is the one line on the site set in the accent colour, because it
   introduces the firm rather than explaining the strategy. */
h1.firm-intro {
  font-size: 1.125rem;             /* 18px */
  line-height: 1.6;
  letter-spacing: 0;
  max-width: none;
  color: var(--accent);
  margin: -1.25rem 0 1.5rem;       /* pulls up closer to the header on this page only */
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.headline {
  font-size: 1.4375rem;           /* 23px - sized to fit one line on desktop */
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}
.subhead {
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 2rem;
}

.note {
  font-size: 0.9375rem;
  color: var(--muted);
  font-style: italic;
}

a { color: var(--accent); }

strong { font-weight: 600; }

ul { padding-left: 1.15rem; margin: 0 0 1.35rem; }
li { margin-bottom: 0.6rem; }

/* ---------- components ---------- */

/* stacked point blocks, e.g. "Three things worth knowing" */
.points { margin: 0 0 1rem; }
.point {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0;
}
.point p { margin: 0; }
.point p + p { margin-top: 0.4rem; color: var(--muted); font-size: 0.9688rem; }

/* argument blocks - one per reason, separated like the homepage .point blocks */
.reason {
  border-top: 1px solid var(--rule);
  padding-top: 1.3rem;
  margin-bottom: 1.9rem;
}
h2 + .reason {                   /* no doubled rule right under a section heading */
  border-top: none;
  padding-top: 0;
}

/* call to action */
.cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.6rem 1.15rem;
  margin: 0.5rem 0 1rem;
}
.cta:hover { background: var(--accent); color: var(--bg); }

/* ---------- the exchange-path diagram ---------- */

.diagram {
  margin: 2.25rem 0 1rem;
  padding: 1.6rem 1.75rem 1.4rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* the rail: stages are nodes, steps are the line between them */
.flow { padding-left: 26px; }

.stage {
  position: relative;
  font-weight: 600;
  color: var(--ink);
}
.stage::before {                 /* the node */
  content: "";
  position: absolute;
  left: -26px;
  top: 0.42em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.stage::after {                  /* rail continues from this node down to the next step */
  content: "";
  position: absolute;
  left: -22px;
  top: calc(0.42em + 9px);
  bottom: -0.6rem;
  width: 1px;
  background: var(--rule);
}
.stage.terminal::before {        /* last node reads as an ending, not a stop-off */
  background: var(--panel);
  border: 2px solid var(--accent);
  width: 11px;
  height: 11px;
  left: -27px;
  top: 0.36em;
}
.stage.terminal::after { display: none; }   /* rail stops here */
.stage .sub {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8438rem;
  line-height: 1.5;
  margin-top: 0.15rem;
  max-width: 29rem;
}

.step {                          /* the labelled move, drawn on the rail */
  margin-left: -22px;
  padding: 0.6rem 0 0.6rem 22px;
  border-left: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8438rem;
  max-width: 30rem;
}
.step .law { font-weight: 600; color: var(--accent); }

.tag {
  display: inline-block;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 0.08rem 0.4rem;
  margin-left: 0.25rem;
  white-space: nowrap;
}

/* the optional endings, off the rail */
.outcomes {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}
.outcomes-label {
  color: var(--muted);
  font-size: 0.8438rem;
  margin-bottom: 0.8rem;
}
.outcome {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.55rem;
  max-width: 30rem;
  font-size: 0.8438rem;
  color: var(--muted);
}
.outcome:last-child { margin-bottom: 0; }
.outcome::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 1px;
  background: #bdb8ab;
}
.outcome strong { color: var(--ink); font-weight: 600; }

.diagram-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2.25rem;
}

/* contact block */
.contact-block {
  font-size: 1.1875rem;
  margin: 2rem 0;
}

/* ---------- "In brief" summary + on-page navigation ---------- */

html { scroll-behavior: smooth; }
h2[id], .reason[id] { scroll-margin-top: 1.5rem; }

.inbrief {
  margin: 0 0 1.75rem;
  padding: 0.15rem 0 0.15rem 1.35rem;
  border-left: 2px solid var(--accent);
}
.inbrief-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.inbrief ul { margin: 0; padding: 0; list-style: none; }
.inbrief li {
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.inbrief li:last-child { margin-bottom: 0; }
.inbrief strong { color: var(--ink); font-weight: 600; }

.onpage {
  font-family: var(--sans);
  font-size: 0.8438rem;
  margin: 0 0 3rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--rule);
}
.onpage-label {
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.onpage a { display: inline-block; margin: 0 1.4rem 0.35rem 0; }

/* A lede that runs straight into the diagram already ends with a rule, so
   tighten both sides of it. Targets the lede itself because adjacent margins
   collapse - shrinking the diagram's top margin alone does nothing. */
.lede:has(+ .diagram) { padding-bottom: 1.35rem; margin-bottom: 1.35rem; }
.lede + .diagram { margin-top: 0.4rem; }

/* ---------- comparison table ---------- */

.compare {
  margin: 0 0 0.9rem;
  padding: 0 1.25rem;
  background: #faf8f3;              /* lighter than --panel; the table is tall */
  border: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8438rem;
  line-height: 1.5;
}
.compare-row:last-child { border-bottom: none; }
.compare-row {
  display: grid;
  grid-template-columns: 9rem 1fr 1fr;
  gap: 0 1.4rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.compare-head {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.9rem 0 0.6rem;
}
.compare-head .b { color: var(--accent); }
.compare .f { font-weight: 600; color: var(--ink); }
.compare .f a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--rule); }
.compare .f a:hover { border-bottom-color: var(--accent); }
.compare .a { color: var(--muted); }
.compare .b { color: var(--ink); }
.compare .lbl { display: none; }

.compare-note {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 2.75rem;
}

/* On phones the three columns stack. The label sits inline with its value so
   each row stays as short as possible. */
@media (max-width: 40rem) {
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; gap: 0.2rem; padding: 0.8rem 0; }
  .compare .lbl {
    display: inline;
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 0.4rem;
  }
  .compare .b .lbl { color: var(--accent); }
  .compare .f { margin-bottom: 0.3rem; }
}

/* ---------- footer ---------- */

footer {
  margin-top: 5rem;
  border-top: 1px solid var(--rule);
  padding: 2rem 0 4rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.7;
}
footer a { color: var(--muted); }
footer .disclaimer { margin-top: 0.75rem; max-width: var(--measure); }

/* ---------- disclosures page ---------- */

.disclosure { margin-bottom: 1.75rem; }
.disclosure p { margin: 0; font-size: 0.9688rem; }

/* ---------- small screens ---------- */

@media (max-width: 34rem) {
  body { font-size: 1rem; }
  /* 80px plus a rule is a quarter of a phone screen. Halve it here; the type
     size stays put, since shrinking it only saves a line on some handsets. */
  .lede { padding-bottom: 1.25rem; margin-bottom: 1.25rem; }
  h1 { font-size: 1.625rem; }
  .headline { font-size: 1.625rem; }   /* wraps to two lines on phones anyway */
  h1.firm-intro { font-size: 1.125rem; margin-top: -0.75rem; padding-bottom: 1rem; margin-bottom: 1.25rem; }
  header { margin-bottom: 2.5rem; }
  nav a { margin-left: 0; margin-right: 1.25rem; }
}
