/* ------------------------------------------------
   Fernloop — homepage
   Aesthetic: warm, editorial, quiet confidence
   ------------------------------------------------ */

:root {
    /* Warm-tinted palette — no pure black, no pure white */
    --bg: #1a1916;
    --surface: #f5f3ee;
    --surface-hover: #eceae4;
    --text: #2c2a25;
    --text-secondary: #6b6660;
    --accent: #8a7e6b;
    --border: #d6d1c7;
    --border-light: #e8e5dd;

    /* Spacing scale */
    --s1: 0.5rem;
    --s2: 0.75rem;
    --s3: 1rem;
    --s4: 1.5rem;
    --s5: 2.5rem;
    --s6: 4rem;
    --s7: 6rem;

    /* Typography */
    --font-display: "Newsreader", Georgia, "Times New Roman", serif;
    --font-body: "DM Sans", -apple-system, "Segoe UI", sans-serif;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.5s;
}

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

html,
body {
    margin: 0;
    padding: 0;
}

/* ---- Base ---- */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Layout ---- */
.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s4);
}

.frame {
    width: 100%;
    max-width: 640px;
    background: var(--surface);
    padding: var(--s6) var(--s5);
    animation: frame-in var(--duration) var(--ease-out) both;
}

@keyframes frame-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* ---- Hero ---- */
.hero {
    margin-bottom: var(--s6);
}

h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text);
}

.tagline {
    margin: var(--s2) 0 0;
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-style: italic;
    font-family: var(--font-display);
}

/* ---- Divider ---- */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 0 var(--s5);
}

/* ---- Products ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.product {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s4);
    padding: var(--s4);
    margin: 0 calc(-1 * var(--s4));
    border-radius: 2px;
    transition:
        background-color 0.2s var(--ease-out),
        box-shadow 0.2s var(--ease-out);
    animation: item-in var(--duration) var(--ease-out) 0.15s both;
    text-decoration: none;
    color: inherit;
}

@keyframes item-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

.product:hover {
    background: var(--surface-hover);
}

.product__info {
    flex: 1;
    min-width: 0;
}

.product__name {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 500;
    line-height: 1.2;
    color: var(--text);
}

.product__desc {
    margin: var(--s1) 0 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.product__status {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
    padding: var(--s1) var(--s2);
    border: 1px solid var(--border);
    white-space: nowrap;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms; /* 150ms */
}

.product__status:hover {
    border-color: var(--accent);
}

/* ---- Footer ---- */
.site-footer {
    margin-top: var(--s7);
    padding-top: var(--s4);
    border-top: 1px solid var(--border);
    animation: item-in var(--duration) var(--ease-out) 0.3s both;
}

.site-footer small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .product {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--s2);
    }
}

@media (min-width: 768px) {
    .page {
        padding: var(--s6);
    }

    .frame {
        padding: var(--s7) var(--s6);
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
