/* ============================================
   Zenesa Digital — Agreement (Premium)
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ink: #000000;
    --ink-soft: #0f172a;
    --ink-mute: #1f2937;
    --ink-light: #4b5563;
    --border: #e5e7eb;
    --bg: #eef0f4;
    --paper: #ffffff;
    --grad-purple: #4f2dba;
    --grad-pink: #e63aae;
    --grad-orange: #f37335;
    --accent-from: #4f2dba;
    --accent-to: #f37335;
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Plus Jakarta Sans', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    padding: 40px 16px 60px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-wrap {
    max-width: 880px;
    margin: 0 auto;
}

.agreement-page {
    position: relative;
    background: var(--paper);
    padding: 70px 75px 90px;
    margin-bottom: 32px;
    border-radius: 6px;
    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.04),
        0 14px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    min-height: 1180px;
}

/* ==== DECORATIVE CORNER SHAPES — only in corners ==== */
.deco-corner {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

/* TOP-LEFT — purple triangle */
.deco-tl {
    top: 0; left: 0;
    width: 210px; height: 48px;
    background: linear-gradient(110deg, #4f2dba 0%, #7c3aed 70%, #9d4aff 100%);
    clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
}

/* TOP-RIGHT — orange/pink triangle (notched) */
.deco-tr {
    top: 0; right: 0;
    width: 260px; height: 85px;
    background: linear-gradient(225deg, #f37335 0%, #e63aae 55%, #7c3aed 100%);
    clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 0);
}

/* BOTTOM-LEFT — purple/blue triangle (smaller, only in corner) */
.deco-bl {
    bottom: 0; left: 0;
    width: 160px; height: 35px;
    background: linear-gradient(60deg, #1e3a8a 0%, #4f2dba 50%, #7c3aed 100%);
    clip-path: polygon(0 0, 100% 100%, 0 100%);
}

/* BOTTOM-RIGHT — orange/pink triangle (smaller, only in corner) */
.deco-br {
    bottom: 0; right: 0;
    width: 160px; height: 35px;
    background: linear-gradient(300deg, #f37335 0%, #e63aae 50%, #7c3aed 100%);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* ===== HEADER + LOGO ===== */
.page-header {
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}
.logo-img {
    height: 56px;
    width: auto;
    display: block;
}

/* ===== PREPARED FOR ROW ===== */
.prepared-row {
    position: relative; z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 38px;
}
.prepared-block { flex: 1; }
.prepared-block.right { text-align: right; }
.prepared-block h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.prepared-block p {
    font-size: 15.5px;
    color: var(--ink-soft);
    font-weight: 500;
}

/* ===== TITLE ===== */
.agreement-title {
    position: relative; z-index: 2;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    color: var(--ink);
    letter-spacing: 0.02em;
    margin: 28px 0 32px;
}
.agreement-title .title-underline {
    border-bottom: 3px solid var(--ink);
    padding-bottom: 4px;
}

/* ===== CONTENT ===== */
.content {
    position: relative; z-index: 2;
}

.content h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    margin: 28px 0 10px;
    letter-spacing: -0.015em;
}
.content h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin: 20px 0 6px;
    letter-spacing: -0.01em;
}
.content p {
    font-size: 14.5px;
    color: var(--ink-soft);
    margin-bottom: 12px;
    line-height: 1.7;
    font-weight: 400;
}
.content p.bold-intro {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
}

.content-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}
.content-list li {
    position: relative;
    padding-left: 22px;
    font-size: 14.5px;
    color: var(--ink-soft);
    margin-bottom: 7px;
    line-height: 1.65;
    font-weight: 400;
}
.content-list li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 11px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ink);
}
.content-list li strong {
    color: var(--ink);
    font-weight: 700;
}

.milestone {
    margin-bottom: 18px;
}

/* ===== SIGNATURE PAGE ===== */
.signature-section {
    position: relative;
    margin-top: 40px;
}

.sig-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 45px;
    align-items: end;
    margin-bottom: 35px;
}

.sig-pad-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: border-color 0.25s, box-shadow 0.25s;
}
.sig-pad-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.10);
}
.sig-pad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(79,45,186,0.04), rgba(243,115,53,0.04));
    border-bottom: 1px solid #eef0f4;
}
.sig-pad-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sig-pad-label i {
    background: linear-gradient(120deg, var(--accent-from), var(--accent-to));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 13px;
}
.clear-btn {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: var(--ink-light);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font: 500 11px 'Plus Jakarta Sans', sans-serif;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.clear-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}
.sig-pad {
    width: 100%;
    height: 120px;
    display: block;
    cursor: crosshair;
    touch-action: none;
    background: #fff;
}
.sig-pad-footer {
    padding: 6px 14px 8px;
    background: #fafbfd;
    border-top: 1px solid #eef0f4;
}
.sig-hint {
    font-size: 11px;
    color: var(--ink-light);
    font-style: italic;
}

.sig-caption {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
    margin-top: 16px;
    margin-bottom: 6px;
}
.sig-date {
    font-size: 14px;
    color: var(--ink-soft);
}
.sig-date strong { color: var(--ink); }

.sig-right {
    text-align: right;
    padding-bottom: 6px;
}
.auth-by {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}
.auth-name {
    font-size: 14.5px;
    color: var(--ink-soft);
    font-weight: 500;
}

/* ===== SUBMIT BUTTON ===== */
.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: linear-gradient(120deg, var(--grad-purple) 0%, var(--grad-pink) 55%, var(--grad-orange) 100%);
    color: #fff;
    border: none;
    padding: 15px 42px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-top: 8px;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.28);
    transition: transform 0.25s, box-shadow 0.25s;
}
.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.40);
}
.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.submit-btn i { font-size: 14px; }

.form-status {
    margin-top: 16px;
    font-size: 13.5px;
    color: var(--ink-soft);
    font-weight: 500;
}
.form-status.error { color: #dc2626; }

/* ===== FOOTER ===== */
.page-footer {
    position: absolute;
    bottom: 45px;
    left: 75px;
    right: 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    z-index: 10;
    font-size: 13px;
    color: #000000;
    font-weight: 600;
    font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
}
.ft-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    color: #000000;
}
.ft-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ft-icon i {
    background: linear-gradient(120deg, var(--grad-purple), var(--grad-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 12px;
}

/* ===== THANK YOU PAGE ===== */
.thankyou-page {
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ty-card {
    text-align: center;
    max-width: 520px;
    padding: 30px;
    position: relative;
    z-index: 2;
}
.ty-icon {
    font-size: 90px;
    background: linear-gradient(120deg, var(--grad-purple), var(--grad-pink), var(--grad-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 25px;
    line-height: 1;
}
.ty-card h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
.ty-card p {
    font-size: 15.5px;
    color: var(--ink-soft);
    line-height: 1.65;
    margin-bottom: 0;
}
.ty-ref {
    margin-top: 30px;
    padding: 14px 20px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.ty-ref span {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.ty-ref code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--grad-purple);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body { padding: 18px 10px 30px; }
    .agreement-page {
        padding: 50px 30px 95px;
        min-height: auto;
    }
    .deco-tl, .deco-tr { width: 140px; height: 50px; }
    .deco-bl, .deco-br { width: 160px; height: 50px; }
    .logo-img { height: 44px; }
    .prepared-row {
        flex-direction: column;
        gap: 22px;
    }
    .prepared-block.right { text-align: left; }
    .agreement-title {
        font-size: 16px;
        line-height: 1.45;
    }
    .agreement-title .title-underline {
        display: inline-block;
        padding-bottom: 4px;
    }
    .content h2 { font-size: 17px; }
    .content p, .content-list li { font-size: 13.5px; }
    .sig-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .sig-right { text-align: left; }
    .page-footer {
        position: static;
        flex-direction: column;
        gap: 10px;
        margin-top: 35px;
        align-items: flex-start;
    }
    .ty-card h1 { font-size: 28px; }
}
