/* Lundberg Enterprises — site styles */

:root {
  --paper: #f7f5f0;
  --surface: #ffffff;
  --ink: #16181d;
  --muted: #565c68;
  --faint: #868b95;
  --line: #e2ded4;
  --line-soft: #eeebe4;
  --accent: #0b5c8e;
  --accent-hover: #084a73;
  --accent-ink: #ffffff;
  --accent-soft: #e5eef5;
  --good: #2d6a0a;
  --bad: #8b2020;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1080px;
  --prose: 680px;
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111214;
    --surface: #18191d;
    --ink: #ecebe6;
    --muted: #a6aab2;
    --faint: #7d828c;
    --line: #2a2c32;
    --line-soft: #222429;
    --accent: #72b6e3;
    --accent-hover: #93c8eb;
    --accent-ink: #0a1520;
    --accent-soft: #15232e;
    --good: #82c862;
    --bad: #e58080;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--prose); }
.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.12rem; letter-spacing: 0.01em; }
.wordmark:hover { color: var(--ink); }
.mark { width: 28px; height: 28px; flex: none; }
.mark-bg { fill: var(--ink); }
.mark-fg { fill: var(--paper); }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 6px 10px; border-radius: 6px; }
.site-nav a:hover { color: var(--ink); background: var(--line-soft); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--line-soft); }

@media (max-width: 560px) {
  .header-inner { padding-top: 12px; padding-bottom: 10px; }
  .site-nav { width: 100%; margin-left: -10px; }
}

/* Sections */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-tight { padding: clamp(32px, 5vw, 56px) 0; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; font-weight: 600; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 40em; line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* Hero */
.hero { padding: clamp(64px, 11vw, 136px) 0 clamp(48px, 8vw, 96px); }
.hero h1 { max-width: 15em; }
.hero .lead { margin-bottom: 32px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.95rem/1 var(--sans);
  padding: 14px 20px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.button[disabled] { opacity: .6; cursor: progress; }
.button-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.button-quiet:hover { background: var(--line-soft); color: var(--ink); border-color: var(--line); }

/* Cards & grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }
.card .card-link { margin-top: auto; font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.card .card-link::after { content: " →"; }
a.card { color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
a.card:hover { border-color: var(--faint); transform: translateY(-2px); color: inherit; }
.card-num { font-family: var(--serif); color: var(--faint); font-size: 0.95rem; margin-bottom: 18px; }

.badge {
  display: inline-block; align-self: flex-start; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.badge-live { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.badge-soon { background: var(--line-soft); color: var(--muted); }

.placeholder-card { border-style: dashed; background: transparent; }

/* Principles */
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border-top: 1px solid var(--line); }
.principles li { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); }
.principles strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.15rem; margin-bottom: 6px; }
.principles span { color: var(--muted); font-size: 0.95rem; }

/* Split section */
.split { display: grid; gap: clamp(24px, 5vw, 64px); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }

/* Waitlist */
.waitlist { max-width: 520px; }
.waitlist-row { display: flex; gap: 10px; flex-wrap: wrap; }
.waitlist input[type="email"] {
  flex: 1 1 220px; min-width: 0; font: inherit; font-size: 1rem; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
}
.waitlist input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.waitlist .button { flex: 0 0 auto; }
.waitlist-note { font-size: 0.85rem; color: var(--faint); margin: 10px 0 0; }
.waitlist.is-done .waitlist-note { color: var(--good); }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); }

/* Prose pages */
.page-head { padding: clamp(48px, 8vw, 88px) 0 clamp(24px, 4vw, 40px); }
.page-head .lead { margin-bottom: 0; }
.prose h2 { font-size: 1.45rem; margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.updated { font-size: 0.88rem; color: var(--faint); }

/* Link list */
.link-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a, .link-list .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; color: var(--ink); text-decoration: none; }
.link-list a:hover .ll-title { color: var(--accent); }
.ll-title { font-family: var(--serif); font-size: 1.2rem; }
.ll-meta { color: var(--faint); font-size: 0.88rem; white-space: nowrap; }

/* Portfolio */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 14px); margin: 0 0 40px; }
@media (max-width: 480px) { .stat { padding: 12px; } .stat-value { font-size: 1.3rem; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.stat-value { font-family: var(--serif); font-size: 1.6rem; line-height: 1.3; }
.stat-sub { font-size: 0.8rem; color: var(--faint); }
.table-wrap { overflow-x: auto; margin: 0 0 40px; -webkit-overflow-scrolling: touch; }
table.holdings { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 520px; }
.holdings th { text-align: left; font-weight: 600; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.holdings td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.holdings .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.holding-name { font-weight: 500; }
.holding-ticker { font-size: 0.78rem; color: var(--faint); }
.weight { display: flex; align-items: center; gap: 10px; }
.bar { width: 80px; height: 4px; flex: none; }
.bar .bar-bg { fill: var(--line); }
.bar .bar-fill { fill: var(--ink); }
.up { color: var(--good); }
.down { color: var(--bad); }
.category { font-style: italic; color: var(--muted); font-size: 0.9rem; }
.disclaimer { font-size: 0.85rem; color: var(--faint); border-left: 2px solid var(--line); padding-left: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(48px, 8vw, 96px); padding: 48px 0 24px; font-size: 0.92rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 2fr repeat(3, 1fr); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-name { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 8px; }
.footer-quote { color: var(--muted); font-family: var(--serif); font-style: italic; }
.footer-quote span { font-style: normal; font-family: var(--sans); font-size: 0.85rem; color: var(--faint); }
.footer-head { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 0.85rem; }
.home .site-footer { margin-top: 0; }

/* 404 */
.notfound { padding: clamp(80px, 14vw, 160px) 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
