/* =========================================================
   Danny Sallis — Personal brand (static)
   Palette: charcoal / deep navy + warm bronze accent
   ========================================================= */

:root {
  --bg: #0c1017;
  --bg-elevated: #121821;
  --bg-card: #161d28;
  --bg-soft: #1a2230;
  --line: rgba(232, 224, 208, 0.1);
  --line-strong: rgba(232, 224, 208, 0.18);
  --text: #ebe6dc;
  --text-muted: #9a9488;
  --text-soft: #c8c0b2;
  --accent: #c4a574;
  --accent-soft: rgba(196, 165, 116, 0.14);
  --accent-strong: #d4b98a;
  --navy: #1e3a5f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --container: 1120px;
  --narrow: 720px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.65rem 1rem;
  background: var(--accent);
  color: #111;
  font-weight: 600;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 2.5rem, var(--narrow));
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(12, 16, 23, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(12, 16, 23, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.logo-text {
  font-size: 0.95rem;
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.65rem;
}

.nav-menu a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--text);
}

.nav-cta {
  padding: 0.45rem 0.95rem !important;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-soft) !important;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  border-color: var(--accent);
  color: var(--accent) !important;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(4.5rem, 10vw, 7.5rem) 0 clamp(4rem, 8vw, 6rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 55% at 70% -10%, rgba(30, 58, 95, 0.55), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(196, 165, 116, 0.08), transparent 55%),
    linear-gradient(180deg, #0e1420 0%, var(--bg) 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 75%);
  opacity: 0.35;
  pointer-events: none;
}

.hero-inner {
  max-width: 820px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(3.25rem, 9vw, 5.75rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-lede {
  margin-top: 1.5rem;
  max-width: 38rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--text-soft);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.hero-meta dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.hero-meta dd {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-soft);
  font-weight: 500;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #14110c;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(4rem, 9vw, 6.5rem) 0;
}

.section-label {
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 5vw, 3.15rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
}

.section-intro {
  margin-top: 1rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-head {
  margin-bottom: 2.75rem;
}

/* ---------- Thesis ---------- */

.thesis {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
  border-block: 1px solid var(--line);
}

.thesis h2 {
  margin-bottom: 2.5rem;
}

.thesis-grid {
  display: grid;
  gap: 1.15rem;
}

.thesis-card {
  position: relative;
  padding: 1.65rem 1.5rem 1.65rem 1.65rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}

.thesis-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.thesis-num {
  display: block;
  margin-bottom: 0.85rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--accent);
  opacity: 0.85;
}

.thesis-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.thesis-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

@media (min-width: 768px) {
  .thesis-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  gap: 2.75rem;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.35fr 0.9fr;
    gap: 4rem;
    align-items: start;
  }
}

.about-photo {
  margin: 0 auto 1.25rem;
  max-width: 280px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0a0a;
  aspect-ratio: 1 / 1;
  line-height: 0;
}

.about-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 15%;
}

/* Mobile: photo first, keep square — never stretch */
@media (max-width: 899px) {
  .about-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .about-aside {
    order: -1;
  }

  .about-photo {
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-photo img {
    height: auto;
    max-height: none;
  }
}

@media (min-width: 900px) {
  .about-photo {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

.prose {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.15rem;
}

.prose p {
  color: var(--text-soft);
  font-size: 1.05rem;
}

.aside-list {
  display: grid;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.aside-list li {
  display: grid;
  gap: 0.25rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--line);
}

.aside-list li:last-child {
  border-bottom: none;
}

.aside-list strong {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.aside-list span {
  color: var(--text-soft);
  font-size: 0.98rem;
}

.aside-quote {
  margin: 1.25rem 0 0;
  padding: 1.35rem 1.4rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.aside-quote p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--text-soft);
}

/* ---------- Track record ---------- */

.track {
  background: var(--bg-elevated);
  border-block: 1px solid var(--line);
}

.track-list {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 768px) {
  .track-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.track-card {
  padding: 1.65rem 1.55rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.track-card:hover {
  border-color: rgba(196, 165, 116, 0.35);
  box-shadow: var(--shadow);
}

.track-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.85rem;
}

.track-tag {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(196, 165, 116, 0.25);
}

.track-loc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.track-card h3 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.track-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ---------- Approach ---------- */

.approach-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .approach-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3.5rem;
    align-items: start;
  }
}

.approach-steps {
  counter-reset: step;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.approach-steps li {
  counter-increment: step;
  position: relative;
  padding: 1.4rem 1.4rem 1.4rem 4.25rem;
  border-bottom: 1px solid var(--line);
}

.approach-steps li:last-child {
  border-bottom: none;
}

.approach-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.25rem;
  top: 1.45rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--accent);
}

.approach-steps h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.approach-steps p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(30, 58, 95, 0.4), transparent 70%),
    var(--bg);
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact h2 {
  max-width: 18ch;
}

.contact-lede {
  margin: 1.15rem 0 2rem;
  max-width: 34rem;
  color: var(--text-muted);
}

.contact-note {
  margin-top: 1.35rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.contact-note strong {
  color: var(--text-soft);
  font-weight: 500;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: #090c12;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-brand .logo-mark {
  width: 2rem;
  height: 2rem;
  font-size: 0.65rem;
}

.footer-brand strong {
  display: block;
  font-size: 0.95rem;
}

.footer-brand span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Reveal motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .thesis-card:hover {
    transform: none;
  }
}

/* ---------- Mobile nav ---------- */

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(12, 16, 23, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--line);
  }

  .nav-menu li:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
  }

  .nav-menu a {
    display: block;
    padding: 0.9rem 0.25rem;
  }

  .nav-cta {
    text-align: center;
    border-radius: 999px !important;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}


/* ---------- Markets map ---------- */
.markets .section-head {
  margin-bottom: 1.75rem;
}

.map-panel {
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.us-map-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 920px;
  margin: 0 auto;
}

.map-caption {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem 0 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.map-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  background: var(--accent);
  border: 1px solid var(--accent-strong);
  flex-shrink: 0;
}

.state-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}

.state-chips li {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Focus styles for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Prose links (e.g. Velocity About) */
.prose a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: rgba(196, 165, 116, 0.45);
  text-underline-offset: 0.18em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.prose a:hover,
.prose a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
