/* =========================================================
   Ocean Key Realty – one-page site
   Designed on a 1280px grid (Figma "MacBook Air – 1").
   Backgrounds are full-bleed; content sits in a centred
   1280px container (.in) with absolutely positioned items
   (coordinates are relative to their section).
   ========================================================= */

/* ---- Brand fonts: Logate (self-hosted in /fonts) + Aktiv Grotesk Extended (Adobe Fonts kit, linked in index.html) ---- */
@font-face {
  font-family: "Logate";
  src: url("../fonts/Logate-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --navy:  #2f3d59;
  --blue:  #9ab8cb;
  --cream: #eee8e2;
  --text:  #434343;
  --font-display: "Logate", "Jost", "Helvetica Neue", Arial, sans-serif;
  --font-body: "aktiv-grotesk-extended", "Lexend", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; font-weight: 400; }

.page { position: relative; width: 100%; overflow: hidden; }
.in   { position: relative; width: 1280px; height: 100%; margin: 0 auto; }
.in > *, .card > * { position: absolute; }

/* ---------- Shared type ---------- */
.h-display {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1.1875;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--navy);
}
.body   { font-size: 16px; line-height: 21.5px; color: var(--text); }
.right  { text-align: right; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center;
  height: 40px;
  border: 0; border-radius: 0;
  color: #fff;
  font: 400 16px/1 var(--font-body);
  cursor: pointer;
  transition: opacity .2s ease, background-color .2s ease;
}
.btn:hover { opacity: .85; }
.btn-navy { background: var(--navy); }
.btn-blue { background: var(--blue); }

/* ---------- Form fields ---------- */
.f {
  width: 436px; height: 40px;
  padding: 0 15px;
  background: transparent;
  border: 1px solid var(--navy);
  border-radius: 0;
  color: var(--navy);
  font: 400 16px/1 var(--font-body);
  outline: none;
}
.f::placeholder { color: var(--navy); opacity: .35; }
.f:focus { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.f-area { width: 881px; height: 95px; padding: 11px 15px; resize: none; line-height: 1.2; }

.card { position: absolute; background: var(--cream); }

/* =========================================================
   HERO  (0 – 838)
   ========================================================= */
.hero {
  position: relative; z-index: 2;
  height: 838px;
  background: url("../images/hero.jpg") center / cover no-repeat;
}
.hero::before, .hero::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }
/* tint over the photo */
.hero::before {
  top: 0; bottom: 0;
  /* top fade behind the nav + tint over the photo */
  background:
    linear-gradient(to bottom, rgba(47,61,89,.59) 0%, rgba(47,61,89,.59) 28.9%, rgba(47,61,89,.4) 64%, rgba(47,61,89,0) 100%) top / 100% 171px no-repeat,
    url("../images/hero-overlay.png") center / cover no-repeat;
}
/* fade to navy at the bottom of the photo */
.hero::after {
  top: 418px; height: 420px;
  background: linear-gradient(to bottom,
    rgba(47,61,89,0) 0%, rgba(47,61,89,.61) 22.4%, rgba(47,61,89,.75) 56.1%, rgba(47,61,89,.75) 100%);
}
.hero .in { z-index: 1; }

.nav-link {
  position: absolute; top: 40px;
  height: 24px; line-height: 24px;
  text-align: center;
  font-size: 14px; color: var(--cream);
  transition: opacity .2s ease;
}
.nav-link:hover { opacity: .7; }
.logo { position: absolute; left: 490px; top: 44px; width: 299px; height: 73px; }

.hero-title {
  left: 75px; top: 529px; width: 1317px;
  font-family: var(--font-display);
  font-size: 110px; line-height: 110px; letter-spacing: 5.5px;
  text-transform: uppercase; color: var(--cream);
  white-space: nowrap;
}
.hero-place, .hero-tag { position: absolute; text-align: right; }
.hero-place {
  right: 151px; top: 524px;
  font-size: 24px; line-height: 48px; text-transform: uppercase; color: var(--blue);
  white-space: nowrap;
}
.hero-place img { display: inline-block; margin-right: 10px; vertical-align: 1px; }
.hero-tag { right: 149px; top: 562px; font-size: 16px; line-height: 48px; color: #fff; white-space: nowrap; }
.hero .hero-place img { position: static; }

.card-top { left: 150px; top: 711px; width: 980px; height: 307px; z-index: 2; }
.card-ask {
  left: 49px; top: 43px;
  font-size: 24px; line-height: 48px; color: var(--navy); text-transform: uppercase; white-space: nowrap;
}

/* =========================================================
   SECTIONS
   ========================================================= */
.sec { position: relative; }

/* A New Perspective (838 – 1417) */
.perspective { height: 579px; background: var(--blue); }

/* The process (1417 – 2336) */
.process { height: 919px; background: #fff; }
.process-photo { position: absolute; left: 150px; top: 151px; width: 274px; height: 614px; object-fit: cover; }
.sand {
  position: absolute; left: 74px; top: 196px; width: 76px; height: 524px;
  background: url("../images/sand.jpg") 0 0 / 785px 524px no-repeat;
}
.step { font-size: 24px; line-height: 48px; text-transform: uppercase; color: var(--blue); position: absolute; left: 574px; width: 558px; }
.step-d { position: absolute; left: 574px; width: 558px; }

/* Picture your island life (2336 – 2916) */
.picture { height: 580px; background: var(--cream); }
.picture-left, .picture-right { position: absolute; top: 0; bottom: 0; width: 50%; }
.picture-left  { left: 0;  background: var(--cream); }
.picture-right { right: 0; background: url("../images/umbrella.jpg") center / 108% auto no-repeat; }
.picture .in { z-index: 1; }
.ph { position: absolute; object-fit: cover; }

/* Band (2916 – 3067) */
.band {
  position: relative; height: 151px; background: var(--navy); overflow: hidden;
  display: flex; justify-content: center;
}
.band span {
  position: absolute; top: 35px; left: calc(50% - 647px);
  width: 1317px; white-space: nowrap;
  font-family: var(--font-display);
  font-size: 100px; line-height: 1.064; letter-spacing: 4px;
  text-transform: uppercase; color: var(--cream);
}

/* Highlighted properties – carousel of cards */
.properties { height: 872px; background: #fff; }
.props-wrap { position: absolute; left: 150px; top: 344px; width: 980px; }
.props {
  display: flex; align-items: flex-start; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 12px 0 34px; -webkit-overflow-scrolling: touch;
}
.props::-webkit-scrollbar { display: none; }
.prop {
  position: relative; flex: 0 0 308px; scroll-snap-align: start;
  display: flex; flex-direction: column; background: #fff;
  border: 2px solid var(--blue);
}
.prop > img:first-child { display: block; width: calc(100% + 4px); max-width: none; height: auto; aspect-ratio: 2 / 1; margin: -2px -2px 0; object-fit: cover; }
.prop h3 { margin: 20px 26px 0; min-height: var(--h3h, 0); font-size: 28px; line-height: 38px; text-transform: uppercase; color: var(--blue); }
.prop .loc { margin: 2px 26px 0; min-height: var(--loch, 0); font-size: 14px; line-height: 20px; color: #8c9197; }
.prop .price { margin: 16px 26px 0; font-size: 16px; line-height: 30px; color: var(--text); }
.meta { margin-top: auto; padding: 14px 26px 26px; display: flex; align-items: center; gap: 8px; }
.meta > span { line-height: 30px; margin-right: 8px; }
.meta > a { margin-left: auto; display: flex; align-items: center; gap: 6px; line-height: 30px; white-space: nowrap; }
.meta > a img { width: 16px; height: 9px; margin: 0 -3.5px; transform: rotate(90deg); }
.meta > a:hover { opacity: .7; }

/* carousel arrows (desktop: in the side margins) */
.props-arrow {
  position: absolute; top: 112px; width: 46px; height: 46px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: #fff; color: var(--navy); border: 1.5px solid var(--blue);
  transition: background .25s ease, color .25s ease, opacity .25s ease, border-color .25s ease;
}
.props-arrow.prev { left: -70px; }
.props-arrow.next { right: -70px; }
.props-arrow svg { display: block; }
.props-arrow.next svg { transform: scaleX(-1); }
.props-arrow:hover:not(:disabled) { background: var(--navy); border-color: var(--navy); color: #fff; }
.props-arrow:disabled { opacity: .3; cursor: default; }
.props-arrow:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* Pool photo band (3859 – 4123) */
.poolband { height: 264px; background: url("../images/pool-band.jpg") center / 108% auto no-repeat; }

/* Contact (4123 – 4919) */
.contact { height: 796px; background: var(--blue); overflow: hidden; }
.shadow {
  position: absolute; inset: 0; opacity: .25; transform: rotate(180deg);
  background: url("../images/pool-shadow.jpg") 0 -56px / 100% auto no-repeat;
}
.card-contact { left: 93px; top: 101px; width: 1095px; height: 597px; }

/* =========================================================
   FOOTER (4919 – 5260)
   ========================================================= */
.footer { position: relative; height: 341px; background: var(--navy); overflow: hidden; }
.mono { position: absolute; left: -10px; top: 137px; width: 558px; height: 215px; max-width: none; }
.f-place {
  position: absolute; left: 74px; top: 69px;
  font-size: 20px; line-height: 48px; text-transform: uppercase; color: var(--blue); white-space: nowrap;
}
.f-place img { display: inline-block; margin-right: 8px; vertical-align: 0; position: static; }
.f-logo { position: absolute; left: 468px; top: 76px; width: 344px; height: 84px; }
.social a { position: absolute; top: 77px; transition: opacity .2s ease; }
.social a:hover { opacity: .7; }
.f-link { position: absolute; font-size: 14px; line-height: 24px; color: var(--cream); white-space: nowrap; transition: opacity .2s ease; }
.f-link.r { right: 74px; text-align: right; }
.f-link:hover { opacity: .7; }

/* =========================================================
   HERO VIDEO
   ========================================================= */
.hero-media { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero::before, .hero::after { z-index: 1; }
.hero .in { z-index: 2; }

/* =========================================================
   MOTION
   (everything below is purely decorative – the layout is unchanged)
   ========================================================= */
:root { --ease: cubic-bezier(.22, .7, .2, 1); }

/* ---- Hover / focus ---- */
.btn { transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s ease, opacity .3s ease; }
.btn:hover { opacity: 1; transform: translateY(-3px); box-shadow: 0 10px 22px rgba(47, 61, 89, .25); }
.btn:active { transform: translateY(-1px); }
.nav-link, .f-link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; text-decoration-thickness: 1px; transition: text-decoration-color .3s ease, opacity .3s ease; }
.nav-link:hover, .f-link:hover { opacity: 1; text-decoration-color: currentColor; }
.logo, .f-logo { transition: transform .5s var(--ease); }
.logo:hover, .f-logo:hover { transform: scale(1.03); }
.social a { transition: transform .3s var(--ease), opacity .3s ease; }
.social a:hover { opacity: 1; transform: translateY(-3px); }
.f { transition: border-color .3s ease, box-shadow .3s ease, background-color .3s ease; }
.f:hover { background-color: rgba(255, 255, 255, .35); }
.f:focus { background-color: rgba(255, 255, 255, .55); }

.prop { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.prop:hover { transform: translateY(-8px); box-shadow: 0 18px 36px rgba(47, 61, 89, .16); }
.meta > a { transition: transform .3s var(--ease), opacity .3s ease; }
.meta > a:hover { opacity: 1; transform: translateX(4px); }

/* ---- Hero entrance (plays once on load) ---- */
@keyframes rise  { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes drop  { from { opacity: 0; transform: translate3d(0, -14px, 0); } to { opacity: 1; transform: none; } }
.js .hero .nav-link, .js .hero .logo { animation: drop 1s var(--ease) .15s both; }
.js .hero .logo { animation-delay: .3s; }
.js .hero-title   { animation: rise 1.3s var(--ease) .45s both; }
.js .hero-place   { animation: rise 1.1s var(--ease) .85s both; }
.js .hero-tag     { animation: rise 1.1s var(--ease) 1s both; }
.js .card-top     { animation: rise 1.2s var(--ease) 1.15s both; }

/* ---- Scroll reveal ---- */
.js .rv {
  opacity: 0; transform: translate3d(0, 32px, 0);
  transition: opacity 1s var(--ease) var(--d, 0ms), transform 1.1s var(--ease) var(--d, 0ms), box-shadow .5s var(--ease);
}
.js .rv.in-view { opacity: 1; transform: none; }
.js .prop.rv.in-view:hover { transform: translateY(-8px); transition-delay: 0ms; }
.js .rv-wipe {
  opacity: 0;
  clip-path: inset(0 0 99% 0);   /* 1% stays "visible" so the observer can detect it */
  transition: clip-path 1.3s var(--ease) var(--d, 0ms), opacity .4s ease var(--d, 0ms);
}
.js .rv-wipe.in-view { opacity: 1; clip-path: inset(0 0 0 0); }
.js .poolband.rv, .js .picture-right.rv { transform: none; transition: opacity 1.4s ease; }
.js .poolband.rv.in-view, .js .picture-right.rv.in-view { opacity: 1; }

/* ---- Ambient motion ---- */
@keyframes sway {
  0%   { transform: rotate(180deg) translate3d(0, 0, 0) scale(1.02); }
  50%  { transform: rotate(180deg) translate3d(-22px, 12px, 0) scale(1.06); }
  100% { transform: rotate(180deg) translate3d(14px, -10px, 0) scale(1.03); }
}
.shadow { animation: sway 22s ease-in-out infinite alternate; will-change: transform; }
.band span { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv, .js .rv-wipe { opacity: 1; transform: none; clip-path: none; }
}

/* =========================================================
   LANGUAGE SWITCHER + translated text
   ========================================================= */
.nav-right { position: absolute; right: 54px; top: 40px; height: 24px; display: flex; align-items: center; gap: 28px; white-space: nowrap; }
.nav-right .nav-link { position: static; width: auto; }
.lang {
  position: static; height: 24px; line-height: 24px;
  font-size: 14px; color: var(--cream); white-space: nowrap;
}
.lang a { display: inline; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; text-decoration-thickness: 1px; transition: text-decoration-color .3s ease; }
.lang a:hover { text-decoration-color: currentColor; }
.lang span { margin: 0 8px; opacity: .6; }
.js .hero .lang { animation: drop 1s var(--ease) .15s both; }

.band span { text-align: center; }
.btn { white-space: nowrap; }
html[lang="fr"] .step-d, html[lang="es"] .step-d { width: 650px; }
html[lang="fr"] .properties .body.right, html[lang="es"] .properties .body.right { left: 640px !important; width: 490px !important; }
.in > .nav { position: static; }

/* line break used only on tablet (see responsive.css) */
.br-tb { display: none; }

/* ---- Property video pop-up ---- */
.prop .meta a.play { cursor: pointer; }
.vmodal {
  padding: 0; border: 0; background: transparent; overflow: visible;
  max-width: none; max-height: none; width: 100vw; height: 100vh; margin: 0;
  align-items: center; justify-content: center;
}
.vmodal[open] { display: flex; }
.vmodal::backdrop { background: rgba(31, 40, 60, .86); }
.vmodal-box { position: relative; width: min(92vw, 1100px); max-height: 86vh; display: flex; justify-content: center; }
.vmodal-box video {
  display: block; max-width: 100%; max-height: 86vh; background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}
.vmodal-close {
  position: absolute; top: -46px; right: 0; width: 38px; height: 38px;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.vmodal-close span { position: absolute; left: 7px; top: 18px; width: 24px; height: 1.5px; background: var(--cream, #ede8e3); }
.vmodal-close span:first-child { transform: rotate(45deg); }
.vmodal-close span:last-child { transform: rotate(-45deg); }
.vmodal-close:hover { opacity: .7; }
.vmodal-open { overflow: hidden; }
@media (max-width: 767px) {
  .vmodal-box { width: 94vw; }
  .vmodal-close { top: -44px; }
}
