/* ============================================================================
   Andaman Estate — лендинг «Ипотека на Пхукете»
   Системные шрифты (без внешних зависимостей), палитра «океан + закатное золото».
   ============================================================================ */

:root {
  /* Палитра */
  --sea: #0e8a8a;
  --sea-600: #0b6f72;
  --sea-800: #08484f;
  --sea-900: #06363c;
  --gold: #e3a23f;
  --gold-2: #f3bd5f;
  --coral: #ff6f59;
  --ink: #122024;
  --body: #33474d;
  --muted: #6a7d83;
  --bg: #fbf8f3;
  --bg-alt: #f1ece2;
  --card: #ffffff;
  --line: rgba(11, 47, 51, 0.10);
  --line-strong: rgba(11, 47, 51, 0.18);

  /* Размеры/радиусы/тени */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(8, 54, 60, 0.06);
  --shadow: 0 16px 40px -18px rgba(8, 54, 60, 0.30);
  --shadow-lg: 0 30px 70px -28px rgba(8, 54, 60, 0.45);
  --maxw: 1140px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

/* ── Reset / база ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.container--narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ── Кнопки ───────────────────────────────────────────────────────────────── */
.btn {
  --b: var(--sea);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border: 1px solid transparent; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 1rem; line-height: 1; color: #fff; background: var(--b);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #3a2606; box-shadow: 0 12px 26px -12px rgba(227, 162, 63, 0.8);
}
.btn--primary:hover { box-shadow: 0 16px 30px -10px rgba(227, 162, 63, 0.95); }
.btn--ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.55); color: #fff; backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(255,255,255,.22); }
.btn--soft { background: var(--bg-alt); color: var(--sea-800); border-color: var(--line); }
.btn--soft:hover { background: #e7e0d2; }
.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 17px 28px; font-size: 1.05rem; }
.btn--sm { padding: 10px 18px; font-size: .92rem; }

/* ── Типографика секций ───────────────────────────────────────────────────── */
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700;
  color: var(--sea); margin-bottom: 12px;
}
.eyebrow--light { color: var(--gold-2); }
.section { padding: clamp(56px, 8vw, 104px) 0; }
[id] { scroll-margin-top: 84px; }
.section--alt { background: var(--bg-alt); }
.section__title { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 14px; }
.section__title--light { color: #fff; }
.section__lead { font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 62ch; margin-bottom: 36px; }
.ast { color: var(--coral); }

/* ── Шапка ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 243, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: box-shadow .25s ease, border-color .25s ease;
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); border-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__mark { display: inline-flex; }
.brand__text { font-size: 1.18rem; color: var(--ink); letter-spacing: -.02em; font-weight: 700; }
.brand__text strong { color: var(--sea); font-weight: 800; }
.brand__text--light { color: #fff; } .brand__text--light strong { color: var(--gold-2); }
.nav { display: none; margin-left: auto; gap: 26px; }
.nav a { color: var(--body); font-weight: 600; font-size: .96rem; transition: color .15s ease; }
.nav a:hover { color: var(--sea); }
.header-cta { margin-left: auto; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .header-cta { margin-left: 0; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { position: relative; color: #fff; isolation: isolate; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,54,60,.55) 0%, rgba(6,54,60,.30) 40%, rgba(6,54,60,.78) 100%),
    radial-gradient(120% 80% at 80% 0%, rgba(255,111,89,.25), transparent 60%);
}
.hero__inner { padding-block: clamp(80px, 14vh, 150px) clamp(56px, 9vh, 96px); max-width: 760px; }
.hero__title { color: #fff; font-size: clamp(2.1rem, 6vw, 3.7rem); text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.3rem); margin: 20px 0 30px; color: rgba(255,255,255,.94); max-width: 60ch; }
.hero__lead b { color: var(--gold-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px;
  margin: 38px 0 26px; max-width: 560px;
}
.hero__stats div { border-left: 3px solid var(--gold); padding-left: 14px; }
.hero__stats dt { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; color: #fff; }
.hero__stats dd { color: rgba(255,255,255,.8); font-size: .9rem; }
.hero__note {
  background: rgba(8, 54, 60, .42); border: 1px solid rgba(255,255,255,.18);
  padding: 14px 18px; border-radius: var(--radius-sm); font-size: .96rem; max-width: 60ch;
  backdrop-filter: blur(3px);
}
@media (min-width: 620px) { .hero__stats { grid-template-columns: repeat(4, 1fr); } }
.hero__minpay {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  background: rgba(8, 54, 60, .42); border: 1px solid rgba(255, 255, 255, .20);
  padding: 12px 18px; border-radius: var(--radius-sm); backdrop-filter: blur(3px);
  font-size: 1.02rem; color: rgba(255, 255, 255, .92); max-width: 100%;
}
.hero__minpay b { color: var(--gold-2); font-size: 1.3rem; font-weight: 800; }
.hero__minpay-rub { color: rgba(255, 255, 255, .85); }
.hero__minpay-cond { width: 100%; color: rgba(255, 255, 255, .7); font-size: .86rem; }

/* ── Features (сетка преимуществ) ─────────────────────────────────────────── */
.features { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature__ico {
  display: inline-grid; place-items: center; width: 50px; height: 50px; font-size: 1.5rem;
  background: linear-gradient(135deg, #e8f5f3, #d6efe9); border-radius: 14px; margin-bottom: 14px;
}
.feature h3 { font-size: 1.12rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .96rem; }
.features--compact .feature { padding: 22px 20px; }

/* ── Steps ────────────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; display: grid; gap: 18px; grid-template-columns: 1fr; counter-reset: s; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px 24px; box-shadow: var(--shadow-sm);
}
.step__num {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--sea); color: #fff; font-weight: 800; font-size: 1.15rem; margin-bottom: 14px;
}
.step h3 { font-size: 1.06rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .95rem; }

/* ── Калькулятор ──────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.calc { display: grid; gap: 22px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 920px) { .calc { grid-template-columns: 1.05fr 1fr; } }
.calc__controls { padding: 28px 26px; }
.control { margin-bottom: 26px; }
.control:last-of-type { margin-bottom: 18px; }
.control__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.control__head label { font-weight: 700; color: var(--ink); }
.control__value { font-weight: 800; color: var(--sea); font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.control__scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; margin-top: 6px; }
.control__hint { color: var(--muted); font-size: .86rem; margin-top: 10px; }

/* range */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, var(--sea) 0%, var(--sea) var(--p,0%), var(--bg-alt) var(--p,0%));
  outline-offset: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 5px solid var(--sea); box-shadow: var(--shadow-sm); cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 5px solid var(--sea); cursor: grab;
}

/* segmented */
.segmented { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.segmented button {
  padding: 12px 0; border: 1px solid var(--line-strong); background: var(--card);
  border-radius: 10px; font-weight: 700; color: var(--body); transition: all .15s ease;
}
.segmented button:hover { border-color: var(--sea); color: var(--sea); }
.segmented button.is-active { background: var(--sea); border-color: var(--sea); color: #fff; }

.calc__breakdown { list-style: none; padding: 18px 0 0; margin-top: 6px; border-top: 1px dashed var(--line-strong); }
.calc__breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .96rem; }
.calc__breakdown span { color: var(--muted); }
.calc__breakdown b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* планы (2 блока) */
.calc__cards { display: grid; gap: 18px; }
.plan { position: relative; padding: 26px 24px; }
.plan__head h3 { font-size: 1.25rem; }
.plan__head p { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.plan__amount { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; color: var(--ink); margin: 14px 0 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.plan__amount small { font-size: 1rem; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.plan__sub { color: var(--sea-600); font-size: .95rem; margin-bottom: 12px; }
.plan__sub b { color: var(--sea-800); }
.plan__list { list-style: none; padding: 14px 0 0; margin-top: 6px; border-top: 1px solid var(--line); display: grid; gap: 9px; }
.plan__list li { font-size: .96rem; color: var(--body); }
.plan--accent { border: 2px solid var(--gold); box-shadow: var(--shadow-lg); }
.plan--accent .plan__amount { color: var(--sea-800); }
.plan__badge {
  position: absolute; top: -13px; right: 22px; background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #3a2606; font-weight: 800; font-size: .78rem; padding: 6px 14px; border-radius: 99px; box-shadow: var(--shadow-sm);
}
.calc__note { color: var(--muted); font-size: .85rem; margin-top: 22px; max-width: 90ch; line-height: 1.55; }
.calc__cta { margin-top: 26px; }

/* ── Split (управление) ───────────────────────────────────────────────────── */
.section--split { background: var(--bg); }
.split { display: grid; gap: 30px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; gap: 50px; } }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.checklist { list-style: none; padding: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 34px; color: var(--body); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px;
  display: grid; place-items: center; background: var(--sea); color: #fff; border-radius: 50%;
  font-size: .8rem; font-weight: 800;
}

/* ── Объекты ──────────────────────────────────────────────────────────────── */
.objects { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .objects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .objects { grid-template-columns: repeat(3, 1fr); } }
.object { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.object:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.object__media { position: relative; }
.object__media img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.object__tag {
  position: absolute; top: 14px; left: 14px; background: rgba(8,54,60,.85); color: #fff;
  font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; backdrop-filter: blur(3px);
}
.object__body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.object__body h3 { font-size: 1.2rem; }
.object__price { font-size: 1.35rem; font-weight: 800; color: var(--sea-800); }
.object__specs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.object__specs li { background: var(--bg-alt); color: var(--sea-800); font-size: .84rem; font-weight: 600; padding: 5px 11px; border-radius: 99px; }
.object .btn { margin-top: auto; }

/* ── Band (для кого) ──────────────────────────────────────────────────────── */
.section--band {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(8,72,79,.90), rgba(6,54,60,.86)),
    url("/assets/img/aerial.jpg") center / cover no-repeat;
}
.section--band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 120% at 90% -10%, rgba(243,189,95,.22), transparent 55%);
}
.band { position: relative; }
.band__body { max-width: 720px; }
.band__lead { color: rgba(255,255,255,.9); font-size: clamp(1rem,1.7vw,1.18rem); margin-bottom: 22px; }
.band__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.band__tags span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; padding: 8px 16px; border-radius: 99px; font-weight: 600; font-size: .92rem; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 12px; }
.faq__item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 22px; box-shadow: var(--shadow-sm);
}
.faq__item summary {
  list-style: none; cursor: pointer; font-weight: 700; color: var(--ink);
  padding: 18px 36px 18px 0; position: relative; font-size: 1.04rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--sea); font-weight: 400; transition: transform .2s ease;
}
.faq__item[open] summary::after { content: "−"; }
.faq__item p { color: var(--muted); padding: 0 0 20px; max-width: 70ch; }

/* ── Форма ────────────────────────────────────────────────────────────────── */
.section--lead { background: var(--bg-alt); }
.lead { padding: clamp(26px, 4vw, 44px); }
.lead__intro { margin-bottom: 28px; }
.lead__intro .section__lead { margin-bottom: 0; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label, .field legend { font-weight: 700; color: var(--ink); font-size: .96rem; }
.req { color: var(--coral); margin-left: 2px; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--sea); box-shadow: 0 0 0 4px rgba(14,138,138,.14);
}
.field.has-error input, .field.has-error select { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255,111,89,.14); }
.field__err { color: var(--coral); font-size: .85rem; min-height: 0; }
.field--inline { display: block; }
.field--inline legend { margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; margin: 0 8px 8px 0;
  border: 1.5px solid var(--line-strong); border-radius: 99px; font-weight: 600; color: var(--body);
  cursor: pointer; transition: all .15s ease;
}
.chip:has(input:checked) { background: var(--sea); border-color: var(--sea); color: #fff; }
.chip input { accent-color: #fff; }
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: .94rem; color: var(--body); cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--sea); flex: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form__status { font-weight: 600; min-height: 1.2em; }
.form__status.is-ok { color: var(--sea-600); }
.form__status.is-err { color: var(--coral); }
.form__fine { color: var(--muted); font-size: .82rem; }
.lead__success { text-align: center; padding: 26px 10px 14px; }
.lead__success-ico { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.lead__success h3 { font-size: 1.5rem; margin-bottom: 10px; }
.lead__success p { color: var(--muted); max-width: 48ch; margin: 0 auto; }
[hidden] { display: none !important; }
.form.is-sent .field, .form.is-sent .consent, .form.is-sent [data-submit] { opacity: .55; pointer-events: none; }

/* ── Подвал ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: rgba(255,255,255,.74); padding-top: 56px; }
.site-footer__inner { display: grid; gap: 30px; grid-template-columns: 1fr; padding-bottom: 36px; }
@media (min-width: 760px) { .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; gap: 40px; } }
.site-footer__brand p { margin-top: 12px; max-width: 38ch; font-size: .95rem; }
.site-footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer__col ul { list-style: none; padding: 0; display: grid; gap: 9px; font-size: .95rem; }
.site-footer__col a:hover { color: var(--gold-2); }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; padding-bottom: 30px; display: grid; gap: 10px; }
.site-footer__legal p { font-size: .8rem; color: rgba(255,255,255,.55); max-width: 95ch; }

/* ── Плавающая кнопка (мобайл) ────────────────────────────────────────────── */
.floating-cta {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px; border-radius: var(--radius-pill); font-weight: 800; color: #3a2606;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 14px 30px -10px rgba(227,162,63,.9); transition: transform .2s ease, opacity .2s ease;
}
.floating-cta:hover { transform: translateY(-2px); }
.floating-cta.is-hidden { opacity: 0; transform: translateY(140%); pointer-events: none; }
@media (min-width: 760px) { .floating-cta { display: none; } }

/* ── Анимация появления (прогрессивное улучшение) ─────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
