@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --lime: #c1e85f;
  --lime-strong: #a9d63b;
  --lime-soft: #e3f5b3;
  --lime-bg: #f3f8e8;
  --ink: #2b2f2a;
  --ink-soft: #5b6157;
  --forest: #2f3d17;
  --line: #e2e8d6;
  --white: #fff;
  --danger: #d64545;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(47, 61, 23, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: #fbfdf7;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

/* ---------- Layout ---------- */
.topbar { height: 6px; background: linear-gradient(90deg, var(--lime-strong), var(--lime), var(--lime-strong)); background-size: 200% 100%; animation: flow 6s linear infinite; }
@keyframes flow { to { background-position: -200% 0; } }

.site-header { background: var(--white); }
.site-header-inner { display: flex; justify-content: center; align-items: center; height: 96px; }
.logo img { height: 52px; width: auto; transition: transform .3s; }
.logo:hover img { transform: scale(1.06); }
.site-header + .topbar { height: 22px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.page-head { text-align: center; padding: 48px 0 28px; }
.page-head h1 { font-size: clamp(28px, 4.5vw, 42px); font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--ink-soft); margin-top: 10px; font-size: 17px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--lime-soft); color: var(--forest);
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 99px; margin-bottom: 16px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime-strong); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(169,214,59,.7); } 70% { box-shadow: 0 0 0 10px rgba(169,214,59,0); } 100% { box-shadow: 0 0 0 0 rgba(169,214,59,0); } }

/* ---------- Apartment card ---------- */
.apartment {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: grid; grid-template-columns: 1.25fr 1fr; border: 1px solid var(--line);
}
.gallery { position: relative; min-height: 340px; background: var(--lime-bg); overflow: hidden; }
.gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .8s ease, transform 6s ease; }
.gallery img.active { opacity: 1; transform: scale(1); }
.gallery-nav { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.gallery-nav button { width: 9px; height: 9px; border-radius: 99px; border: 0; background: rgba(255,255,255,.6); cursor: pointer; transition: width .3s, background .3s; }
.gallery-nav button.active { width: 26px; background: var(--lime); }
.gallery-arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.85); cursor: pointer; display: grid; place-items: center;
  opacity: 0; transition: opacity .3s, transform .2s;
}
.gallery:hover .gallery-arrow { opacity: 1; }
.gallery-arrow:hover { transform: scale(1.1); }
.gallery-arrow.prev { left: 14px; } .gallery-arrow.next { right: 14px; }
.gallery-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-soft); }

.apartment-info { padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.apartment-info h2 { font-size: 26px; font-weight: 800; line-height: 1.2; }
.meta { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 15px; }
.meta svg { flex: none; color: var(--forest); }
.price { margin-top: auto; display: flex; align-items: baseline; gap: 6px; padding-top: 14px; border-top: 1px dashed var(--line); }
.price strong { font-size: 30px; font-weight: 800; color: var(--forest); }
.price span { color: var(--ink-soft); }
.description { color: var(--ink-soft); font-size: 15px; white-space: pre-line; }

/* ---------- Info blocks ---------- */
.hero-block {
  margin-top: 28px; background: var(--lime-bg); border-radius: var(--radius);
  display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 24px; padding: 40px;
}
.hero-block h3 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.hero-block p { font-size: 17px; }
.hero-block p + p { font-size: 15px; color: var(--ink-soft); margin-top: 10px; }

.icon-circle {
  width: 110px; height: 110px; border-radius: 50%; background: var(--lime-soft);
  display: grid; place-items: center; color: var(--forest); flex: none;
}
.icon-circle.big { width: 200px; height: 200px; justify-self: center; }
.float { animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

.steps { margin: 28px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--lime); }
.step .num {
  width: 34px; height: 34px; border-radius: 10px; background: var(--lime); color: var(--forest);
  font-weight: 800; display: grid; place-items: center; margin-bottom: 14px;
}
.step.done .num { background: var(--forest); color: var(--lime); }
.step h4 { font-size: 17px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--ink-soft); }

.row-block { display: flex; align-items: center; gap: 32px; padding: 32px 40px; border-radius: var(--radius); }
.row-block.tinted { background: var(--lime-bg); }
.row-block.grey { background: #f6f7f4; }
.row-block h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.row-block .icon-circle { transition: transform .4s; }
.row-block:hover .icon-circle { transform: rotate(-8deg) scale(1.06); }
.checks { list-style: none; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; }
.checks li::before {
  content: ''; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f3d17' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- Form ---------- */
.form-card {
  margin: 28px 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 40px; position: relative; overflow: hidden;
}
.form-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--lime); }
.form-card h3 { font-size: 26px; font-weight: 800; }
.form-card > p { color: var(--ink-soft); margin: 6px 0 26px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { position: relative; }
.field input, .field textarea {
  width: 100%; border: 2px solid var(--line); border-radius: 14px; background: #fcfdf9;
  padding: 24px 16px 10px 48px; font-size: 16px; outline: none; transition: border-color .25s, box-shadow .25s, background .25s;
}
.field textarea { padding-left: 16px; resize: vertical; min-height: 110px; }
.field label {
  position: absolute; left: 48px; top: 17px; color: var(--ink-soft); pointer-events: none;
  transition: all .2s ease; font-size: 16px;
}
.field textarea + label { left: 16px; }
.field svg { position: absolute; left: 16px; top: 18px; color: #9aa38f; transition: color .25s, transform .25s; }
.field input:focus, .field textarea:focus { border-color: var(--lime-strong); background: var(--white); box-shadow: 0 0 0 5px rgba(193,232,95,.25); }
.field input:focus ~ svg { color: var(--forest); transform: scale(1.1); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 7px; font-size: 12px; font-weight: 600; color: var(--forest); }
.field.invalid input { border-color: var(--danger); animation: shake .4s; }
.field .error { color: var(--danger); font-size: 13px; margin: 6px 4px 0; display: none; }
.field.invalid .error { display: block; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* Country-code picker */
.phone-box { position: relative; }
.field-phone input { padding-left: 112px; }
.field-phone label, .field-phone input + label { left: 72px; top: 7px; font-size: 12px; font-weight: 600; color: var(--forest); }
.dial-btn {
  position: absolute; left: 2px; top: 2px; bottom: 2px; width: 66px; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; border-radius: 12px 0 0 12px; background: transparent;
  color: var(--ink-soft); cursor: pointer; transition: color .15s;
}
.dial-btn:hover, .phone-box.open .dial-btn { color: var(--forest); }
.dial-btn:focus-visible { outline: 2px solid var(--lime-strong); outline-offset: -2px; }
.dial-code {
  position: absolute; left: 72px; top: 26px; z-index: 1; pointer-events: none;
  font-size: 16px; line-height: 1.55; color: var(--ink); font-variant-numeric: tabular-nums;
}
.phone-box.open input { border-color: var(--lime-strong); background: var(--white); box-shadow: 0 0 0 5px rgba(193,232,95,.25); }
.dial-flag, .dial-list .fi {
  width: 24px; height: 18px; flex: none; border-radius: 3px;
  background-size: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.dial-chev {
  width: 7px; height: 7px; flex: none; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s;
}
.phone-box.open .dial-chev { transform: rotate(-135deg); margin-top: 3px; }

.dial-panel {
  position: fixed; z-index: 100; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(47, 61, 23, .16); padding: 8px;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.dial-panel.up { transform: translateY(4px); }
.dial-panel.show { opacity: 1; transform: none; pointer-events: auto; }
.dial-search {
  width: 100%; border: 2px solid var(--line); border-radius: 10px; outline: none;
  padding: 10px 12px; font-size: 15px; background: #fcfdf9; margin-bottom: 6px;
  transition: border-color .15s;
}
.dial-search:focus { border-color: var(--lime-strong); background: var(--white); }
.dial-list { list-style: none; overflow-y: auto; overscroll-behavior: contain; max-height: 290px; }
.dial-list::-webkit-scrollbar { width: 8px; }
.dial-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.dial-list li {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px;
  border-radius: 9px; cursor: pointer; font-size: 15px;
}
.dial-list li.active { background: var(--lime-bg); }
.dial-list li.selected { font-weight: 600; }
.dial-list li.selected::after {
  content: ''; width: 5px; height: 10px; margin: -3px 4px 0 0; flex: none;
  border-right: 2px solid var(--forest); border-bottom: 2px solid var(--forest); transform: rotate(45deg);
}
.dial-list .n { flex: 1; min-width: 0; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dial-list .c { color: var(--ink-soft); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.dial-list .empty { padding: 18px; justify-content: center; color: var(--ink-soft); cursor: default; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); margin: 18px 0 24px; cursor: pointer; }
.consent input { width: 20px; height: 20px; accent-color: var(--forest); flex: none; margin-top: 1px; }
.consent.invalid { color: var(--danger); }

.btn-main {
  width: 100%; border: 0; background: var(--lime); color: var(--forest);
  font-size: 20px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 22px; border-radius: 999px; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .15s, background .2s;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.btn-main::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shine 3s ease-in-out infinite;
}
@keyframes shine { 60%, 100% { left: 130%; } }
.btn-main:hover { background: var(--lime-strong); transform: translateY(-2px); }
.btn-main:active { transform: scale(.98); }
.btn-main:disabled { cursor: wait; opacity: .8; }
.btn-main .arrow { transition: transform .25s; }
.btn-main:hover .arrow { transform: translateX(6px); }
.btn-hint { text-align: center; font-size: 14px; color: var(--ink-soft); margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; }

.spinner { width: 22px; height: 22px; border: 3px solid rgba(43,47,42,.25); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Success ---------- */
.success { text-align: center; padding: 20px 0; display: none; }
.success.show { display: block; animation: pop .6s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
.success-check { width: 120px; height: 120px; margin: 0 auto 20px; }
.success-check circle { fill: var(--lime-soft); stroke: var(--lime-strong); stroke-width: 3; stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw .8s ease forwards; }
.success-check path { fill: none; stroke: var(--forest); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h3 { font-size: 28px; }
.success p { color: var(--ink-soft); max-width: 520px; margin: 10px auto 0; }

.btn-paypal {
  margin: 26px auto 0; max-width: 520px; width: 100%;
  border: 0; background: var(--lime); color: var(--forest);
  padding: 18px 26px; border-radius: 999px; cursor: pointer;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 20px rgba(47, 61, 23, .12);
  transition: transform .15s, background .2s, box-shadow .2s;
  font-size: 22px; line-height: 1;
}
.btn-paypal::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shine 3s ease-in-out infinite;
}
.btn-paypal:hover { background: var(--lime-strong); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(47, 61, 23, .18); }
.btn-paypal:active { transform: scale(.98); }
.btn-paypal:disabled { cursor: wait; opacity: .75; }
.btn-paypal .pp-mit, .btn-paypal .pp-zahlen {
  font-weight: 700; color: var(--forest); font-size: 20px;
}
.btn-paypal .pp-logo {
  font-weight: 900; font-style: italic; font-size: 24px;
  letter-spacing: -.02em; display: inline-flex;
}
.btn-paypal .pp-pay { color: #003087; }
.btn-paypal .pp-pal { color: #009cde; }

.confetti { position: fixed; top: -12px; width: 10px; height: 14px; z-index: 50; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .3; } }

footer { text-align: center; padding: 20px 0 50px; color: var(--ink-soft); }
footer strong { color: var(--ink); display: block; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }

.skeleton { background: linear-gradient(90deg, #eef2e6 25%, #f7faf1 50%, #eef2e6 75%); background-size: 200% 100%; animation: flow 1.4s linear infinite; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .site-header-inner { height: 72px; }
  .logo img { height: 40px; }
  .site-header + .topbar { height: 14px; }
  .apartment, .hero-block { grid-template-columns: 1fr; }
  .gallery { min-height: 260px; }
  .hero-block { padding: 28px; text-align: left; }
  .hero-block h3 { font-size: 28px; }
  .icon-circle.big { width: 150px; height: 150px; }
  .icon-circle.big svg { width: 100px; height: 100px; }
  .steps { grid-template-columns: 1fr; }
  .row-block { flex-direction: column; align-items: flex-start; padding: 26px; gap: 18px; }
  .form-card { padding: 26px 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .btn-main { font-size: 17px; padding: 18px; }
}
