/* Winding Place Root Website - Brand Guidelines */

:root {
    /* The 60-30-10 Color System */
    --clr-primary: #0F172A; /* Navy Blue (60%) */
    --clr-surface: #F8FAFC; /* Cloud White (30%) - Off-White #F5F3EE also acceptable, sticking to Cloud White for stark contrast */
    --clr-surface-alt: #F5F3EE; /* Off-White */
    --clr-accent: #D4AF37; /* Goldenrod (10%) */
    --clr-dark: #111111; /* Deep Shadow/Text */
    
    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-drama: 'Playfair Display', serif;
    --font-data: 'Space Mono', monospace;
}

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

body {
    background-color: var(--clr-primary);
    color: var(--clr-surface);
    font-family: var(--font-data); /* Default to mono for that terminal/precision feel, override where needed */
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography Classes */
.font-heading { font-family: var(--font-heading); }
.font-drama { font-family: var(--font-drama); }
.font-data { font-family: var(--font-data); }

.gold-text { color: var(--clr-accent); }

/* Layout */
.site-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 4rem 0;
    border-bottom: 1px solid rgba(248, 250, 252, 0.1);
    margin-bottom: 4rem;
}

.sys-status {
    font-size: 0.8rem;
    color: var(--clr-surface);
    opacity: 0.7;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.1em;
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--clr-accent);
    border-radius: 50%;
    display: inline-block;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(4rem, 8vw, 8rem);
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -0.025em; /* tracking-tight */
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

/* Protocol Section */
.protocol-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.protocol-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--clr-surface);
}

.protocol-line {
    flex: 1;
    height: 1px;
    background-color: rgba(248, 250, 252, 0.2);
}

/* Subdomain Card */
.subdomain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.subdomain-card {
    display: block;
    text-decoration: none;
    background-color: var(--clr-surface);
    color: var(--clr-dark);
    position: relative;
    padding: 2rem;
    transition: transform 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    outline: none; /* Removed default outline to replace with custom focus ring */
}

.subdomain-card:focus-visible {
    outline: 3px solid var(--clr-accent);
    outline-offset: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.card-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--clr-accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.subdomain-card:hover .card-border {
    transform: scaleY(1);
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 1;
    position: relative;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(17, 17, 17, 0.1);
    padding-bottom: 1rem;
}

.system-tag {
    background-color: var(--clr-primary);
    color: var(--clr-accent);
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.project-title {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.card-body {
    flex: 1;
    margin-bottom: 2rem;
    min-height: 3rem;
}

.telemetry-feed {
    font-size: 0.9rem;
    color: #444;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.button-sim {
    background-color: var(--clr-accent);
    color: var(--clr-primary);
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: inline-block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.subdomain-card:hover .button-sim {
    background-color: var(--clr-primary);
    color: var(--clr-accent);
}

.url-display {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(248, 250, 252, 0.1);
    text-align: center;
}

.footer-link {
    color: var(--clr-surface);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease, color 0.3s ease;
    outline: none;
}

.footer-link:hover, .footer-link:focus-visible {
    opacity: 1;
    color: var(--clr-accent);
}

/* Responsive */
@media (max-width: 768px) {
    .site-wrapper {
        padding: 1.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .subdomain-grid {
        grid-template-columns: 1fr;
    }
}
