/* Kasap Beach Land
   Palette taken from the site photos: hazy sky, deep ocean, dry-grass straw,
   lagoon teal and beach sand. */

:root {
  --haze: #E7EBEE;
  --haze-2: #DCE2E6;
  --ink: #1C2A40;
  --ink-soft: #46536A;
  --straw: #B9914F;
  --straw-deep: #7A5A26;
  --lagoon: #23625E;
  --lagoon-deep: #184A47;
  --sand: #E9DCC0;
  --white: #FFFFFF;
  --line: rgba(28, 42, 64, 0.2);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --step-4: clamp(2.6rem, 1.5rem + 5vw, 5.5rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: clamp(4rem, 3rem + 5vw, 8rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --max: 72rem;
  --nav-h: 4rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-reveal: cubic-bezier(0.7, 0, 0.2, 1);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--haze);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: var(--step-3); margin-bottom: var(--space-3); }

p { margin: 0 0 var(--space-2); max-width: 62ch; text-wrap: pretty; }

a { color: var(--lagoon-deep); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--straw);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-6); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 6px;
}
.skip-link:focus { top: var(--space-2); color: var(--white); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out),
              border-color 200ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn .icon { width: 1.25rem; height: 1.25rem; flex: none; }

.btn--wa { background: var(--lagoon); color: var(--white); }
.btn--wa:hover { background: var(--lagoon-deep); color: var(--white); }

.btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); color: var(--white); border-color: var(--white); }

.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--sand); color: var(--ink); }

.btn--outline { color: var(--ink); border-color: var(--line); background: transparent; }
.btn--outline:hover { border-color: var(--ink); color: var(--ink); }

.btn--small { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.btn--large { min-height: 56px; padding: 1rem 1.8rem; font-size: 1.0625rem; }

.icon { display: block; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--nav-h);
  color: var(--white);
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.nav.is-solid {
  background: rgba(231, 235, 238, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.nav__inner {
  height: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
  white-space: nowrap;
}
.wordmark:hover { color: inherit; }
.wordmark__mark { width: 1.6rem; height: 1.6rem; color: var(--straw); }

.nav__links { display: none; gap: var(--space-3); margin-left: auto; }
.nav__links a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding-block: 0.5rem;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 250ms var(--ease-out);
}
.nav__links a:hover { background-size: 100% 1px; color: inherit; }

.nav__actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.nav__links + .nav__actions { margin-left: 0; }
.nav__wa { display: none; }

.lang { display: inline-flex; border: 1px solid currentColor; border-radius: 999px; padding: 2px; opacity: 0.9; }
.lang__btn {
  min-width: 44px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 600 0.8125rem/1 var(--font-body);
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
}
.lang__btn[aria-pressed="true"] { color: var(--ink); background: var(--white); }
.nav.is-solid .lang__btn[aria-pressed="true"] { color: var(--white); background: var(--ink); }

@media (min-width: 960px) {
  .nav__links { display: flex; }
  .nav__wa { display: inline-flex; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--ink);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 30, 46, 0.45) 0%, rgba(20, 30, 46, 0) 22%),
    linear-gradient(0deg, rgba(20, 30, 46, 0.86) 0%, rgba(20, 30, 46, 0.55) 34%, rgba(20, 30, 46, 0) 64%);
}

.hero__content {
  position: relative;
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding: calc(var(--nav-h) + var(--space-5)) var(--gutter) clamp(2.5rem, 6vh, 5rem);
}
.hero__place { font-size: var(--step--1); font-weight: 500; opacity: 0.9; margin-bottom: var(--space-2); }
.hero__title {
  font-size: var(--step-4);
  font-weight: 300;
  max-width: 13ch;
  margin-bottom: var(--space-3);
}
.hero__lead { font-size: var(--step-1); line-height: 1.55; max-width: 36rem; opacity: 0.95; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-4); }

/* The one orchestrated moment: the view opens outward from the horizon. */
@media (prefers-reduced-motion: no-preference) {
  .hero__media {
    animation: horizon 1.7s var(--ease-reveal) 0.1s both;
  }
  .hero__media img { animation: settle 2.6s var(--ease-out) 0.1s both; }
  .hero__content > * { animation: rise 0.9s var(--ease-out) both; }
  .hero__place { animation-delay: 1.15s; }
  .hero__title { animation-delay: 1.25s; }
  .hero__lead { animation-delay: 1.4s; }
  .hero__ctas { animation-delay: 1.55s; }
}
@keyframes horizon {
  from { clip-path: inset(44% 0 50% 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes settle {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- The site ---------- */

.site__grid { display: grid; gap: var(--space-5); align-items: start; }
.site__photo { margin: 0; }
.site__photo img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }

@media (min-width: 900px) {
  .site__grid { grid-template-columns: 1.15fr 0.85fr; gap: clamp(3rem, 6vw, 6rem); }
  .site__photo { position: sticky; top: calc(var(--nav-h) + var(--space-4)); }
}

/* Site sheet, drawn like a survey record */
.sheet { margin: var(--space-5) 0 0; }
.sheet__row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.8fr) 1.2fr;
  gap: var(--space-2);
  padding-block: 0.95rem;
}
.sheet__row::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--line);
  transform-origin: left;
}
.sheet__row:last-child::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--line);
}
.sheet dt { color: var(--ink-soft); font-size: 0.9375rem; }
.sheet dd { margin: 0; font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .js .sheet__row::before { transform: scaleX(0); transition: transform 900ms var(--ease-out); }
  .js .sheet__row > * { opacity: 0; transition: opacity 600ms var(--ease-out); }
  .js .sheet.is-drawn .sheet__row::before { transform: scaleX(1); }
  .js .sheet.is-drawn .sheet__row > * { opacity: 1; }
  .js .sheet.is-drawn .sheet__row:nth-child(2)::before, .js .sheet.is-drawn .sheet__row:nth-child(2) > * { transition-delay: 70ms; }
  .js .sheet.is-drawn .sheet__row:nth-child(3)::before, .js .sheet.is-drawn .sheet__row:nth-child(3) > * { transition-delay: 140ms; }
  .js .sheet.is-drawn .sheet__row:nth-child(4)::before, .js .sheet.is-drawn .sheet__row:nth-child(4) > * { transition-delay: 210ms; }
  .js .sheet.is-drawn .sheet__row:nth-child(5)::before, .js .sheet.is-drawn .sheet__row:nth-child(5) > * { transition-delay: 280ms; }
  .js .sheet.is-drawn .sheet__row:nth-child(6)::before, .js .sheet.is-drawn .sheet__row:nth-child(6) > * { transition-delay: 350ms; }
  .js .sheet.is-drawn .sheet__row:nth-child(7)::before, .js .sheet.is-drawn .sheet__row:nth-child(7) > * { transition-delay: 420ms; }
  .js .sheet.is-drawn .sheet__row:nth-child(8)::before, .js .sheet.is-drawn .sheet__row:nth-child(8) > * { transition-delay: 490ms; }
}

/* ---------- Wide band ---------- */

.band { margin: 0; }
.band__frame {
  height: clamp(18rem, 62vh, 44rem);
  overflow: hidden;
  background: var(--haze-2);
}
.band__img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  object-position: 50% 70%;
  will-change: transform;
}
.band__caption {
  padding-top: var(--space-2);
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* ---------- 360 tour ---------- */

.tour { padding-bottom: var(--space-5); }
.tour__head { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.tour__head h2 { margin-bottom: 0; }
@media (min-width: 900px) {
  .tour__head { grid-template-columns: 1fr 1fr; align-items: end; gap: var(--space-5); }
  .tour__head p { margin-bottom: 0.4rem; }
}

.tour__stage {
  position: relative;
  aspect-ratio: 3 / 2;
  max-height: 78vh;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
}
@media (max-width: 599px) { .tour__stage { aspect-ratio: 4 / 5; } }
.tour__poster { width: 100%; height: 100%; object-fit: cover; opacity: 0.72; transition: opacity 400ms var(--ease-out), transform 1.2s var(--ease-out); }
.tour__stage:hover .tour__poster { opacity: 0.6; }
.tour__open { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 10px 30px rgba(10, 18, 30, 0.35); }
.tour__open:active { transform: translate(-50%, -50%) scale(0.97); }
.tour__stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tour__alt { margin-top: var(--space-2); font-size: var(--step--1); }

/* ---------- Lease ---------- */

.lease { background: var(--sand); }
.lease__grid { display: grid; gap: var(--space-5); }
@media (min-width: 900px) {
  .lease__grid { grid-template-columns: 0.9fr 1.1fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
}

.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-4); margin: var(--space-4) 0 0; }
.terms dt { color: var(--straw-deep); font-size: 0.9375rem; font-weight: 500; }
.terms dd { margin: 0.15rem 0 0; font-family: var(--font-display); font-size: var(--step-1); }

.ledger table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ledger thead th {
  text-align: right;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0 0 0.75rem 1rem;
  border-bottom: 1px solid var(--ink);
}
.ledger thead th:first-child { text-align: left; padding-left: 0; }
.ledger tbody th, .ledger tbody td {
  padding: 1.1rem 0 1.1rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
.ledger tbody th { padding-left: 0; text-align: left; font-weight: 500; }
.ledger tbody td { text-align: right; white-space: nowrap; }
.ledger td[data-price="usd"] { color: var(--ink-soft); }
.ledger__total th, .ledger__total td[data-price="idr"] {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.2;
}
.ledger__total th { font-size: var(--step-1); }
.ledger__total th, .ledger__total td { border-bottom: 1px solid var(--ink); }
.ledger__note { margin-top: var(--space-3); font-size: var(--step--1); color: var(--ink-soft); }

@media (max-width: 599px) {
  .ledger table, .ledger tbody, .ledger tr { display: block; }
  .ledger thead { display: none; }
  .ledger tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: var(--space-2);
    padding-block: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .ledger tbody th { grid-column: 1 / -1; padding: 0 0 0.35rem; border: 0; color: var(--ink-soft); font-size: 0.9375rem; font-family: var(--font-body); }
  .ledger tbody td { padding: 0; border: 0; text-align: left; }
  .ledger tbody td[data-price="usd"] { text-align: right; align-self: end; }
  .ledger__total { border-bottom-color: var(--ink) !important; }
  .ledger__total th { font-size: 0.9375rem !important; }
}

/* ---------- Foreign investors ---------- */

.foreign__grid { display: grid; gap: var(--space-3); }
@media (min-width: 900px) {
  .foreign__grid { grid-template-columns: 0.9fr 1.1fr; gap: clamp(3rem, 6vw, 6rem); }
}
.foreign__body p:first-child { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.35; }
.foreign__note { font-size: var(--step--1); color: var(--ink-soft); padding-top: var(--space-2); border-top: 1px solid var(--line); }

/* ---------- Location ---------- */

.location { padding-top: 0; }
.location__grid { display: grid; gap: var(--space-4); }
@media (min-width: 900px) {
  .location__grid { grid-template-columns: 0.8fr 1.2fr; gap: clamp(3rem, 6vw, 6rem); align-items: center; }
}
.coords { display: grid; gap: 0.15rem; margin-top: var(--space-3); }
.coords__label { font-size: 0.9375rem; color: var(--ink-soft); }
.coords__value { font-family: var(--font-display); font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.location__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-3); }
.copy-status { min-height: 1.6em; margin-top: var(--space-1); font-size: var(--step--1); color: var(--lagoon-deep); }

.location__map {
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: var(--haze-2);
}
.location__map iframe { width: 100%; height: 100%; border: 0; filter: saturate(0.85); }

/* ---------- Contact ---------- */

.contact { background: var(--ink); color: var(--white); }
.contact__inner { display: grid; justify-items: start; gap: var(--space-2); }
.contact h2 { font-size: var(--step-4); font-weight: 300; max-width: 12ch; margin-bottom: var(--space-2); }
.contact p { font-size: var(--step-1); opacity: 0.9; }
.contact .btn { margin-top: var(--space-2); }
.contact__phone a { color: var(--white); opacity: 0.85; font-size: var(--step-0); }
.contact__phone a:hover { opacity: 1; color: var(--white); }
.contact :focus-visible { outline-color: var(--sand); }

/* ---------- Footer ---------- */

.footer { background: var(--ink); color: rgba(255, 255, 255, 0.72); font-size: var(--step--1); border-top: 1px solid rgba(255, 255, 255, 0.14); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem var(--space-4); padding-block: var(--space-4); }
.footer p { margin: 0; }

/* ---------- Mobile WhatsApp bar ---------- */

.wa-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(231, 235, 238, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 -1px 0 var(--line);
  transform: translateY(110%);
  transition: transform 350ms var(--ease-out);
}
.wa-bar.is-visible { transform: none; }
.wa-bar__btn { width: 100%; }

@media (max-width: 959px) {
  .footer__inner { padding-bottom: calc(var(--space-4) + 4.5rem + env(safe-area-inset-bottom)); }
}
@media (min-width: 960px) {
  .wa-bar { display: none; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
  .band__img { height: 100%; }
}
