
/* fredlopes — experiência editorial */
/* Monocromático, classless */

/* Estrutura */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: white;
    color: #202020;
    font-family: system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

header,
main,
footer {
    width: calc(100% - 2rem);
    max-width: 600px;
    margin-inline: auto;
}

/* Cabeçalho */

header {
    padding-block: 2rem 1.5rem;
    border-bottom: 2px solid #ccc;
    text-align: center;
}

header h1 {
    margin: 0;
    font-family: system-ui, sans-serif;
    font-size: 2.5rem;
    font-weight: 750;
    letter-spacing: -0.055em;
    line-height: 1.1;
}

header small {
    color: #666;
}

/* Tipografia */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: system-ui, sans-serif;
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -0.035em;
}

main {
    min-height: 55vh;
    padding-block: 2rem 3rem;
}

main h2 {
    margin-top: 0;
    font-size: 2rem;
    font-weight: 700;
}

main h3 {
    margin-top: 2rem;
    font-size: 1.5rem;
    font-weight: 650;
}

main h4 {
    font-size: 1.2rem;
    font-weight: 650;
}

/* Texto */

p,
ul,
ol,
blockquote,
pre,
table,
figure {
    margin-bottom: 1.25rem;
}

ul,
ol {
    padding-left: 1.5rem;
}

li + li {
    margin-top: .3rem;
}

a {
    color: inherit;
    text-decoration-color: #999;
    text-underline-offset: .2em;
}

a:hover {
    color: #666;
}

a:focus-visible,
summary:focus-visible {
    outline: 2px solid #202020;
    outline-offset: 3px;
}

blockquote {
    margin-inline: 0;
    padding-left: 1rem;
    border-left: 3px solid #ccc;
    color: #555;
}

hr {
    border: 0;
    border-top: 1px solid #ccc;
    margin-block: 2rem;
}

/* Imagens e figuras */

img,
video,
svg,
canvas {
    max-width: 100%;
    height: auto;
}

img {
    display: block;
    margin-inline: auto;
}

figure {
    margin-inline: 0;
}

figcaption {
    color: #666;
    font-size: .875rem;
    text-align: center;
}

/* Código */

pre {
    overflow-x: auto;
    padding: 1rem;
    background: #f3f3f3;
    font-size: .875rem;
}

code,
kbd,
samp {
    font-family: "Liberation Mono", monospace;
}

/* Tabelas */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

th,
td {
    padding: .6rem;
    border-bottom: 1px solid #ccc;
    text-align: left;
}

th {
    border-bottom: 2px solid #777;
}

/* Cartões expansíveis */

main > section {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #ccc;
    border-top: 3px solid #222;
}

main details > summary {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    font-family: system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.025em;
}

main details > summary::-webkit-details-marker {
    display: none;
}

main details > summary::after {
    content: "+";
    color: #666;
    font-family: sans-serif;
    font-weight: 400;
}

main details[open] > summary::after {
    content: "−";
}

main details > ul {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Rodapé */

footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1.5rem 2rem;
    border-top: 2px solid #ccc;
    color: #666;
    font-size: .875rem;
}

footer p {
    margin: 0;
}

footer p a {
    color: inherit;
    text-decoration: none;
}

/* Menu hambúrguer */

footer details {
    position: relative;
}

footer details > summary {
    display: grid;
    gap: 5px;
    width: 28px;
    padding: 0;
    cursor: pointer;
    list-style: none;
}

footer details > summary::-webkit-details-marker {
    display: none;
}

footer details > summary::after {
    content: none;
}

footer details > summary > span {
    display: block;
    width: 28px;
    height: 2px;
    background: #222;
}

footer details > nav {
    position: absolute;
    right: 0;
    bottom: calc(100% + .75rem);
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 2rem;
    row-gap: .65rem;
    margin: 0;
    padding: 1rem;
    border: 1px solid #ccc;
    background: white;
    text-align: left;
}

footer details > nav a {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 550;
    text-decoration: none;
    white-space: normal;
}

footer details > nav a:hover {
    background: transparent;
    color: #666;
}

