/* ==========================================================================
   FFT Memory Wall — Front-end Styles
   Cork board, polaroid cards, pushpins, form, responsive
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --fft-cork: #b8885c;
    --fft-cork-dark: #9a6d3a;
    --fft-wood: #5c3a1e;
    --fft-paper: #faf6f0;
    --fft-paper-shadow: rgba(0, 0, 0, 0.25);
    --fft-green-btn: #2d5a27;
    --fft-green-btn-hover: #3a7332;
    --fft-text: #333;
    --fft-text-light: #666;
    --fft-pin-red: #c0392b;
    --fft-pin-blue: #2980b9;
    --fft-pin-green: #27ae60;
    --fft-pin-yellow: #d4a017;
}

/* ---------- Cork Board Container ---------- */
.fft-memory-wall,
.fft-form-wrap {
    background:
        /* Cork texture fallback: subtle noise effect via gradient layering */
        repeating-conic-gradient(rgba(0,0,0,0.03) 0% 25%, transparent 0% 50%) 0 0 / 4px 4px,
        radial-gradient(ellipse at 20% 50%, #c49a6c 0%, #b8885c 40%, #a67844 80%, #9a6d3a 100%);
    padding: 40px 20px;
    min-height: 60vh;
    position: relative;
    box-sizing: border-box;
}

/* ---------- String Lights ---------- */
.fft-wall-lights {
    position: relative;
    height: 30px;
    margin: 0 -10px 20px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 60px,
        rgba(255, 200, 50, 0.0) 60px
    );
    overflow: visible;
}

.fft-wall-lights--bottom {
    margin: 20px -10px 0;
}

.fft-wall-lights::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #555 0%, #777 50%, #555 100%);
    border-radius: 1px;
}

.fft-wall-lights::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle 6px at 40px 50%, rgba(255, 180, 50, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 120px 50%, rgba(255, 80, 80, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 200px 50%, rgba(80, 255, 80, 0.6) 0%, transparent 100%),
        radial-gradient(circle 6px at 280px 50%, rgba(255, 180, 50, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 360px 50%, rgba(80, 180, 255, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 440px 50%, rgba(255, 80, 80, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 520px 50%, rgba(80, 255, 80, 0.6) 0%, transparent 100%),
        radial-gradient(circle 6px at 600px 50%, rgba(255, 180, 50, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 680px 50%, rgba(80, 180, 255, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 760px 50%, rgba(255, 80, 80, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 840px 50%, rgba(80, 255, 80, 0.6) 0%, transparent 100%),
        radial-gradient(circle 6px at 920px 50%, rgba(255, 180, 50, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 1000px 50%, rgba(80, 180, 255, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 1080px 50%, rgba(255, 80, 80, 0.7) 0%, transparent 100%),
        radial-gradient(circle 6px at 1160px 50%, rgba(80, 255, 80, 0.6) 0%, transparent 100%),
        radial-gradient(circle 6px at 1240px 50%, rgba(255, 180, 50, 0.7) 0%, transparent 100%);
    pointer-events: none;
}

/* ---------- Wall Header ---------- */
.fft-wall-header {
    background: var(--fft-paper);
    max-width: 700px;
    margin: 0 auto 30px;
    padding: 20px 30px;
    text-align: center;
    position: relative;
    box-shadow: 2px 3px 8px var(--fft-paper-shadow);
    border-bottom: 3px solid #d4c5b0;
}

.fft-wall-header::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 30px;
    width: 16px;
    height: 16px;
    background: var(--fft-pin-red);
    border-radius: 50%;
    box-shadow: 1px 2px 3px rgba(0,0,0,0.3), inset -2px -2px 3px rgba(0,0,0,0.2);
}

.fft-wall-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--fft-text);
    margin: 0;
    line-height: 1.2;
}

/* ---------- Wall Intro (in-grid CTA card, 2-col wide) ---------- */
.fft-wall-intro {
    background: var(--fft-paper);
    width: 575px; /* 2 cards (270×2) + 1 gap (35) */
    padding: 30px 30px;
    text-align: center;
    box-shadow: 2px 3px 8px var(--fft-paper-shadow);
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fft-wall-intro p {
    font-size: 0.95rem;
    color: var(--fft-text);
    line-height: 1.6;
    margin: 0 0 15px;
}

.fft-wall-contact {
    font-size: 0.85rem !important;
    color: var(--fft-text-light) !important;
}

/* ---------- Buttons ---------- */
.fft-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, transform 0.1s;
}

.fft-btn:hover {
    transform: translateY(-1px);
}

.fft-btn--primary {
    background: var(--fft-green-btn);
    color: #fff;
}

.fft-btn--primary:hover {
    background: var(--fft-green-btn-hover);
    color: #fff;
}

.fft-btn--submit {
    background: var(--fft-green-btn);
    color: #fff;
    padding: 14px 40px;
    font-size: 1.1rem;
    border-radius: 30px;
}

.fft-btn--submit:hover {
    background: var(--fft-green-btn-hover);
}

.fft-btn--submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Memory Grid ---------- */
.fft-memory-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ---------- Polaroid Card ---------- */
.fft-memory-card {
    background: #fff;
    padding: 12px 12px 16px;
    width: 270px;
    box-shadow: 2px 4px 12px var(--fft-paper-shadow);
    position: relative;
    transition: transform 0.3s ease, z-index 0s;
    cursor: default;
    flex-shrink: 0;
}

.fft-memory-card:hover {
    transform: scale(1.08) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 4px 8px 20px rgba(0,0,0,0.3);
}

/* Rotation classes: -4 to +4 degrees */
.fft-rotate-n4 { transform: rotate(-4deg); }
.fft-rotate-n3 { transform: rotate(-3deg); }
.fft-rotate-n2 { transform: rotate(-2deg); }
.fft-rotate-n1 { transform: rotate(-1deg); }
.fft-rotate-0  { transform: rotate(0deg); }
.fft-rotate-1  { transform: rotate(1deg); }
.fft-rotate-2  { transform: rotate(2deg); }
.fft-rotate-3  { transform: rotate(3deg); }
.fft-rotate-4  { transform: rotate(4deg); }

/* ---------- Pushpin ---------- */
.fft-pushpin {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    z-index: 5;
    box-shadow: 1px 2px 4px rgba(0,0,0,0.35), inset -2px -2px 4px rgba(0,0,0,0.2);
}

.fft-pushpin--card {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.fft-pushpin--red    { background: radial-gradient(circle at 35% 35%, #e74c3c, #a93226); }
.fft-pushpin--blue   { background: radial-gradient(circle at 35% 35%, #3498db, #2471a3); }
.fft-pushpin--green  { background: radial-gradient(circle at 35% 35%, #2ecc71, #1e8449); }
.fft-pushpin--yellow { background: radial-gradient(circle at 35% 35%, #f1c40f, #d4a017); }

/* Pushpin needle shadow */
.fft-pushpin::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: rgba(0,0,0,0.15);
    border-radius: 50%;
}

/* ---------- Card Photo ---------- */
.fft-memory-card__photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #f0ebe3;
}

/* No-photo cards: collapse photo area, show as compact text-only note */
.fft-memory-card--no-photo {
    background: var(--fft-paper);
    padding: 12px 16px 16px;
}

/* ---------- Card Content ---------- */
.fft-memory-card__name {
    font-family: 'Georgia', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--fft-text);
    margin: 10px 0 2px;
    line-height: 1.3;
}

.fft-memory-card__details {
    font-size: 0.78rem;
    color: var(--fft-text-light);
    margin: 0 0 8px;
    line-height: 1.4;
}

.fft-memory-card__details strong {
    font-weight: 700;
}

.fft-memory-card__quote {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 0.88rem;
    color: var(--fft-text);
    line-height: 1.5;
    margin: 0;
}

/* ---------- Loading / End States ---------- */
.fft-loading {
    text-align: center;
    padding: 30px 0;
    color: #fff;
}

.fft-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: fft-spin 0.8s linear infinite;
}

@keyframes fft-spin {
    to { transform: rotate(360deg); }
}

.fft-no-more {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

.fft-form-card {
    background: var(--fft-paper);
    max-width: 700px;
    margin: 0 auto 30px;
    padding: 35px 40px;
    position: relative;
    box-shadow: 2px 3px 10px var(--fft-paper-shadow);
    border-bottom: 3px solid #d4c5b0;
}

.fft-pushpin--card-pin {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.fft-form-title {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--fft-text);
    margin: 0 0 15px;
    text-align: center;
}

.fft-form-intro {
    font-size: 0.95rem;
    color: var(--fft-text);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* ---------- Form Layout ---------- */
.fft-form-row {
    margin-bottom: 18px;
}

.fft-form-row--half {
    display: flex;
    gap: 20px;
}

.fft-form-row--half .fft-form-group {
    flex: 1;
}

.fft-form-row--center {
    text-align: center;
    margin-top: 25px;
}

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

.fft-required {
    color: var(--fft-text-light);
    font-weight: 400;
    font-size: 0.85rem;
}

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

.fft-charlimit {
    color: var(--fft-text-light);
    font-weight: 400;
    font-size: 0.85rem;
}

/* ---------- Form Inputs ---------- */
.fft-form-card input[type="text"],
.fft-form-card input[type="email"],
.fft-form-card input[type="tel"],
.fft-form-card select,
.fft-form-card textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: var(--fft-text);
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.fft-form-card input:focus,
.fft-form-card select:focus,
.fft-form-card textarea:focus {
    outline: none;
    border-color: var(--fft-green-btn);
    box-shadow: 0 0 0 2px rgba(45, 90, 39, 0.15);
}

.fft-form-card textarea {
    resize: vertical;
    min-height: 100px;
}

.fft-form-card input[type="file"] {
    font-size: 0.9rem;
    padding: 8px 0;
}

.fft-char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--fft-text-light);
    margin-top: 4px;
}

.fft-char-count--warn {
    color: #e67e22;
}

.fft-char-count--max {
    color: #c0392b;
    font-weight: 600;
}

/* ---------- Photo Preview ---------- */
.fft-photo-preview {
    margin-top: 8px;
    position: relative;
    display: inline-block;
}

.fft-photo-preview img {
    max-width: 120px;
    max-height: 90px;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.fft-photo-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #c0392b;
    color: #fff;
    border: none;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

/* ---------- Form Messages ---------- */
.fft-form-message {
    text-align: center;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 0.95rem;
}

.fft-form-message--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fft-form-message--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.fft-form-disclaimer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--fft-text-light);
    margin-top: 15px;
    font-style: italic;
}

/* ---------- Notice Card (bottom of form page) ---------- */
.fft-form-notice {
    background: #fef9e7;
    max-width: 300px;
    margin: 0 0 0 20px;
    padding: 20px 25px 20px;
    position: relative;
    box-shadow: 2px 3px 8px var(--fft-paper-shadow);
    transform: rotate(-2deg);
}

.fft-pushpin--notice-pin {
    top: -8px;
    left: 20px;
}

.fft-form-notice p {
    font-size: 0.9rem;
    color: var(--fft-text);
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

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

@media (max-width: 1024px) {
    .fft-memory-card {
        width: 240px;
    }

    .fft-wall-intro {
        width: 515px; /* 2 cards (240×2) + 1 gap (35) */
    }
}

@media (max-width: 768px) {
    .fft-memory-wall,
    .fft-form-wrap {
        padding: 20px 12px;
    }

    .fft-wall-title {
        font-size: 1.6rem;
    }

    .fft-memory-grid {
        gap: 25px;
    }

    .fft-memory-card {
        width: calc(100% - 40px);
        max-width: 320px;
    }

    .fft-wall-intro {
        width: calc(100% - 40px);
        max-width: 320px;
    }

    .fft-form-row--half {
        flex-direction: column;
        gap: 0;
    }

    .fft-form-card {
        padding: 25px 20px;
    }

    .fft-form-title {
        font-size: 1.4rem;
    }

    .fft-form-notice {
        margin: 0 auto;
        transform: rotate(-1deg);
    }

}

/* ---------- Card entrance animation ---------- */
@keyframes fft-card-in {
    from {
        opacity: 0;
        transform: translateY(20px) rotate(0deg);
    }
    to {
        opacity: 1;
    }
}

.fft-memory-card {
    animation: fft-card-in 0.4s ease-out both;
}
