/**
 * Homepage "Who's behind it" section: template-parts/home-dan.php. Sits after the toolkit and matches it:
 * dark by default, light under html[data-theme="light"]. Scoped to .smd.
 */

.smd {
    --smd-bg: #0a0a0a;
    --smd-text: #f5f5f2;
    --smd-text2: #c4c9d2;
    --smd-muted: #9aa1ad;
    --smd-gold: #f5c518;
    --smd-orange: #fb923c;
    --smd-line: #232c3b;
    --smd-panel: linear-gradient(180deg, #161e2c 0%, #111827 100%);
    --smd-plate: #0f1522;
    padding: 80px 0 88px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--smd-bg);
    color: var(--smd-text);
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
html[data-theme="light"] .smd {
    --smd-bg: #f5f5f5;
    --smd-text: #1a1a1a;
    --smd-text2: #4a4f57;
    --smd-muted: #6b7079;
    --smd-gold: #8a6606;
    --smd-orange: #c2410c;
    --smd-line: #e2e5ea;
    --smd-panel: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
    --smd-plate: #f6f7f9;
    border-top-color: rgba(0, 0, 0, 0.06);
}
.smd *, .smd *::before, .smd *::after { box-sizing: border-box; }
.smd :where(h2, h3, p, figure) { margin: 0; padding: 0; }
.smd :where(p, span, div, h2, h3, b) { color: inherit; font-size: inherit; }
.smd :focus-visible { outline: 3px solid var(--smd-gold); outline-offset: 3px; border-radius: 6px; }
.smd-wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 40px; }

/* Portrait about a third; the headline and introduction take the rest, centred beside it */
.smd-top { display: grid; grid-template-columns: 340px 1fr; grid-template-rows: 1fr auto auto 1fr; grid-template-areas: "photo ." "photo head" "photo body" "photo ."; column-gap: 64px; }
.smd-head { grid-area: head; }
.smd-body { grid-area: body; }
.smd-photo { grid-area: photo; align-self: center; overflow: hidden; border-radius: 24px; border: 1px solid var(--smd-line); background: var(--smd-panel); }
.smd .smd-photo img { display: block; width: 78%; max-width: none; height: auto; margin: 28px auto 0; }
.smd-plate { padding: 18px 22px; border-top: 1px solid var(--smd-line); background: var(--smd-plate); }
.smd .smd-plate b { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; color: var(--smd-text); }
.smd .smd-plate span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--smd-text2); }

.smd .smd-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smd-gold); }
.smd .smd-h2 { margin-top: 14px; font-size: 56px; line-height: 1.06; font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; color: var(--smd-text); }
.smd .smd-h2 span { display: block; }
.smd .smd-h2 em { font-style: italic; color: var(--smd-gold); }
.smd .smd-lead { margin-top: 28px; max-width: 40em; font-size: 20px; line-height: 1.6; color: var(--smd-text); text-wrap: pretty; }
.smd .smd-lead + .smd-lead { margin-top: 14px; font-size: 18px; color: var(--smd-text2); }

/* How the membership fits an investing routine: an unboxed row with thin separators */
.smd-how { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 64px; border-top: 1px solid var(--smd-line); border-bottom: 1px solid var(--smd-line); }
.smd-step { padding: 30px 36px 32px; }
.smd-step:first-child { padding-left: 0; }
.smd-step:last-child { padding-right: 0; }
.smd-step + .smd-step { border-left: 1px solid var(--smd-line); }
.smd .smd-num { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--smd-orange); }
.smd .smd-step h3 { margin-top: 10px; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--smd-text); }
.smd .smd-step p:not(.smd-num) { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--smd-text2); }

/* Supporting credibility: quiet */
.smd-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; margin-top: 28px; }
.smd .smd-indep { font-size: 15px; line-height: 1.5; color: var(--smd-text2); }
.smd .smd-indep b { font-weight: 600; color: var(--smd-text); }
.smd-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.smd .smd-links a, .smd .smd-links a:hover { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--smd-gold); text-decoration: none; }
.smd .smd-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.smd .smd-note { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--smd-muted); }

/* Below 1440px the headline takes the full width, so it stays on two lines; the portrait sits beside the introduction */
@media (min-width: 761px) and (max-width: 1439px) {
    .smd-top { grid-template-rows: auto auto; grid-template-areas: "head head" "photo body"; align-items: center; }
    .smd-head { margin-bottom: 36px; }
    .smd-body .smd-lead:first-child { margin-top: 0; }
}
/* Tablets: a narrower portrait */
@media (max-width: 1279px) {
    .smd-top { grid-template-columns: 300px 1fr; column-gap: 40px; }
    .smd .smd-h2 { font-size: 46px; }
    .smd .smd-lead { font-size: 18px; }
    .smd .smd-lead + .smd-lead { font-size: 17px; }
    .smd-step { padding: 28px 28px 30px; }
}
/* With the headline above it (761-1439px), a smaller portrait keeps the section compact */
@media (min-width: 761px) and (max-width: 1439px) {
    .smd-top { grid-template-columns: 270px 1fr; column-gap: 48px; }
    .smd .smd-photo img { margin-top: 20px; }
}
/* Smaller tablets: the steps stack as rows */
@media (max-width: 1024px) {
    .smd-how { grid-template-columns: 1fr; margin-top: 48px; border-bottom: 0; }
    .smd-step, .smd-step:first-child, .smd-step:last-child { padding: 22px 0; border-bottom: 1px solid var(--smd-line); }
    .smd-step + .smd-step { border-left: 0; }
}
/* Phones: headline, a compact portrait strip, the introduction, then the steps stacked */
@media (max-width: 760px) {
    .smd { padding: 72px 0 80px; font-size: 16px; }
    .smd-wrap { padding: 0 18px; }
    .smd-top { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "head" "photo" "body"; }
    .smd .smd-eyebrow { font-size: 13px; }
    .smd .smd-h2 { margin-top: 12px; font-size: 36px; line-height: 1.08; }
    .smd-photo { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 12px 14px; border-radius: 16px; }
    .smd .smd-photo img { flex: 0 0 auto; width: 68px; height: 80px; margin: 0; object-fit: cover; object-position: top; border-radius: 12px; background: var(--smd-plate); }
    .smd-plate { padding: 0; border: 0; background: none; }
    .smd .smd-plate b { font-size: 17px; }
    .smd .smd-plate span { margin-top: 3px; font-size: 13px; line-height: 1.4; }
    .smd .smd-lead { margin-top: 20px; font-size: 17px; }
    .smd .smd-lead + .smd-lead { margin-top: 12px; font-size: 16px; }
    .smd-how { margin-top: 28px; }
    .smd-step, .smd-step:first-child, .smd-step:last-child { padding: 18px 0; }
    .smd .smd-num { font-size: 11px; }
    .smd .smd-step h3 { margin-top: 8px; font-size: 17px; line-height: 1.35; }
    .smd .smd-step p:not(.smd-num) { margin-top: 5px; font-size: 14px; }
    .smd-foot { display: block; margin-top: 20px; }
    .smd .smd-indep { font-size: 14px; }
    .smd-links { display: grid; gap: 0; margin-top: 8px; }
    .smd .smd-links a { display: flex; }
    .smd .smd-note { font-size: 12px; }
}
