@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
    --paper: #f6f0e9;
    --ink: #0d1b2a;
    --slate: #3b4a55;
    --mist: #e2d8c7;
    --accent: #f2a33a;
    --accent-dark: #d27f1a;
    --teal: #2f7f7b;
    --teal-dark: #1e5f5c;
    --shadow: 0 20px 45px rgba(13, 27, 42, 0.15);
    --shadow-soft: 0 18px 40px rgba(13, 27, 42, 0.14);
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --outline: rgba(13, 27, 42, 0.12);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
    color: var(--ink);
    background: radial-gradient(1200px 800px at 10% 10%, rgba(242, 163, 58, 0.2), transparent 60%),
        radial-gradient(1000px 600px at 90% 20%, rgba(47, 127, 123, 0.25), transparent 60%),
        linear-gradient(160deg, #f9f5f0 0%, #f1e7d8 100%);
    min-height: 100vh;
}

.no-scroll {
    min-height: 100vh;
}

.no-scroll .main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.no-scroll .form-wrap {
    margin: 0 auto;
    min-height: auto;
    width: min(1120px, 92vw);
}

.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(300px 300px at 80% 15%, rgba(242, 163, 58, 0.35), transparent 70%),
        radial-gradient(350px 350px at 15% 80%, rgba(47, 127, 123, 0.25), transparent 70%);
    opacity: 0.6;
    z-index: -1;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.site-header {
    padding: 24px 0 8px;
}

.header-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    background: var(--ink);
    color: var(--paper);
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 12px;
    letter-spacing: 0.08em;
}

.brand-name {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 1.2rem;
    margin: 0;
}

.brand-sub {
    margin: 2px 0 0;
    color: var(--slate);
    font-size: 0.9rem;
}

.site-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.site-nav a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.site-nav a:hover {
    background: rgba(13, 27, 42, 0.08);
}

.main {
    padding: 20px 0 80px;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    align-items: center;
    padding: 40px 0 20px;
}

.hero-content h1 {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 0 0 16px;
}

.hero-content p {
    font-size: 1.05rem;
    color: var(--slate);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.hero-panel {
    display: flex;
    justify-content: flex-end;
}

.hero-card {
    background: var(--paper);
    padding: 26px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 340px;
    animation: floatIn 0.8s ease-out;
}

.label {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    color: var(--teal);
    font-weight: 600;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px auto 40px;
}

.card {
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    animation: fadeUp 0.8s ease both;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

.card h3 {
    margin: 10px 0;
    font-family: 'Fraunces', 'Georgia', serif;
}

.text-link {
    color: var(--teal-dark);
    font-weight: 600;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 26px;
    align-items: center;
    margin-bottom: 30px;
}

.steps ol {
    padding-left: 20px;
    color: var(--slate);
    line-height: 1.8;
}

.callout {
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius);
    padding: 26px;
}

.callout .label {
    color: var(--accent);
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.page-header .label {
    margin: 0;
}

.page-header h1 {
    margin: 0;
}

.page-header p {
    margin: 0;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.progress-meter {
    width: 160px;
    height: 6px;
    border-radius: 999px;
    background: rgba(13, 27, 42, 0.12);
    overflow: hidden;
}

.progress-meter span {
    display: block;
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--teal), var(--accent));
    border-radius: inherit;
}

.step {
    margin: 0;
    font-size: 0.85rem;
    color: var(--slate);
}

.payment-form .page-header {
    margin: -28px -28px 22px;
    padding: 22px 28px;
    background: linear-gradient(140deg, rgba(47, 127, 123, 0.12), rgba(242, 163, 58, 0.1));
    border-bottom: 1px solid rgba(13, 27, 42, 0.08);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.page-badge {
    background: linear-gradient(120deg, var(--teal), #4ea49f);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    box-shadow: 0 10px 20px rgba(47, 127, 123, 0.2);
}

.form-wrap {
    margin: 40px auto 60px;
    min-height: auto;
}

.payment-shell {
    display: block;
}

.muted {
    color: var(--slate);
    margin: 0;
    line-height: 1.5;
}

.payment-form {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78));
    border-radius: calc(var(--radius) + 2px);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(13, 27, 42, 0.08);
    position: relative;
    overflow: hidden;
    animation: floatIn 0.7s ease-out;
}

.payment-form::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(420px 180px at 0% 0%, rgba(242, 163, 58, 0.18), transparent 60%);
    opacity: 0.6;
    pointer-events: none;
}

.payment-form > * {
    position: relative;
}

.form-section {
    border: 0;
    padding: 0;
    margin: 0 0 24px;
}

.form-section legend {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 500;
    color: var(--ink);
}

label:focus-within {
    color: var(--teal-dark);
}

.field-hint {
    font-size: 0.85rem;
    color: var(--slate);
    line-height: 1.4;
}

input,
textarea,
select {
    font-family: inherit;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--outline);
    background: var(--surface-strong);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input[type='checkbox'] {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 4px;
    accent-color: var(--teal);
}

input:hover,
textarea:hover,
select:hover {
    border-color: rgba(13, 27, 42, 0.3);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(47, 127, 123, 0.2);
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--surface-strong);
    border-radius: 12px;
    border: 1px solid var(--outline);
    overflow: hidden;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.input-prefix {
    padding: 12px 14px;
    background: rgba(13, 27, 42, 0.06);
    color: var(--slate);
    font-weight: 600;
}

.input-group input {
    border: 0;
    border-radius: 0;
    padding: 12px 14px;
    background: transparent;
    flex: 1;
}

.input-group input:focus {
    box-shadow: none;
}

.input-group:focus-within {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(47, 127, 123, 0.2);
}

.confirmation-panel {
    background: rgba(13, 27, 42, 0.04);
    border: 1px solid rgba(13, 27, 42, 0.08);
    border-radius: 16px;
    padding: 18px;
    display: grid;
    gap: 16px;
}

.confirmation-panel.success {
    border-top: 8px solid var(--teal);
    box-shadow: 0 16px 30px rgba(47, 127, 123, 0.18);
    background: linear-gradient(160deg, rgba(47, 127, 123, 0.08), rgba(255, 255, 255, 0.7));
}

.confirmation-panel.failure {
    border-top: 8px solid var(--accent-dark);
    box-shadow: 0 16px 30px rgba(210, 127, 26, 0.2);
    background: linear-gradient(160deg, rgba(242, 163, 58, 0.12), rgba(255, 255, 255, 0.72));
}

.confirmation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.confirmation-title {
    margin: 0;
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 1.05rem;
}

.confirmation-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(47, 127, 123, 0.12);
    color: var(--teal-dark);
    font-weight: 600;
    width: fit-content;
}

.confirmation-panel.failure .confirmation-status {
    background: rgba(210, 127, 26, 0.12);
    color: var(--accent-dark);
}

.confirmation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.status-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate);
}

.status-text-success {
    color: var(--teal-dark);
}

.status-text-failed {
    color: var(--accent-dark);
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(13, 27, 42, 0.2);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.slider::before {
    position: absolute;
    content: '';
    height: 14px;
    width: 14px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(13, 27, 42, 0.2);
}

.switch input:checked + .slider {
    background: rgba(210, 127, 26, 0.45);
}

.switch input:checked + .slider::before {
    transform: translateX(16px);
}

.confirmation-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 22px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: var(--slate);
    font-weight: 600;
}

.summary-value {
    font-weight: 600;
    color: var(--ink);
}

.summary-wide {
    grid-column: span 2;
}

.checkbox-field {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: var(--ink);
}

.checkbox-field input {
    margin: 0;
}

.span-2 {
    grid-column: span 2;
}

.is-hidden {
    display: none !important;
}

.form-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.form-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.form-separator {
    width: 100%;
    height: 1px;
    background: rgba(13, 27, 42, 0.08);
}

.form-note {
    color: var(--slate);
    font-size: 0.8rem;
    width: 100%;
    line-height: 1.4;
    text-align: center;
    margin: 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(210, 127, 26, 0.25);
}

.button.ghost {
    background: transparent;
    border: 1px solid rgba(13, 27, 42, 0.2);
}

.result {
    margin: 40px auto 60px;
}

.result-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
}

.result-card.success {
    border-top: 6px solid var(--teal);
}

.result-card.failure {
    border-top: 6px solid var(--accent-dark);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.error-detail {
    color: var(--accent-dark);
    font-weight: 600;
}

.site-footer {
    padding: 20px 0 50px;
}

.footer-grid {
    background: rgba(13, 27, 42, 0.9);
    color: var(--paper);
    border-radius: var(--radius);
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-title {
    margin: 0 0 6px;
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 1.3rem;
}

.footer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.footer-note {
    font-size: 0.85rem;
    color: rgba(246, 240, 233, 0.7);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 860px) {
    .header-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .site-nav {
        width: 100%;
    }

    .hero-panel {
        justify-content: flex-start;
    }

    .footer-actions {
        align-items: flex-start;
    }

    .payment-form {
        padding: 22px;
    }

    .payment-form .page-header {
        margin: -22px -22px 18px;
        padding: 18px 22px;
    }

    .confirmation-summary {
        grid-template-columns: 1fr;
    }

    .summary-wide {
        grid-column: span 1;
    }
}
