/* =============================================================================
   RIFID UNIVERSAL STYLESHEET
   Version: 1.0
   Last Updated: January 4, 2026
   Brand: Rifid LLC - Clarity for everyday life
   ============================================================================= */

/* =============================================================================
   CSS RESET & BASE STYLES
   ============================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #2A3330;
    background: #FDFBF7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   RIFID COLOR PALETTE
   ============================================================================= */

:root {
    /* Primary Brand Colors */
    --sage-green: #9FA892;
    --sage-green-light: #A8B5A0;
    --sage-green-dark: #96A892;
    
    /* Neutral Grays */
    --gray-100: #F5F3EF;
    --gray-200: #E8E6E1;
    --gray-300: #D5D8D3;
    --gray-400: #B5BDB8;
    --gray-500: #8A9288;
    --gray-600: #6B7970;
    --gray-700: #4A5450;
    --gray-800: #3D4845;
    --gray-900: #2A3330;
    
    /* Warm Whites */
    --warm-white: #FDFBF7;
    --warm-white-100: #FFFEF9;
    --warm-white-200: #FAF8F4;
    --warm-white-300: #F5F3EF;
    
    /* App-Specific Colors */
    --faith-green: #A8B5A0;
    --clearspend-terracotta: #CDB094;
    --valydedge-blue: #7E94A4;
    --keyshyft-amber: #DECFB3;
    --kraftshyft-plum: #A494A9;
    --locshield-pewter: #94A4A4;
    
    /* Semantic Colors */
    --success: #96A892;
    --warning: #CDB094;
    --error: #B89D7E;
    --info: #7E94A4;
    
    /* Text Colors */
    --text-primary: #2A3330;
    --text-secondary: #3D4845;
    --text-tertiary: #4A5450;
    --text-muted: #6B7970;
    --text-light: #8A9288;
    
    /* Background Colors */
    --bg-primary: #FDFBF7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F5F3EF;
    --bg-overlay: rgba(42, 51, 48, 0.05);
    
    /* Border Colors */
    --border-light: #E8E6E1;
    --border-medium: #D5D8D3;
    --border-dark: #B5BDB8;
    
    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(42, 51, 48, 0.05);
    --shadow-md: 0 4px 6px rgba(42, 51, 48, 0.07);
    --shadow-lg: 0 10px 15px rgba(42, 51, 48, 0.1);
    --shadow-xl: 0 20px 25px rgba(42, 51, 48, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

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

strong, b {
    font-weight: 600;
    color: var(--text-primary);
}

em, i {
    font-style: italic;
}

small {
    font-size: 0.875rem;
    color: var(--text-muted);
}

a {
    color: var(--sage-green);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--sage-green-dark);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--sage-green);
    outline-offset: 2px;
}

/* =============================================================================
   LAYOUT COMPONENTS
   ============================================================================= */

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

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-sm {
    padding: var(--space-xl) 0;
}

.section-lg {
    padding: var(--space-3xl) 0;
}

/* =============================================================================
   HEADER & NAVIGATION
   ============================================================================= */

.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(253, 251, 247, 0.95);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-logo:hover {
    text-decoration: none;
    color: var(--sage-green);
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-base);
}

.nav-link:hover {
    color: var(--sage-green);
    text-decoration: none;
}

/* =============================================================================
   HERO SECTIONS
   ============================================================================= */

.hero {
    text-align: center;
    padding: var(--space-3xl) var(--space-md);
    background: var(--bg-primary);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--text-tertiary);
    margin-bottom: var(--space-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    line-height: 1;
}

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

.btn-primary:hover {
    background: var(--sage-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: white;
}

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

.btn-secondary:hover {
    border-color: var(--sage-green);
    color: var(--sage-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--sage-green);
    box-shadow: 0 0 0 3px rgba(159, 168, 146, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Email Signup Form */
.email-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: var(--space-sm);
}

.email-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-secondary);
}

.email-input:focus {
    outline: none;
    border-color: var(--sage-green);
    box-shadow: 0 0 0 3px rgba(159, 168, 146, 0.1);
}

/* =============================================================================
   CARDS
   ============================================================================= */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

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

/* =============================================================================
   GRID SYSTEMS
   ============================================================================= */

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
    background: var(--gray-100);
    padding: var(--space-xl) 0;
    margin-top: var(--space-3xl);
    border-top: 1px solid var(--border-light);
}

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

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

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

.footer-link:hover {
    color: var(--sage-green);
}

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

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

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

.text-primary {
    color: var(--sage-green);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .nav-menu {
        gap: var(--space-md);
    }
    
    .email-form {
        flex-direction: column;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .section {
        padding: var(--space-xl) 0;
    }
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--sage-green);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: var(--space-sm) var(--space-md);
    background: var(--sage-green);
    color: white;
    text-decoration: none;
}

.skip-to-main:focus {
    left: 0;
    top: 0;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .footer,
    .btn,
    .email-form {
        display: none;
    }
}
