/* ===== CSS Variables ===== */
:root {
    --primary: #F8AE19;
    --primary-dark: #C37217;
    --primary-light: #FBCB5C;
    --secondary: #C37217;
    --accent: #FFF8E7;
    --cream: #FFFDF7;
    --cream-dark: #FEF3DC;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    --bg-primary: #FFFDF7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #FEF3DC;
    --bg-card: #ffffff;

    --text-primary: #3D2914;
    --text-secondary: #6B5744;
    --text-muted: #9A8A78;

    --border-color: #E8DED0;
    --shadow-sm: 0 1px 2px rgba(195, 114, 23, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(195, 114, 23, 0.1), 0 2px 4px -2px rgba(195, 114, 23, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(195, 114, 23, 0.12), 0 4px 6px -4px rgba(195, 114, 23, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(195, 114, 23, 0.15), 0 8px 10px -6px rgba(195, 114, 23, 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Philosopher', 'Bookman Old Style', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Elegant Animations ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(248, 174, 25, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(248, 174, 25, 0.5), 0 0 30px rgba(248, 174, 25, 0.3);
    }
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(254, 243, 220, 0.98));
    backdrop-filter: blur(20px);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--primary), var(--primary-dark), var(--primary), transparent) 1;
    position: relative;
    /* Diubah dari sticky agar ikut tergulung saat scroll */
    z-index: 1000;
    animation: fadeInDown 0.8s ease-out;
    overflow: hidden;
}

/* Background Pattern Logo (Repeating) */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/logo.png');
    background-repeat: repeat;
    background-size: 140px;
    opacity: 0.07;
    z-index: 0;
    pointer-events: none;
    filter: grayscale(1);
    animation: patternPulse 10s ease-in-out infinite;
}

@keyframes patternPulse {

    0%,
    100% {
        opacity: 0.03;
        transform: scale(1);
    }

    50% {
        opacity: 0.06;
        transform: scale(1.02);
    }
}

.header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-light), var(--primary), var(--primary-light), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    max-width: 1200px;
    position: relative;
    overflow: visible;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 10;
    width: 100%;
}

.logo-img {
    display: none;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #F8AE19, #C37217, #FBCB5C, #F8AE19);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: 1px;
    text-shadow: 0px 4px 15px rgba(248, 174, 25, 0.15);
    position: relative;
    z-index: 11;
    animation: shimmerFlow 8s linear infinite;
}

@keyframes shimmerFlow {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 300% center;
    }
}

@keyframes textGlow {
    from {
        text-shadow: 1px 1px 2px rgba(195, 114, 23, 0.1);
    }

    to {
        text-shadow: 2px 2px 8px rgba(248, 174, 25, 0.3);
    }
}

.logo-text span {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
    letter-spacing: 0.5px;
    margin-top: 8px;
    position: relative;
    z-index: 11;
}

/* ===== Main Content ===== */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 140px);
}

/* ===== Hero Simple ===== */
.hero-simple {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease-out 0.2s both;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.22rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-dark));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

.hero-description {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== Form Card ===== */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark), var(--primary));
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
}

.letter-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--primary);
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(248, 174, 25, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Input nama menggunakan huruf kapital */
.form-group input#nama {
    text-transform: uppercase;
}

.form-group select {
    cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(248, 174, 25, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 174, 25, 0.5);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Success Modal ===== */
.modal-success {
    text-align: center;
}

.success-content {
    padding: 40px 28px;
}

.success-icon {
    font-size: 72px;
    color: var(--primary);
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.success-content h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.success-content>p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.success-info {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.info-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: right;
    max-width: 60%;
}

.success-content .btn {
    margin-bottom: 10px;
}

.success-content .btn:last-child {
    margin-bottom: 0;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--primary), var(--primary-dark), var(--primary), transparent) 1;
    padding: 30px 0;
    text-align: center;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
    overflow: hidden;
}

/* Background image Brown.png for footer */
.footer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    /* Disesuaikan dengan besar tulisan */
    height: 100px;
    background-image: url('../images/Brown.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: footerreveal 8s ease-in-out infinite;
}

@keyframes footerreveal {

    0%,
    100% {
        opacity: 0.1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.footer::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-light), var(--primary), var(--primary-light), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    z-index: 2;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 10;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.footer-icon {
    font-size: 1.5rem;
    color: var(--primary);
    animation: float 2.5s ease-in-out infinite;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
}

.footer-divider {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--primary-light), var(--primary), transparent);
    border-radius: 2px;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

.footer-copyright {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.footer-copyright strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 768px) {
    .header .container {
        height: auto;
        padding: 15px 16px;
    }

    .logo {
        gap: 12px;
    }

    .logo-img {
        width: 220px;
        height: 220px;
    }

    .logo-text h1 {
        font-size: 2.2rem;
    }

    .logo-text span {
        font-size: 1.1rem;
    }

    .main {
        padding: 24px 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .form-card {
        padding: 24px 20px;
        border-radius: var(--radius-lg);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .header .container {
        padding: 20px 16px;
        height: auto;
        flex-direction: column;
        gap: 12px;
        justify-content: center;
    }

    .logo {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        width: 100%;
    }

    .header::before {
        background-size: 100px;
        opacity: 0.08;
    }

    .logo-img {
        display: none;
    }

    .logo-text {
        min-width: 0;
        flex: 1;
    }

    .logo-text h1 {
        font-size: 2.4rem;
        font-weight: 800;
        line-height: 1.2;
        width: 100%;
        text-shadow: none;
    }

    .logo-text span {
        font-size: 1.3rem;
        font-weight: 700;
        width: 100%;
        text-shadow: none;
    }

    .main {
        padding: 20px 0;
    }

    .hero-simple {
        margin-bottom: 20px;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .form-card {
        padding: 20px 16px;
        margin-bottom: 24px;
    }

    .letter-form {
        gap: 18px;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .btn-lg {
        padding: 14px 24px;
    }

    /* Modal Mobile */
    .modal {
        padding: 12px;
    }

    .modal-container {
        border-radius: var(--radius-lg);
        max-width: 100%;
    }

    .success-content {
        padding: 28px 20px;
    }

    .success-icon {
        font-size: 56px;
        margin-bottom: 16px;
    }

    .success-content h3 {
        font-size: 1.2rem;
    }

    .success-content>p {
        font-size: 0.9rem;
    }

    .success-info {
        padding: 12px;
        margin-bottom: 20px;
    }

    .info-item {
        padding: 6px 0;
    }

    .info-label {
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.85rem;
        max-width: 55%;
    }

    .footer {
        padding: 20px 0;
    }

    .footer-content {
        gap: 12px;
    }

    .footer-brand {
        flex-direction: column;
        gap: 8px;
    }

    .footer-icon {
        font-size: 1.2rem;
    }

    .footer-title {
        font-size: 0.9rem;
        text-align: center;
    }

    .footer-divider {
        width: 80px;
    }

    .footer-copyright {
        font-size: 0.75rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .logo-img {
        display: none;
    }

    .logo-text h1 {
        font-size: 1.4rem;
    }

    .logo-text span {
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 1.1rem;
    }

    .form-card {
        padding: 16px 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}