/* Sanctuary of Innocence - Candle Light Theme */

:root {
    --candle-light: #fffcf0;
    --dust-gold: #c5a86d;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-100: #f1f5f9;
    --soft-white: #ffffff;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--candle-light);
    color: var(--slate-700);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    scroll-behavior: smooth;
}

.serif {
    font-family: 'Libre Baskerville', Georgia, serif;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    line-height: 1.3;
}

a {
    color: var(--slate-700);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dust-gold);
}

/* Layout */
.container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--slate-100);
    backdrop-filter: blur(8px);
    background: rgba(255, 252, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    max-width: 72rem;
    margin: 0 auto;
}

.site-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--slate-500);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-tagline {
    font-size: 0.625rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--slate-400);
    font-weight: 500;
}

/* Candle Icon Animation */
.candle-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--slate-400);
    animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 6rem;
    max-width: 48rem;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--slate-700);
    margin-bottom: 2.5rem;
    line-height: 1.4;
}

.manifesto-box {
    border-left: 2px solid var(--dust-gold);
    padding-left: 2rem;
    text-align: left;
    margin: 0 auto 4rem;
    max-width: 42rem;
}

.manifesto-text {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--slate-500);
    line-height: 1.8;
}

/* Search */
.search-container {
    max-width: 28rem;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    background: var(--soft-white);
    border: 1px solid var(--slate-200, #e2e8f0);
    border-radius: 9999px;
    padding: 1rem 2rem;
    font-size: 1rem;
    color: var(--slate-600);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--slate-400);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.no-results {
    display: none;
    text-align: center;
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    color: var(--slate-400);
    padding: 3rem 1rem;
    font-size: 1.125rem;
}

/* Children Grid */
.children-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5rem;
    padding: 2rem 0;
}

@media (min-width: 640px) {
    .children-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .children-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Child Card */
.child-card {
    background: var(--soft-white);
    border: 1px solid rgba(197, 168, 109, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.child-card:hover {
    transform: translateY(-5px);
    border-color: var(--dust-gold);
    box-shadow: 0 30px 60px -12px rgba(197, 168, 109, 0.15);
}

.child-card-image-wrapper {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: var(--slate-100);
}

.child-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(0.9) brightness(1.1);
    transition: filter 0.8s ease;
}

.child-card:hover .child-card-image {
    filter: grayscale(0%) contrast(1) brightness(1);
}

.child-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.child-card:hover .child-card-overlay {
    opacity: 1;
}

.child-card-hover-info {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    color: white;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
}

.child-card:hover .child-card-hover-info {
    opacity: 1;
    transform: translateY(0);
}

.child-card-location {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.child-card-hover-name {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
}

.child-card-content {
    padding: 2rem;
}

.child-card-name {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
    color: var(--slate-700);
    margin: 0 0 0.25rem;
}

.child-card-meta {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--slate-400);
    margin-bottom: 1rem;
}

.child-card-dream {
    font-size: 0.875rem;
    color: var(--slate-500);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.child-card-link {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--slate-300);
    font-style: italic;
    transition: color 0.3s ease;
}

.child-card:hover .child-card-link {
    color: var(--slate-600);
}

/* Child Profile Page */
.profile-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 700;
    color: var(--slate-400);
    margin-bottom: 3rem;
    transition: color 0.3s ease;
}

.profile-back:hover {
    color: var(--slate-700);
}

.profile-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 5rem;
}

@media (min-width: 768px) {
    .profile-header {
        grid-template-columns: 1fr 1fr;
    }
}

.profile-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-weight: 700;
    color: var(--slate-400);
    margin-bottom: 1rem;
}

.profile-name {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    color: var(--slate-700);
    line-height: 1.1;
    margin: 0 0 1rem;
}

.profile-meta {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.25rem;
    color: var(--slate-500);
    font-style: italic;
    margin-bottom: 2rem;
}

.profile-dream-box {
    background: var(--soft-white);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-100);
    font-style: italic;
    color: var(--slate-600);
}

.profile-image-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.profile-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 8px solid var(--soft-white);
}

.profile-image-caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--slate-600);
    text-align: center;
    font-style: italic;
    line-height: 1.5;
}

/* Profile Bio */
.profile-bio {
    max-width: 42rem;
    margin: 0 auto 5rem;
}

.profile-bio-text {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--slate-600);
    line-height: 2;
}

.profile-bio-text img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
}

.profile-bio-text img.float-left,
.profile-bio-text img.float-right {
    shape-outside: margin-box;
}

.profile-bio-text figure {
    margin: 2rem 0;
    text-align: center;
}

.profile-bio-text figure img {
    margin-bottom: 0.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-bio-text figcaption {
    font-size: 0.875rem;
    color: var(--slate-600);
    font-style: italic;
    line-height: 1.5;
    font-family: system-ui, -apple-system, sans-serif;
}

.profile-bio-text::first-letter {
    font-size: 4rem;
    color: var(--slate-300);
    float: left;
    margin-right: 0.75rem;
    margin-top: 0.5rem;
    line-height: 0.8;
}

/* Gallery */
.gallery {
    margin-bottom: 5rem;
}

.gallery-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.875rem;
    text-align: center;
    color: var(--slate-700);
    font-style: italic;
    margin-bottom: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.gallery-img {
    aspect-ratio: 1/1;
    width: 100%;
    object-fit: cover;
    border-radius: 1rem;
    cursor: zoom-in;
    transition: all 0.5s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.gallery-img:hover {
    transform: scale(1.03);
    filter: brightness(1.05);
}

.gallery-caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--slate-600);
    text-align: center;
    font-style: italic;
    line-height: 1.5;
}

/* Profile Footer */
.profile-footer {
    text-align: center;
    padding: 5rem 0;
    border-top: 1px solid var(--slate-100);
}

.profile-remember {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.875rem;
    color: var(--slate-400);
    font-style: italic;
    margin-bottom: 2rem;
}

/* Shared Button Component - iOS flat glass style */
.btn {
    display: inline-block;
    position: relative;
    background: rgba(60, 60, 60, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 14px;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

/* Top highlight that wraps around edges */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 2%,
        black 98%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 2%,
        black 98%,
        transparent 100%
    );
    pointer-events: none;
}

/* Edge highlight that fades to corners */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 3%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.4) 97%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

.btn:hover {
    background: rgba(75, 75, 75, 0.9);
    color: white;
    border-color: rgba(255, 255, 255, 0.12);
}

.btn:active {
    background: rgba(50, 50, 50, 0.95);
    transform: scale(0.98);
}

/* Legacy support - maps old class to new */
.btn-primary {
    display: inline-block;
    position: relative;
    background: rgba(60, 60, 60, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 14px;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 2%,
        black 98%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 2%,
        black 98%,
        transparent 100%
    );
    pointer-events: none;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 3%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.4) 97%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

.btn-primary:hover {
    background: rgba(75, 75, 75, 0.9);
    color: white;
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-primary:active {
    background: rgba(50, 50, 50, 0.95);
    transform: scale(0.98);
}

/* Footer */
.site-footer {
    margin-top: 5rem;
    padding: 6rem 0;
    background: var(--soft-white);
    border-top: 1px solid var(--slate-100);
}

.footer-quote {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
    color: var(--slate-600);
    font-style: italic;
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 2rem;
}

.footer-divider {
    height: 1px;
    width: 5rem;
    background: var(--slate-200, #e2e8f0);
    margin: 0 auto 3rem;
}

.footer-tagline {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--slate-400);
    font-weight: 500;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 0;
}

.footer-nav-link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    color: var(--slate-400);
    transition: color 0.3s ease;
}

.footer-nav-link:hover {
    color: var(--dust-gold);
}

/* Static Pages */
.page-container {
    max-width: 42rem;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.page-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--slate-700);
    margin-bottom: 2rem;
    text-align: center;
}

.page-content {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.125rem;
    color: var(--slate-600);
    line-height: 1.9;
}

.page-content p {
    margin-bottom: 1.5rem;
}

/* Contact Form */
.contact-intro {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.125rem;
    color: var(--slate-600);
    line-height: 1.9;
    margin-bottom: 2rem;
}

.contact-email {
    display: block;
    text-align: center;
    margin: 2rem 0 3rem;
    padding: 1.5rem;
    background: var(--soft-white);
    border-radius: 1rem;
    border: 1px solid var(--slate-100);
}

.contact-email a {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.25rem;
    color: var(--dust-gold);
}

.contact-email a:hover {
    color: var(--slate-700);
}

.contact-form-intro {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.125rem;
    color: var(--slate-600);
    line-height: 1.9;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--slate-100);
}

.contact-form {
    background: var(--soft-white);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-100);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: var(--slate-500);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: var(--dust-gold);
}

.form-input,
.form-textarea {
    width: 100%;
    background: var(--candle-light);
    border: 1px solid var(--slate-200, #e2e8f0);
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--slate-700);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--dust-gold);
    box-shadow: 0 0 0 3px rgba(197, 168, 109, 0.1);
}

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

/* Floating Labels */
.floating-field {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-input {
    width: 100%;
    background: var(--candle-light);
    border: 1px solid var(--slate-200, #e2e8f0);
    border-radius: 0.5rem;
    padding: 1.75rem 1rem 0.5rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--slate-700);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.floating-input:focus {
    outline: none;
    border-color: var(--dust-gold);
    box-shadow: 0 0 0 3px rgba(197, 168, 109, 0.1);
}

.floating-textarea {
    min-height: 150px;
    resize: vertical;
    padding-top: 2rem;
}

.floating-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--slate-500);
    pointer-events: none;
    transition: all 0.2s ease;
    transform-origin: left center;
}

.floating-field:has(.floating-textarea) .floating-label {
    top: 1.25rem;
    transform: translateY(0);
}

/* Float the label when input is focused or has content */
.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
    top: 0.5rem;
    transform: translateY(0) scale(0.75);
    color: var(--dust-gold);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Textarea floating state */
.floating-textarea:focus ~ .floating-label,
.floating-textarea:not(:placeholder-shown) ~ .floating-label {
    top: 0.35rem;
    transform: translateY(0) scale(0.75);
    color: var(--dust-gold);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.floating-label .optional {
    font-weight: 400;
    font-size: 0.875em;
    color: var(--slate-400);
}

.floating-label .required {
    color: var(--dust-gold);
}

/* Photo Upload */
.photo-upload-section {
    margin-bottom: 1.5rem;
}

.photo-upload-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-600);
    margin-bottom: 0.25rem;
}

.photo-upload-help {
    font-size: 0.8125rem;
    color: var(--slate-500);
    margin: 0 0 0.75rem;
}

.photo-upload-fields {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.photo-upload-field {
    position: relative;
}

.photo-upload-field input[type="file"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.photo-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 5.5rem;
    height: 5.5rem;
    background: var(--slate-100);
    border: 2px dashed var(--slate-300);
    border-radius: 0.75rem;
    color: var(--slate-500);
    font-size: 0.6875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-upload-btn:hover {
    border-color: var(--dust-gold);
    color: var(--dust-gold);
    background: rgba(197, 168, 109, 0.05);
}

.photo-preview {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--slate-100);
}

.photo-preview.has-image {
    display: block;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview .remove-photo {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile Appeal */
.profile-appeal {
    background: rgba(197, 168, 109, 0.1);
    border: 1px solid rgba(197, 168, 109, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin: 3rem 0;
}

.profile-appeal-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.25rem;
    color: var(--slate-700);
    margin: 0 0 0.75rem;
}

.profile-appeal-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    color: var(--slate-600);
    margin: 0 0 1.25rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.form-submit {
    display: inline-block;
    position: relative;
    background: rgba(60, 60, 60, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 0.875rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 2%,
        black 98%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 2%,
        black 98%,
        transparent 100%
    );
    pointer-events: none;
}

.form-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 3%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.4) 97%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

.form-submit:hover {
    background: rgba(75, 75, 75, 0.9);
    color: white;
    border-color: rgba(255, 255, 255, 0.12);
}

.form-submit:active {
    background: rgba(50, 50, 50, 0.95);
    transform: scale(0.98);
}

.contact-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

/* Modal */
.modal-page {
    background: transparent;
    min-height: 100vh;
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.switching {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.switching .modal {
    opacity: 0;
}

.modal {
    position: relative;
    background: var(--candle-light);
    border-radius: 1.5rem;
    max-width: 42rem;
    width: 100%;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    padding: 3rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-overlay.active .modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal-header-actions {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-action-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--slate-200, #e2e8f0);
    border-radius: 50%;
    color: var(--slate-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-action-btn:hover {
    background: var(--slate-100);
    color: var(--dust-gold);
    border-color: var(--dust-gold);
}

.modal-header-actions .modal-close {
    position: static;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--slate-200, #e2e8f0);
    border-radius: 50%;
    color: var(--slate-400);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--slate-100);
    color: var(--slate-700);
    border-color: var(--slate-300);
}

.modal-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: var(--slate-700);
    margin: 0 0 1.5rem;
    padding-right: 3rem;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.modal-actions-stacked {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Secondary Button (for Cancel, etc.) - iOS flat glass style */
.btn-secondary {
    background: rgba(240, 240, 240, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--slate-600);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-secondary::before {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0) 100%
    );
}

.btn-secondary::after {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.7) 3%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.7) 97%,
        rgba(255, 255, 255, 0) 100%
    );
}

.btn-secondary:hover {
    background: rgba(250, 250, 250, 0.85);
    color: var(--slate-700);
    border-color: rgba(0, 0, 0, 0.08);
}

.btn-secondary:active {
    background: rgba(230, 230, 230, 0.9);
    transform: scale(0.98);
}

/* Modal form adjustments */
.modal .contact-form {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
}

.modal .contact-intro {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.modal .contact-email {
    margin: 1.5rem 0 2rem;
}

.modal .contact-form-intro {
    font-size: 1rem;
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Animations */
.fade-in {
    animation: fadeIn 1.5s ease-out forwards;
}

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

/* Utilities */
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Float utilities */
.float-left { float: left; }
.float-right { float: right; }
.clear-both { clear: both; }

/* Width utilities */
.w-full { width: 100%; }
.w1\/2 { width: 50%; }
.w1\/3 { width: 33.333%; }
.w2\/3 { width: 66.666%; }
.w1\/4 { width: 25%; }
.w3\/4 { width: 75%; }

/* Margin utilities (1 unit = 0.25rem) */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.m-6 { margin: 1.5rem; }
.m-8 { margin: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.ml-6 { margin-left: 1.5rem; }
.ml-8 { margin-left: 2rem; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.mr-6 { margin-right: 1.5rem; }
.mr-8 { margin-right: 2rem; }

/* Padding utilities */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

/* Border radius */
.rounded { border-radius: 0.5rem; }
.rounded-lg { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Font imports - add to your HTML head */
/*
<link href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
*/

/* Floating Nav Pill */
.nav-pill {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(60, 60, 60, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.15),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.nav-pill::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 20%,
        rgba(255, 255, 255, 0.3) 80%,
        transparent 100%
    );
    border-radius: 9999px;
}

.nav-pill-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: transparent;
    border: none;
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-pill-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
}

.nav-pill-item:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.nav-pill-item svg {
    flex-shrink: 0;
}

.nav-pill-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(60, 60, 60, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.nav-pill-item:hover .nav-pill-tooltip {
    opacity: 1;
}

/* Hide nav pill when modal is open */
body:has(.modal-overlay.active) .nav-pill {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(1rem);
    transition: all 0.2s ease;
}

.nav-pill {
    transition: all 0.2s ease;
}

/* Names Wall */
.names-wall-page {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 6rem;
}

.names-header {
    text-align: center;
    margin-bottom: 3rem;
}

.names-title {
    font-size: 2.5rem;
    color: var(--slate-700);
    margin-bottom: 1rem;
}

.names-subtitle {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.125rem;
    color: var(--slate-500);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.names-search-container {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.names-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: var(--soft-white);
    border: 1px solid var(--slate-200, #e2e8f0);
    border-radius: 9999px;
    color: var(--slate-700);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.names-search-input:focus {
    outline: none;
    border-color: var(--dust-gold);
    box-shadow: 0 0 0 3px rgba(197, 168, 109, 0.1);
}

.names-cta {
    background: rgba(197, 168, 109, 0.1);
    border: 1px solid rgba(197, 168, 109, 0.2);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.names-cta p {
    font-family: 'Libre Baskerville', Georgia, serif;
    margin: 0 0 1rem;
    color: var(--slate-600);
    font-size: 0.9375rem;
}

.names-stats {
    text-align: center;
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-bottom: 1.5rem;
}

.names-wall {
    line-height: 2.2;
    text-align: center;
    color: var(--slate-600);
}

.name-item {
    display: inline;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1rem;
    color: var(--slate-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

.name-item:not(:last-child)::after {
    content: ' · ';
    color: var(--slate-300);
}

.name-item:hover {
    color: var(--dust-gold);
    cursor: pointer;
}

.name-item.hidden {
    display: none;
}

.name-age {
    font-size: 0.75rem;
    color: var(--slate-400);
}

.names-no-results {
    display: none;
    text-align: center;
    color: var(--slate-500);
    font-style: italic;
    padding: 3rem 1rem;
}

.names-no-results.visible {
    display: block;
}
