/* Shared motion + interaction layer. Page styles stay inline in the views. */
@view-transition { navigation: auto; }   /* native cross-page crossfade where supported */

:root { --ease: cubic-bezier(.2,.7,.25,1); }

/* Scroll reveal. Elements start hidden only when JS is there to un-hide them. */
.js .rise { opacity: 0; transform: translateY(14px); }
.js .rise.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0ms); }

/* Hero and headline settle on load without waiting for the observer. */
.enter { animation: enter .7s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }

/* Image containers: .zoom on the frame, .img on the picture. */
.zoom { overflow: hidden; }
.zoom .img { transition: transform .8s var(--ease); }
.zoom:hover .img, a:hover .zoom .img { transform: scale(1.045); }

/* Listing cards. */
.card-link { transition: transform .35s var(--ease); }
.card-link:hover { transform: translateY(-3px); }
.card-link .arrow { display: inline-block; transition: transform .35s var(--ease); }
.card-link:hover .arrow { transform: translateX(5px); }

/* Nav underline. */
.nav a { position: relative; transition: color .25s var(--ease); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
.nav a.cta::after { display: none; }

/* Buttons and chips. */
.cta, .chip { transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease); }
.cta:hover, .chip:hover { transform: translateY(-1px); }
.chip:hover { border-color: #14161a !important; color: #14161a; }

/* A card's photos cycle only while it is hovered or focused — nothing moves on its own. */
.shots { position: relative; }
.shots .shot { position: absolute; inset: 0; opacity: 0; transition: opacity .45s var(--ease); }
.shots .shot.on { opacity: 1; }

:focus-visible { outline: 2px solid #2a3f6b; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .js .rise, .js .rise.in, .enter { opacity: 1; transform: none; animation: none; transition: none; }
  .zoom .img, .card-link, .card-link .arrow, .nav a::after, .shots .shot { transition: none; animation: none; }
}

/* ===================================================================
   UI components — alerts, dialogs, toasts, dropdowns.
   Same palette and shapes as the pages: ink and cream, square corners,
   Archivo for labels, Source Serif for a heading. One ease for all motion.
   =================================================================== */
:root {
  --sans: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --ink: #14161a; --ink-soft: #3f454d; --muted: #5b6169; --line: #d5d9de;
  --cream: #e2cfae; --cream-bg: #fdf9f2; --cream-ink: #8a6d3b;
  --danger: #9c2b2b; --dark: #0f1114;
}

/* ---- Alert: an inline banner sitting above what it talks about. ---- */
.alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 11px 13px;
  border: 1px solid var(--line); background: #f6f7f8; color: var(--ink-soft);
  font: 400 13px/1.55 var(--sans); animation: enter .35s var(--ease) both; }
.alert > .i { flex: none; margin-top: 2px; color: var(--muted); }
.alert b { display: block; margin-bottom: 2px; font: 600 10px/1.8 var(--sans);
  letter-spacing: .14em; text-transform: uppercase; }
.alert-danger { background: #fbf0f0; border-color: #e0c4c4; color: var(--danger); }
.alert-danger > .i { color: var(--danger); }
.alert-note { background: var(--cream-bg); border-color: var(--cream); color: var(--cream-ink); }
.alert-note > .i { color: var(--cream-ink); }
.alert-ok { background: #f1f6f2; border-color: #c6dbcd; color: #1f6b43; }
.alert-ok > .i { color: #1f6b43; }

/* ---- Dialog: native <dialog>, dressed. Top layer and Esc come free. ---- */
dialog.sheet { width: min(430px, 92vw); padding: 0; border: 0; border-radius: 0;
  background: #fff; color: var(--ink); box-shadow: 0 26px 70px rgba(15,17,20,.34); }
dialog.sheet::backdrop { background: rgba(15,17,20,.58); animation: fade .25s var(--ease) both; }
dialog.sheet[open] { animation: enter .3s var(--ease) both; }
.sheet-rule { height: 3px; background: var(--cream); }
.sheet-danger .sheet-rule { background: var(--danger); }
.sheet-body { display: flex; gap: 14px; padding: 24px 26px 4px; }
.sheet-body > .i { flex: none; margin-top: 3px; color: var(--cream-ink); }
.sheet-danger .sheet-body > .i { color: var(--danger); }
.sheet h2 { margin: 0 0 7px; font: 500 20px/1.25 var(--serif); }
.sheet p { margin: 0; font: 400 13.5px/1.65 var(--sans); color: var(--muted); text-wrap: pretty; }
.sheet-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 20px 26px 22px; }

/* Inquire: the contact sheet behind the header's Inquire button (_foot.ejs). */
.inq { flex: 1; min-width: 0; }
.inq-about span { color: var(--ink); font-weight: 500; }
.inq-list { display: grid; gap: 16px; margin: 14px 0 18px; padding: 0; list-style: none; }
.inq-list li { display: flex; gap: 12px; align-items: flex-start; }
.inq-list li > .i { flex: none; margin-top: 16px; color: var(--cream-ink); }
.inq-k { display: block; margin-bottom: 5px; font: 600 10px/1.4 var(--sans); letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); }
.inq-v { font: 500 16px/1.35 var(--sans); color: var(--ink); overflow-wrap: anywhere; }
.inq-apps { display: grid; gap: 8px; margin-top: 7px; }
/* One box per number, since WhatsApp and Viber are on different lines. */
.app-box { display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border: 1px solid var(--line); background: #fff; font: 500 15px/1.35 var(--sans); color: var(--ink); }
.app-box img { flex: none; width: 24px; height: 24px; }
.app-box span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.app-box:hover { border-color: var(--ink); }
/* The same ↗ as "View this home": says "tap me", not "copy me", and nudges on hover. */
.inq-list a .i { margin-left: 5px; color: var(--cream-ink); transition: transform .3s var(--ease); }
.inq-list a:hover .i { transform: translate(2px, -2px); }
.inq-v:hover { color: #2a3f6b; }
.inq .alert { margin: 0; }
.inq .alert strong { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* Buttons, shared by dialogs and anything else that needs one. */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 17px; cursor: pointer;
  border: 1px solid transparent; border-radius: 0; background: var(--ink); color: #fff;
  font: 500 12.5px/1 var(--sans); letter-spacing: .01em;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.btn:hover { background: var(--cream); color: var(--ink); }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn-quiet:hover { background: #f2f3f5; border-color: var(--ink); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #7d2020; color: #fff; }

/* ---- Toasts: one line of feedback after a save, then it leaves. ---- */
.toasts { position: fixed; z-index: 60; right: clamp(12px,3vw,28px); bottom: clamp(12px,3vw,28px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
body:has(.ed-bar) .toasts { bottom: 92px; }   /* clear of the editor's save bar */
.toast { display: flex; align-items: center; gap: 10px; max-width: min(380px, 88vw);
  padding: 12px 15px; background: var(--dark); color: #fff;
  font: 400 13px/1.45 var(--sans); border-left: 3px solid var(--cream);
  box-shadow: 0 16px 40px rgba(15,17,20,.28); animation: toast-in .35s var(--ease) both; }
.toast > .i { flex: none; color: var(--cream); }
.toast-danger { border-left-color: #e08b8b; }
.toast-danger > .i { color: #e08b8b; }
.toast.out { animation: toast-out .3s var(--ease) both; }

/* ---- Dropdown: the real <select> stays in the form, this is its face. ---- */
.dd { position: relative; display: inline-block; max-width: 100%; }
.dd-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dd-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 9px;
  max-width: 100%; cursor: pointer; font: inherit; text-align: left;
  border: 1px solid var(--line); background: #fff; color: inherit; border-radius: 0; padding: 8px 11px;
  transition: border-color .2s var(--ease); }
.dd-btn:hover { border-color: var(--ink); }
.dd-btn .dd-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .i { flex: none; opacity: .6; transition: transform .2s var(--ease); }
.dd-btn[aria-expanded="true"] .i { transform: rotate(180deg); opacity: 1; }
/* Inside the inline editor a dropdown wears the same cream as the other fields. */
.dd-btn.ed { width: 100%; background: rgba(226,207,174,.45); border: 0;
  border-bottom: 1px dashed #a8834a; padding: 5px 7px; }
.dd-btn.ed:hover { background: rgba(226,207,174,.62); }
.ed-panel .dd { display: block; }
.ed-panel .dd-btn.ed { background: #fff; border: 1px solid #e0d3b8; border-bottom-style: solid;
  padding: 8px 10px; font: 400 13.5px/1.3 var(--sans); color: var(--ink); }

.dd-menu { position: absolute; z-index: 50; top: calc(100% + 5px); left: 0;
  min-width: 100%; max-height: 264px; overflow-y: auto; margin: 0; padding: 5px;
  list-style: none; background: #fff; border: 1px solid var(--ink);
  box-shadow: 0 16px 40px rgba(15,17,20,.2); animation: dd-in .18s var(--ease) both; }
.dd-opt { display: flex; align-items: center; gap: 9px; padding: 8px 10px; cursor: pointer;
  white-space: nowrap; font: 400 13px/1.35 var(--sans); letter-spacing: .01em; color: var(--ink-soft); }
.dd-opt .i { flex: none; visibility: hidden; color: var(--cream-ink); }
.dd-opt[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.dd-opt[aria-selected="true"] .i { visibility: visible; }
.dd-opt.at { background: var(--ink); color: #fff; }
.dd-opt.at .i { color: var(--cream); }

@keyframes fade { from { opacity: 0; } }
@keyframes dd-in { from { opacity: 0; transform: translateY(-5px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .alert, dialog.sheet[open], dialog.sheet::backdrop, .dd-menu, .toast, .toast.out { animation: none; }
  .btn, .dd-btn, .dd-btn .i, .inq-list a .i { transition: none; }
}
