/* ==========================================================================
   ПЛЯЖ Pool & Spa — Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  --bg-0: #05080d;
  --bg-1: #0a1320;
  --bg-2: #0d1b2e;
  --ink: #f4f8ff;
  --ink-dim: #8aa0b8;
  --aqua: #4cc9f0;
  --aqua-bright: #7dd3fc;
  --aqua-deep: #0284c7;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-hi: rgba(255, 255, 255, 0.07);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  font-family: 'Onest', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg-0);
  min-height: 100vh;
  position: relative;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* --------------------------------------------------------------------------
   3. Atmospheric background
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(70% 45% at 75% 8%, rgba(76, 201, 240, 0.16), transparent 65%),
    radial-gradient(55% 38% at 10% 92%, rgba(2, 132, 199, 0.20), transparent 65%),
    radial-gradient(40% 30% at 90% 70%, rgba(125, 211, 252, 0.08), transparent 70%),
    linear-gradient(180deg, #0a1424 0%, #060a13 55%, #04070d 100%);
  z-index: -3;
}

/* Subtle grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -1;
}

/* Animated mesh wave at the bottom */
.mesh {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -10vh;
  height: 55vh;
  z-index: -2;
  pointer-events: none;
  opacity: 0.55;
  mask-image: linear-gradient(to top, #000 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 100%);
}

.mesh svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mesh path {
  fill: none;
  stroke-width: 1;
  stroke-linecap: round;
}

.mesh .w1 { stroke: rgba(76, 201, 240, 0.35);  animation: swell 9s ease-in-out infinite; }
.mesh .w2 { stroke: rgba(125, 211, 252, 0.18); animation: swell 12s ease-in-out infinite reverse; }
.mesh .w3 { stroke: rgba(2, 132, 199, 0.22);   animation: swell 15s ease-in-out infinite; }
.mesh .w-faint { opacity: 0.6; }

/* --------------------------------------------------------------------------
   4. Layout shell
   -------------------------------------------------------------------------- */
.shell {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(20px, 6vw, 40px) clamp(18px, 5vw, 28px) 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   5. Brand / logo
   -------------------------------------------------------------------------- */
.brand {
  position: relative;
  padding-top: clamp(28px, 8vw, 56px);
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s forwards;
}

.logo {
  display: inline-block;
  width: clamp(220px, 60vw, 360px);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  animation: drift 6s ease-in-out 1s infinite;
}

.tagline {
  margin-top: clamp(8px, 2vw, 14px);
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  letter-spacing: 0.42em;
  font-size: 13px;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.tagline span {
  color: var(--aqua-bright);
}

/* Ambient wave behind the logo */
.ambient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  height: 280px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.45;
  overflow: hidden;
}

.ambient svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ambient path {
  fill: none;
  stroke: rgba(76, 201, 240, 0.25);
  stroke-width: 1;
}

.ambient path.faint {
  stroke: rgba(76, 201, 240, 0.12);
}

/* --------------------------------------------------------------------------
   6. Hours indicator
   -------------------------------------------------------------------------- */
.hours {
  margin: clamp(28px, 7vw, 42px) 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s forwards;
}

.hours .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

/* --------------------------------------------------------------------------
   7. Card grid (Страви / Dishes / Бар / Bar)
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 20px;
  min-height: 140px;
  border-radius: 22px;
  background: linear-gradient(160deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s, background 0.35s;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.card:nth-child(1) { animation-delay: 0.35s; }
.card:nth-child(2) { animation-delay: 0.45s; }
.card:nth-child(3) { animation-delay: 0.55s; }
.card:nth-child(4) { animation-delay: 0.65s; }

.card::before {
  /* gradient hover wash */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(76, 201, 240, 0.22), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}

.card::after {
  /* subtle bottom hairline */
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
}

.card:hover::before,
.card:focus-visible::before {
  opacity: 1;
}

.card:active {
  transform: translateY(-1px);
}

.card .lang {
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.card .title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 6vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 6px;
}

.card .alt {
  font-family: 'Onest', sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.card .arrow {
  align-self: flex-end;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.35s, color 0.35s;
}

.card:hover .arrow {
  transform: rotate(-45deg);
  background: var(--aqua);
  color: #04121d;
  border-color: transparent;
}

.card .icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 22px;
  height: 22px;
  color: var(--aqua);
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   8. Booking CTA
   -------------------------------------------------------------------------- */
.cta {
  margin-top: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--aqua-deep) 0%, var(--aqua) 60%, #a5e8ff 100%);
  color: #03121f;
  text-decoration: none;
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: clamp(15px, 4.2vw, 18px);
  overflow: hidden;
  box-shadow:
    0 18px 40px -20px rgba(76, 201, 240, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.75s forwards;
}

.cta:hover {
  transform: translateY(-3px);
  box-shadow:
    0 24px 50px -18px rgba(76, 201, 240, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 100% 50%, rgba(255, 255, 255, 0.35), transparent 60%);
  pointer-events: none;
}

.cta::after {
  content: "";
  position: absolute;
  right: -30px;
  top: 50%;
  width: 160px;
  height: 160px;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  pointer-events: none;
  animation: shimmer 5s ease-in-out infinite;
}

.cta .label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.cta .label small {
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 4px;
}

.cta .arrow-cta {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #04121d;
  color: var(--aqua-bright);
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cta:hover .arrow-cta {
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   9. Footer / contacts
   -------------------------------------------------------------------------- */
.footer {
  margin-top: auto;
  padding-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  opacity: 0;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.9s forwards;
}

.contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.02em;
  font-feature-settings: "tnum";
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.contact:hover {
  background: var(--glass-hi);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.contact svg {
  width: 16px;
  height: 16px;
  color: var(--aqua-bright);
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.3s, border-color 0.3s, transform 0.3s, color 0.3s;
}

.icon-btn:hover {
  background: var(--glass-hi);
  border-color: var(--line-strong);
  transform: translateY(-2px);
  color: var(--aqua-bright);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   10. Animations
   -------------------------------------------------------------------------- */
@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.55); }
  100% { box-shadow: 0 0 0 14px rgba(76, 201, 240, 0); }
}

@keyframes swell {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50%      { transform: translateY(-8px) scaleY(1.04); }
}

@keyframes shimmer {
  0%, 100% { transform: translateY(-50%) scale(1);    opacity: 0.7; }
  50%      { transform: translateY(-50%) scale(1.15); opacity: 1;   }
}

/* --------------------------------------------------------------------------
   11. Responsive tweaks
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .card {
    padding: 18px 16px;
    min-height: 128px;
    border-radius: 18px;
  }
  .grid { gap: 10px; }
  .cta {
    padding: 18px 20px;
    border-radius: 18px;
  }
}

/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
