:root {
    --black: #000000;
    --parchment-glow: rgba(244, 241, 222, 0.9);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --soft-gold: #EAE3D9;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--black);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Starfield and Grain Overlay */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

/* Main Container */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 0;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 10vw, 9rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--parchment-glow);
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.hero h1 span {
    display: block;
}

.hero h1 .death-support {
    font-weight: 700; /* Bolder weight */
    position: relative;
}

.galaxy-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%; /* Adjust as needed */
    opacity: 0.7;
    mix-blend-mode: screen;
    z-index: -1;
}

.hero p {
    font-size: clamp(2.5rem, 5vw, 3rem);
    color: var(--text-secondary);
    max-width: 40ch;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.hero .subheading-1 {
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.hero .subheading-2 {
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.doula-project-line {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Bento Grid for Pillars */
.stewardship-pillars {
    padding: 100px 0;
}

.stewardship-pillars > h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 3rem;
    text-align: center;
}

.sign-in-the-stars {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    min-height: calc(100vh + 100px);
    justify-content: center;
    text-align: center; /* Center text for children */
}

/* New styles for the legacy text container */
.legacy-text-container {
    max-width: 800px;
    width: 90%;
    animation: fadeInUp 1.5s ease-out forwards;
    opacity: 0;
}

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

.legacy-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 1.5px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 0 25px rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.legacy-subheading {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    opacity: 0.8;
    line-height: 1.6;
    color: var(--soft-gold);
}

.legacy-subheading a {
    font-size: 18px;
    color: var(--soft-gold);
    font-weight: bold;
}

.star-heart-svg {
    width: 52.5vw;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%; /* Centered */
    transform: translate(-50%, -50%); /* Centered */
    z-index: -1;
    opacity: 0.3; /* Softened */
}

#mamaandbabyhearts .star-heart-path {
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 0.0025pt;
    fill: transparent;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.005)); /* Adds a subtle glow */
    animation: draw-heart 8s cubic-bezier(0.65, 0, 0.35, 1) forwards, fill-heart 4s 8s forwards;
}

@keyframes fill-heart {
    from {
        fill: transparent;
    }
    to {
        fill: rgba(0, 0, 0, 0.5); /* Softer fill */
    }
}

@keyframes draw-heart {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0;
    }
    30% {
        stroke-dashoffset: 700;
        opacity: 1;
    }
    70% {
        stroke-dashoffset: 300;
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.7;
    }
}

.mama-baby-hearts-img {
    width: 150px;
    opacity: 0;
    animation: fade-in 2s ease-in-out 4s forwards;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.pillar-card {
    background: var(--card-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--card-border);
    border-radius: 60px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100px; /* Fixed height for all cards */
}

.pillar-card h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.pillar-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Grid Layout */
.pillar-a { grid-column: span 1; }
.pillar-b { grid-column: span 1; }
.pillar-c { grid-column: span 1; }

/* Contact Section */
.contact-section {
    padding: 120px 0;
    text-align: center;
    position: relative;
    z-index: 2;
}

.contact-section .legacy-text-container {
    margin-top: 2rem;
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Contact Text */
.contact-text {
    font-size: 22px;
    text-align: left;
    max-width: 60ch;
    margin: 1rem auto;
}

.contact-text a {
    font-size: 22px;
}

/* Footer */
.site-footer {
    padding: 60px 0;
    text-align: center;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1rem;
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

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

.submit-btn {
    background-color: var(--text-primary);
    color: var(--black);
    border: none;
    border-radius: 100px;
    padding: 1.2rem 2rem;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: scale(1.05);
}

.footer-links {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Service Feature Section */
.service-feature {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 2rem;
    min-height: 40vh;
    visibility: visible;
}

.service-container {
    width: 100%;
    max-width: 1200px;
}

.text-arc-svg {
    width: 100%;
    overflow: visible;
}

.service-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 28px; /* Adjust font size for optimal wrapping */
    fill: #F4F1EA;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-container:hover .service-text {
    fill: #fff;
    text-shadow: 0 0 15px rgba(244, 241, 234, 0.7);
}

#arc {
    transition: d 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.text-arc-svg .line2 {
    display: none;
}

#ghost-signup-container {
    height: 40vmin;
    min-height: 360px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
}

#ghost-signup-form {
    height: 40vmin;
    min-height: 360px;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .pillar-a, .pillar-b, .pillar-c {
        grid-column: span 12;
    }
    .pillar-card {
        border-radius: 40px;
        padding: 2rem;
    }
    .service-text {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 2rem 0;
    }
    .hero h1 {
        mix-blend-mode: normal; /* More readable on mobile */
        white-space: normal; /* Allow wrapping on smaller screens */
        font-size: clamp(3rem, 20vw, 5rem);
    }
    .hero p {
        white-space: normal;
        max-width: 80%;
    }
    .service-text {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 0 1rem;
    }
    .pillar-card {
        border-radius: 30px;
        padding: 1.5rem;
    }
    .pillar-card h2 {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }
    .contact-footer {
        padding: 4rem 0;
    }
    .service-text {
        font-size: 18px;
    }
}

main.content-shield {
    flex-grow: 1;
}

.copyright {
    margin-top: 2rem;
    width: 100%;
    text-align: center;
}
