/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

html {
  font-size: 18px;
}

body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
}

/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}

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

body {
    min-height: 100vh;
    font-family: "degular-variable", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 20pt;
    font-optical-sizing: auto;
    overflow: hidden;
    color: #fff;
    background: #6b798d;
}

/* Desktop layer - everything that gets blurred */
#desktop-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    filter: blur(6px) brightness(1.0) contrast(0.5);
}

#wallpaper-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    background: url('../assets/images/wallpaper.webp') center center / cover no-repeat;
}

#wallpaper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
}

/* Fake App Windows Container */
#windows-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* Generic window styles */
.fake-window {
    position: absolute;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    animation: windowSpawnIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: none;
}

@keyframes windowSpawnIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* macOS traffic lights */
.traffic-lights {
    display: flex;
    gap: 6px;
    padding: 0 10px;
    align-items: center;
}

.traffic-light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.tl-red { background: #ff5f57; }
.tl-yellow { background: #febc2e; }
.tl-green { background: #28c840; }

/* ---- Zoom Window ---- */
.zoom-window .zoom-titlebar {
    height: 32px;
    background: #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 12px;
}

.zoom-window .zoom-title {
    font-size: 12px;
    color: #ccc;
    font-weight: 500;
}

.zoom-window .zoom-body {
    background: #000;
    padding: 8px;
    display: grid;
    gap: 4px;
    height: calc(100% - 32px - 44px);
}

.zoom-participant {
    background: #1a1a1a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 16px;
    font-weight: 600;
    min-height: 40px;
}

.zoom-window .zoom-controls {
    height: 44px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.zoom-window .zoom-controls-left {
    display: flex;
    gap: 8px;
}

.zoom-window .zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #3d3d3d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.zoom-window .zoom-btn.end {
    background: #e53935;
    width: 48px;
    border-radius: 16px;
}

/* "Me" video overlay for all windows */
.me-video {
    position: absolute;
    bottom: 52px;
    right: 8px;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    background: url('../assets/images/portraits/me.webp') center center / cover no-repeat;
    border: 2px solid #333;
    z-index: 10;
}

.meet-window .me-video {
    bottom: 8px;
}

.slack-window .me-video {
    bottom: 52px;
}

/* ---- Google Meet (Chrome) Window ---- */
.meet-window .chrome-tab-bar {
    height: 36px;
    background: #202124;
    display: flex;
    align-items: flex-end;
    padding: 0 8px;
}

.meet-window .chrome-tab {
    height: 28px;
    background: #292a2d;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 6px;
    font-size: 11px;
    color: #ccc;
    max-width: 180px;
}

.meet-window .chrome-tab .tab-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00897b;
    flex-shrink: 0;
}

.meet-window .chrome-toolbar {
    height: 32px;
    background: #292a2d;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
}

.meet-window .chrome-toolbar .url-bar {
    flex: 1;
    height: 22px;
    background: #202124;
    border-radius: 11px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 11px;
    color: #8ab4f8;
}

.meet-window .chrome-toolbar .nav-btn {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.meet-window .meet-body {
    background: #1a1a1a;
    padding: 8px;
    display: grid;
    gap: 4px;
    height: calc(100% - 68px);
}

.meet-participant {
    background: #292929;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.meet-participant .meet-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.meet-window .meet-controls {
    height: 0;
}

/* ---- Slack Huddle Window ---- */
.slack-window {
    display: flex;
    flex-direction: column;
    background: #1a1134;
}

.slack-window .slack-titlebar {
    height: 36px;
    background: #1a1134;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.slack-window .huddle-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.slack-window .huddle-icon {
    width: 18px;
    height: 18px;
    background: #1d9bd1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.slack-window .huddle-body {
    flex: 1;
    padding: 8px;
    display: grid;
    gap: 6px;
}

.slack-window .huddle-participant {
    background: #2c2250;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.slack-window .huddle-avatar {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.slack-window .huddle-controls {
    height: 44px;
    background: #1a1134;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 12px;
}

.slack-window .huddle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3d3456;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slack-window .huddle-btn.end {
    background: #e01e5a;
    width: 36px;
    height: 36px;
}

/* Canvas and content z-index */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#canvas-container.ready {
    opacity: 1;
}

#canvas-container canvas {
    pointer-events: auto;
}

.content {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    padding: 60px;
    padding-bottom: 120px;
    max-width: 50%;
    pointer-events: none;
    height: 100vh;
    overflow-y: auto;
}

.content * {
    pointer-events: auto;
}

h1.logo {
    margin-bottom: 20px;
}

h1.logo img {
    max-width: 300px;
    height: auto;
}

.tagline {
    font-size: 2.5rem;
    font-weight: 700;
    font-variation-settings: "opsz" 36;
    margin-bottom: 40px;
    line-height: 1em;
    text-wrap: balance;
}

.highlight {
    color: #FE3231;
    text-decoration: underline;
}

.yank {
    color: #FE3231;
    font-weight: 800;
    font-variation-settings: "ital" 1, "opsz" 20;
}

.description {
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 500px;
    text-wrap: pretty;
}

.content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 15px;
    color: #fff;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-width: 480px;
}

.features-list li {
    background: rgba(240, 240, 240, 0.8);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    aspect-ratio: 1;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.features-list li:hover {
    background: #FE3231;
}

.features-list li:hover span {
    color: #fff;
}

.features-list li:hover img {
    filter: invert(1);
}

.features-list li img {
    width: 30%;
    aspect-ratio: 1;
    flex: 1;
    object-fit: contain;
    transition: filter 0.2s;
}

.features-list li span {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #222;
    min-height: 3.5em;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    text-wrap: balance;
}

.specs-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    max-width: 500px;
}

.specs-list li {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 8px;
    padding-left: 18px;
    position: relative;
    }

.specs-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.content a {
    color: #FE3231;
    text-decoration: underline;
}

.content a:hover {
    color: #FE3231;
}

.buy-button {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: 800;
    font-variation-settings: "ital" 1, "opsz" 24;
    font-family: inherit;
    border: none;
    border-radius: 999px;
    background: #8a6565;
    color: #bbb;
    cursor: not-allowed;
}

.dev-note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
    font-style: italic;
}

.made-by {
    margin-top: 40px;
    font-size: 1rem;
}

@media (max-width: 768px) {
    h1.logo {
        position: fixed;
        top: 30px;
        left: 30px;
        pointer-events: none;
        transition: none;
        padding-bottom: 25px;
    }

    h1.logo.scrolling {
        position: absolute;
    }

    h1.logo img {
        max-width: 200px;
    }

    .content {
        position: relative;
        top: auto;
        height: auto;
        padding: 30px;
        padding-top: 50vh;
        padding-bottom: 40vh;
        max-width: 100%;
    }

    .tagline {
        margin-top: 80px;
    }

    body {
        overflow: auto;
        font-size: 24pt;
    }
}
