/*
 * Semi Camera Brand Design System
 * Single source of truth for all portal visual styling.
 *
 * Brand identity: retro CRT amber terminal aesthetic,
 * inspired by Tokyo's industrial design and 1980s/90s
 * Japanese electronics.
 *
 * Rules:
 * - ZERO inline styles anywhere in templates.
 * - All visual styling via CSS classes defined here.
 * - CSS custom properties for all brand tokens.
 * - Tailwind CDN for LAYOUT ONLY (flex, grid, gap, padding, margin, responsive).
 */

/* ================================================================
   CSS Custom Properties — Brand Tokens
   ================================================================ */

:root {
    /* Amber (primary accent) */
    --amber-glow: #FF7D00;
    --amber-bright: #FFAA00;
    --amber-dim: #CC6400;

    /* Gold (premium / emblem) */
    --gold-metallic: #E3B451;
    --gold-light: #F0D080;
    --gold-dark: #B8923F;

    /* Gray (structure) */
    --charcoal: #1A1A1A;
    --steel-gray: #4A4A4A;
    --warm-gray: #9B9595;

    /* Black & White */
    --ink-black: #0D0D0D;
    --ghost-white: #F5F5F5;

    /* Typography */
    --font-display: 'VT323', monospace;
    --font-section: 'Silkscreen', cursive;
    --font-subheading: 'Share Tech Mono', monospace;
    --font-body: 'IBM Plex Mono', monospace;
    --font-caption: 'Share Tech Mono', monospace;

    /* Gradients */
    --gradient-amber-spectrum: linear-gradient(180deg, #FFAA00 0%, #FF7D00 50%, #CC6400 100%);
    --gradient-gold-metallic: linear-gradient(135deg, #F0D080 0%, #E3B451 50%, #B8923F 100%);
    --gradient-steel: linear-gradient(180deg, #6A6A6A 0%, #4A4A4A 50%, #2A2A2A 100%);
    --gradient-crt-glow: radial-gradient(ellipse at center, rgba(255, 149, 0, 0.4) 0%, transparent 70%);
    --gradient-amber-fade: linear-gradient(180deg, #FF7D00 0%, transparent 100%);

    /* Spacing */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}


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

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--ink-black);
    color: var(--ghost-white);
    line-height: 1.6;
}


/* ================================================================
   Typography Classes
   ================================================================ */

.hero-display {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 400;
    color: var(--amber-glow);
    line-height: 1.1;
    letter-spacing: 2px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 400;
    color: var(--amber-glow);
    line-height: 1.2;
}

.section-header {
    font-family: var(--font-section);
    font-size: 20px;
    font-weight: 400;
    color: var(--ghost-white);
    letter-spacing: 1px;
}

.text-subheading {
    font-family: var(--font-subheading);
    font-size: 18px;
    font-weight: 400;
    color: var(--warm-gray);
}

.text-body-large {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    color: var(--ghost-white);
}

.text-body-default {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    color: var(--ghost-white);
}

.text-caption {
    font-family: var(--font-caption);
    font-size: 12px;
    font-weight: 400;
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-secondary {
    color: var(--warm-gray);
}

.text-body {
    color: var(--ghost-white);
}


/* ================================================================
   Page Background
   ================================================================ */

.page-bg {
    background-color: var(--ink-black);
}


/* ================================================================
   Logo
   ================================================================ */

.logo-amber {
    color: var(--amber-glow);
    filter: drop-shadow(0 0 8px rgba(255, 125, 0, 0.4));
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ================================================================
   Buttons
   ================================================================ */

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gradient-amber-spectrum);
    color: var(--ink-black);
    font-family: var(--font-section);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: var(--ghost-white);
    font-family: var(--font-section);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    border: 1px solid var(--steel-gray);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
    border-color: var(--amber-glow);
    color: var(--amber-glow);
}

.btn-danger {
    display: inline-block;
    padding: 8px 16px;
    background: transparent;
    color: #ff4444;
    font-family: var(--font-caption);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #ff4444;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: rgba(255, 68, 68, 0.15);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid var(--steel-gray);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--warm-gray);
    transition: border-color 0.2s, color 0.2s;
}

.btn-icon:hover {
    border-color: var(--amber-glow);
    color: var(--amber-glow);
}


/* ================================================================
   Cards
   ================================================================ */

.card {
    background-color: var(--charcoal);
    border: 1px solid var(--steel-gray);
    border-radius: var(--radius-md);
}

.card-glow {
    box-shadow: 0 0 30px rgba(255, 125, 0, 0.08);
}

.card-hover {
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-hover:hover {
    border-color: var(--amber-glow);
    box-shadow: 0 0 20px rgba(255, 125, 0, 0.15);
    transform: translateY(-2px);
}


/* ================================================================
   Form Inputs
   ================================================================ */

.input-label {
    display: block;
    font-family: var(--font-caption);
    font-size: 12px;
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.input-field {
    display: block;
    padding: 12px 16px;
    background-color: var(--ink-black);
    color: var(--ghost-white);
    font-family: var(--font-body);
    font-size: 16px;
    border: 1px solid var(--steel-gray);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--amber-glow);
    box-shadow: 0 0 0 2px rgba(255, 125, 0, 0.2);
}

.input-field::placeholder {
    color: var(--steel-gray);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ghost-white);
    cursor: pointer;
}

.checkbox-input {
    accent-color: var(--amber-glow);
    width: 18px;
    height: 18px;
}

select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239B9595' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

textarea.input-field {
    resize: vertical;
    min-height: 80px;
}


/* ================================================================
   Tables
   ================================================================ */

.table-container {
    overflow-x: auto;
}

.table-branded {
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 14px;
}

.table-branded th {
    font-family: var(--font-caption);
    font-size: 11px;
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--steel-gray);
}

.table-branded td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(74, 74, 74, 0.3);
    color: var(--ghost-white);
}

.table-branded tr:hover td {
    background-color: rgba(255, 125, 0, 0.04);
}


/* ================================================================
   Badges & Status
   ================================================================ */

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-family: var(--font-caption);
    font-size: 11px;
    color: var(--ghost-white);
    background-color: var(--steel-gray);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-amber {
    background-color: rgba(255, 125, 0, 0.2);
    color: var(--amber-glow);
    border: 1px solid rgba(255, 125, 0, 0.3);
}

.status-active {
    color: #4ade80;
    font-family: var(--font-caption);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-disabled {
    color: var(--warm-gray);
    font-family: var(--font-caption);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 48px;
    color: var(--amber-glow);
    line-height: 1;
}


/* ================================================================
   Navigation
   ================================================================ */

.nav-link {
    font-family: var(--font-caption);
    font-size: 12px;
    color: var(--warm-gray);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 0;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--amber-bright);
}

.nav-link-active {
    color: var(--amber-glow);
    border-bottom: 2px solid var(--amber-glow);
}


/* ================================================================
   Alerts
   ================================================================ */

.alert-error {
    padding: 12px 16px;
    background-color: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #ff6b6b;
    font-family: var(--font-body);
    font-size: 14px;
}


/* ================================================================
   Code
   ================================================================ */

.code-inline {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--amber-glow);
    background-color: rgba(255, 125, 0, 0.08);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}


/* ================================================================
   Borders
   ================================================================ */

.border-steel {
    border-color: var(--steel-gray);
}

.border-amber {
    border-color: var(--amber-glow);
}


/* ================================================================
   CRT Patterns
   ================================================================ */

/* Scanline overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* CRT glow behind cards */
.crt-glow {
    background: var(--gradient-crt-glow);
}

/* Dot matrix pattern (optional background) */
.dot-matrix {
    background-image: radial-gradient(circle, var(--steel-gray) 0.5px, transparent 0.5px);
    background-size: 12px 12px;
}

/* Tech grid pattern */
.tech-grid {
    background-image:
        linear-gradient(rgba(74, 74, 74, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 74, 74, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Film grain effect */
.film-grain {
    position: relative;
}

.film-grain::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

/* Registration marks / crosshair corners */
.crosshair-corners {
    position: relative;
}

.crosshair-corners::before,
.crosshair-corners::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--steel-gray);
    border-style: solid;
}

.crosshair-corners::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.crosshair-corners::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}


/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 768px) {
    .hero-display {
        font-size: 48px;
    }

    .page-title {
        font-size: 32px;
    }

    .section-header {
        font-size: 16px;
    }

    .stat-number {
        font-size: 36px;
    }

    header nav {
        gap: 8px;
    }

    .nav-link {
        font-size: 10px;
    }
}
