/* ===== SHARED STYLESHEET ===== */
/* Common styles for index.html, create_project_2.html, project-created.html */

/* ===== ROOT VARIABLES ===== */
:root {
   /* Warm theme colors */
   --warm-black: #1a1613;
   --deep-brown: #2c2420;
   --warm-cream: #f8f3ed;
   --soft-cream: #faf7f2;
   --gold: #d4a24c;
   --gold-light: #e8be6a;
   --gold-dark: #b07d2f;
   --text-primary: #1e1814;
   --text-secondary: #4a3f36;
   --text-light: #7a6e62;
   --border-soft: #e2d6c8;
   --accent-rose: #d4776a;
   --bg-warm: #f3ebe0;

   /* Semantic colors */
   --color-error: #E74C3C;
   --color-error-light: #FADBD8;
   --color-success: #27AE60;
   --color-success-light: #D5F5E3;
   --color-warning: #F39C12;
   --color-warning-light: #FCF3CF;
   --color-info: #3498DB;
   --color-info-light: #D6EAF8;
   --color-accent: #A8C5A0;

   /* Typography */
   --font-size-xs: clamp(0.75rem, 1.5vw, 0.875rem);
   --font-size-sm: clamp(0.875rem, 1.8vw, 1rem);
   --font-size-base: clamp(1rem, 2vw, 1.125rem);
   --font-size-md: clamp(1.125rem, 2.2vw, 1.25rem);
   --font-size-lg: clamp(1.25rem, 2.5vw, 1.5rem);
   --font-size-xl: clamp(1.5rem, 3vw, 2rem);
   --font-size-2xl: clamp(2rem, 4vw, 3rem);
   --font-size-3xl: clamp(2.5rem, 5vw, 4rem);
   --font-size-2xs: 0.7rem;

   --line-height-tight: 1.2;
   --line-height-normal: 1.5;
   --line-height-relaxed: 1.8;

   --font-weight-light: 300;
   --font-weight-normal: 400;
   --font-weight-medium: 500;
   --font-weight-semibold: 600;
   --font-weight-bold: 700;

   /* Spacing */
   --space-3xs: 0.25rem;
   --space-2xs: 0.375rem;
   --space-xs: 0.5rem;
   --space-sm: 1rem;
   --space-md: 1.5rem;
   --space-lg: 2rem;
   --space-xl: 3rem;
   --space-2xl: 4rem;
   --space-3xl: 6rem;

   /* Borders & Radius */
   --radius-sm: 4px;
   --radius-md: 8px;
   --radius-lg: 12px;
   --radius-xl: 20px;
   --radius-2xl: 30px;
   --radius-circle: 50%;
   --border-width: 1px;
   --border-width-thick: 2px;

   /* Transitions */
   --transition-fast: 150ms ease;
   --transition-base: 300ms ease;
   --transition-slow: 500ms ease;
   --transition-bounce: 300ms cubic-bezier(0.4, 0, 0.2, 1);
   --animation-duration: 0.3s;
   --animation-duration-slow: 0.8s;

   /* Z-index scale */
   --z-dropdown: 100;
   --z-sticky: 200;
   --z-fixed: 500;
   --z-modal-backdrop: 900;
   --z-modal: 1000;
   --z-popover: 1100;
   --z-tooltip: 1200;

   /* Container widths */
   --container-sm: 640px;
   --container-md: 768px;
   --container-lg: 1024px;
   --container-xl: 1200px;
   --container-2xl: 1400px;

   /* Focus styles */
   --focus-ring-color: var(--gold);
   --focus-ring-width: 3px;
   --focus-ring-offset: 2px;

   /* Touch targets */
   --touch-target-min: 44px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-primary);
    background: var(--soft-cream);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--warm-black);
    color: var(--warm-cream);
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}
.skip-link:focus {
    top: 0;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ===== NAV ===== */
nav#nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 1.25rem 2rem;
    display: flex; align-items: center; gap: 1.5rem;
    background: rgba(248,243,237,0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(184,149,106,0.12);
    transition: all 0.4s ease;
}
nav#nav.scrolled {
    padding: 0.8rem 2rem;
    box-shadow: 0 2px 30px rgba(44,36,32,0.06);
}
.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem; font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex: 1;
    white-space: nowrap;
}
.nav-logo span { color: var(--gold); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: var(--gold-dark);
}
.nav-cta {
    font-size: 0.85rem; font-weight: 500;
    padding: 0.65rem 1.5rem;
    background: var(--warm-black);
    color: var(--warm-cream);
    border: none; border-radius: 100px;
    cursor: pointer; text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}
.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex: 1;
}
.nav-cta:hover { background: var(--gold-dark); transform: translateY(-1px); }
.nav-mobile-cta { display: none; }

/* ===== NAV CART ===== */
.nav-cart-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--warm-black);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.nav-cart-btn:hover { color: var(--gold); }
.nav-cart-badge {
    position: absolute;
    top: 2px;
    right: 0;
    background: var(--gold);
    color: var(--warm-black);
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ===== HAMBURGER ===== */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
}
.nav-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.2rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--warm-black);
    color: var(--warm-cream);
}

@media (hover: hover) {
    .btn-primary:hover {
        background: var(--gold-dark);
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(150,116,77,0.25);
    }

    .btn-secondary:hover {
        background: var(--warm-black, #2C3E50);
        color: var(--warm-cream, #FDFBF7);
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    }
}

.btn-secondary {
    background: transparent;
    color: var(--warm-black, #2C3E50);
    border: 1.5px solid var(--warm-black, #2C3E50);
}

/* ===== SECTION LABEL ===== */
.section-label {
    font-size: 0.78rem; font-weight: 500;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
footer {
    padding: 2.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-soft);
    font-size: 0.8rem;
    color: var(--text-light);
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.footer-links a {
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--gold-dark); }

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1; transform: translateY(0);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes btn-shake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-4px); }
    30%, 70% { transform: translateX(4px); }
}
.btn-shake {
    animation: btn-shake 0.6s ease-in-out;
}

/* ===== DESKTOP NAV ===== */
@media (min-width: 901px) {
    .nav-right { justify-content: flex-start; }
}

/* ===== RESPONSIVE NAV ===== */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .nav-hamburger { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: rgba(248,243,237,0.98);
        backdrop-filter: blur(20px);
        padding: 1.5rem 2rem;
        gap: 1rem;
        box-shadow: 0 8px 30px rgba(44,36,32,0.08);
        border-bottom: 1px solid var(--border-soft);
        animation: slideDown 0.3s ease;
    }
    .nav-links.open .nav-link { font-size: 1rem; padding: 0.5rem 0; }
    .nav-links.open .nav-mobile-cta {
        display: block;
        background: var(--warm-black);
        color: var(--warm-cream);
        text-align: center;
        padding: 0.85rem 1.5rem;
        border-radius: 100px;
        font-weight: 500;
        margin-top: 0.5rem;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .fade-in { opacity: 1; transform: none; }
}
