/* ══════════════════════════════════════════════════════════════
   APP STORE STYLE — Project Detail Pages
   Inspired by macOS App Store — clean, minimal, premium
   ══════════════════════════════════════════════════════════════ */

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

:root {
    --as-bg:            #0a0a0a;
    --as-bg-raised:     #141414;
    --as-surface:       rgba(255, 255, 255, 0.055);
    --as-surface-hi:    rgba(255, 255, 255, 0.10);
    --as-border:        rgba(255, 255, 255, 0.09);
    --as-border-hi:     rgba(255, 255, 255, 0.16);
    --as-text:          #f5f5f7;
    --as-text-muted:    rgba(245, 245, 247, 0.56);
    --as-text-soft:     rgba(245, 245, 247, 0.32);
    --as-blue:          #0a84ff;
    --as-green:         #30d158;
    --as-orange:        #ff9f0a;
    --as-r-sm:          10px;
    --as-r-md:          16px;
    --as-r-lg:          22px;
    --as-r-xl:          28px;
    --as-max:           960px;
    --project-accent:   #7c6af7;
    --project-accent-r: 124;
    --project-accent-g: 106;
    --project-accent-b: 247;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
    background: var(--as-bg);
    color: var(--as-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }

/* ─── NAV ─────────────────────────────────────────────────── */

.as-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(10, 10, 10, 0.76);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.25s;
}

.as-nav__back {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    font-weight: 500;
    color: var(--as-blue);
    cursor: pointer;
    transition: opacity 0.15s;
    text-decoration: none;
}

.as-nav__back:hover { opacity: 0.7; }

.as-nav__back svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.as-nav__title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--as-text);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    white-space: nowrap;
}

.as-nav.is-scrolled .as-nav__title {
    opacity: 1;
}

.as-nav__github {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--as-text-muted);
    transition: color 0.15s;
}

.as-nav__github:hover { color: var(--as-text); }

/* ─── HERO ─────────────────────────────────────────────────── */

.as-hero {
    position: relative;
    height: 64vh;
    min-height: 440px;
    max-height: 660px;
    overflow: hidden;
    background: #111;
}

.as-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: brightness(0.65) saturate(1.3);
    transform: scale(1.06);
    transition: transform 8s cubic-bezier(0.2, 0, 0, 1);
    will-change: transform;
}

.as-hero:hover .as-hero__bg {
    transform: scale(1.0);
}

/* Dual gradient: darkens bottom + left edge */
.as-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, var(--as-bg) 0%, rgba(10,10,10,0.82) 28%, rgba(10,10,10,0.15) 62%, rgba(10,10,10,0.35) 100%),
        linear-gradient(to right, rgba(10,10,10,0.5) 0%, transparent 55%);
}

.as-hero__content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 22px;
    padding: 36px 32px;
    max-width: calc(var(--as-max) + 64px);
    margin: 0 auto;
}

.as-hero__icon {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    background: linear-gradient(145deg,
        rgba(var(--project-accent-r), var(--project-accent-g), var(--project-accent-b), 0.9),
        rgba(var(--project-accent-r), var(--project-accent-g), var(--project-accent-b), 0.6)
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.as-hero__icon svg,
.as-hero__icon img {
    width: 54px;
    height: 54px;
}

.as-hero__info {
    flex: 1;
    min-width: 0;
}

.as-hero__kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
}

.as-hero__title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    font-size: clamp(32px, 5.5vw, 56px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.as-hero__subtitle {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: -0.005em;
    margin-bottom: 14px;
    line-height: 1.4;
}

.as-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.as-hero__tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.82);
}

/* ─── ACTION BAR ─────────────────────────────────────────── */

.as-action-bar {
    position: sticky;
    top: 52px;
    z-index: 150;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-bottom: 1px solid var(--as-border);
}

.as-action-bar__inner {
    max-width: var(--as-max);
    margin: 0 auto;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.as-action-bar__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.as-sep {
    width: 1px;
    height: 14px;
    background: var(--as-border-hi);
    flex-shrink: 0;
}

.as-meta-item {
    font-size: 13px;
    color: var(--as-text-muted);
    font-weight: 500;
}

/* Status badges */
.as-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
}

.as-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.as-badge--live {
    background: rgba(48, 209, 88, 0.14);
    color: #30d158;
    border: 1px solid rgba(48, 209, 88, 0.28);
}

.as-badge--live::before { background: #30d158; }

.as-badge--wip {
    background: rgba(255, 159, 10, 0.14);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.28);
}

.as-badge--wip::before { background: #ff9f0a; }

.as-badge--upcoming {
    background: rgba(10, 132, 255, 0.14);
    color: #0a84ff;
    border: 1px solid rgba(10, 132, 255, 0.28);
}

.as-badge--upcoming::before { background: #0a84ff; }

/* Buttons */
.as-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, transform 0.12s;
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.as-btn:hover  { opacity: 0.82; transform: scale(0.98); }
.as-btn:active { opacity: 0.7;  transform: scale(0.96); }

.as-btn--primary {
    background: var(--as-blue);
    color: #fff;
}

.as-btn--accent {
    background: linear-gradient(135deg,
        rgba(var(--project-accent-r), var(--project-accent-g), var(--project-accent-b), 1),
        rgba(var(--project-accent-r), var(--project-accent-g), var(--project-accent-b), 0.7)
    );
    color: #fff;
}

.as-btn--ghost {
    background: var(--as-surface-hi);
    color: var(--as-text);
    border: 1px solid var(--as-border-hi);
}

/* ─── MAIN CONTENT ───────────────────────────────────────── */

.as-content {
    max-width: var(--as-max);
    margin: 0 auto;
    padding: 44px 32px 96px;
}

.as-section {
    margin-bottom: 52px;
}

.as-section-title {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--as-text);
    margin-bottom: 20px;
}

/* ─── SCREENSHOTS ─────────────────────────────────────────── */

.as-screenshots-outer {
    margin: 0 -32px;
    padding: 0 32px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    cursor: grab;
    user-select: none;
}

.as-screenshots-outer::-webkit-scrollbar { display: none; }
.as-screenshots-outer.is-dragging { cursor: grabbing; }

.as-screenshots-row {
    display: flex;
    gap: 14px;
    width: max-content;
    padding-bottom: 2px;
}

.as-screenshot {
    flex-shrink: 0;
    width: 300px;
    height: 200px;
    border-radius: var(--as-r-lg);
    overflow: hidden;
    background: var(--as-surface);
    border: 1px solid var(--as-border);
    scroll-snap-align: start;
    position: relative;
}

.as-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.as-screenshot:hover img {
    transform: scale(1.04);
}

/* Placeholder screenshot (gradient) */
.as-screenshot--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.as-screenshot--placeholder .as-screenshot__label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ─── DESCRIPTION ─────────────────────────────────────────── */

.as-desc {
    font-size: 16px;
    line-height: 1.72;
    color: var(--as-text-muted);
}

.as-desc p + p { margin-top: 14px; }

.as-desc strong {
    color: var(--as-text);
    font-weight: 600;
}

/* ─── TWO-COLUMN LAYOUT ─────────────────────────────────── */

.as-two-col {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* ─── INFO SHEET ─────────────────────────────────────────── */

.as-info-sheet {
    background: var(--as-surface);
    border: 1px solid var(--as-border);
    border-radius: var(--as-r-xl);
    overflow: hidden;
}

.as-info-sheet-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--as-text-soft);
    padding: 16px 20px 0;
    margin-bottom: 4px;
}

.as-info-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 11px 20px;
    border-top: 1px solid var(--as-border);
}

.as-info-row:first-of-type {
    border-top: none;
}

.as-info-row dt {
    font-size: 13px;
    color: var(--as-text-soft);
    font-weight: 500;
    min-width: 100px;
    flex-shrink: 0;
}

.as-info-row dd {
    font-size: 13px;
    color: var(--as-text);
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}

/* ─── FEATURE HIGHLIGHTS ─────────────────────────────────── */

.as-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.as-feature-card {
    background: var(--as-surface);
    border: 1px solid var(--as-border);
    border-radius: var(--as-r-lg);
    padding: 20px;
    transition: background 0.2s, border-color 0.2s;
}

.as-feature-card:hover {
    background: var(--as-surface-hi);
    border-color: var(--as-border-hi);
}

.as-feature-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg,
        rgba(var(--project-accent-r), var(--project-accent-g), var(--project-accent-b), 0.22),
        rgba(var(--project-accent-r), var(--project-accent-g), var(--project-accent-b), 0.08)
    );
    border: 1px solid rgba(var(--project-accent-r), var(--project-accent-g), var(--project-accent-b), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: rgba(var(--project-accent-r), var(--project-accent-g), var(--project-accent-b), 1);
}

.as-feature-card__icon svg { width: 20px; height: 20px; }

.as-feature-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--as-text);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.as-feature-card__desc {
    font-size: 13px;
    color: var(--as-text-muted);
    line-height: 1.5;
}

/* ─── FOOTER ─────────────────────────────────────────────── */

.as-footer {
    border-top: 1px solid var(--as-border);
    padding: 40px 32px;
    max-width: var(--as-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.as-footer__text {
    font-size: 13px;
    color: var(--as-text-soft);
}

.as-footer__links {
    display: flex;
    gap: 16px;
}

.as-footer__link {
    font-size: 13px;
    color: var(--as-blue);
    transition: opacity 0.15s;
}

.as-footer__link:hover { opacity: 0.7; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 720px) {
    .as-hero__content {
        padding: 28px 20px;
        gap: 14px;
    }

    .as-hero__icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .as-hero__icon svg,
    .as-hero__icon img { width: 38px; height: 38px; }

    .as-hero__title { font-size: 26px; white-space: normal; }

    .as-content { padding: 32px 20px 64px; }

    .as-screenshots-outer { margin: 0 -20px; padding: 0 20px; }

    .as-action-bar__inner { padding: 10px 20px; }

    .as-two-col { grid-template-columns: 1fr; gap: 28px; }

    .as-nav { padding: 0 16px; }

    .as-screenshot { width: 230px; height: 154px; }

    .as-footer { padding: 32px 20px; }
}
