:root {
    --color-bg: #000000;
    --color-surface: #1a1a17;
    --color-warm: #8F8B7E;
    --color-sage: #D1DCBD;
    --color-green: #B0C290;
    --color-cream: #f5f0e8;
    --color-white: #ffffff;
    --color-text: #f5f0e8;
    --color-text-muted: #b0aba3;
    --color-border: rgba(245, 240, 232, 0.14);
    --color-border-strong: rgba(245, 240, 232, 0.28);
    --color-field-bg: rgba(255, 255, 255, 0.04);
    --color-field-bg-focus: rgba(255, 255, 255, 0.07);

    --font-body: 'Heebo', 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-pill: 100px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(209, 220, 189, 0.08), transparent 60%),
        radial-gradient(ellipse 60% 40% at 50% 110%, rgba(209, 220, 189, 0.04), transparent 60%);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px 32px;
}

.header {
    display: flex;
    justify-content: center;
    margin-bottom: 56px;
}

.logo {
    height: 36px;
    width: auto;
    display: block;
}

/* ---------- Hero ---------- */

.hero {
    text-align: center;
    margin-bottom: 56px;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-sage);
    margin-bottom: 20px;
}

.title {
    font-family: var(--font-body);
    font-size: clamp(2.4rem, 6vw, 3.2rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--color-cream);
    margin-bottom: 14px;
    line-height: 1.15;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    font-weight: 300;
    margin-bottom: 28px;
}

.meta-pills {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background: rgba(209, 220, 189, 0.04);
}

.meta-pill-accent {
    border-color: rgba(209, 220, 189, 0.5);
    background: rgba(209, 220, 189, 0.10);
}

.meta-pill-accent .meta-value {
    color: var(--color-sage);
}

.meta-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.meta-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-cream);
}

/* ---------- Content blocks ---------- */

.content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 64px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--color-border);
}

.block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.block-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-sage);
    opacity: 0.85;
}

.block-title {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--color-sage);
    margin-bottom: 4px;
    line-height: 1.4;
}

.block p {
    color: var(--color-cream);
    font-size: 1rem;
    line-height: 1.75;
    font-weight: 300;
}

.block em {
    font-style: italic;
    color: var(--color-sage);
    font-weight: 400;
}

/* Pull-quote (the credo) */
.block-pull {
    position: relative;
    padding: 18px 22px;
    margin: 4px 0;
    border-right: 2px solid var(--color-sage);
    background: rgba(209, 220, 189, 0.04);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.02rem !important;
    line-height: 1.75;
    color: var(--color-cream) !important;
}

/* Bio block */
.bio-portrait {
    display: block;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    margin: 0 auto 18px;
    border: 1px solid var(--color-border-strong);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.block-bio .block-title {
    text-align: center;
}

/* The "Intuition or fear?" block — slightly elevated */
.block-question {
    padding: 28px 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: linear-gradient(
        180deg,
        rgba(209, 220, 189, 0.05) 0%,
        rgba(209, 220, 189, 0.02) 100%
    );
}

.block-question .block-eyebrow {
    display: block;
    margin-bottom: 4px;
}

.block-question .block-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-cream);
    margin-bottom: 10px;
}

/* Note block (used for "in the workshop" callout) */
.block-note {
    padding: 22px 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(209, 220, 189, 0.04);
}

.block-note .block-title {
    margin-bottom: 6px;
}

.block-note p {
    font-size: 1rem;
    color: var(--color-text);
}

/* ---------- Form ---------- */

.form-section {
    flex: 1;
}

.form-intro {
    text-align: center;
    margin-bottom: 36px;
}

.form-title {
    font-family: var(--font-body);
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--color-cream);
    margin-top: 12px;
    margin-bottom: 10px;
}

.form-subtitle {
    color: var(--color-text-muted);
    font-size: 0.98rem;
    font-weight: 300;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.honeypot {
    position: absolute;
    left: -9999px;
    visibility: hidden;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field[hidden] {
    display: none;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 520px) {
    .field-row {
        grid-template-columns: 1fr;
    }
}

.label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.required {
    color: var(--color-sage);
    font-size: 0.8rem;
    line-height: 1;
}

/* ---------- Inputs ---------- */

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-cream);
    background: var(--color-field-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"] {
    text-align: right;
}

input[type="tel"],
input[type="email"] {
    text-align: left;
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-body);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

input:hover,
textarea:hover {
    border-color: var(--color-border-strong);
}

input:focus,
textarea:focus {
    border-color: var(--color-sage);
    background: var(--color-field-bg-focus);
    box-shadow: 0 0 0 3px rgba(209, 220, 189, 0.12);
}

/* ---------- Field errors ---------- */

.field-error {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: #e8a599;
    margin-top: -2px;
    text-align: right;
    animation: fadeUp 0.2s var(--ease-out) both;
}

.field.invalid input {
    border-color: rgba(232, 165, 153, 0.55);
}

.field.invalid input:focus {
    box-shadow: 0 0 0 3px rgba(232, 165, 153, 0.15);
}

/* ---------- Phone row ---------- */

.phone-row {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: var(--color-field-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.phone-row:hover {
    border-color: var(--color-border-strong);
}

.phone-row:focus-within {
    border-color: var(--color-sage);
    background: var(--color-field-bg-focus);
    box-shadow: 0 0 0 3px rgba(209, 220, 189, 0.12);
}

.phone-prefix {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-right: 1px solid var(--color-border);
    color: var(--color-cream);
    font-family: var(--font-body);
    font-size: 1rem;
    user-select: none;
    flex-shrink: 0;
}

.phone-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.phone-row input[type="tel"] {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 14px 16px;
    color: var(--color-cream);
    text-align: left;
    direction: ltr;
}

.phone-row input[type="tel"]:hover,
.phone-row input[type="tel"]:focus {
    border: none;
    background: transparent;
    box-shadow: none;
}

.field.invalid .phone-row {
    border-color: rgba(232, 165, 153, 0.55);
}

.field.invalid .phone-row:focus-within {
    box-shadow: 0 0 0 3px rgba(232, 165, 153, 0.15);
}

/* ---------- Submit button ---------- */

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-bg);
    background: var(--color-sage);
    border: none;
    border-radius: var(--radius-pill);
    padding: 18px 32px;
    cursor: pointer;
    transition:
        background 0.3s var(--ease-out),
        transform 0.3s var(--ease-out),
        box-shadow 0.3s var(--ease-out);
    margin-top: 12px;
    align-self: stretch;
}

.submit-btn:hover {
    background: var(--color-green);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(209, 220, 189, 0.18);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.form-footnote {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 4px;
    line-height: 1.6;
}

/* ---------- PayPlus iframe ---------- */

.payplus-iframe-panel {
    position: relative;
    width: 100%;
    min-height: 720px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--color-border);
    animation: fadeUp 0.4s var(--ease-out) both;
}

.payplus-iframe-panel[hidden] {
    display: none;
}

#payplus-iframe {
    display: block;
    width: 100%;
    min-height: 720px;
    border: none;
    background: #000;
}

.iframe-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 1;
}

.iframe-loading-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

@media (max-width: 520px) {
    .payplus-iframe-panel,
    #payplus-iframe {
        min-height: 760px;
    }
}

/* ---------- State panels (success / failure / closed) ---------- */

.success-panel,
.failure-panel,
.closed-panel {
    text-align: center;
    padding: 56px 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(209, 220, 189, 0.04);
    animation: fadeUp 0.4s var(--ease-out) both;
}

.success-panel[hidden],
.failure-panel[hidden],
.closed-panel[hidden] {
    display: none;
}

.spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 20px;
    border: 2px solid rgba(209, 220, 189, 0.2);
    border-top-color: var(--color-sage);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.success-title,
.failure-title,
.closed-title {
    font-family: var(--font-body);
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--color-cream);
    margin-bottom: 12px;
}

.success-subtitle,
.failure-subtitle,
.closed-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.success-panel {
    background: rgba(176, 194, 144, 0.08);
    border-color: rgba(176, 194, 144, 0.35);
    padding: 64px 28px 56px;
}

.success-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 50%;
    border: 1.5px solid var(--color-sage);
    color: var(--color-sage);
    background: rgba(209, 220, 189, 0.06);
    animation: successPop 0.5s var(--ease-out) both;
}

.success-mark svg {
    width: 30px;
    height: 30px;
}

.success-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-sage);
    margin-bottom: 14px;
}

.success-title {
    color: var(--color-cream);
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.success-subtitle {
    color: var(--color-text);
    font-size: 1.02rem;
    line-height: 1.75;
    max-width: 460px;
    margin: 0 auto;
}

.success-meta {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    margin: 32px auto 0;
    padding: 18px 28px;
    border: 1px solid rgba(209, 220, 189, 0.25);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.35);
    text-align: right;
    direction: rtl;
    min-width: 260px;
}

.success-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
}

.success-meta-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.success-meta-value {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    color: var(--color-cream);
}

.success-footnote {
    margin-top: 28px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

@keyframes successPop {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1); }
}

.failure-panel {
    background: rgba(232, 165, 153, 0.06);
    border-color: rgba(232, 165, 153, 0.35);
}

.failure-title {
    color: #e8a599;
}

.failure-link {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 28px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    color: var(--color-cream);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.failure-link:hover {
    border-color: var(--color-sage);
    background: rgba(209, 220, 189, 0.05);
}

.form-section.paying .form-intro,
.form-section.paying .signup-form,
.form-section.success .form-intro,
.form-section.success .signup-form,
.form-section.failed .form-intro,
.form-section.failed .signup-form,
.form-section.closed .form-intro,
.form-section.closed .signup-form {
    display: none !important;
}

/* Thank-you / failure return page — show only the logo + the panel. */
.page.return-page > .hero,
.page.return-page > .content,
.page.return-page > .footer {
    display: none !important;
}

.page.return-page {
    justify-content: center;
    min-height: 100vh;
}

.page.return-page > .header {
    margin-bottom: 48px;
}

.page.return-page > .form-section {
    flex: 0 0 auto;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Footer ---------- */

.footer {
    margin-top: 64px;
    padding-top: 24px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
