/* State Credits. One layout, three looks (data-design 1-3), two audiences (data-role sell/buy).
   Palettes and type pairings start from tasteskill's library (github.com/Leonxlnx/taste-skill). */
:root {
  --bg: #f3efe8; --surface: #e9e3d8; --ink: #1d1a16; --muted: #6b645a; --line: #d6cfc2;
  --accent: #8a2e1d; --accent-ink: #fbf8f2; --band: #1d1a16; --band-ink: #f3efe8; --band-muted: #a79f92;
  --display: "Instrument Serif", Georgia, serif; --text: "Instrument Sans", system-ui, sans-serif; --num: var(--display);
  --dw: 400; --track: -0.015em; --radius: 4px; --h1: clamp(52px, 6.4vw, 100px);
}
html[data-design="2"] {
  --bg: #0d0c0a; --surface: #16140f; --ink: #f3efe6; --muted: #9a9286; --line: #2a261f;
  --accent: #c9a45a; --accent-ink: #0d0c0a; --band: #16140f; --band-ink: #f3efe6; --band-muted: #9a9286;
  --display: "Instrument Serif", Georgia, serif; --text: "Manrope", system-ui, sans-serif;
}
html[data-design="3"] {
  --bg: #ffffff; --surface: #f3f4f6; --ink: #0f1115; --muted: #5f6672; --line: #dfe2e7;
  --accent: #1f3fd1; --accent-ink: #ffffff; --band: #0f1115; --band-ink: #ffffff; --band-muted: #9aa1ad;
  --display: "Source Serif 4", Georgia, serif; --text: "IBM Plex Sans", system-ui, sans-serif; --num: "IBM Plex Mono", ui-monospace, monospace;
  --dw: 400; --track: -0.025em; --radius: 2px; --h1: clamp(48px, 7vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--dw); letter-spacing: var(--track); line-height: 1.02; margin: 0; }
h2 { font-size: clamp(40px, 5vw, 72px); }
h3 { font-family: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
em { font-style: italic; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* Roles: show only the chosen audience's copy */
html[data-role="sell"] [data-show="buy"], html[data-role="buy"] [data-show="sell"] { display: none !important; }

.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: var(--accent-ink); border: 0;
  border-radius: var(--radius); font: 600 15px/1 var(--text); padding: 14px 22px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-lg { padding: 18px 28px; font-size: 16px; }

/* Header sits on the photograph */
.bar { position: absolute; inset: 0 0 auto; z-index: 3; color: #fff; }
.bar-in { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.mark { display: inline-flex; align-items: center; gap: 12px; font: 500 18px/1 var(--text); letter-spacing: -0.01em; text-decoration: none; margin: 0; }
.seal { width: 34px; height: 34px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center;
  font: italic 400 15px/1 var(--display); letter-spacing: 0; }
.bar nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.bar nav a:not(.btn) { text-decoration: none; opacity: .82; }
.bar nav a:not(.btn):hover { opacity: 1; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #2a2620; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  animation: settle 2.4s cubic-bezier(.2,.7,.2,1) both; }
.hero-scrim { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(10,8,6,.78) 0%, rgba(10,8,6,.5) 38%, rgba(10,8,6,0) 66%),
  linear-gradient(180deg, rgba(10,8,6,.5) 0%, rgba(10,8,6,0) 20%, rgba(10,8,6,0) 60%, rgba(10,8,6,.7) 100%); }
.hero-in { position: relative; z-index: 2; width: 100%; padding-bottom: 56px; }
.kicker { font: 500 12px/1 var(--text); letter-spacing: .16em; text-transform: uppercase; opacity: .8; margin-bottom: 22px; }
.hero h1 { font-size: var(--h1); max-width: 10ch; }
.lede { font-size: clamp(17px, 1.4vw, 20px); max-width: 32em; margin: 26px 0 40px; color: rgba(255,255,255,.86); }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 860px; }
.door { position: relative; text-align: left; cursor: pointer; padding: 22px 64px 22px 24px; border-radius: 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #fff; display: grid; gap: 6px; transition: background .2s, border-color .2s, transform .2s; }
.door:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.6); transform: translateY(-2px); }
.door-k { font: 500 11px/1 var(--text); letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.door-t { font: var(--dw) 30px/1.1 var(--display); letter-spacing: var(--track); }
.door-s { font-size: 14px; opacity: .75; }
.door-a { position: absolute; right: 22px; top: 50%; translate: 0 -50%; font-size: 22px; transition: translate .2s; }
.door:hover .door-a { translate: 4px -50%; }

/* Switch */
.switch { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.switch button { border: 0; background: none; padding: 10px 20px; border-radius: 999px; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.switch button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.switch-dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); margin-top: 32px; }
.switch-dark button { color: var(--band-muted); }
.switch-dark button[aria-selected="true"] { background: var(--band-ink); color: var(--band); }

/* How it works */
.how { padding: 120px 0; }
.how-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 80px; align-items: stretch; margin-top: 48px; }
.how h2 { max-width: 12ch; }
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 48px 0 0; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.figures dt { font: var(--dw) clamp(48px, 5vw, 76px)/1 var(--num); letter-spacing: var(--track); color: var(--accent); }
.figures dd { margin: 12px 0 0; color: var(--muted); font-size: 15px; max-width: 26ch; }
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 28px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 8px; }
.steps p { color: var(--muted); margin-top: 6px; max-width: 40em; }
.n { font: italic var(--dw) 26px/1 var(--display); color: var(--accent); padding-top: 1px; }
.how-img { margin: 0; border-radius: 6px; overflow: hidden; min-height: 520px; }
.how-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.how-img:hover img { transform: scale(1.025); }

/* Credits */
.credits { padding: 120px 0; background: var(--surface); }
.credits-head { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; margin-bottom: 56px; }
.credits-head p { color: var(--muted); font-size: 18px; max-width: 34em; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.card { grid-column: span 2; display: grid; gap: 16px; }
.card-wide { grid-column: span 4; }
.card img { width: 100%; height: 260px; object-fit: cover; border-radius: 6px; transition: transform .6s ease; }
.card-wide img, .card:nth-child(2) img { height: 380px; }
.card > div { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 12px; }
.card p { color: var(--muted); font-size: 14px; text-align: right; }
.card { overflow: hidden; }
.card:hover img { transform: scale(1.02); }
.more { margin-top: 32px; color: var(--muted); font-size: 15px; }

/* Join */
.join { background: var(--band); color: var(--band-ink); padding: 120px 0; }
.join-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: start; }
.join-copy p { color: var(--band-muted); margin-top: 22px; max-width: 30em; font-size: 18px; }
form { display: grid; gap: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 500; letter-spacing: .01em; color: var(--band-muted); }
input, select { font: 400 16px/1.4 var(--text); color: var(--band-ink); background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); padding: 14px 15px; width: 100%; transition: border-color .2s; }
html[data-design="3"] .join input, html[data-design="3"] .join select { background: rgba(255,255,255,.06); }
select option { color: #111; }
input::placeholder { color: rgba(255,255,255,.35); }
input:hover, select:hover { border-color: rgba(255,255,255,.32); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
form .btn { justify-self: start; margin-top: 8px; }
html[data-design="1"] .join .btn { background: var(--band-ink); color: var(--band); }
.hp { position: absolute; left: -9999px; }
.msg { min-height: 1.4em; font-size: 15px; }
.msg.err { color: #ff9c8a; }
.msg.ok { color: var(--band-ink); font-weight: 600; }

/* Footer */
.foot { padding: 56px 0 96px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: 1fr 2fr; gap: 24px 80px; }
.foot .mark { color: var(--ink); }
.foot .credit { grid-column: 2; font-size: 13px; }

/* Design 3: ledger touches */
html[data-design="3"] .kicker { font-family: var(--num); letter-spacing: .04em; }
html[data-design="3"] .figures dt { font-weight: 400; font-size: clamp(36px, 3.6vw, 54px); }
.figures dt { white-space: nowrap; }
html[data-design="3"] .n { font: 500 14px/1.9 var(--num); font-style: normal; }
html[data-design="3"] .door { border-radius: 2px; }
html[data-design="3"] .switch, html[data-design="3"] .switch button { border-radius: 2px; }
html[data-design="2"] .credits { background: var(--bg); border-top: 1px solid var(--line); }
html[data-design="2"] .join { border-top: 1px solid var(--line); }
html[data-design="2"] .how-img img, html[data-design="2"] .card img { filter: saturate(.85) contrast(1.05); }


@keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .bar nav a:not(.btn) { display: none; }
  .hero-in { padding-bottom: 32px; padding-top: 120px; }
  .hero-scrim { background: linear-gradient(180deg, rgba(10,8,6,.55) 0%, rgba(10,8,6,.62) 50%, rgba(10,8,6,.85) 100%); }
  .doors, .how-grid, .credits-head, .join-in, .row, .foot-in { grid-template-columns: 1fr; }
  .door-t { font-size: 25px; }
  .how, .credits, .join { padding: 80px 0; }
  .how-grid { gap: 40px; }
  .how-img { min-height: 340px; }
  .figures { grid-template-columns: 1fr 1fr; gap: 20px; }
  .credits-head { gap: 20px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 16px; }
  .card, .card-wide { grid-column: span 1; }
  .card-wide { grid-column: span 2; }
  .card img, .card-wide img, .card:nth-child(2) img { aspect-ratio: 4 / 3; height: auto; }
  .card > div { display: grid; gap: 2px; }
  .card p { text-align: left; }
  .join-in { gap: 40px; }
  .foot .credit { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero-in { animation: none; }
  .door, .how-img img, .card img, .btn { transition: none; }
}
