/* margoengine.com landing page. One theme per visitor (system light or dark), one accent, 10px radius. */
:root {
  color-scheme: light dark;
  --bg: #f5f6f9; --surface: #ffffff; --text: #141b2d; --muted: #4a556b; --line: #d5dae4;
  --accent: #7a4d00; --accent-text: #ffffff; --code-bg: #10172a; --code-text: #e6ebf5;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.6;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1020; --surface: #121a30; --text: #e9edf6; --muted: #a9b3c7; --line: #26304a; --accent: #e5b454; --accent-text: #1a1304; --code-bg: #060a16; }
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; }
.skip { position: absolute; left: 16px; top: -100px; background: var(--surface); padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { top: 12px; }

.nav, main > section, footer { max-width: 1180px; margin-inline: auto; padding-inline: 28px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand { font-weight: 700; letter-spacing: -.01em; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.nav nav { display: flex; gap: 26px; }
.nav nav a { color: var(--muted); text-decoration: none; padding-block: 10px; }
.nav nav a:hover { color: var(--text); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.1rem; letter-spacing: -.01em; }
p { margin: 0; }
main > section { padding-block: 72px; }
.section-lede { color: var(--muted); max-width: 62ch; margin-top: 12px; }

.hero { display: grid; grid-template-columns: 5fr 6fr; gap: 48px; align-items: center; padding-block: 48px 72px; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 44ch; margin-top: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-block; padding: 12px 20px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; transition: transform .15s ease; }
.button:hover { border-color: var(--accent); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.hero-shot { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
img { display: block; width: 100%; height: auto; }

pre { margin: 24px 0 0; padding: 20px 22px; background: var(--code-bg); color: var(--code-text); border-radius: var(--radius); overflow-x: auto; line-height: 1.55; }
p code { background: color-mix(in srgb, var(--line) 55%, transparent); padding: 1px 5px; border-radius: 4px; }
/* Grid columns may shrink below their longest code line; the code block scrolls inside itself. */
.two > div { min-width: 0; display: flex; flex-direction: column; }
.two pre { min-height: calc(4 * 1.55em + 40px); }
.hero > *, main > section > * { min-width: 0; }
pre { max-width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; }
.two p { color: var(--muted); margin-top: 14px; }
.two pre { margin-top: 14px; }

.core dl { margin: 36px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 56px; }
.core dl > div:first-child { grid-column: 1 / -1; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.core dl > div:first-child dt { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--accent); }
dt { font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; }
dd { margin: 6px 0 0; color: var(--muted); max-width: 52ch; }

.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
.groups > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.groups p { color: var(--muted); margin-top: 10px; }

.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; margin-top: 36px; }
.tile { grid-column: span 2; }
.tile.wide { grid-column: span 4; }
.tile.half { grid-column: span 3; }
.more { margin-top: 24px; }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; transition: transform .2s ease; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile img { flex: 1; object-fit: cover; min-height: 0; aspect-ratio: 16 / 10; }
.tile span { padding: 18px 22px; color: var(--muted); }
.tile strong { display: block; color: var(--text); font-size: 1.1rem; }

.status p { color: var(--muted); max-width: 68ch; margin-top: 16px; font-size: 1.05rem; }
footer { padding-block: 36px 56px; border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer a { margin-left: 20px; }
footer a:first-child { margin-left: 0; }

@media (max-width: 820px) {
  /* Short shell commands wrap on a phone so nothing in these two boxes needs sideways scrolling. */
  .two pre { min-height: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  .nav, main > section, footer { padding-inline: 18px; }
  .nav nav { gap: 16px; font-size: .95rem; }
  .nav nav a:nth-child(2) { display: none; }
  main > section { padding-block: 48px; }
  .hero, .two, .core dl, .groups, .tiles { grid-template-columns: 1fr; }
  .tile, .tile.wide, .tile.half { grid-column: auto; }
  .hero { gap: 28px; padding-block: 24px 48px; }
  .two { gap: 32px; }
}
@media (prefers-reduced-motion: reduce) { .button, .tile { transition: none; } .tile:hover { transform: none; } }
