/* Email Collector — Frontend Styles */

.ec-wrap {
    --ec-pink-light: #fde4ee;
    --ec-pink: #f9c5dc;
    --ec-magenta: #d946a8;
    --ec-magenta-deep: #9d2b73;
    --ec-text: #5c2746;
    --ec-text-soft: #8b5076;
    --ec-white: #fffafc;
    --ec-font-display: 'Cormorant Garamond', 'Playfair Display', serif;
    --ec-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Hiragino Sans', sans-serif;

    font-family: var(--ec-font-body);
    max-width: 520px;
    margin: 48px auto;
    padding: 0 20px;
    box-sizing: border-box;
}
.ec-wrap *, .ec-wrap *::before, .ec-wrap *::after { box-sizing: border-box; }

.ec-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255,250,252,0.85) 0%, rgba(253,228,238,0.7) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(217,70,168,0.15);
    border-radius: 2px;
    padding: 56px 44px 48px;
    text-align: center;
    box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 20px 60px -25px rgba(157,43,115,0.25);
}

.ec-ornament { color: var(--ec-magenta); font-size: 14px; letter-spacing: 0.5em; margin: 0; opacity: 0.7; }
.ec-ornament-top { margin-bottom: 24px; }
.ec-ornament-bottom { margin-top: 28px; }

.ec-badge {
    display: inline-block; font-size: 10px; font-weight: 500;
    letter-spacing: 0.35em; color: var(--ec-magenta);
    margin-bottom: 22px; text-transform: uppercase;
}

.ec-title {
    font-family: var(--ec-font-display);
    font-style: italic; font-weight: 400; font-size: 38px;
    line-height: 1.2; color: var(--ec-text); margin: 0 0 18px;
}

.ec-subtitle {
    font-family: var(--ec-font-display);
    font-style: italic; font-weight: 300; font-size: 17px;
    line-height: 1.65; color: var(--ec-text-soft);
    margin: 0 auto 28px; max-width: 380px;
}

.ec-divider {
    display: flex; align-items: center; justify-content: center; margin: 0 0 28px;
}
.ec-divider::before, .ec-divider::after {
    content: ''; flex: 0 0 60px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217,70,168,0.4), transparent);
}
.ec-divider-mark {
    font-family: var(--ec-font-display); font-style: italic;
    color: var(--ec-magenta); margin: 0 14px; font-size: 18px; opacity: 0.7;
}

.ec-form { position: relative; }
.ec-field { margin-bottom: 12px; }

.ec-input {
    width: 100%;
    background: rgba(255,255,255,0.6);
    border: none;
    border-bottom: 1px solid rgba(157,43,115,0.25);
    color: var(--ec-text); padding: 14px 4px;
    font-size: 15px; font-family: var(--ec-font-body); font-weight: 400;
    outline: none; transition: border-color 0.3s, background 0.3s;
    text-align: center;
}
.ec-input::placeholder {
    color: rgba(139,80,118,0.5); font-style: italic;
    font-family: var(--ec-font-display); font-size: 16px;
}
.ec-input:focus { border-bottom-color: var(--ec-magenta); background: rgba(255,255,255,0.85); }

.ec-btn {
    margin-top: 18px; background: transparent; color: var(--ec-magenta-deep);
    border: 1px solid var(--ec-magenta); padding: 14px 42px;
    border-radius: 0; font-size: 11px; font-weight: 500;
    letter-spacing: 0.32em; text-transform: uppercase;
    font-family: var(--ec-font-body); cursor: pointer;
    transition: all 0.35s ease; position: relative; overflow: hidden;
}
.ec-btn::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, var(--ec-magenta), var(--ec-magenta-deep));
    transition: left 0.4s ease; z-index: 0;
}
.ec-btn:hover::before { left: 0; }
.ec-btn:hover:not(:disabled) { color: var(--ec-white); border-color: var(--ec-magenta-deep); }
.ec-btn-text { position: relative; z-index: 1; }
.ec-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ec-privacy {
    font-family: var(--ec-font-display); font-style: italic;
    font-size: 12px; color: var(--ec-text-soft);
    margin: 22px 0 0; opacity: 0.75;
}

.ec-message {
    margin-top: 16px; font-family: var(--ec-font-display);
    font-style: italic; font-size: 15px; min-height: 22px;
}
.ec-message.is-success { color: var(--ec-magenta-deep); padding: 8px 0; }
.ec-message.is-error { color: #c2185b; padding: 8px 0; }

.ec-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.ec-btn.is-loading { pointer-events: none; }
.ec-btn.is-loading .ec-btn-text { opacity: 0.5; }
.ec-btn.is-loading::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 14px; height: 14px; margin: -7px 0 0 -7px;
    border: 1.5px solid currentColor; border-top-color: transparent;
    border-radius: 50%; animation: ec-spin 0.7s linear infinite; z-index: 2;
}
@keyframes ec-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .ec-wrap { margin: 32px auto; }
    .ec-card { padding: 42px 28px 36px; }
    .ec-title { font-size: 30px; }
    .ec-subtitle { font-size: 15px; }
    .ec-btn { padding: 13px 32px; letter-spacing: 0.28em; }
}

/* ===================================================
 * Thank-you screen — appears after successful submit
 * The form fades out, then the thank-you state fades in
 * with a check-mark draw animation.
 * =================================================== */
.ec-state-form { transition: opacity 0.5s ease, transform 0.5s ease; }
.ec-state-form.is-leaving { opacity: 0; transform: translateY(-8px); pointer-events: none; }

.ec-state-thanks {
    text-align: center;
    padding: 20px 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}
.ec-state-thanks.is-entered {
    opacity: 1;
    transform: translateY(0);
}

.ec-thanks-ornament {
    color: var(--ec-magenta);
    font-size: 14px;
    letter-spacing: 0.5em;
    margin-bottom: 24px;
    opacity: 0.6;
}
.ec-thanks-ornament-bottom { margin-top: 36px; margin-bottom: 0; }

.ec-thanks-check {
    width: 72px;
    height: 72px;
    margin: 0 auto 28px;
    display: block;
}

/* Animated check-mark stroke draw */
.ec-state-thanks .ec-check-circle {
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    animation: ec-draw-circle 0.7s ease 0.3s forwards;
}
.ec-state-thanks .ec-check-path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: ec-draw-check 0.4s ease 1.0s forwards;
}
@keyframes ec-draw-circle { to { stroke-dashoffset: 0; } }
@keyframes ec-draw-check  { to { stroke-dashoffset: 0; } }

.ec-thanks-title {
    font-family: var(--ec-font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 42px;
    line-height: 1.2;
    color: var(--ec-text);
    margin: 0 0 18px;
}

.ec-thanks-subtitle {
    font-family: var(--ec-font-display);
    font-style: italic;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ec-text-soft);
    margin: 0 auto;
    max-width: 380px;
}

@media (max-width: 480px) {
    .ec-thanks-title { font-size: 32px; }
    .ec-thanks-subtitle { font-size: 15px; }
    .ec-thanks-check { width: 60px; height: 60px; margin-bottom: 22px; }
}
