@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@300;400;500;600;700&family=Geist:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

:root {
    --background: #f1f0ef;
    --foreground: #09090b;
    --card: #ffffff;
    --card-foreground: #09090b;
    --primary: #9a2e22;
    --primary-light: rgba(154, 46, 34, 0.08);
    --primary-foreground: #ffffff;
    --secondary: #f4f4f5;
    --secondary-foreground: #18181b;
    --muted: #f4f4f5;
    --muted-foreground: #71717b;
    --border: #e4e4e7;
    --ring: #9f9fa9;
    
    --font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Geist Mono', 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    --blueprint-grid-gap: 1.25rem;
    --uniform-font-size: 0.875rem;
}

@media (min-width: 48rem) {
    :root {
        --blueprint-grid-gap: 1.5rem;
    }
}

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

html, body {
    height: 100%;
}

html {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 16px;
}

@media (min-width: 48rem) {
    html {
        font-size: 16px;
    }
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: var(--background);
    color: var(--foreground);
    position: relative;
    font-size: var(--uniform-font-size);
}

main {
    flex: 1 0 auto;
}

::selection {
    background-color: var(--primary);
    color: #ffffff;
}

/* Blueprint Grid Layout */
.blueprint-grid {
    display: grid;
    grid-template-columns: 1fr var(--blueprint-grid-gap) minmax(auto, 38rem) var(--blueprint-grid-gap) 1fr;
    width: 100%;
}

.blueprint-padding {
    padding: 2.25rem 1.25rem;
}

@media (min-width: 48rem) {
    .blueprint-padding {
        padding: 3rem 1.5rem;
    }
}

.header-padding {
    padding: 1.25rem 1.25rem;
}

@media (min-width: 48rem) {
    .header-padding {
        padding: 1.5rem 1.5rem;
    }
}

/* Subtle Section Dividers (1px fine dashed #e4e4e7) */
.border-b-dashed {
    border-bottom: 1px dashed var(--border);
}

.border-t-dashed {
    border-top: 1px dashed var(--border);
}

.border-x-dashed {
    border-left: 1px dashed var(--border);
    border-right: 1px dashed var(--border);
}

/* Typography Utilities */
.font-mono {
    font-family: var(--font-mono);
}

.font-sans {
    font-family: var(--font-sans);
}

.text-primary {
    color: var(--primary);
}

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

.uppercase {
    text-transform: uppercase;
}

.tracking-widest {
    letter-spacing: 0.08em;
}

.text-sm,
.text-xs {
    font-size: var(--uniform-font-size);
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

/* Header */
header.blueprint-grid {
    position: sticky;
    top: 0;
    background-color: rgba(241, 240, 239, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 50;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--primary);
    border-radius: 9999px;
    display: inline-block;
    box-shadow: 0 0 6px rgba(154, 46, 34, 0.35);
    animation: pulse-dot 2.5s infinite ease-in-out;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.75; }
}

.brand-title {
    font-family: var(--font-mono);
    font-size: var(--uniform-font-size);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0;
}

/* Language Selector Dropdown */
.lang-switcher {
    position: relative;
}

.lang-trigger {
    background: transparent;
    border: 1px solid rgba(9, 9, 11, 0.2);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-family: var(--font-mono);
    font-size: var(--uniform-font-size);
    color: var(--foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
}

.lang-trigger:hover,
.lang-trigger.active {
    color: var(--foreground);
    border-color: var(--foreground);
    background-color: rgba(0, 0, 0, 0.04);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(9, 9, 11, 0.15);
    border-radius: 4px;
    padding: 0.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 85px;
    z-index: 100;
}

.lang-dropdown.show {
    display: flex;
}

.lang-dropdown-item {
    background: transparent;
    border: none;
    border-radius: 3px;
    padding: 0.3rem 0.55rem;
    font-family: var(--font-mono);
    font-size: var(--uniform-font-size);
    color: var(--muted-foreground);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.lang-dropdown-item:hover,
.lang-dropdown-item.active {
    background-color: var(--secondary);
    color: var(--primary);
    font-weight: 600;
}

/* Canvas / Visual Container */
.canvas-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 32 / 9;
    background-color: transparent;
    overflow: hidden;
    border-radius: 0;
}

.canvas-wrapper canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Studio Intro Section */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.hero-desc {
    font-size: var(--uniform-font-size);
    line-height: 1.6;
    color: var(--foreground);
    font-weight: 400;
}

/* Showcase App Cards */
.showcase-block {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.app-header {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.app-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.4rem;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.app-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.app-title {
    font-size: var(--uniform-font-size);
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
    line-height: 1.3;
}

.app-sub-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-mono);
    font-size: var(--uniform-font-size);
    color: var(--muted-foreground);
    background: transparent;
    padding: 0;
    border: none;
}

.stars {
    color: var(--primary);
    letter-spacing: 0.04em;
}

.app-category {
    font-size: var(--uniform-font-size);
    color: var(--muted-foreground);
    font-family: var(--font-mono);
    font-weight: 400;
}

.app-description {
    font-size: var(--uniform-font-size);
    line-height: 1.6;
    color: var(--foreground);
    font-weight: 400;
}

/* Feature List (Normal font weight for title) */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: var(--uniform-font-size);
    line-height: 1.5;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.25rem;
    color: var(--primary);
    margin-top: 0;
    flex-shrink: 0;
}

.feature-dot {
    width: 0.32rem;
    height: 0.32rem;
    background-color: var(--primary);
    border-radius: 9999px;
    display: inline-block;
}

.feature-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.feature-item strong {
    display: block;
    color: var(--foreground);
    font-weight: 400;
    line-height: 1.35;
}

.feature-item p {
    color: var(--muted-foreground);
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Store Button */
.cta-row {
    margin-top: 0.25rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background-color: transparent;
    color: var(--foreground);
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: var(--uniform-font-size);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--foreground);
}

.store-btn:hover {
    background-color: var(--foreground);
    color: #ffffff;
}

.store-btn svg {
    width: 0.9rem;
    height: 0.9rem;
    fill: currentColor;
}

/* Standalone Contact Section */
.contact-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-desc {
    font-size: var(--uniform-font-size);
    color: var(--foreground);
    line-height: 1.6;
}

.contact-desc a {
    color: var(--foreground);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 1px;
    transition: color 0.2s ease;
}

.contact-desc a:hover {
    color: var(--primary);
}

/* Footer: Sticky to bottom */
footer.blueprint-grid {
    background-color: var(--background);
    margin-top: auto;
}

footer.blueprint-grid .header-padding {
    padding: 2.25rem 1.25rem 3.75rem 1.25rem;
}

@media (min-width: 48rem) {
    footer.blueprint-grid .header-padding {
        padding: 2.75rem 1.5rem 4.5rem 1.5rem;
    }
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.footer-copyright {
    color: var(--muted-foreground);
}

.copyright-symbol {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.95em;
    display: inline-block;
    margin-right: 0.15rem;
}

.footer-clock {
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-family: var(--font-mono);
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 400;
}

/* Responsive adjustments */
@media (max-width: 47.99rem) {
    .blueprint-grid {
        grid-template-columns: 0px 0px 1fr 0px 0px;
    }

    .hero-meta-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
}