/*
 * public.css — Design system for public-facing pages
 * Used by: home.php, index.php (login), register.php, shop.php
 * Internal pages (dashboard, etc.) use style.css via layout/header.php
 */

/* ═══ VARIABLES ═══ */
:root {
    --amber: #E8A838;
    --amber-hover: #D4952E;
    --amber-dim: rgba(232,168,56,0.12);
    --amber-glow: rgba(232,168,56,0.25);
    --teal: #10B981;
    --teal-hover: #0EA472;
    --teal-dim: rgba(16,185,129,0.10);
    --teal-glow: rgba(16,185,129,0.25);
    --bg-deep: #0A0D12;
    --bg: #0F1218;
    --bg-card: #161B24;
    --bg-card-alt: #1A2030;
    --bg-card-hover: #1E2430;
    --bg-elevated: #1E2536;
    --border: #232B3A;
    --border-light: #2A3448;
    --text: #F0F2F5;
    --text-secondary: #9BA4B5;
    --text-dim: #6B7486;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gradient-amber: linear-gradient(135deg, #E8A838 0%, #D4952E 100%);
    --font-display: 'Bricolage Grotesque', Georgia, serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.82rem;
    --fs-base: 0.9rem;
}

/* ═══ RESET ═══ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

html, body { max-width: 100vw; overflow-x: hidden; }

/* ═══ NOISE TEXTURE ═══ */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px var(--amber-dim); }
    50% { box-shadow: 0 0 40px var(--amber-glow); }
}

.anim-up { animation: fadeUp 0.7s ease-out both; }
.anim-up-d1 { animation: fadeUp 0.7s 0.1s ease-out both; }
.anim-up-d2 { animation: fadeUp 0.7s 0.2s ease-out both; }
.anim-up-d3 { animation: fadeUp 0.7s 0.3s ease-out both; }
.anim-up-d4 { animation: fadeUp 0.7s 0.4s ease-out both; }
.anim-up-d5 { animation: fadeUp 0.7s 0.5s ease-out both; }
.anim-up-d6 { animation: fadeUp 0.7s 0.6s ease-out both; }
.anim-up-d7 { animation: fadeUp 0.7s 0.7s ease-out both; }
.anim-fade { animation: fadeIn 1s ease-out both; }

/* ═══ NAV (shared: home, shop) ═══ */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 0 48px; height: 72px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(10,13,18,0.88);
    backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    max-width: 100vw; box-sizing: border-box;
}
.nav-logo { text-decoration: none; flex-shrink: 1; min-width: 0; }
.nav-logo img { height: 46px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
    color: var(--text-dim); text-decoration: none;
    font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
    text-transform: uppercase; transition: color 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-btn {
    background: var(--amber); color: var(--bg-deep);
    padding: 9px 24px; border-radius: 6px;
    font-weight: 700; font-size: 0.85rem; text-decoration: none;
    letter-spacing: 0.03em; text-transform: uppercase;
    transition: all 0.25s; border: none;
    flex-shrink: 0; white-space: nowrap;
}
.nav-btn:hover { background: var(--amber-hover); transform: translateY(-1px); box-shadow: 0 6px 20px var(--amber-glow); }

/* ═══ BUTTONS (shared) ═══ */
.btn-primary {
    background: var(--amber); color: var(--bg-deep);
    padding: 15px 36px; border-radius: 6px;
    font-family: var(--font-body); font-weight: 700; font-size: 0.92rem;
    text-decoration: none; transition: all 0.3s;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 24px rgba(232,168,56,0.2);
}
.btn-primary:hover { background: var(--amber-hover); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(232,168,56,0.3); }
.btn-ghost {
    border: 1px solid var(--border-light); color: var(--text-secondary);
    padding: 15px 36px; border-radius: 6px; background: transparent;
    font-family: var(--font-body); font-weight: 600; font-size: 0.92rem;
    text-decoration: none; transition: all 0.3s;
}
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); background: rgba(255,255,255,0.03); }

/* ═══ LANG TOGGLE ═══ */
.lang-toggle {
    display: inline-block; text-decoration: none; font-size: 1rem;
    margin-left: 4px; cursor: pointer; opacity: 0.6; transition: all 0.25s;
}
.lang-toggle:hover { opacity: 1; transform: scale(1.15); }

/* ═══ SECTION SYSTEM ═══ */
.section {
    padding: 120px 24px; max-width: 1120px; margin: 0 auto;
    position: relative; z-index: 1;
}
.section-eyebrow {
    font-family: var(--font-body); font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--amber); margin-bottom: 14px; text-align: center;
}
.section-title {
    font-family: var(--font-display); font-size: 2.5rem; font-weight: 800;
    text-align: center; margin-bottom: 16px; letter-spacing: -0.015em;
    line-height: 1.15;
}
.section-desc {
    font-size: 1rem; color: var(--text-secondary); text-align: center;
    max-width: 560px; margin: 0 auto 72px; line-height: 1.7;
}

/* ═══ DIVIDER ═══ */
.divider {
    max-width: 1120px; margin: 0 auto; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ═══ FOOTER (shared: home, shop) ═══ */
.pub-footer,
.footer {
    text-align: center; padding: 40px 24px;
    border-top: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.78rem;
    position: relative; z-index: 1;
}
.pub-footer a,
.footer a,
.footer-links a {
    color: var(--text-dim); text-decoration: none; margin: 0 14px;
    transition: color 0.25s; font-size: 0.78rem;
}
.pub-footer a:hover,
.footer a:hover,
.footer-links a:hover { color: var(--text-secondary); }
.footer-links { margin-top: 10px; }

/* ═══ AUTH CARD (login, register) ═══ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    line-height: 1.6;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 36px 32px;
    animation: fadeUp 0.5s ease-out both;
}

.auth-logo { text-align: center; margin-bottom: 8px; }
.auth-logo img { height: 52px; width: auto; }

.auth-subtitle {
    font-family: var(--font-display);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 28px;
    letter-spacing: 0.01em;
}

.auth-success {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.25);
    color: #6EE7B7;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-alert {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    color: #FCA5A5;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.auth-alert a {
    color: var(--teal);
    text-decoration: underline;
}

.auth-card form { display: flex; flex-direction: column; gap: 14px; }

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-card input::placeholder { color: var(--text-dim); }

.auth-btn {
    width: 100%;
    padding: 12px;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-top: 4px;
    letter-spacing: 0.01em;
}

/* Login: amber accent */
.auth-card--login input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-dim);
}
.auth-card--login .auth-btn {
    background: var(--amber);
}
.auth-card--login .auth-btn:hover {
    background: var(--amber-hover);
    box-shadow: 0 0 20px var(--amber-glow);
}

/* Register: teal accent */
.auth-card--register input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-dim);
}
.auth-card--register .auth-btn {
    background: var(--teal);
}
.auth-card--register .auth-btn:hover {
    background: var(--teal-hover);
    box-shadow: 0 0 20px var(--teal-glow);
}

.auth-forgot {
    text-align: center;
    margin-top: 16px;
}
.auth-forgot a {
    color: var(--text-dim);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}
.auth-forgot a:hover { color: var(--text-secondary); }

.forgot-panel {
    display: none;
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.verify-note {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 14px;
    line-height: 1.5;
}

.auth-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0 20px;
}

.auth-link {
    display: block;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}
.auth-card--login .auth-link:hover { color: var(--teal); }
.auth-card--register .auth-link:hover { color: var(--amber); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .nav-links a:not(.nav-btn):not(.nav-shop) { display: none; }
    .nav-links { gap: 14px; }
    .nav-logo img { height: 40px; }
}

@media (max-width: 768px) {
    .nav { padding: 0 16px; height: 60px; }
    .nav-logo img { height: 34px; }
    .nav-links { gap: 10px; }
    .nav-links a:not(.nav-btn):not(.nav-shop) { display: none; }
    .nav-shop { font-size: 0.78rem; }
    .nav-btn { padding: 7px 16px; font-size: 0.78rem; }
    .section { padding: 80px 20px; }
    .section-title { font-size: 1.8rem; }
    .section-desc { margin-bottom: 48px; }
}

@media (max-width: 480px) {
    .auth-card { padding: 32px 20px 24px; }
}
