/* Panzer Labs - app pages in the "desktop window" style used on the homepage.
 * Each app keeps its own URL (for SEO); this sheet makes them look like one system.
 */

:root {
    --bg: #FBF9F6;
    --surface: #FFFFFF;
    --ink: #1D1B16;
    --muted: #5C594F;
    --accent: #F54E00;
    --accent2: #FFD200;
    --border: #1D1B16;
    --desktop: #E8E3DA;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html[data-theme="crt"] {
    --bg: #0A0F0B;
    --surface: #101812;
    --ink: #33FF66;
    --muted: #4D8F5C;
    --accent: #33FF66;
    --accent2: #FFD200;
    --border: #33FF66;
    --desktop: #050A06;
    --font-display: 'VT323', monospace;
    --font-body: 'JetBrains Mono', monospace;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--desktop);
    background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

::selection { background: var(--accent2); color: var(--ink); }

img { max-width: 100%; }

a:focus-visible, button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ===== Top nav ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    padding: .9rem 0;
}

.navbar .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -.02em;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    font-family: var(--font-mono);
    font-size: .85rem;
    letter-spacing: .02em;
    transition: color .2s ease;
}

.nav-links a:hover { color: var(--accent); }

.nav-cta {
    display: inline-block;
    padding: .5rem 1.1rem;
    border: 2px solid var(--border);
    border-radius: .6rem;
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--ink);
    color: var(--bg);
    box-shadow: 3px 3px 0 0 var(--border);
    transition: transform .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}

.nav-cta:hover { transform: translateY(-2px); box-shadow: 4px 5px 0 0 var(--border); }

.nav-brand { display: flex; align-items: center; gap: 1.1rem; }

.nav-actions { display: flex; align-items: center; gap: .75rem; }

.retro-toggle {
    padding: .5rem 1.1rem;
    border: 2px solid var(--border);
    border-radius: .6rem;
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 600;
    background: transparent;
    color: var(--ink);
    box-shadow: 3px 3px 0 0 var(--border);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    white-space: nowrap;
}

.retro-toggle:hover { transform: translateY(-2px); box-shadow: 4px 5px 0 0 var(--border); }
.retro-toggle.active { background: var(--ink); color: var(--bg); }

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: .6rem;
    background: var(--surface);
    cursor: pointer;
    box-shadow: 2px 2px 0 0 var(--border);
}

.hamburger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    display: none;
    flex-direction: column;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
    padding: .75rem 1.25rem 1.25rem;
    gap: .5rem;
    position: relative;
    z-index: 1001;
}

.mobile-menu.open { display: flex; }

.mobile-menu a, .mobile-menu button {
    width: 100%;
    text-align: left;
    padding: .75rem 1rem;
    border: 2px solid var(--border);
    border-radius: .6rem;
    font-family: var(--font-mono);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 2px 2px 0 0 var(--border);
}

.mobile-menu .mm-retro.active { background: var(--ink); color: var(--bg); }

/* ===== Window ===== */
.browser-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 1rem;
    box-shadow: 8px 8px 0 0 var(--border);
    position: relative;
    z-index: 1;
    margin: 1rem 1.5rem 1.5rem 1rem;
    animation: windowOpen .3s ease;
}

html[data-theme="crt"] .browser-window { box-shadow: 0 0 20px var(--accent), 8px 8px 0 0 var(--border); }

html[data-theme="crt"] body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0px, rgba(0,0,0,.25) 1px, transparent 1px, transparent 3px);
    mix-blend-mode: multiply;
}

@keyframes windowOpen {
    from { opacity: 0; transform: scale(.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.browser-titlebar {
    position: sticky;
    top: 4.35rem;
    z-index: 5;
    border-radius: calc(1rem - 2px) calc(1rem - 2px) 0 0;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border-bottom: 2px solid var(--border);
    background: var(--surface);
}

.browser-titlebar .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    display: block;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
a.dot-red:hover, a.dot-yellow:hover { filter: brightness(.85); }
.dot-disabled, .dot.is-disabled { background: #d4d0c6; cursor: not-allowed; }

.titlebar-links { margin-left: auto; display: flex; gap: 1rem; font-family: var(--font-mono); font-size: .72rem; }
.titlebar-links a { color: var(--muted); text-decoration: none; }
.titlebar-links a:hover { color: var(--accent); }

.titlebar-title {
    margin-left: .5rem;
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browser-content { flex: 1; width: 100%; padding: 2.5rem 2rem 3rem; }
.content-inner { max-width: 960px; margin: 0 auto; }

/* ===== App header ===== */
.app-hero {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.app-icon-large {
    width: 112px;
    height: 112px;
    border: 2px solid var(--border);
    border-radius: 1.4rem;
    background: var(--surface);
    box-shadow: 4px 4px 0 0 var(--border);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon-large img { width: 100%; height: 100%; object-fit: cover; }
.app-icon-large.bolt { background: var(--accent); }
.app-icon-large.bolt svg { width: 55%; height: 55%; }

.app-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin-bottom: .35rem;
}

.app-tagline { color: var(--muted); font-size: 1.1rem; margin-bottom: .6rem; }

.badges { display: flex; flex-wrap: wrap; gap: .5rem; }

.app-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 2px solid var(--border);
    border-radius: 9999px;
    padding: .2rem .7rem;
    background: var(--surface);
    color: var(--ink);
}

.app-badge.yellow { background: #FCEBAF; }
.app-badge.pink { background: #F5C6DC; }
.app-badge.accent { background: var(--accent2); }

.app-description {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 62ch;
    margin-bottom: 1.5rem;
}

/* ===== Buttons ===== */
.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 1.75rem; }

.btn-retro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.4rem;
    border: 2px solid var(--border);
    border-radius: .75rem;
    font-family: var(--font-mono);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 4px 4px 0 0 var(--border);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn-retro:hover {
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: 6px 8px 0 0 var(--border);
}

.btn-playstore, .btn-appstore, .btn-quest { color: #1D1B16; }
.btn-playstore { background: #B5E3C8; }
.btn-playstore:hover { background: #A2D9B8; }
.btn-appstore { background: #C4D9F5; }
.btn-appstore:hover { background: #B1CBF0; }
.btn-quest { background: #F5C6DC; }
.btn-quest:hover { background: #EEB2CE; }
.btn-primary-retro { background: var(--ink); color: var(--bg); }
.btn-secondary-retro { background: transparent; }
.btn-secondary-retro:hover { background: var(--surface); }
.btn-disabled { opacity: .75; cursor: default; pointer-events: none; }

/* ===== Content sections ===== */
.section { margin-top: 2.5rem; scroll-margin-top: 5.5rem; }

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.section-title::before {
    content: '';
    width: .9rem;
    height: .9rem;
    background: var(--accent);
    border: 2px solid var(--border);
    border-radius: 50%;
    flex: none;
}

.banner {
    margin-bottom: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 4px 4px 0 0 var(--border);
    background: var(--surface);
}

.banner img { display: block; width: 100%; height: auto; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: .9rem;
    padding: 1.1rem 1.15rem;
    box-shadow: 3px 3px 0 0 var(--border);
    transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover { transform: translate(-1px, -2px); box-shadow: 5px 5px 0 0 var(--accent); }

.card .card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1.35rem;
    background: var(--accent2);
    border: 2px solid var(--border);
    border-radius: .7rem;
    margin-bottom: .6rem;
}

.card h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: .25rem; }
.card p { color: var(--muted); font-size: .92rem; }

/* Screenshots: horizontal, snap-scrolling phone frames */
.shots {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: .25rem .25rem 1rem;
    scroll-snap-type: x proximity;
}

.shot {
    flex: 0 0 168px;
    scroll-snap-align: start;
    border: 2px solid var(--border);
    border-radius: 1.2rem;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 3px 3px 0 0 var(--border);
}

.shot img { display: block; width: 100%; height: auto; }

.callout {
    background: #FCEBAF;
    border: 2px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem 1.4rem;
    box-shadow: 4px 4px 0 0 var(--border);
}

.callout h2, .callout .btn-retro { color: #1D1B16; }
.callout h2 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: .4rem; }
.callout p { color: #3d3a30; margin-bottom: 1rem; }

/* ===== Taskbar footer ===== */
.taskbar {
    border-top: 2px solid var(--border);
    background: var(--bg);
    padding: 1rem 0;
    position: relative;
    z-index: 1;
}

.taskbar .task-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--muted);
}

.taskbar a { color: var(--muted); text-decoration: none; }
.taskbar a:hover { color: var(--accent); }
.taskbar .links { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ===== Responsive ===== */
@media (max-width: 700px) {
    .titlebar-links { display: none; }
    .browser-content { padding: 1.25rem; }
    .app-icon-large { width: 88px; height: 88px; }
    .shot { flex-basis: 140px; }
    .cta-row .btn-retro { width: 100%; }
    .browser-window { margin: .6rem .9rem .9rem .6rem; box-shadow: 4px 4px 0 0 var(--border); }
}

@media (max-width: 640px) {
    .nav-links, .nav-cta, .retro-toggle { display: none; }
    .hamburger { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .browser-window { animation: none; }
}


/* ===== Footer inside the window ===== */
.app-footer {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 2px dashed color-mix(in srgb, var(--border) 45%, transparent);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--muted);
}

.app-footer .links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.app-footer a { color: var(--ink); text-decoration: none; font-weight: 600; }
.app-footer a:hover { color: var(--accent); text-decoration: underline; }

/* ===== Icons (Lucide, ISC licence - https://lucide.dev) ===== */
.ico { width: 1.35rem; height: 1.35rem; flex: none; }
.card .card-icon { color: var(--ink); }
.card .card-icon .ico { width: 1.4rem; height: 1.4rem; }
.ico-inline { width: 1.2rem; height: 1.2rem; vertical-align: -0.2em; margin-right: .25rem; }
.ico-badge { width: .85rem; height: .85rem; vertical-align: -0.15em; }
.callout h2 .ico { color: var(--accent); }
