/* ===========================================
   ONGGI STYLES - Main stylesheet
   Official Onggi Branding
   =========================================== */

@import url('variables.css');

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

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

a:hover {
    color: var(--color-accent);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

.korean-text {
    font-family: var(--font-korean);
    line-height: 1.7;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 72px;
    display: flex;
    align-items: center;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-english {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-dm-primary);
}

.logo-korean {
    font-family: var(--font-korean);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

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

.nav-links a {
    font-weight: 500;
    color: var(--color-text);
}

.nav-links a:hover {
    color: var(--color-dm-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 14px 24px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-primary);
}

.btn-accent:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: var(--color-dm-primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212, 165, 116, 0.08) 0%, transparent 50%),
        var(--color-bg);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.hero-text h1 {
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-dm-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-family: var(--font-korean);
    font-size: 1.1rem;
    color: var(--color-dm-accent);
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.05em;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
    max-width: 500px;
}

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

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-visual img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero-placeholder {
    width: 500px;
    height: 350px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

/* Features Section */
.features {
    padding: var(--spacing-2xl) 0;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.feature-card {
    padding: var(--spacing-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--color-dm-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    padding: var(--spacing-2xl) 0;
    text-align: center;
}

.cta-section p {
    color: var(--color-text-muted);
    margin: var(--spacing-md) 0 var(--spacing-xl);
}

/* Auth Page Styles */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background: var(--color-bg);
}

.auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    width: 100%;
    max-width: 480px;
    /* Slightly wider */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    /* Ensure content doesn't clip */
    height: auto;
    min-height: 400px;
    margin: var(--spacing-xl) 0;
    /* Add margin for mobile scrolling */
}

.auth-card h1 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.auth-card>p {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    text-decoration: none;
}

.auth-logo .logo-icon {
    width: 48px;
    height: 48px;
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 52px;
    /* Increased from 48px to prevent clipping */
    padding: 12px 16px;
    /* Adjusted padding */
    background-color: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: block;
    appearance: none;
    /* Remove browser default styling */
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Custom Arrow for Dropdowns */
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23A8A29E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-dm-primary);
    /* Use brand gold for focus */
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

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

.form-error {
    color: var(--color-error);
    font-size: 0.875rem;
    margin-top: var(--spacing-sm);
    display: none;
}

.form-error.visible {
    display: block;
}

.form-success {
    color: var(--color-success);
    text-align: center;
    margin-bottom: var(--spacing-md);
}

/* Footer */
.footer {
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

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

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-placeholder {
        width: 100%;
        height: 250px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: var(--spacing-md);
    }
}