/* Undomains Corporate Design System */

/* ===== Design Tokens ===== */
:root {
    /* Colors - Corporate Palette */
    --color-black: #0A0A0A;
    --color-rich-black: #000000;
    --color-gold: #CC9933;
    --color-gold-light: #E6B347;
    --color-gold-dark: #B38829;
    
    /* Grayscale */
    --color-gray-900: #1A1A1A;
    --color-gray-800: #333333;
    --color-gray-700: #4D4D4D;
    --color-gray-600: #666666;
    --color-gray-500: #888888;
    --color-gray-400: #AAAAAA;
    --color-gray-300: #CCCCCC;
    --color-gray-200: #E5E5E5;
    --color-gray-100: #F5F5F5;
    --color-white: #FFFFFF;
    
    /* Semantic Colors */
    --bg-primary: var(--color-black);
    --bg-secondary: var(--color-gray-900);
    --bg-tertiary: var(--color-gray-800);
    --text-primary: var(--color-white);
    --text-secondary: var(--color-gray-300);
    --text-muted: var(--color-gray-500);
    --border-color: var(--color-gray-800);
    --accent-color: var(--color-gold);
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Inconsolata', 'Fira Code', monospace;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* Layout */
    --container-max: 1280px;
    --border-radius: 8px;
    --border-width: 1px;
    --transition-speed: 0.2s;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: var(--color-white);
    --bg-secondary: var(--color-gray-100);
    --bg-tertiary: var(--color-gray-200);
    --text-primary: var(--color-black);
    --text-secondary: var(--color-gray-700);
    --text-muted: var(--color-gray-600);
    --border-color: var(--color-gray-300);
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease;
    min-height: 100vh;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

h1 { 
    font-size: 2.5rem;
    font-weight: 700;
}

h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--color-gold-light);
}

/* ===== Glass Components ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    transition: opacity var(--transition-speed) ease;
}

.logo:hover {
    opacity: 0.8;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease;
}

.nav-link:hover {
    background: var(--glass-bg);
    color: var(--color-gold-light);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--color-gold-dark));
    color: var(--color-black);
    box-shadow: 0 4px 15px rgba(204, 153, 51, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(204, 153, 51, 0.4);
    color: var(--color-black);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-ghost:hover {
    background: var(--accent-color);
    color: var(--color-black);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: all var(--transition-speed) ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(204, 153, 51, 0.1);
    background: rgba(255, 255, 255, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ===== Search Hero Section ===== */
.hero-search {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    background: 
        radial-gradient(circle at 20% 50%, rgba(204, 153, 51, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(204, 153, 51, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    padding: var(--spacing-3xl) 0;
}

.hero-compact {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-secondary);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Search Section ===== */
.search-section {
    padding: var(--spacing-3xl) 0;
}

.search-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    text-align: center;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.search-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.search-form {
    position: relative;
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.search-input {
    flex: 1;
    padding: var(--spacing-lg);
    font-size: 1.125rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.search-btn {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== Features Grid ===== */
.features {
    padding: var(--spacing-3xl) 0;
}

.features-grid {
    display: grid;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
    /* 4 columns on large screens */
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive grid breakpoints */
@media (max-width: 1199px) {
    .features-grid {
        /* 2 columns on medium screens */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .features-grid {
        /* 1 column on small screens */
        grid-template-columns: 1fr;
    }
}

.feature-card {
    padding: var(--spacing-xl);
    text-align: center;
    border-radius: var(--border-radius);
    transition: transform var(--transition-speed) ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    color: var(--accent-color);
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-icon svg {
    width: 48px;
    height: 48px;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* ===== Auth Pages ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background: 
        radial-gradient(circle at 30% 70%, rgba(204, 153, 51, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.auth-logo {
    height: 60px;
    margin-bottom: var(--spacing-lg);
}

.auth-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.auth-subtitle {
    color: var(--text-secondary);
}

.auth-form {
    margin-bottom: var(--spacing-lg);
}

.auth-footer {
    text-align: center;
    color: var(--text-muted);
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    position: relative;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-speed) ease;
    position: absolute;
    top: 4px;
    left: 4px;
}

.theme-icon.active {
    color: var(--accent-color);
    opacity: 1;
}

.theme-icon:not(.active) {
    opacity: 0;
    pointer-events: none;
}

[data-theme="dark"] .theme-icon.dark {
    opacity: 1;
}

[data-theme="dark"] .theme-icon.light {
    opacity: 0;
}

[data-theme="light"] .theme-icon.light {
    opacity: 1;
}

[data-theme="light"] .theme-icon.dark {
    opacity: 0;
}

/* ===== Footer (Unregistry Style) ===== */
.footer {
    background: var(--bg-secondary);
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
    margin-top: auto;
}

.footer-content-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-lg);
}

.footer-line {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Line 1: Logo Section with Powered By */
.footer-logo-section {
    margin-bottom: 1rem;
}

.footer-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-logo-img {
    height: 40px;
    width: auto;
    transition: opacity var(--transition-speed) ease;
}

.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

.footer-powered-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-powered-text a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Line 2: Menu Links */
.footer-links-line {
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    margin: var(--spacing-md) 0;
}

.footer-links-line a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-speed) ease;
}

.footer-links-line a:hover {
    color: var(--accent-color);
}

/* Line 3: Portal Buttons */
.footer-portals-line {
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.portal-btn:hover {
    background: rgba(204, 153, 51, 0.2) !important;
    border-color: rgba(204, 153, 51, 0.5) !important;
    transform: translateY(-1px);
}

/* Line 4: Copyright */
.footer-copyright-line {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(204, 153, 51, 0.1);
}

.footer-copyright-line p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* ===== Mobile Navigation ===== */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        border: 1px solid var(--glass-border);
        border-radius: var(--border-radius);
        margin: var(--spacing-md);
        flex-direction: column;
        padding: var(--spacing-lg);
    }
    
    .nav.active {
        display: flex;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* ===== Loading States ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Contact Grid ===== */
.contact-grid {
    display: grid;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
    /* 4 columns on large screens */
    grid-template-columns: repeat(4, 1fr);
}

/* Contact grid responsive breakpoints */
@media (max-width: 1199px) {
    .contact-grid {
        /* 2 columns on medium screens */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .contact-grid {
        /* 1 column on small screens */
        grid-template-columns: 1fr;
    }
}

.contact-card {
    transition: transform var(--transition-speed) ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.hidden { display: none; }
.visible { display: block; }

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}