/* ============================================================
   NiceTronic — real-photo Mediterranean statement page
   ------------------------------------------------------------
   One fixed viewport. A real sea/sky photograph fills the frame
   and pans very slowly; a flat-vector dolphin emerges from the
   water and glides after the pointer, diving when it moves into
   the sea; three headlines cycle with a soft crossfade; a dark
   CONTACT pill links to the email. No shaders, no scroll —
   minimal and calm.
   ============================================================ */

:root {
  --ink:      #24313b;
  --ink-soft: rgba(36, 49, 59, 0.72);
  --cta-bg:   #3a4249;
  --cta-ink:  #ffffff;

  --display: "Manrope", "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans:    "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  background: linear-gradient(180deg, #99bef5 0%, #d6eafe 55%, #9abce2 100%);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

::selection { background: rgba(90, 165, 201, .28); color: var(--ink); }

a { color: inherit; text-decoration: none; }

/* ============ SCENE (single viewport) ============ */
.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* real photograph, full-bleed with a slow Ken Burns pan */
.bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #99bef5 0%, #d6eafe 55%, #9abce2 100%);
}
.bg__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  animation: kenburns 46s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  0%   { transform: scale(1.06) translate(0, 0); }
  100% { transform: scale(1.17) translate(-1.6%, 1.4%); }
}

/* soft legibility scrim + gentle vignette */
.scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 62%, rgba(120, 170, 200, .16) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .25) 0%, transparent 30%, transparent 72%, rgba(120, 180, 210, .14) 100%);
  pointer-events: none;
}

/* ============ MASCOT (dolphin) ============ */
/* JS positions him with a single transform (translate3d · rotate ·
   scale) relative to his CSS home spot — compositing only, no layout. */
.mascot {
  position: absolute;
  right: clamp(8px, 6vw, 90px);
  top: 57%;
  z-index: 3;
  pointer-events: none;
  transform-origin: 50% 20%; /* spin around the dolphin's visual center */
  will-change: transform;
}
.mascot__inner {
  transform: translateY(-30%);
  will-change: transform;
}
.mascot__dolphin {
  display: block;
  height: clamp(72px, 13.5vh, 135px);
  width: auto;
  aspect-ratio: 273 / 294; /* deterministic size even before the image loads */
  filter: drop-shadow(0 8px 12px rgba(40, 95, 135, .30));
  animation: dolphinFloat 6.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes dolphinFloat {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(1.5px, -3px) rotate(0.5deg); }
  50%  { transform: translate(0, -6px) rotate(1.2deg); }
  75%  { transform: translate(-1.5px, -3px) rotate(0.5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* ============ FOREGROUND SEA OVERLAY ============ */
/* Semi-transparent ocean in front of the dolphin so its body reads
   as submerged. The sky is transparent; a 4vh shift lines its
   horizon up with the background photo's horizon. */
.sea-front {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.sea-front img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateY(4vh);
}

/* ============ WATER-SURFACE RIPPLES ============ */
/* Two soft rings where the dolphin crosses the waterline. Spawned by
   JS at the crossing point; --s scales their strength with entry speed. */
.ripples {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.ripple {
  position: absolute;
  left: 0;
  top: 0;
  border: 2px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
}
.ripple.is-on {
  animation: rippleOut 1.5s var(--ease) forwards;
}
@keyframes rippleOut {
  0%   { opacity: calc(.5 * var(--s, 1)); transform: scale(.35); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ============ HEADLINE (rotating) ============ */
.headline {
  position: absolute;
  top: 55%;
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  padding: 0 6vw;
  text-align: center;
  pointer-events: none;
}
.headline__item {
  grid-area: 1 / 1;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(22px, 3.4vw, 46px);
  line-height: 1.08;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);

  opacity: 0;
  transition: opacity 2.2s var(--ease);
}
.headline__item.is-active {
  opacity: .6;
}

/* ============ CONTACT ============ */
.cta-anchor {
  position: absolute;
  bottom: clamp(30px, 5.5vh, 58px);
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
}
.cta {
  display: inline-block;
  padding: 11px 30px;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-indent: .22em;
  text-transform: uppercase;
  opacity: .8;
  box-shadow: 0 12px 26px rgba(37, 49, 58, .20);
  touch-action: manipulation; /* no double-tap zoom delay on mobile */
  transition:
    transform .4s var(--ease),
    background .3s var(--ease),
    box-shadow .4s var(--ease),
    opacity .3s var(--ease);
}
.cta:hover {
  background: #2c333a;
  transform: translateY(-2px);
  opacity: 1;
  box-shadow: 0 16px 34px rgba(37, 49, 58, .26);
}
.cta:active { transform: translateY(0) scale(.98); }
.cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(90, 165, 201, .65), 0 14px 30px rgba(37, 49, 58, .22);
}

/* ============ reduced motion ============ */
.reduce-motion .bg__img,
.reduce-motion .mascot__dolphin {
  animation: none;
}
.reduce-motion .ripple { display: none; }

/* ============ solo dolphin variant ============ */
/* No ball; the motion is driven by js/dolphin-solo.js instead of CSS. */
.solo .mascot__dolphin {
  animation: none;
}

/* ============ responsive ============ */
@media (max-width: 720px) {
  .mascot {
    right: 4px;
    /* lower home spot: only his head breaks the surface, so he stays
       clear of the wide mobile headline */
    top: 61.5%;
  }
  .mascot__dolphin { height: clamp(63px, 13.5vh, 90px); }
  .headline { top: 55%; }
  .headline__item { font-size: clamp(20px, 6vw, 30px); letter-spacing: .06em; }
  .cta { padding: 13px 34px; } /* comfortable 44px+ touch target */
}

/* ============ CONTACT DIALOG (iOS-style frosted card) ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 24, .2);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  animation: modalFadeIn .5s var(--ease) both;
}
.modal.is-closing .modal__backdrop { animation: modalFadeOut .32s var(--ease) both; }
@keyframes modalFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalFadeOut { from { opacity: 1; } to { opacity: 0; } }

.modal__card {
  position: relative;
  width: min(580px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px); /* dynamic viewport: correct on mobile URL-bar shift */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .25) transparent;
  /* Liquid Glass: tinted glass over a light-catching gradient */
  background:
    linear-gradient(165deg,
      rgba(255, 255, 255, .17) 0%,
      rgba(255, 255, 255, .05) 26%,
      rgba(255, 255, 255, .02) 55%,
      rgba(255, 255, 255, .07) 100%),
    rgba(44, 51, 58, .5);
  backdrop-filter: blur(22px) saturate(1.5) brightness(1.06);
  -webkit-backdrop-filter: blur(22px) saturate(1.5) brightness(1.06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 38px; /* big iOS-style round corners */
  padding: 36px 34px 32px;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28), /* specular top edge */
    inset 0 -1px 0 rgba(255, 255, 255, .07),
    0 24px 60px rgba(10, 20, 30, .4),
    0 2px 10px rgba(10, 20, 30, .18);
  animation: modalIn .6s cubic-bezier(.16, 1.2, .3, 1) both; /* soft spring */
}
.modal__card::-webkit-scrollbar { width: 5px; }
.modal__card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .22);
  border-radius: 999px;
}
.modal__card::-webkit-scrollbar-track { background: transparent; }
.modal.is-closing .modal__card { animation: modalOut .32s var(--ease) both; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(26px) scale(.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modalOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(18px) scale(.95); }
}

/* staggered reveal of the card content */
.modal__msg,
.modal__field,
.modal__submit,
.game,
.modal__thanks {
  animation: riseIn .5s var(--ease) both;
}
.modal__msg                    { animation-delay: .07s; }
.game                          { animation-delay: .12s; }
.modal__field:nth-of-type(1)   { animation-delay: .14s; }
.modal__field:nth-of-type(2)   { animation-delay: .19s; }
.modal__field:nth-of-type(3)   { animation-delay: .24s; }
.modal__submit                 { animation-delay: .3s; }
.modal__thanks                 { animation-delay: .1s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reduce-motion .modal__card,
.reduce-motion .modal__backdrop,
.reduce-motion .modal__msg,
.reduce-motion .modal__field,
.reduce-motion .modal__submit,
.reduce-motion .game,
.reduce-motion .modal__thanks { animation: none; }
.reduce-motion .game__ball { transition: none; }

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08));
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
  touch-action: manipulation;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.modal__close:hover { background: rgba(255, 255, 255, .24); transform: scale(1.08); }
.modal__msg {
  font-family: var(--display); /* Manrope — lighter, more subtle than the form's Inter */
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(203, 224, 244, .92); /* slight blue, softer contrast than white */
  text-align: center;
  margin-bottom: 20px;
}
.modal__field { display: block; margin-bottom: 14px; }
.modal__label {
  display: block;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 6px;
}
.modal__field input,
.modal__field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  resize: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .25) transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.modal__field textarea::-webkit-scrollbar { width: 5px; }
.modal__field textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .22);
  border-radius: 999px;
}
.modal__field input::placeholder,
.modal__field textarea::placeholder { color: rgba(255, 255, 255, .4); }
.modal__field input:focus,
.modal__field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 0 0 3px rgba(255, 255, 255, .08);
}
.modal__submit {
  margin-top: 8px;
  width: 100%;
  padding: 13px 0;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .1));
  color: #fff;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-indent: .22em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
  touch-action: manipulation;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.modal__submit:hover { background: rgba(255, 255, 255, .28); }
.modal__submit:active { transform: scale(.99); }
.modal__thanks {
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
  padding: 30px 0 6px;
}

/* ---------- the little game (spam-friendly gate) ---------- */
.game { margin-bottom: 20px; }
.game__hint {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 12px;
}
.game__arena {
  position: relative;
  height: 96px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .06);
  border: 1px dashed rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  overflow: hidden;
}
.game__ball {
  position: absolute;
  top: 26px;
  left: 26px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  transition:
    left .35s cubic-bezier(.22, .8, .36, 1),
    top .35s cubic-bezier(.22, .8, .36, 1);
}
.game__ball img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(10, 20, 30, .35));
  transition: transform .2s var(--ease);
}
.game__ball:hover img { transform: scale(1.08); }
.game__ball:active img { transform: scale(.9); }
.game__ball:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .55);
  outline-offset: 3px;
}
.game__dots {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.game__dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  transition: background .3s var(--ease);
}
.game__dot.is-on { background: rgba(255, 255, 255, .75); }

/* ============ FOOTER ============ */
.foot {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 22px;
  right: 22px;
  z-index: 7;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .6);
  text-shadow: 0 1px 4px rgba(10, 20, 30, .35); /* keeps it legible over foam */
  pointer-events: none;
}

/* mobile: the dialog becomes an iOS-style bottom sheet */
@media (max-width: 720px) {
  .modal {
    place-items: end center;
    padding: 12px;
  }
  .modal__card {
    width: 100%;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 34px;
    padding: 30px 22px calc(26px + env(safe-area-inset-bottom)); /* clear the home indicator */
    animation: sheetIn .55s cubic-bezier(.16, 1.2, .3, 1) both;
  }
  .modal.is-closing .modal__card { animation: sheetOut .32s var(--ease) both; }
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(70px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sheetOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(70px); }
}
