/* ── Fonts ────────────────────────────────────────────── */

@font-face {
    font-family: 'NS Bold';
    src: url('fonts/nsbold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NS Bold';
    src: url('fonts/nsbolditalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'NS Light Italic';
    src: url('fonts/nslightitalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

/* ── Reset & Base ─────────────────────────────────────── */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    background: #020307;
    color: #e8e4d9;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Worn paper texture overlay across entire page */
body::before {
    content: '';
    position: absolute;
    height: 100%;
    inset: 0;
    transform: scaleY(-1);
    background: url('images/paper1.jpg') center / cover no-repeat;
    mix-blend-mode: screen;
    opacity: 0.07;
    pointer-events: none;
    z-index: 100;
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #020307;
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100vh;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}

.hero-text {
    position: absolute;
    top: 16%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    color: #e8e4d9;
    padding: 0 1rem;
    pointer-events: none;
}

.hero-title {
    font-family: 'NS Bold', 'DM Serif Display', Georgia, serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(2rem, 4.2vw, 3.5rem);
    letter-spacing: 0.01em;
    margin: 0;
    line-height: 1.1;
}

.hero-tagline {
    font-family: 'NS Light Italic', 'Inter', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(0.95rem, 2vw, 1.35rem);
    letter-spacing: 0.02em;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* ── Projects Section ─────────────────────────────────── */

.projects {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-heading {
    font-family: 'NS Bold', 'DM Serif Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    font-style: normal;
    color: #e8e4d9;
    letter-spacing: 0.04em;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(232, 228, 217, 0.12);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-heading.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .section-heading {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.product-card {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.product-logo {
    flex-shrink: 0;
}

.product-logo img {
    width: 200px;
    height: auto;
    display: block;
}

.product-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(232, 228, 217, 0.12);
    flex-shrink: 0;
}

.product-details {
    flex: 1;
    min-width: 0;
}

.product-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-website {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #e8e4d9;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

.product-website:hover {
    color: #fff;
}

.download-badges {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.badge-link {
    display: inline-block;
    transition: transform 0.25s ease;
    transform-origin: center;
}

.badge-link:hover {
    transform: scale(1.05);
}

.badge-link img {
    height: 40px;
    width: auto;
    display: block;
}

.product-description {
    font-size: 0.95rem;
    color: #999;
    line-height: 1.7;
    max-width: 480px;
}

/* ── Coming-soon tooltip ──────────────────────────────── */

.coming-soon {
    position: relative;
    cursor: not-allowed;
}

.coming-soon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.5rem);
    transform: translate(-50%, 4px);
    background: #e8e4d9;
    color: #020307;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.65rem;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.coming-soon::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.25rem);
    transform: translate(-50%, 4px);
    border: 5px solid transparent;
    border-top-color: #e8e4d9;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.coming-soon:hover::after,
.coming-soon:hover::before,
.coming-soon:focus-visible::after,
.coming-soon:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ── Footer ───────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid rgba(232, 228, 217, 0.08);
    padding: 2rem;
    text-align: center;
}

.site-footer p {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.03em;
}

/* ── Shell prompt (decorative) ────────────────────────── */

.shell-prompt {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.3rem;
    line-height: 1;
    color: #3d6b3d;
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}

.shell-dollar {
    margin-right: 0.35ch;
}

.shell-cursor {
    display: inline-block;
    animation: shell-blink 1s steps(1, end) infinite;
}

@keyframes shell-blink {
    0%, 50%      { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .shell-cursor {
        animation: none;
        opacity: 1;
    }
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 640px) {
    .hero {
        height: 80vh;
        min-height: 460px;
    }

    .hero-image {
        height: 100%;
        max-height: none;
    }

    .hero-text {
        top: 22%;
    }

    .shell-prompt {
        font-size: 1rem;
    }

    .product-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .product-divider {
        display: none;
    }

    .product-logo img {
        width: 160px;
    }
}
