/* Assembly Studio website. Flat colors from the application's dark theme (src/AssemblyStudio.App/Themes/Dark.xaml);
   IBM Plex, the IBM typeface, for the machine that made the 8086 famous. No gradients. */
:root {
  --bg: #151618;
  --bg-2: #1B1C1F;
  --panel: #232428;
  --raised: #2B2D32;
  --line: #303238;
  --line-2: #464a52;
  --text: #ECEDEF;
  --text-2: #BFC3C9;
  --muted: #9BA1AA;
  --yellow: #F5C542;
  --yellow-2: #FFD566;
  --ink: #16130a;
  --blue: #5AA2FF;
  --blue-2: #7AB4FF;
  --syn-mnemonic: #82AAFF;
  --syn-register: #F7A072;
  --syn-directive: #D3A6F5;
  --syn-number: #F2C76E;
  --syn-string: #B5E08A;
  --syn-comment: #A3AAB4;
  --syn-label: #7FDBCA;
  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-2); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0 0 .45em; font-weight: 600; letter-spacing: -0.015em; line-height: 1.12; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); }
kbd { display: inline-block; min-width: 1.6em; text-align: center; font-size: .8em; line-height: 1.5; padding: 0 .45em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--raised); color: var(--text); }
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 10px; padding: 8px 14px; background: var(--yellow); color: var(--ink); border-radius: 6px; z-index: 30; }
.skip:focus { left: 12px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(21, 22, 24, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); font-weight: 600; }
.brand:hover { color: var(--text); }
.top nav { display: flex; align-items: center; gap: 28px; font-size: .95rem; }
.top nav a { color: var(--text-2); }
.top nav a:hover { color: var(--text); }
.top nav .nav-dl { color: var(--ink); background: var(--yellow); padding: 6px 14px; border-radius: 6px; font-weight: 600; }
.top nav .nav-dl:hover { background: var(--yellow-2); color: var(--ink); }

/* Hero */
.hero { padding: 84px 0 72px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.tag { font: 500 .82rem/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; margin-bottom: 26px; }
h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); font-weight: 600; letter-spacing: -0.025em; margin-bottom: 24px; }
.nowrap { white-space: nowrap; }
.caret { display: inline-block; width: .45em; height: .78em; margin-left: .1em; background: var(--yellow); vertical-align: baseline; transform: translateY(.08em); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 36em; margin-bottom: 34px; }
.actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; background: var(--yellow); color: var(--ink); font-weight: 600; border-radius: 8px; transition: background .2s var(--ease), transform .2s var(--ease); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn:hover { background: var(--yellow-2); color: var(--ink); transform: translateY(-1px); }
.btn:hover svg { transform: translateY(2px); }
.textlink { color: var(--text); font-weight: 500; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .2s var(--ease); }
.textlink span { display: inline-block; transition: transform .25s var(--ease); }
.textlink:hover { color: var(--text); border-color: var(--text-2); }
.textlink:hover span { transform: translateX(4px); }
.meta { margin-top: 24px; font-size: .88rem; color: var(--muted); }

/* Demo */
.demo { margin: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.demo-bar { display: flex; align-items: center; gap: 14px; padding: 9px 12px 9px 16px; background: var(--panel); border-bottom: 1px solid var(--line); font: 500 .8rem var(--mono); }
.demo-title { color: var(--text); }
.demo-state { color: var(--yellow); flex: 1; }
.demo-buttons { display: flex; gap: 6px; }
.demo-buttons button { font: 500 .78rem var(--mono); color: var(--text-2); background: var(--raised); border: 1px solid var(--line-2); border-radius: 5px; padding: 4px 9px; cursor: pointer; transition: color .15s, border-color .15s; }
.demo-buttons button:hover { color: var(--text); border-color: var(--text-2); }
.demo-buttons kbd { font-size: .9em; padding: 0 .3em; margin-left: 2px; border-bottom-width: 1px; }
.demo-body { display: grid; grid-template-columns: 1fr 150px; }
.demo-code { list-style: none; margin: 0; padding: 14px 0; font: 14px/1.95 var(--mono); counter-reset: ln; overflow-x: auto; }
/* pre on each line, not on the list: the line breaks between the list items must not render. */
.demo-code li { counter-increment: ln; position: relative; padding: 0 16px 0 58px; white-space: pre; transition: background .25s var(--ease); }
.demo-code li::before { content: counter(ln); position: absolute; left: 0; width: 30px; text-align: right; color: #5d626b; }
.demo-code li::after { content: ""; position: absolute; left: 38px; top: 50%; width: 0; height: 0; border-left: 8px solid var(--yellow); border-block: 5px solid transparent; transform: translate(-6px, -50%); opacity: 0; transition: opacity .2s var(--ease), transform .25s var(--ease); }
.demo-code li.cur { background: rgba(245, 197, 66, .09); }
.demo-code li.cur::after { opacity: 1; transform: translate(0, -50%); }
.demo-regs { margin: 0; padding: 14px 16px; border-left: 1px solid var(--line); background: var(--panel); display: grid; align-content: start; gap: 10px; font-family: var(--mono); }
.demo-regs div { display: flex; justify-content: space-between; align-items: center; }
.demo-regs dt { color: var(--syn-mnemonic); font-weight: 600; font-size: .9rem; }
.demo-regs dd { margin: 0; padding: 1px 7px; border: 1px solid transparent; border-radius: 4px; color: var(--syn-number); font-size: .95rem; }
.demo-regs dd.chg { border-color: var(--yellow); }
.demo-regs dd.flash { animation: flash .7s var(--ease); }
@keyframes flash { from { background: rgba(245, 197, 66, .35); } to { background: transparent; } }
.demo figcaption { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; line-height: 1.45; }

/* Screenshots */
.shot-section { padding: 72px 0 0; }
.shot { margin: 0; }
.shot img { border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.shot figcaption { margin-top: 14px; font-size: .9rem; color: var(--muted); }
.shot figcaption span { font-family: var(--mono); color: var(--text-2); margin-right: 10px; }

/* Sections */
.section { padding: 104px 0; }
.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 48px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--text-2); }

/* Datasheet */
.sheet { margin: 0; border-top: 1px solid var(--line-2); }
.sheet > div { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.sheet dt { font: 600 .8rem/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); }
.sheet dd { margin: 0; color: var(--text-2); max-width: 46em; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: center; }
.split > * { min-width: 0; }
.split-copy p { color: var(--text-2); }

/* Quick start */
.steps { list-style: none; counter-reset: s; margin: 26px 0 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 14px 0 14px 48px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 14px; font: 600 .85rem/1.9 var(--mono); color: var(--yellow); }
.steps em { color: var(--text); font-style: normal; font-weight: 500; }
.code { margin: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.code figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); font: .82rem var(--mono); color: var(--text); }
.code figcaption span { color: var(--muted); }
.code pre { margin: 0; padding: 20px; overflow-x: auto; font-size: .88rem; line-height: 1.75; color: var(--text); }
.c { color: var(--syn-comment); } .d { color: var(--syn-directive); } .n { color: var(--syn-number); } .m { color: var(--syn-mnemonic); }
.r { color: var(--syn-register); } .l { color: var(--syn-label); } .s { color: var(--syn-string); }

/* Specs */
.specs { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-2); }
.specs > div { padding: 24px 24px 8px 0; }
.specs > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.specs dt { font: 600 .8rem/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); margin-bottom: 8px; }
.specs dd { margin: 0; color: var(--text-2); font-size: .97rem; }
.more { margin-top: 36px; color: var(--muted); }

/* Download */
.dl { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: start; }
.dl > * { min-width: 0; }
.dl-copy p { color: var(--text-2); max-width: 34em; margin-bottom: 28px; }
.btn-lg { font-size: 1.02rem; padding: 16px 22px; font-family: var(--mono); font-weight: 600; flex-wrap: wrap; }
.btn .size { font-weight: 500; opacity: .7; }
.hash { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); }
.hash-label { font: 600 .74rem var(--mono); letter-spacing: .08em; color: var(--muted); }
.hash code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .8rem; color: var(--text-2); }
.hash button { font: 500 .8rem var(--mono); color: var(--text); background: var(--raised); border: 1px solid var(--line-2); border-radius: 5px; padding: 5px 12px; cursor: pointer; }
.hash button:hover { border-color: var(--text-2); }
.warn { border-left: 3px solid var(--yellow); padding: 2px 0 2px 18px; }
.warn h3 { margin-bottom: .4em; }
.warn p { color: var(--text-2); font-size: .95rem; }
.warn code { font-size: .85em; color: var(--text); }
.facts { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid var(--line); }
.facts li { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: .95rem; }
.more-left { margin-top: 22px; color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 44px 0 60px; color: var(--muted); font-size: .9rem; }
.foot-inner { display: grid; gap: 10px; }
.foot p { margin: 0; }
.foot .brand { color: var(--text); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Tablets and phones */
@media (max-width: 960px) {
  .hero-grid, .split, .dl, .section-head { grid-template-columns: 1fr; gap: 40px; }
  .section-head { gap: 12px; }
  .specs { grid-template-columns: 1fr 1fr; }
  .specs > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .sheet > div { grid-template-columns: 140px 1fr; gap: 20px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { width: min(1180px, 100% - 32px); }
  .top nav a:not(.nav-dl) { display: none; }
  .hero { padding: 52px 0 56px; }
  .section { padding: 72px 0; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-regs { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: repeat(4, 1fr); }
  .demo-regs div { flex-direction: column; gap: 2px; }
  .demo-state { display: none; }
  .sheet > div { grid-template-columns: 1fr; gap: 6px; }
  .specs { grid-template-columns: 1fr; }
  .specs > div, .specs > div + div { padding: 20px 0 4px; border-left: 0; }
  .btn-lg { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .btn, .btn svg, .textlink span, .demo-code li, .demo-code li::after { transition: none; }
}
