/* ==========================================================================
   Тема «Океан» — ОСНОВНАЯ палитра сайта (класс .theme-ocean на <html> ставится по умолчанию).
   Зелёная палитра (style.css без этого класса) — по ссылке ?theme=green, для будущих страниц вдали от океана.
   Белый — стены вилл, песок — пляж, глубокий океан — тёмные блоки,
   бирюза бассейна — акценты, зелень пальмы — детали.
   ========================================================================== */

:root.theme-ocean {
  --moss: #0e3550;        /* глубокий океан — тёмные блоки, кнопки */
  --moss-2: #134563;
  --moss-3: #1b5a7e;
  --dew: #fbfaf6;         /* белая вилла — основной фон */
  --paper: #fbf8f2;       /* светлый текст на тёмном и светлые карточки */
  --sand: #efe5d5;        /* песок — чередующиеся блоки */
  --sand-text: #8a7258;   /* «ствол пальмы» — подписи */
  --ink: #0f2a3d;
  --stone: #5b6b77;
  --lagoon: #1e8c9c;      /* бирюза бассейна, тёмный тон — для линий и текста на белом */
  --aqua: #3db4c4;        /* бирюза бассейна, яркий тон */
  --lagoon-soft: #d7eff2;
  --palm: #3f9a5c;        /* зелень пальмы */
  --turmeric: #d49a4e;    /* золото песка/солнца — крошечные акценты */
  --line: rgba(14, 53, 80, .14);
  /* оттенки «глубокого океана» для тёмных блоков (меняются вариантами палитры ниже) */
  --o-hi: #17507a;        /* светлое пятно в блоке заявки */
  --o-night: #0a2b42;     /* верх блока заявки, панорама над ним */
  --o-abyss: #071f31;     /* самая глубина */
  --o-foot: #0a2638;      /* подвал */
  --o-glass: #061e2e;     /* тон стекла поверх фото */
  /* ворота candi bentar — яркие, «солнечная лазурь»: градиент сверху вниз, светлые карнизы, белый контур */
  --gate-body: #2a93d4;   /* сплошной цвет (запасной) */
  --gate-top: #6fd0f6;    /* верх — светлый, как небо */
  --gate-mid: #2a9ee0;
  --gate-bottom: #1166b3; /* низ — насыщенный синий */
  --gate-fill-l: url(#gate-grad-l);
  --gate-fill-r: url(#gate-grad-r);
  --gate-ledge: #b4ecff;  /* карнизы и ниши */
  --gate-glow: rgba(255,255,255,.8);
  --gate-veil: #d8f1fb;   /* фон, пока ворота закрыты — светлая дымка, а не тёмная «плёнка» */
}
@media (hover: hover) and (pointer: fine) { .theme-ocean .gate { filter: drop-shadow(0 0 34px rgba(6,60,110,.28)); } }

/* фоны: белый и песок чередуются */
.theme-ocean body { background: var(--dew); }
.theme-ocean .location,
.theme-ocean .others { background: var(--sand); }
.theme-ocean .steps-section { background: var(--dew); }
.theme-ocean .steps-section .lease-note { background: var(--sand); }
.theme-ocean .ticker { background: var(--sand); border-color: rgba(138,114,88,.18); }
.theme-ocean .tick { background: rgba(255,255,255,.65); }
.theme-ocean .eyebrow,
.theme-ocean .card-area { color: var(--sand-text); }

/* шапка и меню */
.theme-ocean .site-header.is-solid,
.theme-ocean .site-header.is-light { background: rgba(251, 250, 246, .86); }
.theme-ocean .site-header:not(.is-solid):not(.is-light) .wrap { background-color: color-mix(in srgb, var(--o-glass) 30%, transparent); }
.theme-ocean .mobile-menu { background: color-mix(in srgb, var(--o-abyss) 84%, transparent); }

/* главный экран: ворота из тёмного вулканического камня с синевой */
.theme-ocean .hero::before {
  background:
    radial-gradient(42% 38% at 50% 50%, rgba(6,24,38,.42), rgba(6,24,38,0) 100%),
    linear-gradient(180deg, rgba(6,24,38,.5) 0%, rgba(6,24,38,.16) 28%, rgba(6,24,38,.22) 58%, rgba(6,24,38,.78) 100%),
    radial-gradient(120% 70% at 50% 40%, transparent 40%, rgba(6,24,38,.35) 100%);
}
/* цвет ворот — переменные --gate-* (ниже: свои для каждого варианта синего и отдельный выбор ворот ?gate=) */
@media (max-width: 860px) {
  .theme-ocean .hero::before { background: linear-gradient(180deg, rgba(6,24,38,.5) 0%, rgba(6,24,38,.4) 35%, rgba(6,24,38,.5) 65%, rgba(6,24,38,.82) 100%); }
}

/* главный экран: вид с обрыва на океан. Когда ворота открываются — «погружение»:
   кадр плавно приближается, при прокрутке камера продолжает лететь к воде */
.theme-ocean .hero-media img {
  object-position: 45% 26%;
  transform: scale(1.32);
  animation: oceanDive 3.6s cubic-bezier(.16, 1, .3, 1) .3s forwards, oceanBreath 26s ease-in-out 3.9s infinite alternate;
}
@keyframes oceanDive { to { transform: scale(1.04); } }
@keyframes oceanBreath { from { transform: scale(1.04); } to { transform: scale(1.1) translate3d(-1%, 1%, 0); } }
.theme-ocean .hero-media picture { display: block; width: 100%; height: 100%; transform-origin: 50% 62%; }
@supports (animation-timeline: scroll()) {
  .theme-ocean .hero-media picture { animation: oceanScroll linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
}
@keyframes oceanScroll { from { transform: scale(1); } to { transform: scale(1.22); } }
.theme-ocean .hero-mist { opacity: .3; }
.theme-ocean .hero-kicker { color: rgba(255,255,255,.88); text-shadow: 0 1px 12px rgba(6,24,38,.5); }
@media (max-width: 800px) { .theme-ocean .hero-media img { object-position: 50% 40%; } }
@media (prefers-reduced-motion: reduce) { .theme-ocean .hero-media img, .theme-ocean .hero-media picture { animation: none; transform: none; } }

/* статус «Готова» и галочки — зелень пальмы */
.theme-ocean .badge.ready .dot { background: var(--palm); box-shadow: 0 0 0 0 rgba(63,154,92,.5); }
.theme-ocean .feat-list svg { color: var(--palm); }
.theme-ocean .spec-row svg, .theme-ocean .tick i { color: var(--lagoon); }
.theme-ocean .badge-video, .theme-ocean .slide-nav { background: color-mix(in srgb, var(--o-glass) 30%, transparent); }

/* субак — вода цвета бассейна */
.theme-ocean .subak-water { background-image: linear-gradient(90deg, #1e8c9c, #3db4c4 40%, #9fe2ea 60%, #3db4c4 80%, #1e8c9c); }
@media (max-width: 600px) {
  .theme-ocean .subak-water { background-image: linear-gradient(180deg, #1e8c9c, #3db4c4 40%, #9fe2ea 60%, #3db4c4 80%, #1e8c9c); }
}

/* калькулятор: глубокий океан с бирюзовым и песочным светом */
.theme-ocean .yield .orbs i:nth-child(1) { background: radial-gradient(closest-side, rgba(61,180,196,.45), rgba(61,180,196,0)); }
.theme-ocean .yield .orbs i:nth-child(2) { background: radial-gradient(closest-side, rgba(239,229,213,.22), rgba(239,229,213,0)); }
.theme-ocean input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--aqua) var(--p, 50%), rgba(245,247,241,.2) var(--p, 50%)); }
.theme-ocean input[type=range]::-moz-range-progress { background: var(--aqua); }
.theme-ocean input[type=range]::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(61,180,196,.28); }
.theme-ocean .calc-result strong { color: #f1ddb8; }
.theme-ocean .yield .chip[aria-pressed="true"] { color: var(--moss); }

/* страница виллы */
.theme-ocean .v-layout .orbs i:nth-child(1) { background: radial-gradient(closest-side, rgba(61,180,196,.35), rgba(61,180,196,0)); }
.theme-ocean .v-layout .orbs i:nth-child(2) { background: radial-gradient(closest-side, rgba(239,229,213,.8), rgba(239,229,213,0)); }
.theme-ocean .plan-bar div { background: var(--lagoon-soft); }
.theme-ocean .plan-bar div:first-child { background: var(--moss); }
.theme-ocean .invest div { background: var(--sand); }
.theme-ocean .mobile-bar { background: color-mix(in srgb, var(--moss) 94%, transparent); }
.theme-ocean .vid { background: #071c2b; }
.theme-ocean .lb, .theme-ocean .vm { background: rgba(5, 20, 31, .96); }

/* карта — в холодных тонах */
.theme-ocean .leaflet-container { background: #dde8ec !important; }
.theme-ocean .map .leaflet-tile-pane,
.theme-ocean .v-map .leaflet-tile-pane { filter: grayscale(.85) sepia(.15) hue-rotate(165deg) saturate(.75) brightness(1.06) contrast(.92); }

/* «Бали сейчас» */
.theme-ocean .bali-now { background: linear-gradient(150deg, rgba(255,255,255,.92), rgba(255,255,255,.62)); border-color: rgba(138,114,88,.16); }
.theme-ocean .bn-wicon svg { color: var(--turmeric); }

/* блок заявки — «карта глубин океана» */
.theme-ocean .cta { background: linear-gradient(180deg, var(--o-night) 0, color-mix(in srgb, var(--o-night) 0%, transparent) 160px), radial-gradient(120% 90% at 78% 38%, var(--o-hi) 0%, var(--moss) 45%, var(--o-abyss) 100%); }
.theme-ocean .cta::before { background: linear-gradient(90deg, color-mix(in srgb, var(--o-abyss) 55%, transparent) 0%, color-mix(in srgb, var(--o-abyss) 10%, transparent) 45%, transparent 70%); }
@media (hover: none) {
  .theme-ocean .form { background: linear-gradient(150deg, color-mix(in srgb, var(--o-hi) 84%, transparent), color-mix(in srgb, var(--o-night) 78%, transparent)); }
}
/* серфер в блоке заявки (js/home.js, surf) катается сам; курсор его только сбивает */
@media (max-width: 860px) { .theme-ocean .cta { padding-bottom: 200px; } }   /* на телефоне доска катается под формой */
.theme-ocean .canang { background: linear-gradient(150deg, color-mix(in srgb, var(--o-hi) 95%, transparent), color-mix(in srgb, var(--o-abyss) 97%, transparent)); }

/* гид инвестора: чередование белого и песка */
.theme-ocean .g-alt, .theme-ocean .g-sources { background: var(--sand); }
.theme-ocean .g-alt .g-card, .theme-ocean .g-alt .g-panel, .theme-ocean .g-alt .g-stat { background: rgba(255,255,255,.7); }
.theme-ocean .g-risk { background: rgba(255,255,255,.7); }
.theme-ocean .g-hero { background: radial-gradient(60% 70% at 85% 10%, rgba(212,154,78,.2), transparent 70%), radial-gradient(70% 80% at 0% 100%, rgba(61,180,196,.3), transparent 70%), var(--moss); }
.theme-ocean .g-seg-1, .theme-ocean .g-seg-dot-1 { stroke: #8fb3c2; background: #8fb3c2; }
.theme-ocean .g-seg-2, .theme-ocean .g-seg-dot-2 { stroke: #c4d6de; background: #c4d6de; }
.theme-ocean .g-seg-3, .theme-ocean .g-seg-dot-3 { stroke: #5f7f92; background: #5f7f92; }

/* подвал */
.theme-ocean .site-footer { background: var(--o-foot); }

/* переключатель темы (виден только при просмотре по ссылке с ?theme=) */
.theme-switch {
  position: fixed; left: 14px; bottom: 14px; z-index: 60; display: flex; gap: 4px; padding: 4px;
  border-radius: 999px; background: rgba(255,255,255,.82); border: 1px solid rgba(0,0,0,.08);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px -12px rgba(0,0,0,.35);
  font: 600 12.5px var(--f-body);
}
.theme-switch a { padding: 8px 14px; border-radius: 999px; color: #333; display: inline-flex; align-items: center; gap: 7px; }
.theme-switch a i { width: 10px; height: 10px; border-radius: 50%; }
.theme-switch a[aria-current="true"] { background: #13221e; color: #fff; }
.theme-ocean .theme-switch a[aria-current="true"] { background: var(--moss); }
@media (max-width: 1100px) { .villa-page .theme-switch { bottom: 86px; } }
@media (max-width: 600px) { .theme-switch a { padding: 7px 11px; } }

/* ==========================================================================
   Варианты синего (на выбор, просмотр по ссылке ?palette=azure | lagoon | cobalt, ?palette=deep — как сейчас).
   Меняются только тёмные блоки: кнопки, калькулятор, заявка, подвал, меню.
   ========================================================================== */
:root.theme-ocean[data-palette="azure"] {     /* «Лазурь» — светлее и ярче, как океан в солнечный день */
  --moss: #0b5d8c; --moss-2: #0f6c9f; --moss-3: #1784b8; --ink: #0d2c40; --line: rgba(11, 93, 140, .14);
  --o-hi: #1f8cc4; --o-night: #094c74; --o-abyss: #063b5c; --o-foot: #08446a; --o-glass: #06324e;
  --gate-body: #0b3d60; --gate-ledge: #175b87; --gate-veil: #062f4a; --gate-fill-l: var(--gate-body); --gate-fill-r: var(--gate-body); --gate-glow: rgba(243,220,174,.5);
}
:root.theme-ocean[data-palette="lagoon"] {    /* «Лагуна» — сине-бирюзовый, ближе к цвету бассейна */
  --moss: #0a6272; --moss-2: #0d7383; --moss-3: #138b9b; --ink: #0c2d33; --line: rgba(10, 98, 114, .14);
  --o-hi: #1798a8; --o-night: #08505e; --o-abyss: #05404b; --o-foot: #064a57; --o-glass: #053842;
  --gate-body: #0a4049; --gate-ledge: #15616b; --gate-veil: #06323a; --gate-fill-l: var(--gate-body); --gate-fill-r: var(--gate-body); --gate-glow: rgba(243,220,174,.5);
}
:root.theme-ocean[data-palette="cobalt"] {    /* «Кобальт» — насыщенный яркий синий */
  --moss: #1a4fa0; --moss-2: #2160b8; --moss-3: #2b74cf; --ink: #10234a; --line: rgba(26, 79, 160, .14);
  --o-hi: #3a80d8; --o-night: #153f84; --o-abyss: #0e2f66; --o-foot: #133a7a; --o-glass: #0f2e60;
  --gate-body: #15357a; --gate-ledge: #24509d; --gate-veil: #0d2552; --gate-fill-l: var(--gate-body); --gate-fill-r: var(--gate-body); --gate-glow: rgba(243,220,174,.5);
}
/* ворота отдельно от темы: ?gate=bright | sun | deep | azure | lagoon | cobalt | stone | brick (?gate=auto — как у темы).
   Камень и кирпич — как у настоящих балийских ворот candi bentar (серый вулканический камень paras и красный кирпич). */
:root.theme-ocean[data-gate="deep"]   { --gate-body: #0c2233; --gate-ledge: #17344b; --gate-veil: #071a28; --gate-fill-l: var(--gate-body); --gate-fill-r: var(--gate-body); --gate-glow: rgba(243,220,174,.5); }
:root.theme-ocean[data-gate="azure"]  { --gate-body: #0b3d60; --gate-ledge: #175b87; --gate-veil: #062f4a; --gate-fill-l: var(--gate-body); --gate-fill-r: var(--gate-body); --gate-glow: rgba(243,220,174,.5); }
:root.theme-ocean[data-gate="lagoon"] { --gate-body: #0a4049; --gate-ledge: #15616b; --gate-veil: #06323a; --gate-fill-l: var(--gate-body); --gate-fill-r: var(--gate-body); --gate-glow: rgba(243,220,174,.5); }
:root.theme-ocean[data-gate="cobalt"] { --gate-body: #15357a; --gate-ledge: #24509d; --gate-veil: #0d2552; --gate-fill-l: var(--gate-body); --gate-fill-r: var(--gate-body); --gate-glow: rgba(243,220,174,.5); }
:root.theme-ocean[data-gate="stone"]  { --gate-body: #3a3e3f; --gate-ledge: #565b5b; --gate-veil: #1d2122; --gate-fill-l: var(--gate-body); --gate-fill-r: var(--gate-body); --gate-glow: rgba(243,220,174,.5); }
:root.theme-ocean[data-gate="brick"]  { --gate-body: #7b3f2b; --gate-ledge: #a25c40; --gate-veil: #2b1810; --gate-glow: rgba(250,214,170,.55); --gate-fill-l: var(--gate-body); --gate-fill-r: var(--gate-body); }
/* яркие варианты с градиентом: ?gate=bright (по умолчанию) и ?gate=sun — яркая терракота, как кирпич на солнце */
:root.theme-ocean[data-gate="bright"] { --gate-body: #2a93d4; --gate-top: #6fd0f6; --gate-mid: #2a9ee0; --gate-bottom: #1166b3; --gate-ledge: #b4ecff; --gate-veil: #d8f1fb; --gate-glow: rgba(255,255,255,.8); --gate-fill-l: url(#gate-grad-l); --gate-fill-r: url(#gate-grad-r); }
:root.theme-ocean[data-gate="sun"]    { --gate-body: #e0703f; --gate-top: #ffb27a; --gate-mid: #f07a42; --gate-bottom: #c4471f; --gate-ledge: #ffe0c2; --gate-veil: #fff0e2; --gate-glow: rgba(255,255,255,.8); --gate-fill-l: url(#gate-grad-l); --gate-fill-r: url(#gate-grad-r); }

/* переключатель вариантов: две строки — тема и ворота */
.palette-switch { flex-direction: column; align-items: flex-start; gap: 4px; border-radius: 18px; max-width: calc(100vw - 28px); }
.palette-switch .ps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.palette-switch .ps-label { padding: 0 6px 0 8px; color: #6b6b6b; font-weight: 500; }
.theme-switch:not(.palette-switch) ~ .palette-switch { bottom: 62px; }
@media (max-width: 1100px) { .villa-page .theme-switch:not(.palette-switch) ~ .palette-switch { bottom: 134px; } }
.palette-switch a i { box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
@media (max-width: 600px) {
  .palette-switch { gap: 2px; padding: 3px; left: 8px; bottom: 8px; }
  .palette-switch a { padding: 5px 8px; font-size: 11px; gap: 5px; }
  .palette-switch a i { width: 8px; height: 8px; }
  .palette-switch .ps-label { display: none; }
}
