/* ==========================================================================
   FOREVER LINK | GLOBAL DESIGN SYSTEM (global.css)
   ========================================================================== */

/* --- 1. THE MASTER TOKEN LIBRARY (60-30-10 Rule) --- */
:root {
    /* Global Foundation (60%) */
    --global-bg: #FAFAFA; 
    --global-text: #091413; 
    
    /* Brand & Action Theme (10%) */
    --brand-primary: #F63049;
    --brand-hover: #EB4C4C;
    --brand-soft: #FF7070;
    
    /* Product Theme (Storefront) */
    --product-surface: #B0E4CC;
    --product-interactive: #408A71;
    --product-heading: #091413;
    
    /* Trust & Corporate Theme (Footer/Ecosystem) */
    --corp-surface: #DDE6ED;
    --corp-border: #9DB2BF;
    --corp-icon: #526D82;
    --corp-heading: #27374D;

    /* Ecosystem Program Accents */
    --creator-accent: #E8637A;
    --creator-badge-bg: #FFF0F2;
    --developer-accent: #7C6EF5;
    --developer-badge-bg: #F0EEFF;
    
    /* Global Utilities & Shadows */
    --glass-bg: rgba(250, 250, 250, 0.75);
    --glass-blur: blur(16px);
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --shadow-volumetric: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.12));
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.03);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-snappy: 0.4s cubic-bezier(0.25, 1, 0.25, 1);
}

/* --- 2. GLOBAL RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { background-color: var(--global-bg); color: var(--global-text); font-family: var(--font-sans); overflow-x: hidden; line-height: 1.6; transition: background-color 0.4s ease, color 0.4s ease; }
button:focus, a:focus, input:focus { outline: none; }

/* Global Brand Elements */
.red-dot { display: inline-block; width: 6px; height: 6px; background-color: var(--brand-primary); border-radius: 50%; }

/* --- 3. GLOBAL UI COMPONENTS (Inputs & Buttons) --- */
.premium-input { width: 100%; padding: 15px 20px; background: #FFF; border: 1px solid transparent; border-radius: 8px; font-family: var(--font-sans); font-size: 0.95rem; color: var(--global-text); outline: none; transition: all var(--ease-snappy); }
.premium-input:focus { border-color: var(--corp-border); box-shadow: 0 10px 20px rgba(39, 55, 77, 0.05); }
.btn-submit { width: 100%; padding: 16px; background: var(--corp-heading); color: #FFF; border: none; border-radius: 8px; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer; transition: background var(--ease-snappy); }
.btn-submit:hover { background: #1A2533; }

/* --- 4. GLOBAL NAVIGATION SYSTEMS --- */
/* A. The Homepage Glass Header */
.glass-header { position: sticky; top: 0; z-index: 1005; background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); padding: 15px 5%; }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.header-actions { display: flex; gap: 15px; align-items: center; }
.header-actions button { background: none; border: none; color: var(--global-text); font-size: 1.2rem; cursor: pointer; }

/* B. The Storefront Solid Nav */
.gallery-nav.solid-nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 1005; height: 60px; display: flex; justify-content: space-between; align-items: center; padding: 0 5%; background-color: var(--global-bg); border-bottom: 1px solid rgba(0,0,0,0.06); }
.nav-icon { color: var(--global-text); font-size: 1.4rem; cursor: pointer; background: none; border: none; text-decoration: none; display: flex; align-items: center; }
.nav-brand-compact { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; display: flex; align-items: baseline; gap: 4px; }

/* C. The Universal Apple-Style Hamburger */
.apple-burger { width: 24px; height: 24px; background: none; border: none; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 5px; position: relative; z-index: 1006; }
.apple-burger .line { width: 100%; height: 1.5px; background-color: var(--global-text); border-radius: 2px; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease; }
.apple-burger.active .top-line { transform: translateY(3.25px) rotate(45deg); }
.apple-burger.active .bottom-line { transform: translateY(-3.25px) rotate(-45deg); }

/* --- 5. GLOBAL SIDEBAR (Apple UX Dropdown) --- */
body.nav-open { overflow: hidden; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(250, 250, 250, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.sidebar-backdrop.active { opacity: 1; visibility: visible; }
.apple-sidebar { position: fixed; inset: 0; background: rgba(250, 250, 250, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 1000; padding: 100px 10% 40px; transform: translateY(-100%); transition: transform 0.6s cubic-bezier(0.25, 1, 0.25, 1); overflow-y: auto; }
.apple-sidebar.active { transform: translateY(0); }
.sidebar-links { display: flex; flex-direction: column; gap: 30px; font-size: 1.5rem; font-weight: 600; }
.sidebar-links a { color: var(--global-text); text-decoration: none; transition: color 0.3s ease; }
.sidebar-links a:hover, .accordion-trigger:hover { color: var(--brand-primary); }

.stagger-item { opacity: 0; transform: translateY(40px); transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.apple-sidebar.active .stagger-item:nth-child(1) { transition-delay: 0.10s; opacity: 1; transform: translateY(0); }
.apple-sidebar.active .stagger-item:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.apple-sidebar.active .stagger-item:nth-child(3) { transition-delay: 0.20s; opacity: 1; transform: translateY(0); }
.apple-sidebar.active .stagger-item:nth-child(4) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }

.accordion-trigger { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: none; font-size: 1.5rem; font-weight: 600; font-family: var(--font-sans); color: var(--global-text); cursor: pointer; text-align: left; padding: 0; }
.chevron-icon { font-size: 1.2rem; color: var(--corp-icon); transition: transform 0.3s ease; }
.accordion-trigger.open .chevron-icon { transform: rotate(-180deg); }
.sidebar-group { display: flex; flex-direction: column; gap: 15px; padding-left: 20px; margin-top: 0; max-height: 0; overflow: hidden; opacity: 0; transition: all 0.4s cubic-bezier(0.25, 1, 0.3, 1); }
.sidebar-group.open { max-height: 150px; opacity: 1; margin-top: 25px; }
.sub-link { font-size: 1.1rem; color: var(--corp-icon) !important; font-weight: 500; }
.sub-link:hover { color: var(--brand-primary) !important; }

/* --- 6. GLOBAL PREMIUM FOOTER --- */
.premium-footer { background-color: var(--corp-surface); padding: 100px 5% 40px; position: relative; border-top: 1px solid var(--corp-border); }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: 60px; padding-bottom: 80px; border-bottom: 1px solid rgba(157, 178, 191, 0.3); }
.footer-col-anchor { display: flex; flex-direction: column; gap: 20px; }
.footer-logo { font-family: var(--font-serif); font-weight: 600; color: var(--corp-heading); font-size: 2.2rem; display: flex; align-items: center; gap: 6px; letter-spacing: -0.02em; }
.footer-logo::after { content: ''; display: block; width: 6px; height: 6px; background-color: var(--brand-primary); border-radius: 50%; margin-top: 10px; }

/* The Global Typewriter Text */
.typewriter-text { color: var(--corp-icon); font-size: 1rem; line-height: 1.7; max-width: 320px; min-height: 80px; }
.typewriter-text.is-typing::after { content: '|'; color: var(--corp-heading); margin-left: 4px; animation: cursor-blink 0.8s step-end infinite; }
.typewriter-text.typing-done::after { content: '|'; color: var(--corp-icon); margin-left: 4px; animation: cursor-fade 2s ease forwards; }
@keyframes cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes cursor-fade { 0% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* Footer Inputs & Contact Drawer */
.footer-col-input { display: flex; flex-direction: column; }
.footer-heading { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--corp-icon); margin-bottom: 30px; font-weight: 700; }
.drawer-trigger-wrap { padding: 30px 0; border-top: 1px solid var(--corp-border); border-bottom: 1px solid var(--corp-border); }
.drawer-message { font-family: var(--font-serif); font-size: 1.8rem; color: var(--corp-heading); margin-bottom: 20px; line-height: 1.2; }
.btn-morph { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; background: transparent; border: 1px solid var(--corp-border); border-radius: 100px; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--corp-heading); cursor: pointer; transition: all var(--ease-snappy); }
.btn-morph:hover, .btn-morph.active { background: var(--corp-heading); color: #FFF; border-color: var(--corp-heading); }
.btn-morph i { transition: transform var(--ease-snappy); }
.btn-morph:hover i, .btn-morph.active i { transform: translateX(4px); }
.contact-drawer { max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-10px); transition: all 0.7s cubic-bezier(0.25, 1, 0.25, 1); will-change: max-height, opacity, transform; }
.contact-drawer.open { max-height: 500px; opacity: 1; transform: translateY(0); margin-top: 30px; }
.input-group { display: flex; gap: 20px; margin-bottom: 20px; }
textarea.premium-input { resize: none; height: 100px; margin-bottom: 20px; }

/* Footer Directory & Socials */
.footer-col-directory { display: flex; flex-direction: column; align-items: flex-end; }
.nav-links { display: flex; flex-direction: column; align-items: flex-end; gap: 15px; margin-bottom: 50px; }
.nav-link { font-family: var(--font-sans); font-size: 1rem; color: var(--corp-icon); text-decoration: none; transition: all var(--ease-snappy); }
.nav-link:hover { color: var(--corp-heading); transform: translateX(-5px); }
.social-suite { display: flex; gap: 15px; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #FFF; color: var(--corp-icon); font-size: 1.2rem; text-decoration: none; transition: all var(--ease-snappy); border: 1px solid transparent; }
.social-icon:hover { background: var(--corp-heading); color: #FFF; transform: translateY(-4px); box-shadow: 0 10px 20px rgba(39, 55, 77, 0.1); border-color: var(--corp-heading); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 30px; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--corp-icon); }

/* Footer Responsive Overrides */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-col-directory { align-items: flex-start; grid-column: span 2; flex-direction: row; justify-content: space-between; border-top: 1px solid var(--corp-border); padding-top: 40px; }
    .nav-links { align-items: flex-start; margin-bottom: 0; }
    .nav-link:hover { transform: translateX(5px); }
}
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 50px; }
    .footer-col-directory { grid-column: span 1; flex-direction: column-reverse; gap: 40px; }
    .input-group { flex-direction: column; gap: 10px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
}