/* --- Base & Variables --- */
:root {
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --color-text: #1d1d1f; /* Near black */
    --color-background: #ffffff;
    --color-background-alt: #f5f5f7; /* Light grey */
    --color-accent: #007aff; /* Apple blue */
    --color-border: #d2d2d7;
    --border-radius: 12px; /* Softer rounded corners */
    --section-padding: 100px 40px;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-background);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Layout Helpers --- */
.section {
    padding: var(--section-padding);
    overflow: hidden; /* Important for containing slide-in animations */
}
.content-container {
    max-width: 980px; /* Common Apple content width */
    margin: 0 auto;
    padding: 0 20px;
}
.text-center { text-align: center; }
.split-layout { display: flex; align-items: center; gap: 40px; /* Flexbox for side-by-side */}
@media (max-width: 768px) { .split-layout { flex-direction: column; } }


/* --- Typography --- */
h1, h2, h3 { font-weight: 600; /* Semibold */ line-height: 1.2; margin-bottom: 0.5em; }
.hero-headline { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.02em; font-weight: 700; }
.hero-subheadline { font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: rgba(0, 0, 0, 0.7); margin-bottom: 2em; }
.section-headline { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; }
.section-headline-small { font-size: clamp(1.5rem, 4vw, 2.5rem); }

/* --- Buttons --- */
.button {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    margin: 5px;
}
.button-primary { background-color: var(--color-accent); color: #fff; }
.button-primary:hover { background-color: darken(var(--color-accent), 10%); transform: scale(1.03); }
.button-secondary { background-color: var(--color-background-alt); color: var(--color-accent); border: 1px solid var(--color-border); }
.button-secondary:hover { background-color: darken(var(--color-background-alt), 5%); }
.button-preset { /* Style for donation amounts */ background-color: var(--color-background-alt); color: var(--color-text); border: 1px solid var(--color-border); }
.button-preset:hover, .button-preset:focus { border-color: var(--color-accent); color: var(--color-accent); }
.button-outline { background-color: transparent; color: var(--color-accent); border: 1px solid var(--color-accent); }
.button-outline:hover { background-color: rgba(0, 122, 255, 0.1); }

/* --- Section Specific Styles --- */
.hero-section { height: 100vh; display: flex; flex-direction: column; justify-content: center; background-color: var(--color-background-alt); /* Fallback */}
.hero-background { /* Position background image/video absolutely */ }
.scroll-indicator { margin-top: 40px; font-size: 1.5rem; animation: bounce 2s infinite; }

.need-section { background-color: var(--color-background-alt); }
.need-section img { max-width: 100%; border-radius: var(--border-radius); }

.solution-section { /* ... */ }
.solution-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 40px; }
.solution-item img { width: 100%; height: 180px; object-fit: cover; border-radius: var(--border-radius); margin-bottom: 15px; }

.donate-section { background-color: var(--color-background-alt); }
.donation-options { margin: 40px 0; }
.secure-note { font-size: 0.9rem; color: rgba(0, 0, 0, 0.6); margin-top: 20px; }

/* --- Base Animation States (Hidden) --- */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: var(--animation-delay, 0s); /* Use custom property for staggered effects */
}
.fade-in { transform: translateY(20px); }
.slide-in-left { transform: translateX(-50px); }
.slide-in-right { transform: translateX(50px); }
.fade-in-up { transform: translateY(40px); }

/* --- Active Animation States (Visible) --- */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Simple Keyframe Animations --- */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}
/* --- Crypto Donation Specific Styles --- */
.crypto-donation-options {
    display: grid;
    grid-template-columns: 1fr; /* Start single column */
    gap: 40px;
    margin: 60px auto;
    max-width: 700px; /* Constrain width slightly more */
}

/* Make two columns on wider screens */
@media (min-width: 768px) {
    .crypto-donation-options {
        grid-template-columns: 1fr 1fr;
    }
}

.crypto-wallet {
    background-color: var(--color-background-alt);
    border-radius: var(--border-radius);
    padding: 25px;
    border: 1px solid var(--color-border);
    text-align: left;
}

.crypto-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    display: flex; /* For aligning network tag */
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.network-tag {
    background-color: var(--color-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
}


.wallet-info {
    display: flex;
    flex-direction: column; /* Stack QR and details */
    align-items: center; /* Center items vertically */
    gap: 20px;
    text-align: center;
}

.qr-code img {
    display: block;
    max-width: 160px; /* Adjust size as needed */
    height: auto;
    margin: 0 auto 15px auto; /* Center QR code */
    background-color: white; /* Ensure white background for QR */
    padding: 10px; /* Padding around QR */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.address-details {
    width: 100%;
}

.wallet-label {
    font-size: 0.9rem;
    color: #6e6e73; /* Apple's secondary text color */
    margin-bottom: 5px;
}

.wallet-address {
    font-family: 'Menlo', 'Courier New', Courier, monospace; /* Monospace for addresses */
    font-size: 0.95rem;
    word-wrap: break-word; /* Allow long addresses to wrap */
    background-color: #fff; /* White background for contrast */
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    margin-bottom: 15px;
    line-height: 1.4;
}

.button-copy {
    background-color: #e8e8ed; /* Lighter grey */
    color: var(--color-text);
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.button-copy:hover {
    background-color: #dcdce1;
}
/* Style for 'Copied!' state */
.button-copy.copied {
    background-color: #c8e6c9; /* Light green feedback */
    color: #255d28;
}


.wallet-warning {
    font-size: 0.85rem;
    color: #bf0d1f; /* A warning red */
    background-color: rgba(255, 0, 0, 0.05); /* Very subtle red background */
    border: 1px solid rgba(255, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px;
    line-height: 1.4;
}

.wallet-warning strong {
     color: #9c0a18;
}

/* --- Minor Button Adjustments --- */
.button-primary { /* Make main Donate Crypto button obvious */
     /* Keep existing styles */
}

/* --- Crypto URL Generator Styles --- */
.crypto-generator {
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 40px;
    max-width: 600px; /* Limit width */
    margin-left: auto;
    margin-right: auto;
}

.generator-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--color-text);
}

.generator-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.form-group {
    width: 100%;
    max-width: 350px; /* Limit width of inputs */
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: #555;
}

.form-group select,
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box; /* Include padding and border in element's total width/height */
}

.preset-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 5px;
    margin-bottom: 15px;
}

#generate-payment-btn {
    margin-top: 10px;
    padding: 12px 30px;
}

/* --- Output Area Styles --- */
.payment-output-area {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--color-border);
    display: flex; /* Use flexbox for centering */
    flex-direction: column;
    align-items: center; /* Center items horizontally */
    gap: 15px; /* Space between elements */
}

.payment-output-area h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.qr-code-container {
    background-color: white; /* Ensure white background for QR */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 10px;
    max-width: 200px; /* Control QR max size */
    /* QR code library will add img or canvas here */
}

#payment-link {
    font-weight: 500;
}

.address-display {
    font-family: 'Menlo', 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #6e6e73;
    word-wrap: break-word;
    max-width: 100%;
}

#payment-warning {
    font-size: 0.9rem;
    /* Uses existing wallet-warning styles */
    margin-top: 5px;
    max-width: 450px; /* Constrain warning width */
}


/* --- Optional Static Address Header --- */
.static-address-header {
    margin-top: 60px;
    font-size: 1.3rem;
    color: #6e6e73;
    font-weight: 500;
}