:root {
  --band: #757272;
  --orange: #cc822c;
  --black: #000000;
  --page: #f4f4f4;
  --white: #ffffff;
  --ink: #212529;
  --text: #5c5959;
  --button: #117a8b;
  --button-hover: #0c5f6c;
  --footer: #474747;
  --bottom: #2a2a2a;
  --head: "PT Serif", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.6 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible, .slides:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.wrap { width: min(1110px, 100% - 32px); margin-inline: auto; }

/* Top band: addresses, logo, phone */
.top-band { background: var(--band); border-bottom: 3px solid var(--orange); color: var(--white); font-size: 14px; }
.top-band .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 20px 0; }
.top-band p { margin: 0; }
.top-band .right { text-align: right; }
.top-band .center { text-align: center; font-weight: 600; }
.top-band .center img { width: 90px; margin: 0 auto 4px; }
.top-band a { color: inherit; text-decoration: none; }
.top-band a:hover { color: var(--orange); }

/* Nav */
.site-nav { background: var(--black); }
.site-nav .wrap { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 14px 0; }
.site-nav a { color: var(--white); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.site-nav a:hover { color: var(--orange); }
.site-nav a[aria-current="page"] { border-color: var(--orange); }

section { padding: 56px 0; }

/* Home slides */
.carousel { position: relative; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border: 1px solid #ddd; background: var(--white); padding: 4px; }
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; scroll-snap-align: start; }
.carousel button {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: var(--white); font-size: 22px; cursor: pointer;
  transition: background .2s;
}
.carousel button:hover { background: var(--orange); }
.carousel .prev { left: 12px; }
.carousel .next { right: 12px; }

/* Home intro + contact */
.intro { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.intro h2, .contact-box h2 { font-size: 28px; }
.intro p { color: var(--text); }
.contact-box p { color: var(--text); }

.button {
  display: inline-block; padding: 8px 18px; border-radius: 4px;
  background: var(--button); color: var(--white); text-decoration: none;
  transition: background .2s;
}
.button:hover { background: var(--button-hover); }

/* Home cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; background: var(--white); padding: 28px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.cards h3 { font-size: 20px; text-transform: uppercase; }
.cards img { border: 3px solid #666; margin-bottom: 12px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.cards p { color: var(--text); font-size: 15px; }

/* Inner pages */
.page h1 { font-size: clamp(26px, 4vw, 34px); }
.page p { color: var(--text); }
.page .figure-right { float: right; margin: 4px 0 16px 28px; width: min(300px, 45%); }
.page .portrait { float: right; margin: 4px 0 16px 28px; width: min(260px, 40%); }
.page .clear { clear: both; }
.letter { background: var(--white); border-left: 4px solid var(--orange); padding: 28px; margin: 40px 0 0; }
.letter h2 { font-size: 22px; }

/* Footer */
.site-footer { background: var(--footer); color: var(--white); padding-top: 56px; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--orange); }
.site-footer .sponsor-logo { background: var(--white); padding: 12px 24px; margin: 24px auto; width: 300px; }
.footer-nav { border-top: 1px solid #bbb; margin-top: 40px; padding: 16px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: 14px; }
.footer-nav a { text-decoration: none; }
.copyright { background: var(--bottom); text-align: center; font-size: 13px; padding: 12px 16px; margin: 0; }

/* Market ticker, pinned to the bottom */
body.has-ticker { padding-bottom: 48px; }
.ticker-bar {
  position: fixed; inset: auto 0 0; z-index: 50; height: 48px;
  display: flex; align-items: center;
  background: var(--bottom); border-top: 2px solid var(--orange); color: #bbb; font-size: 13px;
}
.ticker-bar[hidden] { display: none; }
.ticker-bar .tradingview-widget-container { flex: 1; min-width: 0; overflow: hidden; }
.ticker-credit { flex: none; margin: 0; padding: 0 12px; border-left: 1px solid #555; white-space: nowrap; }
.ticker-credit a { color: #bbb; text-decoration: none; }
.ticker-credit a:hover { color: var(--orange); }
.ticker-close { flex: none; width: 40px; height: 100%; border: 0; background: none; color: #bbb; font-size: 20px; cursor: pointer; }
.ticker-close:hover { color: var(--orange); }

/* Client News */
.news-gate { max-width: 420px; }
.news-gate label { display: block; font-weight: 600; margin-bottom: 6px; }
.news-gate input { display: block; width: 100%; padding: 10px 12px; margin-bottom: 14px; border: 1px solid #bbb; border-radius: 4px; font: inherit; }
.news-gate button { border: 0; font: inherit; cursor: pointer; }
.form-error { color: #a12a1f !important; font-weight: 600; }
.post { border-bottom: 1px solid #ddd; padding-bottom: 24px; margin-bottom: 32px; }
.post h2 { font-size: 20px; }

@media (max-width: 768px) {
  .top-band .wrap { grid-template-columns: 1fr; text-align: center; }
  .top-band .center { order: -1; }
  .top-band .right { text-align: center; }
  .intro, .cards { grid-template-columns: 1fr; }
  .page .figure-right, .page .portrait { float: none; width: 100%; max-width: 360px; margin: 0 auto 20px; }
  section { padding: 40px 0; }
}

@media (max-width: 600px) {
  .ticker-credit .long { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .slides { scroll-behavior: auto; }
}
