/* =========================================
   ROBUST DEVS — Static Site Stylesheet
   Design tokens ported verbatim from the
   original Next.js design system (index.css)
   ========================================= */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("/assets/fonts/inter-variable-latin.woff2") format("woff2");
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("/assets/fonts/jetbrains-mono-variable-latin.woff2") format("woff2");
}

@font-face {
    font-family: "VT323";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/vt323-400-latin.woff2") format("woff2");
}

/* =========================================
   Design Tokens (dark theme — the site's
   only supported theme; see plan notes)
   ========================================= */

:root {
    /* Surface Colors */
    --surface-primary: #0B0B0C;
    --surface-secondary: #111113;
    --surface-sidebar: #0E0E10;
    --surface-overlay: rgba(0, 0, 0, 0.6);

    /* Text Colors */
    --text-primary: #EDEDED;
    --text-secondary: #A1A1AA;
    --text-muted: #6B6B75;
    --text-disabled: #4B4B52;

    /* Accent Colors */
    --accent-primary: #22C55E;
    --accent-secondary: #3B82F6;

    /* Border Colors */
    --border-subtle: #1F1F23;
    --border-default: #2A2A30;

    /* Semantic Colors */
    --semantic-success: #22C55E;
    --semantic-warning: #F59E0B;
    --semantic-error: #EF4444;
    --semantic-info: #3B82F6;

    /* Spacing Scale (4px unit) */
    --space-0: 0px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* Border Radius */
    --radius-none: 0px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    /* Typography — Font Families */
    --font-primary: "Inter", ui-sans-serif, system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --font-retro: "VT323", monospace;

    /* Typography — Font Sizes */
    --text-xs: 12px;
    --text-sm: 13px;
    --text-md: 14px;
    --text-lg: 16px;
    --text-xl: 20px;
    --text-display: 48px;

    /* Typography — Line Heights */
    --leading-xs: 16px;
    --leading-sm: 18px;
    --leading-md: 20px;
    --leading-lg: 24px;
    --leading-xl: 28px;
    --leading-display: 56px;

    /* Typography — Font Weights */
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;

    /* Interaction */
    --transition-duration: 120ms;
    --transition-easing: ease-out;
    --focus-ring-width: 2px;
    --focus-ring-color: var(--accent-primary);

    /* Component: Status Dot */
    --status-dot-size: 8px;

    /* Component: Button */
    --button-height: 32px;
}

/* =========================================
   Base
   ========================================= */

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

* {
    border-color: var(--border-subtle);
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    font-size: var(--text-md);
    line-height: var(--leading-md);
    font-weight: var(--font-regular);
    color: var(--text-primary);
    background-color: var(--surface-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   Typography Utilities
   (namespaced rd- to avoid any collision with
   framework utility classes elsewhere)
   ========================================= */

.rd-text-display {
    font-size: var(--text-display);
    line-height: var(--leading-display);
    font-weight: var(--font-semibold);
    letter-spacing: -1.2px;
}

.rd-text-xl {
    font-size: var(--text-xl);
    line-height: var(--leading-xl);
    font-weight: var(--font-medium);
}

.rd-text-lg {
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
    font-weight: var(--font-regular);
}

.rd-text-sm {
    font-size: var(--text-sm);
    line-height: var(--leading-sm);
    font-weight: var(--font-regular);
}

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

.rd-font-mono {
    font-family: var(--font-mono);
}

/* =========================================
   Links
   ========================================= */

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-duration) var(--transition-easing);
}

a:hover {
    color: var(--text-primary);
}

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

.link-muted:hover {
    color: var(--text-secondary);
}

/* =========================================
   Focus States
   ========================================= */

:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: 2px;
}

/* =========================================
   Scrollbar Styling
   ========================================= */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =========================================
   Animations
   ========================================= */

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

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out forwards;
}

.status-dot {
    width: var(--status-dot-size);
    height: var(--status-dot-size);
    border-radius: 50%;
    background-color: var(--accent-primary);
    display: inline-block;
}

/* =========================================
   Layout Shell
   ========================================= */

.site-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--border-subtle);
    background-color: rgba(11, 11, 12, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.site-header__row {
    display: flex;
    height: 48px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .site-header__row {
        padding: 0 24px;
    }
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

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

.site-header__logo {
    height: 40px;
    width: 40px;
}

@media (min-width: 640px) {
    .site-header__brand {
        gap: 8px;
    }
    .site-header__logo {
        height: 48px;
        width: 48px;
    }
}

.site-header__nav {
    display: none;
    align-items: center;
    gap: 16px;
    font-size: var(--text-sm);
}

@media (min-width: 768px) {
    .site-header__nav {
        display: flex;
    }
}

.site-header__nav a {
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.site-header__sep {
    color: var(--text-disabled);
}

.site-header__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-duration) var(--transition-easing);
}

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

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

.hamburger svg {
    width: 20px;
    height: 20px;
}

/* Mobile nav */

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background-color: var(--surface-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity var(--transition-duration) var(--transition-easing);
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 768px) {
    .mobile-nav-backdrop {
        display: none;
    }
}

.mobile-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 48px;
    z-index: 50;
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--surface-secondary);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all var(--transition-duration) var(--transition-easing);
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
}

.mobile-nav.is-open {
    max-height: 400px;
    overflow-y: auto;
    opacity: 1;
}

.mobile-nav__list {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.mobile-nav__list a {
    display: block;
    width: 100%;
    padding: 12px 24px;
    text-align: left;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

/* Footer */

.site-footer {
    width: 100%;
    border-top: 1px solid var(--border-subtle);
    background-color: var(--surface-primary);
}

.site-footer__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 12px;
}

@media (min-width: 768px) {
    .site-footer__row {
        flex-direction: row;
        gap: 24px;
        padding: 24px 16px;
    }
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    text-align: center;
    font-size: var(--text-xs);
}

@media (min-width: 640px) {
    .site-footer__nav {
        gap: 8px 16px;
        font-size: var(--text-sm);
    }
}

.site-footer__nav a {
    white-space: nowrap;
}

.site-footer__nav a.is-primary {
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.site-footer__nav a.is-muted {
    color: var(--text-muted);
}

.site-footer__nav a.is-muted:hover {
    color: var(--text-secondary);
}

.site-footer__copyright {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

@media (min-width: 640px) {
    .site-footer__copyright {
        font-size: var(--text-sm);
    }
}

/* =========================================
   Homepage
   ========================================= */

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.hero__title {
    font-family: var(--font-retro);
    color: var(--text-secondary);
    font-size: 3rem;
    line-height: 1;
    word-break: break-word;
    padding: 0 8px;
    margin: 0;
}

@media (min-width: 640px) {
    .hero__title { font-size: 3.75rem; }
}
@media (min-width: 768px) {
    .hero__title { font-size: 4.5rem; }
}
@media (min-width: 1024px) {
    .hero__title { font-size: 6rem; }
}

.hero__status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero__ping-wrap {
    position: relative;
    display: flex;
    height: 10px;
    width: 10px;
}

.hero__ping {
    position: absolute;
    display: inline-flex;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    background-color: var(--accent-primary);
    opacity: 0.75;
    animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero__dot {
    position: relative;
    display: inline-flex;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background-color: var(--accent-primary);
}

.hero__status-text {
    font-family: var(--font-retro);
    color: var(--text-muted);
    font-size: 1.125rem;
}

@media (min-width: 640px) { .hero__status-text { font-size: 1.25rem; } }
@media (min-width: 768px) { .hero__status-text { font-size: 1.5rem; } }
@media (min-width: 1024px) { .hero__status-text { font-size: 1.875rem; } }

/* =========================================
   Legal / Support / Contact article shell
   ========================================= */

.page-article {
    flex: 1;
    padding: 32px 0;
}

@media (min-width: 768px) {
    .page-article {
        padding: 48px 0;
    }
}

.page-article__container {
    margin: 0 auto;
    max-width: 800px;
    padding: 0 12px;
}

@media (min-width: 768px) {
    .page-article__container {
        padding: 0 24px;
    }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: 32px;
}

.back-link:hover {
    color: var(--text-secondary);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

@media (min-width: 768px) {
    .page-header h1 {
        font-size: 24px;
    }
}

.page-header__meta {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

/* Legal content typography */

.legal-content h2 {
    font-size: var(--text-xl);
    line-height: var(--leading-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
}

.legal-content h3 {
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.legal-content p {
    font-size: var(--text-md);
    line-height: var(--leading-lg);
    color: var(--text-secondary);
    margin: 0 0 var(--space-4) 0;
}

.legal-content ul,
.legal-content ol {
    padding-left: var(--space-5);
    margin: 0 0 var(--space-4) 0;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .legal-content ul,
    .legal-content ol {
        padding-left: var(--space-4);
    }
}

.legal-content li {
    margin-bottom: var(--space-2);
    line-height: var(--leading-lg);
}

.legal-content a {
    color: var(--accent-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content a:hover {
    color: var(--accent-primary);
}

.legal-content strong {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.legal-content hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: var(--space-8) 0;
}

/* Support FAQ (native details/summary) */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background-color: var(--surface-secondary);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 20px;
    font-weight: var(--font-medium);
    color: var(--text-primary);
    transition: color var(--transition-duration) var(--transition-easing);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover {
    color: var(--accent-primary);
}

.faq-item summary::after {
    content: "+";
    font-size: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition-duration) var(--transition-easing);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item__body {
    padding: 0 20px 20px 20px;
    color: var(--text-secondary);
    font-size: var(--text-md);
    line-height: var(--leading-lg);
}

.faq-item__body p {
    margin: 0 0 var(--space-3) 0;
}

.faq-item__body p:last-child {
    margin-bottom: 0;
}

/* Contact page */

.contact-grid {
    display: grid;
    gap: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.form-field input,
.form-field textarea {
    width: 100%;
    background-color: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-family: var(--font-primary);
    font-size: var(--text-md);
    color: var(--text-primary);
    transition: border-color var(--transition-duration) var(--transition-easing);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--button-height);
    padding: 0 20px;
    background-color: var(--accent-primary);
    color: var(--surface-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity var(--transition-duration) var(--transition-easing);
    align-self: flex-start;
}

.btn-primary:hover {
    opacity: 0.9;
}

.contact-alt {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.contact-alt h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.contact-alt p {
    color: var(--text-secondary);
    margin: 0 0 var(--space-3) 0;
}

.contact-alt a {
    color: var(--accent-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

/* Honeypot field — hidden from real users, catches bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* =========================================
   404 page
   ========================================= */

.not-found {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px 16px;
    text-align: center;
}

.not-found__code {
    font-family: var(--font-retro);
    color: var(--text-secondary);
    font-size: 4rem;
    line-height: 1;
    margin: 0;
}

.not-found__text {
    color: var(--text-muted);
    margin: 0;
}
