/* =========================================================
   Apartments Kaštela – Landingpage
   Mediterran, hell, sauber. Mobile-first. Kein Framework.
   ========================================================= */

:root {
  --white: #ffffff;
  --sand: #f6f1e8;
  --sand-dark: #e8dfd0;
  --ink: #1d2733;
  --ink-soft: #5a6676;
  --blue: #123e6b;
  --blue-dark: #0d2f52;
  --blue-light: #e6eef7;
  --wa: #25d366;
  --wa-dark: #1ebe5b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(29, 39, 51, 0.08);
  --shadow-hover: 0 10px 30px rgba(29, 39, 51, 0.14);
  --max: 1120px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--sand { background: var(--sand); }
.section-intro { max-width: 640px; color: var(--ink-soft); margin-bottom: 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn--outline:hover { background: var(--blue-light); }
.btn--light { background: var(--white); color: var(--blue); }
.btn--light:hover { background: var(--sand); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); }
.btn--sm { padding: 9px 16px; font-size: 0.9rem; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--sand-dark);
}
.header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; min-width: 0; }
.brand > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__mark {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.02em;
}
.header__right { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; gap: 2px; background: var(--sand); border-radius: 999px; padding: 3px; }
.lang a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.8rem; font-weight: 600;
  padding: 5px 9px; border-radius: 999px; transition: background 0.2s, color 0.2s;
}
.lang a:hover { color: var(--blue); }
.lang a[aria-current="page"] { background: var(--white); color: var(--blue); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.header .btn--primary { display: none; }
@media (min-width: 640px) { .header .btn--primary { display: inline-flex; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; color: #fff; isolation: isolate; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,47,82,0.10) 0%, rgba(13,47,82,0.35) 45%, rgba(13,47,82,0.80) 100%);
}
.hero__content { padding: 80px 0 56px; max-width: 700px; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 600; opacity: 0.9; margin-bottom: 12px; }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.25rem); opacity: 0.95; max-width: 560px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- Kaštela ---------- */
.discover { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; margin-bottom: 32px; }
@media (min-width: 860px) { .discover { grid-template-columns: 1fr 1fr; gap: 40px; } }
.discover .section-intro { margin-bottom: 0; font-size: 1.05rem; }
.discover__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.footer__photos { font-size: 0.78rem; }

/* ---------- Benefit cards ---------- */
.benefits { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .benefits { grid-template-columns: repeat(3, 1fr); } }
.benefit { background: var(--white); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.benefit__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-light); color: var(--blue); display: grid; place-items: center; margin-bottom: 16px; }
.benefit__icon svg { width: 22px; height: 22px; }
.benefit p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

/* ---------- Apartment cards ---------- */
.apt { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 40px; }
.apt:last-child { margin-bottom: 0; }
.apt__grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .apt__grid { grid-template-columns: 3fr 2fr; } }
.apt__body { padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 20px; }
.apt__title { font-size: 1.5rem; margin: 0; }
.apt__tag { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); background: var(--blue-light); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }

/* Matterport click-to-load facade */
.tour { position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; }
.tour img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease, opacity 0.3s ease; }
.tour:hover img { transform: scale(1.03); }
.tour iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tour__play {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(13,47,82,0) 40%, rgba(13,47,82,0.6) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff;
  font: inherit; font-weight: 600;
}
.tour__play-icon {
  width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--blue);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,0.25); transition: transform 0.2s ease, background 0.2s ease;
}
.tour__play:hover .tour__play-icon { transform: scale(1.06); background: #fff; }
.tour__play-icon svg { width: 30px; height: 30px; margin-left: 4px; }
.tour__badge {
  position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,0.92); color: var(--blue);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
}
.tour.is-loaded .tour__play, .tour.is-loaded .tour__badge, .tour.is-loaded > img { display: none; }

/* Facts */
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.facts li { display: flex; align-items: center; gap: 10px; font-size: 0.93rem; color: var(--ink); }
.facts svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; }
.facts .muted { color: var(--ink-soft); }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; width: 100%; }
.photos a { display: block; border-radius: 10px; overflow: hidden; }
.photos a:hover img { opacity: 0.9; }

.apt__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.apt__embed { padding: 0 24px 24px; }
.apt__embed:empty { display: none; }

/* ---------- Location ---------- */
.location { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .location { grid-template-columns: 1fr 1fr; align-items: start; } }
.map { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--sand-dark); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.distances { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.distances li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; background: var(--white); border-radius: 10px; box-shadow: var(--shadow); }
.distances strong { color: var(--blue); white-space: nowrap; }
.address { color: var(--ink-soft); margin-top: 16px; font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; max-width: 620px; margin: 0 auto; }
.contact__ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.contact__host { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; color: var(--ink-soft); font-size: 0.95rem; }
.contact__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,0.75); padding: 36px 0 28px; font-size: 0.9rem; }
.footer__inner { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 720px) { .footer__inner { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__credit { color: rgba(255,255,255,0.6); }
.footer__credit a { color: rgba(255,255,255,0.9); }

/* ---------- Floating WhatsApp (mobile) ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,0.25); transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.05); }
.wa-float svg { width: 28px; height: 28px; }
@media (min-width: 900px) { .wa-float { display: none; } }

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

@media (max-width: 480px) {
  .apt__actions .btn, .contact__ctas .btn, .hero__ctas .btn { width: 100%; }
  .facts { grid-template-columns: 1fr; }
}
