/* Eunoia Investments — implemented from the "Eunoia Investments website" design artifact */

:root {
  --paper: #FFFFFF;
  --ink: #000000;
  --ink-soft: #404040;
  --muted: #666666;
  --bronze: #8A6838;
  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'Hanken Grotesk', Arial, Helvetica, sans-serif;
}

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

body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--ink-soft); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 40px; padding-right: 40px; box-sizing: border-box; }

.lab { font: 600 11px/14px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.125; letter-spacing: -.01em; color: var(--ink); margin: 0; text-wrap: balance; }

/* Header */
.site-header { border-bottom: 1px solid var(--bronze); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 32px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: block; padding: 12px 0; }
.brand img { width: 132px; height: 26.2px; display: block; }
.main-nav { display: flex; flex-wrap: wrap; gap: 0 32px; }
.nav { font: 500 14px/22px var(--sans); color: var(--ink); text-decoration: none; padding: 12px 0; }
.nav:hover { color: var(--ink-soft); text-decoration: underline; }

/* Hero */
.hero { padding-top: clamp(72px, 9vw, 112px); padding-bottom: clamp(56px, 7vw, 88px); }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 72px); line-height: 1.056; letter-spacing: -0.015em; margin: 26px 0 0; color: var(--ink); max-width: 1060px; text-wrap: balance; }

/* Map + animated routes */
.map-section { padding-bottom: clamp(80px, 9vw, 120px); }
.mapbox { position: relative; }
.mapbox > img { display: block; width: 100%; height: auto; }
.routes { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rt { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: var(--l) var(--l); stroke-dashoffset: var(--l); opacity: 0; animation: eu-route 12s infinite; }
.dt { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; opacity: 0; animation: eu-dot 12s infinite; }
.c1 { stroke: var(--ink); stroke-width: 25; stroke-linecap: round; }
.c2 { stroke: var(--paper); stroke-width: 21; stroke-linecap: round; }
.c3 { stroke: var(--ink); stroke-width: 11; stroke-linecap: round; }

/* Per-route length and stagger (kept out of inline styles for the CSP) */
.r1 { --l: 623; animation-delay: 0s; }
.r2 { --l: 531; animation-delay: 1.33s; }
.r3 { --l: 539; animation-delay: 2.67s; }
.r4 { --l: 473; animation-delay: 4s; }
.r5 { --l: 213; animation-delay: 5.33s; }
.r6 { --l: 255; animation-delay: 6.67s; }
.r7 { --l: 233; animation-delay: 8s; }
.r8 { --l: 141; animation-delay: 9.33s; }
.r9 { --l: 94; animation-delay: 10.67s; }

@keyframes eu-route {
  0% { stroke-dashoffset: var(--l); opacity: 1; animation-timing-function: cubic-bezier(.22, .61, .36, 1); }
  14% { stroke-dashoffset: 0; opacity: 1; }
  72% { stroke-dashoffset: 0; opacity: 1; animation-timing-function: ease-in-out; }
  86% { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes eu-dot {
  0%, 12% { opacity: 0; }
  16% { opacity: 1; }
  72% { opacity: 1; animation-timing-function: ease-in-out; }
  86%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .rt, .dt { animation: none; opacity: 1; stroke-dashoffset: 0; } }

/* Sections */
.band { border-top: 1px solid var(--bronze); }
.band .wrap { padding-top: clamp(80px, 9vw, 120px); padding-bottom: clamp(80px, 9vw, 120px); }
#contact .wrap { padding-bottom: clamp(72px, 8vw, 112px); }
.g3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.8fr); column-gap: 48px; row-gap: 32px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.ap { margin: 0; font: 400 32px/38px var(--serif); color: var(--ink); text-wrap: pretty; }

/* Contact */
.cd { container-type: inline-size; }
.cg { display: grid; grid-template-columns: max-content max-content; justify-content: space-between; column-gap: 24px; row-gap: 40px; align-items: start; }
.ci { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--ink); padding-top: 18px; }
.cv { margin: 0; font-family: var(--serif); font-weight: 400; font-style: normal; font-size: min(32px, 3.9cqi); line-height: 1.1875; white-space: nowrap; color: var(--ink); }
.cv a { color: var(--ink); text-decoration: none; }
.cv a:hover { text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--bronze); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; padding-top: 34px; padding-bottom: 34px; }
.site-footer img { width: 100px; height: 19.9px; display: block; }
.legal { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; font: 400 14px/22px var(--sans); color: var(--muted); }

@media (max-width: 760px) {
  .g3 { grid-template-columns: minmax(0, 1fr); }
  .cg { grid-template-columns: minmax(0, 1fr); }
  .cv { font-size: clamp(20px, 6.2vw, 24px); line-height: 1.25; }
  .ap { font-size: 24px; line-height: 30px; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 22px; padding-right: 22px; }
  .rt { stroke-width: 4.6; }
  .dt { stroke-width: 26; }
  .c1 { stroke-width: 60; }
  .c2 { stroke-width: 50; }
  .c3 { stroke-width: 27; }
}
