:root {
    --dark-brown: #21191c;
    --gold: #b3a572;
    --text-color: oklch(15.9066% 0 none);

    --background: #ffffff;
    --card: #fafafa;
    --muted-foreground: #6e6e6e;
    --border: #e4e4e4;
    --surface-screen: #f7f5f0;
    --grid-line: rgba(102, 102, 102, 0.035);
    --screen-shadow: 0 16px 48px rgba(0, 0, 0, 0.055);
    --footer-foreground: #fafafa;
    --footer-muted: #b0b0b0;

    --ok-color: var(--dark-brown);
    --ok-hover-color: var(--gold);

    --font-sans: system-ui, sans-serif;
    --font-display: "Newsreader", serif;
    --font-size-hero: clamp(46px, 13vw, 80px);
    --font-size-title: clamp(28px, 8vw, 36px);
    --font-size-body: clamp(16px, 4vw, 18px);
}

body {
    margin: 0;
    background-color: var(--dark-brown);
    font-family: var(--font-sans);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}
::selection {
    background: var(--gold);
    color: var(--background);
}

a {
    transition: color 0.3s ease;
}

.landing {
    background-color: var(--background);
}
.page-width {
    width: min(1120px, calc(100% - 96px));
    margin-inline: auto;
}

.text-muted {
    color: var(--muted-foreground);
}
.text-emphasis {
    color: var(--gold);
}

/* ---------- header ---------- */
header {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px) saturate(1.1);
    -webkit-backdrop-filter: blur(6px) saturate(1.1);
    height: 90px;
}
header:has(#navbar:checked) {
    backdrop-filter: unset;
    -webkit-backdrop-filter: unset;
    background: rgba(255, 255, 255, 1);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    width: 3.5rem;
    height: 3.5rem;
    margin: -0.5rem 0.4rem 0 0;
}
.logo span {
    font-family: var(--font-display);
    font-style: normal;
    font-weight: 600;
    font-size: 2.3rem;
}
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
}
.hamburger span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.menu {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}
.menu a {
    color: var(--ok-color);
    font-size: var(--font-size-body);
    font-weight: 500;
    text-decoration: none;
}
.menu a:active,
.menu a:hover {
    color: var(--ok-hover-color);
}

#navbar:checked ~ .navbar .hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
#navbar:checked ~ .navbar .hamburger span:nth-child(2) {
    opacity: 0;
}
#navbar:checked ~ .navbar .hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}
#navbar:checked ~ .navbar .menu {
    height: 100dvh;
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    padding-top: calc(68px + 90px); /* header height */
    text-align: center;
}
.hero h1 {
    margin: 29px 0 24px;
    font-size: var(--font-size-hero);
    font-weight: 300;
    line-height: 1.06;
}
.hero h1 span {
    color: var(--gold);
    font-family: var(--font-display);
    font-weight: 400;
}
.hero-showcase {
    position: relative;
    margin-top: 52px;
}
.hero-showcase .screenshot-frame {
    box-shadow: var(--screen-shadow);
}

/* ---------- screenshot ---------- */
.screenshot-frame {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-screen);
    overflow: hidden;
}
.screen-topbar {
    display: flex;
    height: 40px;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
}
.window-dots {
    display: flex;
    gap: 5px;
}
.window-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}
.screen-space {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 32px 32px;
}
.screen-space img {
    display: block;
    width: 100%;
    object-fit: cover;
    object-position: top;
}

/* ---------- intro ---------- */
.intro-band {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-top: 90px;
    padding: 48px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.intro-band h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: var(--font-size-title);
    line-height: 1.3;
}
.intro-band p {
    margin: 0;
    max-width: 400px;
    font-size: var(--font-size-body);
    line-height: 1.5;
    color: var(--muted-foreground);
}

/* ---------- features ---------- */
.features {
    padding: 90px 0 95px;
}
.feature {
    margin-bottom: 30px;
}
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
.feature-copy {
    display: flex;
    gap: 20px;
    padding-top: 25px;
}
.feature-copy h3 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: var(--font-size-title);
}
.feature-copy p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: var(--font-size-body);
    line-height: 1.5;
}
.feature .screenshot-frame {
    aspect-ratio: 1.4;
}

/* ---------- footer ---------- */
footer {
    border-radius: 38px 38px 0 0;
    background: var(--dark-brown);
    color: var(--footer-foreground);
    padding-top: 42px;
    view-timeline-name: --footer;
    view-timeline-inset: -10%;
}
.footer-display {
    margin: 26px 0 30px;
    font-family: var(--font-display);
    font-size: 18cqw;
    font-weight: 400;
    line-height: 1.1;
    text-align: center;
    opacity: 1;
    transform: translateY(0);
    animation: revealup linear both;
    animation-timeline: --footer; /* view() */
    animation-range: entry 0% entry 100%;
    transform: translateZ(0);
}
.footer-bottom {
    padding-bottom: 25px;
    font-size: var(--font-size-body);
    color: var(--footer-muted);
    text-align: center;
}

/* ---------- animation ---------- */
.hero h1 {
    animation: enter 700ms ease-out both;
    animation-delay: 70ms;
}
@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes revealup {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    header {
        height: 76px;
    }
    .logo img {
        width: 2.5rem;
        height: 2.5rem;
        margin: -0.2rem 0.4rem 0 0;
    }
    .logo span {
        font-size: 1.7rem;
    }
    .hamburger {
        display: flex;
    }
    .navbar .menu {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        position: absolute;
        top: 76px; /* must match header height */
        left: 0;
        right: 0;
        width: 100%;
        background: var(--background);
        overflow: hidden;
        height: 0;
        z-index: 1;
        transition: height 0.1s ease;
    }
    .navbar .menu a {
        margin-left: 20px;
    }
    .navbar .menu a.btn-link {
        margin: 20px auto 20px auto; /* top = auto to align bottom */
        width: calc(100% - 40px);
    }
    .page-width {
        width: calc(100% - 40px);
    }
    .hero {
        padding-top: calc(48px + 76px); /* header height */
    }
    .hero h1 {
        margin: 26px 0 22px;
    }
    .hero-showcase {
        margin-top: 48px;
    }
    .screenshot-frame {
        border-radius: 12px;
    }
    .screen-topbar {
        height: 18px;
        padding-inline: 9px;
    }
    .window-dots i {
        width: 3px;
        height: 3px;
    }
    .intro-band {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 58px;
        padding: 35px 0;
    }
    .intro-band p {
        max-width: none;
    }
    .intro-band h2 br,
    .feature-copy p br {
        display: none;
    }
    .features {
        padding: 55px 0 60px;
    }
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 38px;
    }
    .feature-copy {
        padding-top: 20px;
    }
    footer {
        border-radius: 28px 28px 0 0;
        padding-top: 10px;
    }
    .footer-display {
        margin: 28px 0;
    }

    .btn-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0 0.5rem 0;
        border-radius: 0.5rem;
        background-color: var(--ok-color);
        border: solid 1px var(--ok-color);
        font-size: 1.25rem;
        color: #ffffff !important;
        cursor: pointer;
        text-decoration: none;
        transition: background-color 0.3s ease;
    }
    .btn-link:hover,
    .btn-link:active {
        background-color: var(--ok-hover-color);
        border: solid 1px var(--ok-hover-color);
    }
}

/* ---------- fixes ---------- */
.header-fix,
.footer-fix {
    display: none;
}
@supports (-webkit-touch-callout: none) {
    .header-fix {
        display: block;
        position: fixed;
        width: 100%;
        height: 6px; /* min to be adapted */
        background-color: #ffffff;
        opacity: 0.1; /* min to be adapted */
        z-index: 2;
    }
    .footer-fix {
        display: block;
        position: fixed;
        bottom: 0;
        width: 100%;
        height: 6px; /* min to be adapted */
        background-color: transparent;
        z-index: 2;
    }
}
