@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color: #FF3902;
    --fg: #2c2c2c;
    --bg: #faf6f1;
    --font: 'Libre Baskerville', Georgia, serif;

    /* Type scale */
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.25rem;
    --text-lg: 1.75rem;
    --text-xl: 2.75rem;

    /* Icon */
    --icon: 3.5rem;

    /* Spacing scale */
    --space-xs: 0.75rem;
    --space-sm: 1.5rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;
}

/* Base elements */

html {
    font-family: var(--font);
    font-size: 16px;
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    font-size: var(--text-base);
    line-height: 1.7;
}

h1 {
    font-size: var(--text-xl);
    font-weight: 400;
    line-height: 1.2;
}

h2 {
    font-size: var(--text-lg);
    font-weight: 400;
    line-height: 1.3;
}

h3 {
    font-size: var(--text-md);
    font-weight: 400;
    line-height: 1.4;
}

p {
    font-size: var(--text-base);
    line-height: 1.7;
}

small {
    font-size: var(--text-sm);
}

blockquote {
    font-size: var(--text-lg);
    font-style: italic;
    font-weight: 400;
    line-height: 1.4;
}

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

img, svg {
    display: block;
    max-width: 100%;
}

.icon {
    width: var(--icon);
    height: var(--icon);
}

/* Video */
video {
    width: 100%;
    display: block;
    background: var(--fg);
}

video::-webkit-media-controls-panel {
    background: var(--fg);
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-mute-button,
video::-webkit-media-controls-fullscreen-button {
    filter: invert(1);
}

video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display {
    color: var(--bg);
    font-family: var(--font);
    font-size: var(--text-sm);
}

/* Debug mode */
.debug html-component {
    position: relative;
    outline: 1px solid var(--color);
    display: block;
}

.debug html-component::after {
    content: attr(data-index) ' — ' attr(data-name);
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--font);
    font-size: 0.75rem;
    color: var(--bg);
    background: var(--color);
    padding: 0.2rem 0.5rem;
    z-index: 9999;
    cursor: pointer;
    pointer-events: auto;
}

.debug html-component.hidden-section {
    opacity: 0.1;
    max-height: 2rem;
    overflow: hidden;
}

.debug html-component.hidden-section::after {
    opacity: 1;
}

/* Inverted */
.inverted {
    background: var(--fg);
    color: var(--bg);
}

.inverted a { color: var(--bg); }

/* Responsive */
@media (max-width: 48rem) {
    :root {
        --text-xl: 2rem;
        --text-lg: 1.375rem;
    }
}
