/* elixir_unikernel landing page.
   Tokens: paper / ink / rule / console / console-text / accent. One accent,
   used for the IEx prompt and links. One motion: the prompt cursor. */

:root {
  --paper: #F7F5F0;
  --ink: #1C1B19;
  --ink-soft: #4F4B43;
  --rule: #C9C4B8;
  --console: #0F1A17;
  --console-text: #D7E4DC;
  --console-dim: #7F978E;
  --accent: #B0432E;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --measure: 68ch;
  --wide: 92ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  padding: 0 var(--gutter) 4rem;
}

::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

code, pre { font-family: var(--mono); font-size: 0.92em; font-variant-ligatures: none; }
p code, li code, td code, th code { white-space: nowrap; background: rgba(28, 27, 25, 0.06); padding: 0.05em 0.3em; border-radius: 2px; }

/* header */
.top {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
}
.wordmark { font-family: var(--mono); font-weight: 500; color: var(--ink); text-decoration: none; font-size: 1rem; }
.top nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.top nav a { color: var(--ink-soft); text-decoration: none; font-size: 1rem; }
.top nav a:hover { color: var(--accent); text-decoration: underline; }

/* hero */
.hero { padding-top: clamp(3rem, 8vw, 6rem); max-width: 100%; }
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 22ch;
  text-wrap: balance;
}
.lede { font-size: 1.3rem; line-height: 1.45; max-width: var(--measure); margin: 0 0 2.5rem; color: var(--ink); }

/* the console: the one dark surface and the signature of the page */
.console { margin: 0; min-width: 0; max-width: 100%; }
.console figcaption { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
.console pre {
  margin: 0;
  max-width: 100%;
  background: var(--console);
  color: var(--console-text);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.5;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px -18px rgba(15, 26, 23, 0.55);
}
.console .k { color: var(--console-dim); }
.console .i { color: #9FC3B3; }
.console .p { color: #F0A58E; font-weight: 500; }
.cursor {
  display: inline-block; width: 0.6em; height: 1.1em; vertical-align: text-bottom;
  background: var(--console-text); margin-left: 0.1em;
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin: 2rem 0 0; }
.button {
  display: inline-block; background: var(--ink); color: var(--paper);
  text-decoration: none; padding: 0.7rem 1.2rem; border-radius: 3px; font-weight: 600; font-size: 1.05rem;
}
.button:hover { background: var(--accent); text-decoration: none; }
.hint { color: var(--ink-soft); font-size: 1rem; }

/* prose sections */
main { max-width: var(--wide); width: 100%; margin: 0 auto; min-width: 0; }

.hero { max-width: none; margin: 0; }
.prose { max-width: min(var(--measure), 100%); margin: clamp(3.5rem, 8vw, 5.5rem) 0 0; }
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
}
.prose p { margin: 0 0 1.1rem; }
.prose p:last-child { margin-bottom: 0; }

.steps { padding-left: 1.4rem; margin: 0 0 1.1rem; }
.steps li { margin-bottom: 0.6rem; }
.plain { list-style: none; padding: 0; margin: 0 0 1.1rem; }
.plain li { padding: 0.5rem 0; border-top: 1px solid var(--rule); }
.plain li:last-child { border-bottom: 1px solid var(--rule); }

/* tables: content that is tabular is set as a table */
table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.2rem; font-size: 1rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.75rem 0.55rem 0; border-top: 1px solid var(--rule); }
thead th { border-top: 0; color: var(--ink-soft); font-weight: 600; font-size: 0.9rem; padding-bottom: 0.4rem; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 1px solid var(--rule); }
tbody th { font-weight: 400; }
.files td:nth-child(2), .numbers td { white-space: nowrap; }
.numbers { min-width: 30rem; }
.scroll { overflow-x: auto; max-width: 100%; width: 100%; }
.files { min-width: 36rem; }

pre.shell {
  background: rgba(28, 27, 25, 0.06);
  padding: 1rem 1.25rem;
  border-radius: 3px;
  overflow-x: auto;
  margin: 0 0 1.1rem;
  line-height: 1.6;
}

footer {
  max-width: var(--wide);
  margin: 5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
footer p { margin: 0 0 0.4rem; }

@media (max-width: 40rem) {
  body { font-size: 1.05rem; }
  .lede { font-size: 1.15rem; }
  .console pre { font-size: 0.78rem; padding: 1rem; }
  h1 { max-width: none; }
  .numbers th, .numbers td { padding-right: 0.5rem; }
  .top nav { gap: 1rem; }
}
