/*
    Template 3 - Seal Premium
    nhacohy.vn/mau-seal-premium — phong thư cổ điển
*/
@import url('template1.css');

:root {
    --navy: #5c1828;
    --navy-dark: #3d0f1a;
    --navy-light: #8f2d42;
    --accent-blue: #c9a0a8;
    --text-dark: #3d0f1a;
    --text-muted: #7a5560;
    --bg-white: #faf6f0;
    --bg-soft: #f3ebe3;
    --bg-page: #e8ddd3;
    --border-light: #d4c4b4;
    --seal-red: #8b2332;
    --paper: #fffef9;
    --font-script: 'Great Vibes', 'Dancing Script', cursive;
    --font-serif: 'Cormorant Garamond', 'Playfair Display', serif;
    --font-display: 'Cormorant Garamond', serif;
}

@keyframes sealWaxPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(139, 35, 50, 0.5); }
    50% { transform: scale(1.06); box-shadow: 0 8px 24px rgba(139, 35, 50, 0.65); }
}

@keyframes sealEnvelopeOpen {
    0% { transform: scale(1) rotateX(0deg); opacity: 1; }
    60% { transform: scale(1.05) rotateX(-8deg); opacity: 1; }
    100% { transform: scale(1.15) rotateX(-12deg); opacity: 0; }
}

@keyframes sealReveal {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes sealLineGrow {
    from { width: 0; }
    to { width: 48px; }
}

body.seal-template {
    background: var(--bg-page);
}

body.seal-locked {
    overflow: hidden;
}

.seal-template .texture-layer {
    opacity: 0.06;
    filter: sepia(0.35);
}

.template-shell.is-revealed {
    animation: sealReveal 1s ease-out;
}

/* ── Envelope opener ── */
.seal-envelope {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(60, 20, 30, 0.95) 0%, rgba(20, 8, 12, 0.98) 100%);
    transition: opacity 0.6s ease 0.4s, visibility 0.6s ease 0.4s;
    perspective: 800px;
}

.seal-envelope.is-opening .seal-envelope-inner {
    animation: sealEnvelopeOpen 0.9s ease-in forwards;
}

.seal-envelope.is-open {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.seal-envelope-inner {
    text-align: center;
    padding: 24px;
    max-width: 300px;
    cursor: pointer;
    transform-origin: center bottom;
}

.seal-envelope-card {
    background: var(--paper);
    border: 1px solid var(--border-light);
    padding: 48px 28px 36px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative;
}

.seal-envelope-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: linear-gradient(135deg, var(--seal-red) 0%, var(--navy) 100%);
    clip-path: polygon(0 0, 100% 0, 50% 85%);
    opacity: 0.12;
}

.seal-envelope-card::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(139, 35, 50, 0.15);
    pointer-events: none;
}

.seal-wax {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #d44, var(--seal-red) 55%, #4a1220);
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-script);
    font-size: 1.3rem;
    color: rgba(255,255,255,0.92);
    animation: sealWaxPulse 2.5s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.seal-envelope-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    letter-spacing: 5px;
    color: var(--navy);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.seal-envelope-names {
    font-family: var(--font-script);
    font-size: 1.7rem;
    color: var(--seal-red);
    margin: 14px 0;
    line-height: 1.3;
}

.seal-envelope-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    animation: goldenFloat 2s ease-in-out infinite;
}

@keyframes goldenFloat {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ── Ornamental divider ── */
.seal-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--seal-red);
    opacity: 0.6;
}

.seal-ornament::before,
.seal-ornament::after {
    content: '';
    height: 1px;
    width: 48px;
    background: linear-gradient(90deg, transparent, var(--seal-red), transparent);
    animation: sealLineGrow 1.2s ease-out;
}

.seal-ornament span {
    font-size: 0.65rem;
    letter-spacing: 3px;
}

/* ── Profile stories ── */
.seal-profile-section {
    padding: 48px 0 32px;
    background: var(--paper);
}

.seal-profile {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    max-width: 360px;
    margin: 0 auto 36px;
    text-align: left;
    padding: 20px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.seal-profile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(92, 24, 40, 0.1);
}

.seal-profile.reverse {
    flex-direction: row-reverse;
    text-align: right;
}

.seal-profile-photo-wrap {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(107, 28, 46, 0.18);
}

.seal-profile-photo {
    width: 96px;
    height: 118px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.seal-profile:hover .seal-profile-photo {
    transform: scale(1.06);
}

.seal-profile-name {
    font-family: var(--font-script);
    font-size: 1.55rem;
    color: var(--navy);
    margin-bottom: 8px;
}

.seal-profile-text {
    font-family: var(--font-display);
    font-size: 0.84rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Invitation seal ── */
.seal-template .invitation-section {
    background: var(--bg-soft);
    border-top: 1px solid var(--border-light);
}

.seal-invite-names .name {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--navy);
    transition: letter-spacing 0.4s ease;
}

.seal-invite-names:hover .name {
    letter-spacing: 0.04em;
    transform: scale(1.04);
    color: var(--seal-red);
}

.seal-invite-names .amp {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--seal-red);
}

/* ── Date block ── */
.seal-date-block {
    text-align: center;
    padding: 40px 20px;
    background: var(--paper);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.seal-date-block::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(139, 35, 50, 0.12);
    pointer-events: none;
}

.seal-date-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.seal-date-row .part {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--navy);
    text-transform: uppercase;
}

.seal-date-row .sep {
    color: var(--accent-blue);
    font-weight: 300;
    opacity: 0.6;
}

.seal-date-big {
    font-family: var(--font-serif);
    font-size: 5.5rem;
    font-weight: 600;
    color: var(--seal-red);
    line-height: 1;
    margin: 12px 0;
    text-shadow: 0 2px 0 rgba(139, 35, 50, 0.1);
}

.seal-date-month {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Countdown + calendar ── */
.seal-countdown-wrap {
    background: linear-gradient(165deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    padding: 48px 0;
}

.seal-countdown-wrap .script-title,
.seal-countdown-wrap .guestbook-intro {
    color: #fff;
}

.seal-countdown-wrap .count-label {
    color: rgba(255,255,255,0.75);
}

.seal-countdown-wrap .count-num {
    color: #fff;
}

.seal-countdown-wrap .count-sep {
    color: var(--accent-blue);
}

.seal-calendar-paper {
    margin-top: 32px;
    background: var(--paper);
    padding: 28px 16px;
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.15);
}

.seal-template .cal-day.highlight .cal-num {
    background: var(--seal-red);
}

.seal-template .calendar-month {
    color: var(--navy);
}

/* Seal title hovers */
.seal-template .script-title:hover {
    color: var(--seal-red);
    text-shadow: 0 4px 20px rgba(139, 35, 50, 0.2);
}

.seal-template .script-title.light:hover {
    color: #fff;
    text-shadow: 0 4px 28px rgba(255, 220, 220, 0.35);
}

.seal-template .invite-label:hover,
.seal-template .venue-label:hover {
    color: var(--seal-red);
}

.seal-thanks-title:hover {
    color: var(--seal-red);
}

.seal-envelope-title:hover {
    color: var(--seal-red);
    letter-spacing: 0.42em;
}

.seal-envelope-names:hover {
    color: var(--navy);
    transform: scale(1.05);
}

.seal-profile-name:hover {
    color: var(--seal-red);
}

.seal-date-big:hover {
    color: var(--navy);
}

/* ── Thanks ── */
.seal-thanks-section {
    background: var(--bg-soft);
    padding: 48px 0;
}

.seal-thanks-title {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--navy);
    text-align: center;
}

/* ── Buttons ── */
.seal-template .btn-navy,
.seal-template .float-btn {
    background: var(--seal-red);
}

.seal-template .btn-navy:hover,
.seal-template .float-btn:hover {
    background: var(--navy-dark);
}

.seal-template .guestbook-section {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
}

.seal-template .section-divider span::after {
    color: var(--seal-red);
}

.seal-template .footer-bar {
    background: rgba(250, 246, 240, 0.97);
}

.seal-template .footer-brand-row {
    border-bottom-color: var(--seal-red);
}

.seal-template .gallery-item:hover {
    box-shadow: 0 12px 28px rgba(92, 24, 40, 0.2);
}

@media (max-width: 380px) {
    .seal-date-big { font-size: 4.2rem; }
    .seal-profile {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center;
    }
    .seal-date-row .sep { display: none; }
}
