/* ===========================
   CSS Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2543;
    --accent: #d4a574;
    --accent-dark: #b8935f;
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --success: #38a169;
    --gradient: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-family: var(--font-display);
}

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

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

p {
    margin-bottom: var(--spacing-sm);
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-medium);
    line-height: 1.8;
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-display);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
}

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

.nav-links .nav-cta {
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    padding: 0.625rem 1.5rem;
}

.nav-links .nav-cta:hover {
    background: var(--primary-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(212, 165, 116, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(44, 82, 130, 0.15) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: var(--spacing-md);
}

.hero-title {
    color: white;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-tagline {
    color: var(--accent);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    animation: fadeIn 1s ease-out 1s both;
}

.scroll-indicator {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent);
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0%, 100% { transform: translateY(0); opacity: 0; }
    50% { transform: translateY(10px); opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid white;
}

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

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

/* ===========================
   Section Styles
   =========================== */
section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto var(--spacing-md);
    border-radius: 2px;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
}

/* ===========================
   What Is Section
   =========================== */
.section-what {
    background: var(--bg-white);
}

.content-main {
    max-width: 800px;
    margin: 0 auto;
}

.content-main p {
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: var(--spacing-md);
}

.highlight-box {
    background: var(--bg-light);
    border-left: 4px solid var(--accent);
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg);
    border-radius: var(--radius-md);
}

.highlight-box p {
    margin-bottom: 0.5rem;
}

.highlight-box p:last-child {
    margin-bottom: 0;
}

.highlight-box strong {
    color: var(--primary);
}

/* ===========================
   Who This Is For Section
   =========================== */
.section-who {
    background: var(--bg-light);
}

.who-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.who-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.who-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.who-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-sm);
    color: var(--accent);
}

.who-icon svg {
    width: 100%;
    height: 100%;
}

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

.who-card p {
    color: var(--text-medium);
    margin-bottom: 0;
}

/* ===========================
   Why Apply Section
   =========================== */
.section-why {
    background: var(--bg-white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.benefit-card {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: var(--transition);
}

.benefit-card:hover {
    background: white;
    box-shadow: var(--shadow-md);
}

.benefit-card:hover::before {
    transform: scaleY(1);
}

.benefit-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: var(--spacing-xs);
    font-family: var(--font-display);
}

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

.benefit-card p {
    color: var(--text-medium);
    margin-bottom: 0;
}

/* ===========================
   Process Section
   =========================== */
.section-process {
    background: var(--bg-light);
}

.process-timeline {
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: var(--spacing-lg);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px white, 0 0 0 6px var(--accent);
}

.timeline-content h3 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.timeline-content p {
    color: var(--text-medium);
    margin-bottom: 0;
}

.process-notice {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 2px solid var(--accent);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.process-notice p {
    margin-bottom: 0;
    color: var(--text-dark);
}

/* ===========================
   Retreat Types Section
   =========================== */
.section-types {
    background: var(--bg-white);
}

.types-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
    margin: var(--spacing-lg) auto;
    max-width: 900px;
}

.type-tag {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-xl);
    font-weight: 500;
    transition: var(--transition);
}

.type-tag:hover {
    background: var(--accent);
    transform: scale(1.05);
}

.types-note {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-medium);
    font-style: italic;
    margin-top: var(--spacing-md);
}

/* ===========================
   Requirements Section
   =========================== */
.section-requirements {
    background: var(--bg-light);
}

.requirements-list {
    max-width: 700px;
    margin: 0 auto var(--spacing-md);
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.check-icon {
    width: 30px;
    height: 30px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.requirement-item p {
    margin-bottom: 0;
    color: var(--text-dark);
    font-weight: 500;
}

.requirements-warning {
    text-align: center;
    font-style: italic;
    color: var(--text-medium);
    margin-top: var(--spacing-md);
}

/* ===========================
   Application Form Section
   =========================== */
.section-apply {
    background: var(--bg-white);
}

.application-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.required {
    color: #e53e3e;
}

.optional {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: var(--transition);
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

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

.form-submit {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* ===========================
   Notice Section
   =========================== */
.section-notice {
    background: var(--primary);
    color: white;
    padding: var(--spacing-lg) 0;
}

.notice-box {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.notice-box h3 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.notice-box ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
}

.notice-box li {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    font-weight: 500;
}

/* ===========================
   Final CTA Section
   =========================== */
.section-final-cta {
    background: var(--gradient);
    color: white;
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.section-final-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid2" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid2)"/></svg>');
}

.final-cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.final-cta-content h2 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.final-cta-content p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-brand h3 {
    color: white;
    font-family: var(--font-display);
    margin-bottom: var(--spacing-sm);
}

.footer-links h4,
.footer-contact h4 {
    color: var(--accent);
    margin-bottom: var(--spacing-sm);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero {
        min-height: 80vh;
        padding-top: 100px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .who-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .types-grid {
        justify-content: flex-start;
    }
    
    .application-form {
        padding: var(--spacing-md);
    }
    
    .process-timeline::before {
        left: 10px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
    
    .timeline-marker {
        width: 20px;
        height: 20px;
        box-shadow: 0 0 0 3px white, 0 0 0 5px var(--accent);
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .notice-box ul {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Accessibility
   =========================== */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .navbar,
    .hero-scroll,
    .mobile-menu-toggle,
    .footer {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}
