/* One Dark, because that is what the product itself draws with.
 *
 * No framework and no build step. This whole site is three files a browser can read as they lie
 * on disk, which is the same promise the product makes: nothing here needs a toolchain that has
 * to still exist in ten years for the thing to keep working. */

:root {
    --bg:        #282c34;
    --bg-soft:   #21252b;
    --bg-code:   #1e2127;
    --line:      #3a3f4b;
    --text:      #abb2bf;
    --bright:    #e6e6e6;
    --dim:       #7f8796;
    --blue:      #61afef;
    --purple:    #c678dd;
    --cyan:      #56b6c2;
    --ochre:     #e5c07b;
    --green:     #98c379;
    --red:       #e06c75;
    --rose:      #e06c9f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.5rem; }

/* --- the bar at the top ------------------------------------------------------------------- */

header.top {
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
    position: sticky;
    top: 0;
    z-index: 10;
}
header.top .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .8rem;
    padding-bottom: .8rem;
    gap: 1rem;
}
.brand { font-weight: 600; color: var(--bright); font-size: 1.1rem; letter-spacing: -.01em; }
.brand span { color: var(--blue); }
nav.top a { margin-left: 1.4rem; color: var(--dim); font-size: .95rem; }
nav.top a:hover { color: var(--blue); text-decoration: none; }

/* --- the first screen --------------------------------------------------------------------- */

.hero { padding: 4.5rem 0 3rem; }
.hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    line-height: 1.12;
    margin: 0 0 1.2rem;
    color: var(--bright);
    letter-spacing: -.02em;
    font-weight: 650;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p.lead { font-size: 1.22rem; max-width: 44rem; margin: 0 0 1.2rem; }
.hero p.second { max-width: 44rem; color: var(--dim); margin: 0 0 2rem; }

.buttons { display: flex; flex-wrap: wrap; gap: .8rem; }
.button {
    display: inline-block;
    padding: .62rem 1.3rem;
    border-radius: 6px;
    border: 1px solid var(--line);
    color: var(--text);
    font-size: .98rem;
}
.button:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.button.primary { background: var(--blue); border-color: var(--blue); color: #10131a; font-weight: 600; }
.button.primary:hover { background: #7cc0f5; border-color: #7cc0f5; color: #10131a; }

/* --- the numbers strip --------------------------------------------------------------------- */

.figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    margin: 3rem 0;
}
.figure { background: var(--bg-soft); padding: 1.3rem 1.2rem; }
.figure b { display: block; font-size: 1.7rem; color: var(--bright); font-weight: 650; letter-spacing: -.02em; }
.figure span { font-size: .88rem; color: var(--dim); }

/* --- sections ------------------------------------------------------------------------------ */

section { padding: 3.2rem 0; border-top: 1px solid var(--line); }
section > .wrap > h2 {
    font-size: 1.75rem;
    margin: 0 0 .4rem;
    color: var(--bright);
    letter-spacing: -.015em;
    font-weight: 620;
}
section > .wrap > p.sub { color: var(--dim); margin: 0 0 2rem; max-width: 46rem; }

h3 { font-size: 1.12rem; color: var(--bright); margin: 0 0 .35rem; font-weight: 600; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
@media (max-width: 52rem) {
    .two, .three { grid-template-columns: 1fr; }
}

.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.4rem;
    background: var(--bg-soft);
}
.card .tag { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.card p { margin: .5rem 0 0; font-size: .96rem; }
.card p:last-child { margin-bottom: 0; }

.card.desktop h3 { color: var(--ochre); }
.card.web h3     { color: var(--green); }
.card.mobile h3  { color: var(--red); }

/* --- code ---------------------------------------------------------------------------------- */

figure.code { margin: 0 0 1.6rem; }
figure.code figcaption {
    font-size: .86rem;
    color: var(--dim);
    padding: .5rem .9rem;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
pre {
    margin: 0;
    background: var(--bg-code);
    border: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    padding: 1.1rem 1.2rem;
    overflow-x: auto;
    font: 14px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    color: var(--text);
}
figure.code.nocap pre { border-radius: 8px; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
p code, li code, td code { background: var(--bg-code); padding: .1rem .35rem; border-radius: 3px; }

.tok-key { color: var(--purple); }
.tok-str { color: var(--green); }
.tok-com { color: var(--dim); font-style: italic; }
.tok-num { color: var(--ochre); }
.tok-fn  { color: var(--blue); }

/* --- tables -------------------------------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 500; font-size: .84rem; text-transform: uppercase; letter-spacing: .05em; }
td:first-child { color: var(--bright); white-space: nowrap; }

/* --- the promise box ------------------------------------------------------------------------ */

.promise {
    border: 1px solid var(--line);
    border-left: 3px solid var(--rose);
    border-radius: 0 8px 8px 0;
    background: var(--bg-soft);
    padding: 1.5rem 1.7rem;
}
.promise h3 { color: var(--rose); }
.promise p:last-child { margin-bottom: 0; }

footer {
    border-top: 1px solid var(--line);
    padding: 2.5rem 0 3.5rem;
    color: var(--dim);
    font-size: .92rem;
}
footer a { color: var(--dim); }
footer a:hover { color: var(--blue); }
