/* CALYRA shared styles: tokens, type, header, buttons, forms, availability table, footer. */
:root {
  --sand: #f3eee6;
  --sand-2: #e9e0d2;
  --shell: #fbf8f3;
  --line: rgba(18, 24, 28, .13);
  --line-2: rgba(18, 24, 28, .24);
  --ink: #12181c;
  --ink-2: #444b50;
  --grey: #5f666b;
  --acc: #b04724;
  --acc-2: #8f3519;
  --acc-soft: #f6dfd2;
  --bay: #0b2b31;
  --bay-2: #123c44;
  --gold: #f0b783;
  --ok: #1b6b4a;
  --r: 4px;
  --gut: clamp(16px, 3.4vw, 56px);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --io: cubic-bezier(.7, 0, .2, 1);
  --disp: 'Gilda Display', 'Didot', Georgia, serif;
  --sans: 'Red Hat Text', system-ui, -apple-system, sans-serif;
  --mono: 'Red Hat Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--ink); font-family: var(--sans); font-size: 16.5px; line-height: 1.6; overflow-x: hidden; }
img, video, canvas, svg { display: block; max-width: 100%; }
figure { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--gold); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1560px; margin: 0 auto; padding: 0 var(--gut); }
.num { font-variant-numeric: tabular-nums; }
.on-dark { color: #f4efe8; }

/* type */
.d { font-family: var(--disp); font-weight: 400; line-height: .98; letter-spacing: -.02em; margin: 0; }
.d em { font-style: italic; color: var(--acc); }
.on-dark .d em { color: var(--gold); }
.d-xxl { font-size: clamp(52px, 8.6vw, 150px); }
.d-xl { font-size: clamp(44px, 6.4vw, 112px); }
.d-l { font-size: clamp(36px, 4.6vw, 80px); }
.d-m { font-size: clamp(28px, 2.8vw, 46px); line-height: 1.04; }
.d-s { font-size: clamp(22px, 1.8vw, 28px); line-height: 1.12; }
.k { font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 22px; color: var(--ink-2); display: flex; align-items: center; gap: 12px; }
.k::before { content: ''; width: 26px; height: 1px; background: currentColor; flex: none; }
.on-dark .k { color: #e3d9cc; }
.lede { font-size: clamp(17px, 1.25vw, 20px); line-height: 1.55; max-width: 34em; margin: 0; color: var(--ink-2); }
.on-dark .lede { color: #e2dbd2; }
.mono { font-family: var(--mono); }

/* buttons */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 26px; border-radius: 0;
  background: var(--bg); color: var(--fg); border: 0; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 14.5px; letter-spacing: .04em;
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.btn::after { content: ''; width: 18px; height: 10px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M0 5h16M12 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M0 5h16M12 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .35s var(--ease); }
.btn:hover::after { transform: translateX(4px); }
.btn.no-arrow::after { display: none; }
.btn-acc { --bg: var(--acc); --fg: #fff; }
.btn-acc:hover { --bg: var(--acc-2); }
.btn:not(.btn-acc):not(.btn-white):not(.btn-line):hover { --bg: #2a3238; }
.btn-white { --bg: #fff; --fg: var(--ink); }
.btn-white:hover { --bg: var(--acc-soft); }
.btn-line { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-line:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.on-dark .btn-line { --fg: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); }
.on-dark .btn-line:hover { box-shadow: inset 0 0 0 1px #fff; }
.link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link:hover { color: var(--acc); }

/* media */
.media { position: relative; overflow: hidden; background: var(--sand-2); }
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; }
.credit { position: absolute; right: 10px; bottom: 8px; margin: 0; font-family: var(--mono); font-size: 10.5px; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 3px rgba(0, 0, 0, .7); pointer-events: none; z-index: 2; }

/* header */
.top { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 24px; height: 78px; padding: 0 var(--gut); color: #fff; transition: background-color .35s, color .35s, box-shadow .35s, transform .45s var(--ease); }
.top.solid { background: rgba(243, 238, 230, .94); color: var(--ink); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.top.hide { transform: translateY(-100%); }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--disp); font-size: 25px; letter-spacing: .32em; margin-right: auto; }
.logo svg { width: 22px; height: 30px; }
.top nav { display: flex; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 500; letter-spacing: .02em; }
.top nav a { text-decoration: none; position: relative; padding: 6px 0; }
.top nav a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.top nav a:not(.btn):hover::after, .top nav a[aria-current]::after { transform: scaleX(1); }
.top .btn { min-height: 44px; padding: 0 18px; font-size: 13.5px; }
.menu-btn { display: none; }
.drawer { position: fixed; inset: 0; z-index: 60; background: var(--bay); color: #fff; padding: 90px var(--gut) 40px; display: flex; flex-direction: column; gap: 4px; transform: translateY(-100%); visibility: hidden; transition: transform .55s var(--io), visibility 0s .55s; overflow-y: auto; }
.drawer.open { transform: none; visibility: visible; transition: transform .55s var(--io); }
.drawer a { font-family: var(--disp); font-size: 40px; text-decoration: none; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.drawer .x { position: absolute; top: 18px; right: var(--gut); }
@media (max-width: 1120px) {
  .top nav a:not(.btn) { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 520px) { .top nav .btn-acc { display: none; } .top { height: 64px; } .logo { font-size: 21px; letter-spacing: .26em; } }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 13px 16px; border-radius: 0; border: 1px solid var(--line-2); background: var(--shell); font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.err { color: #a3221a; font-size: 13px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--acc); flex: none; }

/* chips + pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 14px; font-weight: 500; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.available { background: #dcefe4; color: #155a3d; }
.pill.reserved { background: #f8e7c8; color: #6e4300; }
.pill.sold { background: #e4e1dc; color: #4a4f53; }

/* availability table (home + availability page + residence page) */
.av-tools { display: grid; grid-template-columns: repeat(4, auto) 1fr; gap: 18px 28px; align-items: end; margin: 0 0 24px; }
.av-tools .grp > p { margin: 0 0 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }
.av-count { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin: 0; justify-self: end; white-space: nowrap; }
.av { width: 100%; border-collapse: collapse; }
.av th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); padding: 0 14px 12px 0; border-bottom: 1px solid var(--ink); }
.av th button { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.av th button:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.av th button::after { content: '↕'; opacity: .45; }
.av th[aria-sort=ascending] button::after { content: '↑'; opacity: 1; }
.av th[aria-sort=descending] button::after { content: '↓'; opacity: 1; }
.av td { padding: 16px 14px 16px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.av tbody tr { transition: background-color .2s; }
.av tbody tr:hover { background: var(--shell); }
.av .u { font-family: var(--mono); font-size: 15px; font-weight: 500; white-space: nowrap; }
.av .t a { text-decoration: none; font-weight: 600; }
.av .t a:hover { color: var(--acc); }
.av .t span { display: block; font-size: 13px; color: var(--grey); }
.av .pr { font-family: var(--mono); white-space: nowrap; }
.av-empty { padding: 40px 0; color: var(--ink-2); }
.av-more { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
@media (max-width: 960px) {
  .av-tools { grid-template-columns: 1fr 1fr; }
  .av-count { justify-self: start; }
  .av thead { display: none; }
  .av, .av tbody, .av tr, .av td { display: block; width: 100%; }
  .av tr { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; }
  .av td { border: 0; padding: 0; }
  .av td.t { grid-column: 2 / 3; }
  .av td.f, .av td.v, .av td.s { font-size: 13.5px; color: var(--ink-2); }
}

/* reveal */
.rv-wait { opacity: 0; transform: translateY(24px); }
.rv-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform 1s var(--ease); }

/* footer */
.ft { background: var(--bay); color: #e9e3da; padding: clamp(64px, 8vw, 120px) 0 0; overflow: hidden; }
.ft-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.ft h2 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400; color: #b9c4c4; margin: 0 0 18px; }
.ft ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ft a { text-decoration: none; color: #ece6dd; }
.ft a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ft-claim { font-family: var(--disp); font-size: clamp(28px, 2.8vw, 44px); line-height: 1.06; margin: 0 0 26px; max-width: 12em; color: #fff; }
.ft-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; padding: 28px 0; font-size: 13.5px; color: #c3cccc; }
.ft-legal nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ft-legal a { color: #dde3e3; }
.ft-note { margin: 0; max-width: 70em; }
.ft-note a { text-decoration: underline; text-underline-offset: 3px; }
.ft details { border-top: 1px solid rgba(255, 255, 255, .14); padding: 22px 0; }
.ft summary { cursor: pointer; font-family: var(--mono); font-size: 13px; color: #dde3e3; }
.ft .credits { list-style: none; padding: 0; margin: 18px 0 0; columns: 3 260px; gap: 30px; font-size: 13px; color: #c3cccc; }
.ft .credits li { break-inside: avoid; margin: 0 0 6px; }
.ft-big { font-family: var(--disp); line-height: .8; margin: 0; padding-top: 30px; color: #fff; white-space: nowrap; font-size: 22vw; text-align: center; letter-spacing: .12em; transform: translateY(8%); }
@media (max-width: 900px) { .ft-top { grid-template-columns: 1fr 1fr; } .ft-top > div:first-child { grid-column: 1 / -1; } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; visibility: hidden; transform: translate(-50%, calc(100% + 40px)); background: var(--ink); color: #fff; padding: 14px 20px; font-size: 14.5px; z-index: 70; transition: transform .45s var(--ease); max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 600px) {
  .av-tools { grid-template-columns: 1fr; gap: 14px; }
  .av-count { white-space: normal; }
}
