@font-face {
    font-family: 'NewYorkSmall';
    src: url('../fonts/NewYorkSmall-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NewYorkSmall';
    src: url('../fonts/NewYorkSmall-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --green-dark: #011913;
    --green: #18372f;
    --light: #fff3e0;
    --font-default: 'NewYorkSmall', Arial, sans-serif;
    --font-heading: 'NewYorkSmall', Georgia, serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-default);
    background: var(--green-dark);
}

.pi-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    background: linear-gradient(90deg, rgba(245, 183, 157, 0.1) 0%, rgba(255, 238, 190, 0.15) 100%);
}

.pi-loading-bar::before {
    content: '';
    position: absolute;
    left: -40%;
    top: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #f5b79d 0%, #ffeebe 100%);
    box-shadow: 0 0 18px rgba(255, 238, 190, 0.5);
}

body.is-form-loading .pi-loading-bar {
    opacity: 1;
}

body.is-form-loading .pi-loading-bar::before {
    animation: pi-loading-progress 1.1s ease-in-out infinite;
}

@keyframes pi-loading-progress {
    0% {
        left: -40%;
    }
    100% {
        left: 100%;
    }
}

.container {
    width: min(100% - 32px, 1200px);
    margin: 0 auto;
}

.pi-page {
    position: relative;
    overflow: hidden;
    background: radial-gradient(1200px 550px at 8% 0%, rgba(66, 77, 33, 0.45) 0%, rgba(1, 25, 19, 0) 70%),
        radial-gradient(1000px 500px at 100% 20%, rgba(249, 207, 171, 0.15) 0%, rgba(1, 25, 19, 0) 65%),
        var(--green-dark);
    color: var(--light);
    min-height: 100vh;
    padding: 120px 0 72px;
}

.pi-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(1, 25, 19, 0.2) 0%, rgba(1, 25, 19, 0.92) 86%),
        url('../img/hero-bg.jpg') center top / cover no-repeat;
    opacity: 0.38;
    pointer-events: none;
}

.pi-page > * {
    position: relative;
    z-index: 1;
}

.pi-hero,
.pi-register {
    margin-bottom: 28px;
}

.pi-hero-card,
.pi-register-card {
    border: 1px solid rgba(255, 243, 224, 0.3);
    border-radius: 36px 0 36px 0;
    background: linear-gradient(145deg, rgba(15, 39, 31, 0.95) 0%, rgba(24, 55, 47, 0.92) 50%, rgba(32, 71, 56, 0.9) 100%);
    backdrop-filter: blur(6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.pi-hero-card {
    position: relative;
    padding: 48px clamp(20px, 5vw, 70px);
}

.pi-logo {
    max-width: 190px;
    width: 100%;
    margin-bottom: 24px;
}

.pi-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    margin: 0 0 10px;
    color: rgba(255, 243, 224, 0.75);
}

.pi-title {
    font-family: var(--font-heading);
    font-size: clamp(44px, 7vw, 84px);
    line-height: 0.97;
    margin: 0 0 26px;
    color: var(--light);
}

.pi-subtitle {
    font-size: clamp(20px, 3.6vw, 34px);
    line-height: 1.15;
    margin: 0;
    max-width: 870px;
}

.pi-divider {
    width: 120px;
    height: 1px;
    background: rgba(255, 243, 224, 0.45);
    margin: 30px 0;
}

.pi-copy {
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.35;
    color: rgba(255, 243, 224, 0.92);
    margin: 0 0 16px;
}

.pi-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    min-height: 56px;
    border-radius: 14px 0 14px 0;
    padding: 13px 34px;
    border: 1px solid transparent;
    background: linear-gradient(90deg, #f5b79d 0%, #ffeebe 52.88%, #f5b79d 100%);
    color: var(--green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.pi-register-card {
    padding: clamp(24px, 4vw, 50px);
}

.pi-register-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 56px);
    margin: 0 0 12px;
    color: var(--light);
}

.pi-register-subtitle {
    max-width: 780px;
    font-size: 18px;
    line-height: 1.5;
    margin: 0 0 28px;
    color: rgba(255, 243, 224, 0.85);
}

.pi-form-wrap {
    max-width: 740px;
}

.pi-form {
    display: grid;
    gap: 12px;
}

.pi-form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: rgba(255, 243, 224, 0.8);
}

.pi-form input[type='text'],
.pi-form input[type='email'],
.pi-form input[type='tel'] {
    width: 100%;
    height: 54px;
    border-radius: 12px 0 12px 0;
    border: 1px solid rgba(255, 243, 224, 0.36);
    background: rgba(1, 25, 19, 0.5);
    color: var(--light);
    padding: 0 20px;
    outline: none;
}

.pi-form input::placeholder {
    color: rgba(255, 243, 224, 0.62);
}

.pi-form button[type='submit'] {
    border: 1px solid transparent;
    border-radius: 14px 0 14px 0;
    min-height: 54px;
    padding: 0 30px;
    width: fit-content;
    background: linear-gradient(90deg, #f5b79d 0%, #ffeebe 52.88%, #f5b79d 100%);
    color: var(--green);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

@media (max-width: 767px) {
    .pi-page {
        padding-top: 90px;
    }

    .pi-hero-card,
    .pi-register-card {
        border-radius: 24px 0 24px 0;
    }

    .pi-subtitle,
    .pi-copy {
        max-width: 100%;
    }

    .pi-form input[type='text'],
    .pi-form input[type='email'],
    .pi-form input[type='tel'],
    .pi-form button[type='submit'] {
        width: 100%;
        height: 48px;
    }
}

.pi-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.pi-form input.pi-invalid {
    border-color: #ff8c8c;
}

.pi-field-error {
    margin-top: 6px;
    color: #ffb3b3;
    font-size: 12px;
}

.pi-form-message {
    margin: 6px 0 0;
    font-size: 14px;
    color: rgba(255, 243, 224, 0.95);
}

.pi-form-message.is-error {
    color: #ffb3b3;
}

.pi-form-message.is-success {
    color: #c7ffcf;
}

.pi-form button[type='submit']:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.pi-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
}

.pi-alert-error {
    border: 1px solid rgba(255, 140, 140, 0.7);
    background: rgba(92, 21, 21, 0.4);
    color: #ffd2d2;
}

.pi-alert-success {
    border: 1px solid rgba(134, 232, 158, 0.7);
    background: rgba(24, 64, 33, 0.45);
    color: #d7ffdf;
}

.pi-form input.is-invalid {
    border-color: #ff8c8c;
}

.pi-field-error {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    color: #ffb3b3;
    font-size: 12px;
}

.pi-thanks-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.pi-thanks-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.pi-thanks-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 25, 19, 0.75);
}

.pi-thanks-modal__dialog {
    position: relative;
    width: min(100%, 520px);
    border: 1px solid rgba(255, 243, 224, 0.4);
    border-radius: 22px 0 22px 0;
    background: linear-gradient(145deg, rgba(15, 39, 31, 0.98) 0%, rgba(24, 55, 47, 0.96) 100%);
    color: var(--light);
    padding: 28px 24px 24px;
    transform: translateY(16px);
    transition: transform 0.3s ease;
}

.pi-thanks-modal.is-active .pi-thanks-modal__dialog {
    transform: translateY(0);
}

.pi-thanks-modal__close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 243, 224, 0.9);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.pi-thanks-modal__title {
    margin: 0 0 8px;
    font-size: 32px;
    font-family: var(--font-heading);
}

.pi-thanks-modal__text {
    margin: 0;
    color: rgba(255, 243, 224, 0.9);
}
