/* ============================================================
   КавунОпт — тёмная тема, mobile-first
   ============================================================ */

:root {
  /* Palette */
  --bg:        #0c130e;
  --bg-2:      #111b13;
  --bg-3:      #16241a;
  --surface:   #16241a;
  --surface-2: #1d3123;
  --border:    #26402c;

  --text:      #eaf3ec;
  --text-dim:  #a7bcae;
  --muted:     #7d9585;

  --green:     #3fbf4f;
  --green-2:   #2ea33c;
  --green-glow: rgba(63, 191, 79, .35);
  --red:       #e23b53;   /* мякоть кавуна */

  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1160px;

  --shadow:    0 10px 30px rgba(0,0,0,.45);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.35);

  --font-head: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0; }

.accent { color: var(--green); }
.muted  { color: var(--muted); }
.opt    { color: var(--muted); font-weight: 400; }

/* placeholder marker to spot what needs replacing */
.ph {
  color: var(--red);
  font-weight: 600;
  font-size: .85em;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  min-height: 48px;               /* тап-таргет */
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #06120a;
  box-shadow: 0 8px 22px var(--green-glow);
}
.btn-primary:hover { box-shadow: 0 10px 30px var(--green-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

.btn-lg    { font-size: 16px; padding: 16px 26px; min-height: 54px; }
.btn-block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12,19,14,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 12px;
}
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); }
.logo-mark { font-size: 24px; }
.logo-text { font-weight: 800; font-size: 20px; letter-spacing: -.3px; }
.logo-text b { color: var(--green); font-weight: 900; }

.nav {
  position: fixed;
  inset: 62px 0 auto 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 8px 18px 18px;
  gap: 4px;
  display: none;
  box-shadow: var(--shadow);
}
.nav.open { display: flex; }
.nav-link {
  padding: 14px 6px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.nav-link:last-child { border-bottom: none; }
.nav-link:hover { color: var(--green); }
.nav-cta {
  color: var(--green) !important;
  border-bottom: none;
  margin-top: 6px;
}

.header-phone {
  margin-left: auto;
  width: 44px; height: 44px;
  display: none;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 18px;
}

.burger {
  width: 46px; height: 46px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; cursor: pointer;
}
.burger span {
  width: 20px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .25s, opacity .2s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 40px 0 48px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 90% 0%, rgba(63,191,79,.16), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(226,59,83,.10), transparent 60%),
    var(--bg);
}
/* Мобільний фон hero: фото + затемнення, щоб текст лишався читабельним */
.hero-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(180deg,
      rgba(12,19,14,.74) 0%,
      rgba(12,19,14,.86) 60%,
      var(--bg) 100%),
    url("../img/background-mobile.jpg"),
    radial-gradient(circle at 20% 30%, rgba(63,191,79,.06) 0, transparent 40%);
  background-size: cover, cover, auto;
  background-position: center, center top, 0 0;
  background-repeat: no-repeat;
  pointer-events: none;
}
.hero-inner { position: relative; display: flex; flex-direction: column; gap: 22px; }
.hero-copy { padding: 10px 10px 0; }

.hero-copy p {
  margin-bottom: 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  color: var(--green);
  background: rgba(63,191,79,.10);
  border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 999px;
  margin: 0;
  align-self: flex-start;
}
.hero-title {
  font-size: clamp(34px, 11vw, 52px);
  font-weight: 900;
  letter-spacing: -1px;
  margin: 4px 0 20px 0;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 46ch;
  margin: 0;
}

.price-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}
.price-main {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.05;
  color: var(--green);
  letter-spacing: -.5px;
}
.price-approx { color: var(--text-dim); font-size: 14px; }
.price-approx b { color: var(--text); font-weight: 700; }
.price-sub { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

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

.hero-points {
  list-style: none; margin: 16px 0 20px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  color: var(--text-dim); font-size: 14px;
}
.hero-points li { white-space: nowrap; }

.hero-visual { display: none; }
.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 540px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ============================================================
   STATS
   ============================================================ */
.stats { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin: 0 auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.stat { background: var(--bg-2); padding: 20px 14px; text-align: center; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--text); }
.stat-num small { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 52px 0; }
.section-alt { background: var(--bg-2); }
.section-title { font-size: clamp(26px, 7vw, 36px); font-weight: 800; letter-spacing: -.5px; }
.section-lead { color: var(--text-dim); margin: 10px 0 26px; font-size: 15.5px; max-width: 58ch; }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card-ico {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 26px;
  background: rgba(63,191,79,.10);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 14px;
}
.card h3 { font-size: 19px; margin-bottom: 6px; }
.card p { color: var(--text-dim); font-size: 14.5px; margin: 0; }

/* ============================================================
   ЦІНИ / TIERS
   ============================================================ */
.tiers { display: grid; grid-template-columns: 1fr; gap: 16px; }
.tier {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex; flex-direction: column; gap: 16px;
}
.tier-featured {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green), 0 12px 34px var(--green-glow);
}
.tier-tag {
  position: absolute; top: -12px; left: 22px;
  background: var(--green); color: #06120a;
  font-family: var(--font-head); font-weight: 800; font-size: 12px;
  padding: 5px 12px; border-radius: 999px;
}
.tier-head h3 { font-size: 20px; }
.tier-vol { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.tier-price { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--text-dim); }
.tier-price b { font-size: 42px; color: var(--green); }
.tier-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tier-list li { position: relative; padding-left: 26px; color: var(--text-dim); font-size: 14.5px; }
.tier-list li::before {
  content: "✔"; position: absolute; left: 0; top: 0;
  color: var(--green); font-weight: 700;
}
.tier .btn { margin-top: auto; }
.price-note { color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery-item { margin: 0; border-radius: var(--radius-sm); overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.ph-photo {
  aspect-ratio: 4/3;
  display: grid; place-items: center; text-align: center;
  background:
    repeating-linear-gradient(45deg, var(--bg-3) 0 14px, var(--surface) 14px 28px);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
}
.ph-photo small { color: var(--muted); font-weight: 500; font-size: 12px; }

.gallery-cta .gallery-cta-inner {
  aspect-ratio: 4/3;
  display: grid; place-items: center; gap: 12px;
  text-align: center; padding: 18px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--green);
  box-shadow: inset 0 0 0 1px rgba(63,191,79,.15);
  border-radius: var(--radius-sm);
}
.gallery-cta-inner p { margin: 0; color: var(--text-dim); font-size: 14px; }
.btn-cta-sm { padding: 11px 16px; font-size: 14px; white-space: normal; }

/* ============================================================
   LOCATION
   ============================================================ */
.location { display: grid; grid-template-columns: 1fr; gap: 16px; }
.map {
  width: 100%;
  height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  z-index: 1;
}
.map iframe { display: block; width: 100%; height: 100%; border: 0; }
.location-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.location-info h3 { font-size: 19px; margin-bottom: 10px; }
.location-info p { color: var(--text-dim); margin: 0 0 14px; }
.location-contact { margin-top: 16px; }

/* ============================================================
   FORM
   ============================================================ */
.form-wrap {
  max-width: 640px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px 22px;
  box-shadow: var(--shadow);
}
.form-head { text-align: center; margin-bottom: 22px; }
.form-head .section-lead { margin-left: auto; margin-right: auto; }
.phone-big { margin-top: 6px; font-size: 20px; letter-spacing: .5px; }
.or-divider {
  position: relative; text-align: center;
  color: var(--muted); font-size: 13px; margin: 20px 0 2px;
}
.or-divider span { position: relative; z-index: 1; background: var(--surface-2); padding: 0 12px; }
.or-divider::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--border);
}

.lead-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-family: var(--font-head); font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 15px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;                 /* 16px — без зума на iOS */
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}
.field input.invalid, .field select.invalid { border-color: var(--red); }
.err { color: var(--red); font-size: 13px; min-height: 0; }
.err:empty { display: none; }

/* Honeypot: ховаємо від людей, але лишаємо в DOM для ботів.
   Не display:none — частина ботів такі поля свідомо пропускає. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-hint { color: var(--muted); font-size: 12.5px; text-align: center; margin: 4px 0 0; }
.form-status { text-align: center; font-weight: 600; margin: 6px 0 0; min-height: 22px; }
.form-status.ok  { color: var(--green); }
.form-status.bad { color: var(--red); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 26px; padding-bottom: 30px; }
.footer-col h4 { font-size: 15px; margin-bottom: 12px; color: var(--text); }
.footer-col .muted { margin-top: 10px; font-size: 14px; }
.footer-link { display: block; color: var(--text-dim); padding: 6px 0; font-size: 14.5px; }
.footer-link:hover { color: var(--green); }
.footer-phone { font-size: 18px; font-weight: 700; color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 18px;
  color: var(--muted); font-size: 13px; text-align: center;
}

/* ============================================================
   STICKY MOBILE CTA BAR
   ============================================================ */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: flex; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(12,19,14,.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.mobile-bar .btn { flex: 1; }
.mobile-bar .btn-ghost { flex: 0 0 42%; }
/* keep content above the bar */
body { padding-bottom: 78px; }

/* ============================================================
   RESPONSIVE  (mobile-first → up)
   ============================================================ */
@media (min-width: 560px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { flex: 1; }
}

@media (min-width: 900px) {
  html { scroll-padding-top: 80px; }
  .header-inner { height: 72px; }

  /* desktop nav */
  .burger { display: none; }
  .header-phone { display: none; }
  .nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .nav-link { border-bottom: none; padding: 10px 14px; font-size: 15px; }
  .nav-cta {
    background: linear-gradient(135deg, var(--green), var(--green-2));
    color: #06120a !important;
    border-radius: 999px;
    padding: 10px 20px !important;
    margin-left: 8px;
  }

  .hero { padding: 70px 0 80px; }
  /* на десктопі працює .hero-visual — мобільне фото не потрібне (і не вантажиться) */
  .hero-bg {
    background-image:
      radial-gradient(circle at 20% 30%, rgba(63,191,79,.06) 0, transparent 40%);
  }
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }
  .hero-copy { flex: 1.1; padding: 0 24px 0 8px; }
  .hero-visual { display: block; flex: .9; }
  .hero-actions { max-width: 440px; }

  .cards { grid-template-columns: repeat(4, 1fr); }
  .tiers { grid-template-columns: repeat(3, 1fr); }
  .tier-featured { transform: translateY(-10px); }

  .location { grid-template-columns: 1.4fr 1fr; align-items: stretch; }
  .map { height: 100%; min-height: 380px; }

  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }

  /* no sticky bottom bar on desktop */
  .mobile-bar { display: none; }
  body { padding-bottom: 0; }
}

@media (min-width: 1100px) {
  .melon-illustration { font-size: 280px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}
