@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;700&family=Baskervville:ital@0;1&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
    --color-bg:       #000000;
    --color-text:     #ffffff;
    --font-primary:   'DM Sans', sans-serif;
    --font-secondary: 'Baskervville', serif;
    --nav-height:     72px;
    --border:         1px solid rgba(255,255,255,0.15);
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Intro Screen ──────────────────────────────────────────── */
#intro-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: none;
    background: var(--color-bg);
    /* screen itself fades out after title group does */
    animation: disappear_p 0.4s ease-in-out 5.9s forwards;
}

.intro-title-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.intro_p1 {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.03em;
    opacity: 0;
}

.intro_p2 {
    font-family: var(--font-secondary);
    font-style: italic;
    font-size: 24px;
    letter-spacing: 0;
    margin-top: 2px;
    opacity: 0;
}

.intro_p1:nth-child(1) { animation: appear_p 0.7s ease-in-out 0.5s  forwards; }
.intro_p1:nth-child(2) { animation: appear_p 0.7s ease-in-out 1.2s  forwards; }
.intro_p1:nth-child(3) { animation: appear_p 0.7s ease-in-out 1.9s  forwards; }
.intro_p2              { animation: appear_p 1s   ease-in-out 2.5s  forwards; }

#intro-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: disappear_p 0.8s ease-in-out 5.1s forwards;
}

/* ─── Main Stage ────────────────────────────────────────────── */
#main-stage {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

#main-stage.visible {
    opacity: 1;
    pointer-events: all;
}

/* ─── Nav Bar ───────────────────────────────────────────────── */
#navbar {
    position: sticky;
    top: 0;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    z-index: 20;
    border-bottom: var(--border);
    background: var(--color-bg);
}

.nav-link {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.03em;
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
}
.nav-link:hover { opacity: 0.45; }
.nav-link.active { opacity: 0.45; pointer-events: none; }

#nav-title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: var(--color-text);
}

/* ─── Watchface Grid ────────────────────────────────────────── */
#watchface-canvas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.div_watchface {
    position: relative;
    aspect-ratio: 1 / 1;
    border: var(--border);
    cursor: pointer;
    overflow: hidden;
    background: #000;
    transition: background 0.22s ease;
    margin: -1px 0 0 -1px;
}

/* Label — top-left */
.div_watchface::before {
    content: attr(data-label);
    position: absolute;
    top: 14px;
    left: 16px;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    z-index: 2;
    transition: color 0.22s ease;
    pointer-events: none;
}

/* Hover: white bg, label goes dark — SVG image untouched */
.div_watchface:hover {
    background: #ffffff;
}
.div_watchface:hover::before {
    color: rgba(0,0,0,0.4);
}

.div_watchface img.svg-asset {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 20%;
}

/* ─── Keyframes ─────────────────────────────────────────────── */
@keyframes appear_p {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes disappear_p {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 700px) {
    #watchface-canvas { grid-template-columns: repeat(2, 1fr); }
    .nav-link, #nav-title { font-size: 13px; }
    #navbar { padding: 0 18px; }
}

@media (max-width: 440px) {
    #watchface-canvas { grid-template-columns: 1fr; }
}

/* ─── Footer ────────────────────────────────────────────────── */
footer {
    padding: 0 52px;
    font-family: 'DM Sans', sans-serif;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 80px;
    padding: 64px 0 56px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-logo {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.03em;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}
.footer-logo:hover { opacity: 0.5; }

.footer-play {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-play:hover { color: #fff; }

.footer-cols {
    display: flex;
    gap: 80px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
    padding: 20px 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgba(255,255,255,0.25);
}

@media (max-width: 768px) {
    footer { padding: 0 24px; }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 48px 0 40px;
    }
    .footer-cols { gap: 48px; }
}

@media (max-width: 480px) {
    .footer-cols { flex-direction: column; gap: 36px; }
    #navbar .nav-link { display: none; }
}
