@font-face {
  font-family: 'Tubatay TT';
  src: url('/fonts/TubatayTT-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tubatay TT';
  src: url('/fonts/TubatayTT-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tubatay TT';
  src: url('/fonts/TubatayTT-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tubatay TT';
  src: url('/fonts/TubatayTT-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #3E7554;
  --green-light: #99CFAB;
  --terracotta: #D66C56;
  --terracotta-light: #F2C8B3;
  --blue: #CAE4EB;
  --blue-deep: #8ECDDE;
  --yellow: #F8EAA6;
  --white: #ffffff;
  --font-main: 'Tubatay TT', 'Nunito', sans-serif;
  --font-ui: 'Nunito', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--white);
  min-height: 100vh;
  background: linear-gradient(160deg, #2d5a40 0%, var(--green) 40%, #346a4c 100%);
  overflow-x: hidden;
  position: relative;
}

/* ── Background decorative shapes ── */

.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: var(--terracotta);
  top: -120px;
  right: -100px;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: var(--blue);
  bottom: 10%;
  left: -150px;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: var(--yellow);
  top: 50%;
  right: 10%;
}

.shape-4 {
  width: 350px;
  height: 350px;
  background: var(--green-light);
  bottom: -100px;
  right: 30%;
}

/* ── Layout ── */

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ── Header ── */

.header {
  padding: 20px 0;
  display: flex;
  justify-content: center;
}

.header-icon {
  height: 56px;
  width: auto;
  display: block;
}

/* ── Hero ── */

.hero {
  padding: 48px 0 32px;
  text-align: center;
}

.hero__title {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.2rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  opacity: 0.85;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Conditions ── */

.conditions {
  padding: 24px 0 40px;
}

.conditions__card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 36px 32px;
}

.conditions__title {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  margin-bottom: 28px;
  text-align: center;
}

.conditions__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.conditions__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.conditions__number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
}

.conditions__item h3 {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.conditions__item p {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.92rem;
  opacity: 0.8;
  line-height: 1.45;
}

/* ── Registration Form (Glassmorphism) ── */

.registration {
  padding: 0 0 60px;
}

.form-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 40px 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.form-card form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-card__title {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2rem);
  text-align: center;
  margin-bottom: 8px;
}

.form-card__subtitle {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.95rem;
  text-align: center;
  opacity: 0.75;
  margin-bottom: 32px;
}

#code {
  text-transform: uppercase;
}

/* ── Form Inputs ── */

.form-group {
  position: relative;
  margin: 0;
}

.form-group input[type="text"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 400;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.25s, background 0.25s;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.13);
}

.form-group input::placeholder {
  color: transparent;
}

.form-group:not(.form-group--checkbox) label {
  position: absolute;
  left: 18px;
  top: 16px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  transition: all 0.2s ease;
}

.form-group:not(.form-group--checkbox) input:focus + label,
.form-group:not(.form-group--checkbox) input:not(:placeholder-shown) + label {
  top: -10px;
  left: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: var(--green);
  padding: 0 6px;
  border-radius: 4px;
}

.form-group input.input-error {
  border-color: #ff6b6b;
}

.form-error {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: #ff6b6b;
  margin-top: 6px;
  min-height: 0;
}

.form-error:empty {
  display: none;
}

/* ── Checkboxes ── */

.form-group--checkbox {
  position: static;
  margin: 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  position: relative;
  transition: all 0.2s;
  margin-top: 1px;
}

.checkbox-label input:checked + .checkbox-custom {
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 7px;
  height: 11px;
  border: solid var(--white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-label .link {
  color: var(--terracotta-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkbox-label .link:hover {
  color: var(--terracotta);
}

/* ── Submit Button ── */

.btn-submit {
  width: 100%;
  padding: 16px 24px;
  margin-top: 10px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  background: var(--terracotta);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(214, 108, 86, 0.35);
}

.btn-submit:hover {
  background: #c45d48;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(214, 108, 86, 0.45);
}

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

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-loader svg {
  display: block;
}

/* ── Form Message ── */

.form-message {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.45;
}

.form-message--success {
  background: rgba(153, 207, 171, 0.2);
  border: 1px solid rgba(153, 207, 171, 0.4);
  color: #b8e6c8;
}

.form-message--error {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ff8a8a;
}

/* ── Footer ── */

.footer {
  padding: 24px 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer p {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  opacity: 0.5;
}

/* ── Loyalty success modal (таргет-лендинг /promo2) ── */

.loyalty-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.loyalty-modal[hidden] {
  display: none;
}

.loyalty-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.loyalty-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.loyalty-modal__title {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--white);
}

.loyalty-modal__text {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.9;
  margin-bottom: 0;
  color: var(--white);
}

/* ── SMS step (таргет-лендинг) ── */

.sms-step {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sms-step__hint {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  opacity: 0.88;
  margin-bottom: 20px;
  line-height: 1.45;
}

.sms-step .btn-submit {
  margin-top: 8px;
}

.btn-resend {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-resend:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-resend:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .header {
    padding: 16px 0;
  }

  .header-icon {
    height: 48px;
  }

  .hero {
    padding: 32px 0 24px;
  }

  .conditions__card {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .conditions__number {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .form-card {
    padding: 28px 20px;
    border-radius: 22px;
  }

  .form-group input[type="text"],
  .form-group input[type="tel"] {
    padding: 14px 16px;
    border-radius: 12px;
  }

  .btn-submit {
    padding: 14px 20px;
    border-radius: 12px;
  }
}

@media (max-width: 380px) {
  .hero__title {
    font-size: 1.7rem;
  }

  .conditions__item {
    gap: 12px;
  }
}
