/* Central Park II — shared foundation for the three landing variants.
   Brand source: CPII brochure 2025 (cream paper, kraft, sand, sea-glass teal, gold monogram). */

@font-face {
  font-family: "Open Sans";
  src: url("../assets/fonts/open-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../assets/fonts/open-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../assets/fonts/bodoni-moda.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../assets/fonts/bodoni-moda-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* paper and earth, sampled from the brochure */
  --paper: #F1EDE5;
  --paper-2: #E8E1D5;
  --sand: #C5B4A2;
  --tan: #B59A85;
  --kraft: #957962;
  --kraft-deep: #6F5847;
  --ink: #2B2621;
  --ink-2: #5A5047;
  --ink-3: #6E6359;
  --gold: #A9864D;
  --gold-deep: #7C5E2E;
  --teal: #4F7E79;
  --teal-soft: #699590;
  --foam: #FBF9F5;
  --wa: #25D366;
  --wa-deep: #128C4A;
  --danger: #9B3B2A;

  /* brand serif only for H1 (bold, so it survives small screens and low-contrast photos) */
  --brand: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --display: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --gutter: clamp(16px, 4.5vw, 64px);
  --radius: 2px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--foam); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
input { caret-color: var(--gold-deep); }
html { scrollbar-color: var(--tan) var(--paper); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wordmark svg, .monogram svg { display: block; width: 100%; height: auto; }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* language switch */
.lang {
  display: inline-flex; align-items: center; gap: 2px;
  font-family: var(--text); font-size: 0.8125rem; letter-spacing: 0.12em;
}
.lang button {
  appearance: none; border: 0; background: none; cursor: pointer;
  padding: 10px 8px; min-height: 44px; min-width: 40px; opacity: 0.62;
  transition: opacity 160ms ease;
}
.lang button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 0.4em; }
@media (hover: hover) and (pointer: fine) { .lang button:hover { opacity: 1; } }

/* ---------- shared form behaviour (each variant styles its own shell) ---------- */
.cp-field { position: relative; display: grid; gap: 6px; }
.cp-field label { font-size: 0.8125rem; letter-spacing: 0.08em; }
.cp-phone { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: end; }
.cp-input {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  padding: 10px 2px 8px;
  font-size: 1.0625rem;
  border-radius: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.cp-input::placeholder { color: inherit; opacity: 0.55; }
.cp-input:focus { outline: none; box-shadow: 0 1px 0 0 currentColor; }
.cp-input:focus-visible { outline: none; }
select.cp-input { padding-right: 22px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.cp-field[data-invalid] .cp-input { border-bottom-color: var(--danger); box-shadow: 0 1px 0 0 var(--danger); }
.cp-error { font-size: 0.8125rem; color: var(--danger); min-height: 0; }
.cp-error:empty { display: none; }

.cp-submit {
  appearance: none; border: 0; cursor: pointer;
  min-height: 52px; padding: 14px 26px;
  font-family: var(--text); font-size: 0.9375rem; letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  transition: transform 120ms var(--ease-out), background-color 200ms ease, opacity 200ms ease;
}
.cp-submit:active { transform: scale(0.97); }
.cp-submit[disabled] { opacity: 0.7; cursor: progress; }
.cp-submit .spinner { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; display: none; animation: cp-spin 700ms linear infinite; }
.cp-submit[data-loading] .spinner { display: inline-block; }
@keyframes cp-spin { to { transform: rotate(360deg); } }

.cp-legal { font-size: 0.8125rem; line-height: 1.5; }
.cp-status { font-size: 0.875rem; }
.cp-status:empty { display: none; }
.cp-status[data-kind="error"] { color: var(--danger); }

.cp-success { display: none; }
[data-cp-form][data-sent] .cp-fields { display: none; }
[data-cp-form][data-sent] .cp-success { display: block; animation: cp-rise 520ms var(--ease-out) both; }
@keyframes cp-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- WhatsApp bubble with waves ---------- */
.wa-bubble {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--wa-lift, 0px));
  z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 24px -8px rgba(18, 140, 74, 0.55), 0 2px 6px rgba(0,0,0,0.12);
  transition: transform 160ms var(--ease-out), bottom 320ms var(--ease-drawer);
  -webkit-tap-highlight-color: transparent;
}
.wa-bubble svg { width: 30px; height: 30px; position: relative; z-index: 2; }
.wa-bubble::before, .wa-bubble::after, .wa-bubble .wave {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--wa); opacity: 0; pointer-events: none;
  animation: wa-wave 5.4s var(--ease-out) infinite;
}
.wa-bubble::after { animation-delay: 0.45s; }
.wa-bubble .wave { animation-delay: 0.9s; }
@keyframes wa-wave {
  0% { transform: scale(1); opacity: 0.55; }
  40% { transform: scale(1.95); opacity: 0; }
  100% { transform: scale(1.95); opacity: 0; }
}
.wa-bubble:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .wa-bubble:hover { transform: scale(1.06); } }
.wa-tip {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  white-space: nowrap; background: var(--foam); color: var(--ink); font-size: 0.875rem;
  padding: 8px 12px; border-radius: 999px; box-shadow: 0 6px 18px -8px rgba(43,38,33,0.45);
  opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 200ms var(--ease-out);
}
.wa-bubble[data-tip] .wa-tip { opacity: 1; transform: translateY(-50%) translateX(-2px); }
@media (hover: hover) and (pointer: fine) { .wa-bubble:hover .wa-tip { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .wa-bubble::before, .wa-bubble::after, .wa-bubble .wave { animation: none; }
  .wa-bubble::before { opacity: 0.35; transform: scale(1.25); }
  *, *::before, *::after { scroll-behavior: auto !important; }
}

/* reveal utility: content is visible by default; JS opts in */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { transform: none; transition: opacity 400ms ease; } }

.cp-footer-legal { font-size: 0.8125rem; line-height: 1.55; }

@media (max-width: 860px) { footer { padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important; } }

/* H1 = brand serif, bold. Everything else uses Open Sans. */
h1 { font-family: var(--brand); font-weight: 700; font-optical-sizing: auto; }
h1 em, h1 i { font-weight: 700; }

/* ---------- gallery lightbox ---------- */
.gx-trigger { cursor: zoom-in; position: relative; }
.gx-trigger:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.gx-badge {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px;
  background: rgba(251, 249, 245, 0.92); color: var(--ink); border-radius: 999px;
  font-family: var(--text); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em;
  box-shadow: 0 6px 16px -8px rgba(43,38,33,0.5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform 200ms var(--ease-out);
  pointer-events: none;
}
.gx-badge svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
  .gx-trigger img { transition: transform 600ms var(--ease-out), filter 300ms ease; }
  .gx-trigger:hover img { filter: brightness(1.04); }
  .gx-trigger:hover .gx-badge { transform: translateY(-2px); }
}
html.gx-lock, html.gx-lock body { overflow: hidden; }

.gx {
  --gx-dim: 1;
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: #181512;
  color: var(--foam);
  opacity: 0; transition: opacity 220ms var(--ease-out);
  touch-action: none; overscroll-behavior: contain;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.gx[hidden] { display: none; }
.gx.is-open { opacity: var(--gx-dim); }
.gx-top { display: flex; align-items: center; gap: 16px; padding: 10px clamp(10px, 2vw, 24px); min-height: 64px; }
.gx-tabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gx-tabs::-webkit-scrollbar { display: none; }
.gx-tab {
  appearance: none; border: 0; background: transparent; color: inherit; cursor: pointer;
  display: grid; gap: 1px; text-align: left; padding: 8px 14px; min-height: 44px; border-radius: 10px; opacity: 0.6;
  transition: opacity 160ms ease, background-color 160ms ease;
}
.gx-tab b { font-family: var(--brand); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.gx-tab small { font-size: 0.75rem; letter-spacing: 0.02em; white-space: nowrap; }
.gx-tab[aria-selected="true"] { opacity: 1; background: rgba(251, 249, 245, 0.1); }
.gx-tab[tabindex="-1"] { cursor: default; }
@media (hover: hover) and (pointer: fine) { .gx-tab:hover { opacity: 1; } }
.gx-count { font-size: 0.875rem; opacity: 0.75; white-space: nowrap; }

.gx-btn {
  appearance: none; border: 0; cursor: pointer; color: inherit;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(251, 249, 245, 0.12);
  transition: background-color 160ms ease, transform 120ms var(--ease-out), opacity 200ms ease;
}
.gx-btn svg { width: 24px; height: 24px; }
.gx-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .gx-btn:hover { background: rgba(251, 249, 245, 0.22); } }

.gx-stage { position: relative; overflow: hidden; transition: transform 260ms var(--ease-drawer); }
.gx-track { display: flex; height: 100%; transition: transform 420ms var(--ease-drawer); will-change: transform; }
.gx-slide { flex: 0 0 100%; margin: 0; display: grid; place-items: center; overflow: hidden; }
.gx-slide img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; transform-origin: 50% 50%; cursor: zoom-in; background: rgba(251,249,245,0.04); }
.gx.is-zoomed .gx-slide img { cursor: grab; }
.gx-nav { position: absolute; top: 50%; margin-top: -24px; z-index: 2; }
.gx-prev { left: clamp(8px, 1.6vw, 22px); }
.gx-next { right: clamp(8px, 1.6vw, 22px); }
.gx.is-zoomed .gx-nav { opacity: 0; pointer-events: none; }
.gx-hint {
  position: absolute; left: 0; right: 0; bottom: 14px; width: fit-content; margin: 0 auto;
  padding: 6px 12px; border-radius: 999px; background: rgba(24,21,18,0.6); font-size: 0.8125rem; white-space: nowrap;
  pointer-events: none; transition: opacity 300ms ease;
  animation: gx-hint 3.2s 1.2s forwards;
}
.gx-hint.is-gone { opacity: 0; }
@keyframes gx-hint { to { opacity: 0; } }

.gx-bottom { padding: 8px clamp(10px, 2vw, 24px) 14px; display: grid; gap: 10px; }
.gx-cap { margin: 0; font-size: 0.9375rem; line-height: 1.45; max-width: 80ch; min-height: 1.45em; opacity: 0.92; }
.gx-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.gx-thumbs::-webkit-scrollbar { display: none; }
.gx-thumb { appearance: none; border: 0; padding: 0; cursor: pointer; flex: 0 0 auto; width: 76px; height: 52px; border-radius: 6px; overflow: hidden; opacity: 0.5; outline-offset: 2px; transition: opacity 160ms ease; background: rgba(251,249,245,0.08); }
.gx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gx-thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--foam); }
@media (hover: hover) and (pointer: fine) { .gx-thumb:hover { opacity: 0.9; } }

@media (max-width: 700px) {
  .gx-nav { display: none; }
  .gx-tab { padding: 6px 10px; }
  .gx-tab b { font-size: 1.05rem; }
  .gx-count { display: none; }
  .gx-thumb { width: 60px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .gx, .gx-track, .gx-stage { transition: none; }
  .gx-hint { animation: none; }
}
