/* =========================================================================
   Portside by Samana Developers — portsidesamana.com
   Palette: marine ink, harbour slate, warm brass, ivory.
   Cormorant Garamond for display, Jost for everything else.

   Every media panel is built the same way: a solid background-color at the
   base, translucent gradient scrims above it, then the render as the bottom
   background-image layer. Drop a file in and it reads through; leave it out
   and the colour plus scrims still look deliberate. Any scrim added here
   must stay translucent — an opaque stop hides the render entirely.
   ========================================================================= */

:root {
  --ink:        #08131f;
  --ink-2:      #0d1c2b;
  --ink-3:      #142838;
  --slate:      #1d3446;
  --ivory:      #f7f4ed;
  --sand:       #efe9dc;
  --sand-2:     #e2d9c7;
  --brass:      #c2a05c;
  --brass-deep: #9b7c3c;
  --brass-pale: #e3cf9f;
  --sea:        #7d9aa8;

  --text:       #16202a;
  --text-soft:  #55636f;
  --on-dark:    rgba(247, 244, 237, .74);
  --line:       rgba(22, 32, 42, .13);
  --line-dark:  rgba(247, 244, 237, .16);

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:    "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1480px;
  --gut: clamp(20px, 5vw, 76px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ------------------------------------------------------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16.5px;
  line-height: 1.78;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

::selection { background: var(--brass); color: var(--ink); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--ivory); padding: 14px 22px;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- Type -------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.005em;
  margin: 0;
}

/* Cormorant ships oldstyle figures by default, which turns "12" into
   something that reads as "I2". Every display-font numeral is forced to
   lining figures so counts, storeys and drive times stay legible. */
h1, h2, h3, h4,
.brand__mark, .status__v, .near span, .faq summary {
  font-variant-numeric: lining-nums;
  -webkit-font-feature-settings: "lnum" 1;
  font-feature-settings: "lnum" 1;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::after {
  content: "";
  flex: 1;
  max-width: 74px;
  height: 1px;
  background: linear-gradient(90deg, var(--brass), transparent);
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::before {
  content: "";
  flex: 1;
  max-width: 74px;
  height: 1px;
  background: linear-gradient(270deg, var(--brass), transparent);
}
.on-dark .eyebrow { color: var(--brass-pale); }

.h-xl { font-size: clamp(2.9rem, 7.4vw, 6.4rem); }
.h-lg { font-size: clamp(2.3rem, 4.6vw, 4rem); }
.h-md { font-size: clamp(1.8rem, 2.9vw, 2.6rem); }
.h-sm { font-size: clamp(1.35rem, 2vw, 1.7rem); }

.lede {
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.72;
  color: var(--text-soft);
  font-weight: 300;
}
.on-dark .lede, .on-dark p { color: var(--on-dark); }

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

.section { padding: clamp(72px, 9vw, 148px) 0; position: relative; }
.section--tight { padding: clamp(56px, 6vw, 92px) 0; }

.on-dark { background: var(--ink); color: var(--ivory); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--ivory); }

.rule {
  width: 100%; height: 1px; border: 0; margin: 0;
  background: var(--line);
}
.on-dark .rule { background: var(--line-dark); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 17px 38px;
  border: 1px solid var(--brass);
  background: var(--brass);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: background .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
  will-change: transform;
}
.btn:hover { background: var(--brass-pale); border-color: var(--brass-pale); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--line-dark);
}
.btn--ghost:hover { background: rgba(247,244,237,.08); border-color: var(--brass); color: var(--ivory); }

.btn--dark { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.btn--dark:hover { background: var(--ink-3); border-color: var(--ink-3); color: var(--ivory); }

.btn--block { width: 100%; }

/* ---------- Header ------------------------------------------------------ */

.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  padding: 22px 0;
  transition: background .5s var(--ease), padding .5s var(--ease), border-color .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.hdr__in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.hdr.is-stuck {
  background: rgba(8, 19, 31, .93);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  padding: 13px 0;
  border-bottom-color: var(--line-dark);
}

.brand { display: flex; align-items: baseline; gap: 11px; color: var(--ivory); }
.brand__mark {
  font-family: var(--display);
  font-size: 25px;
  letter-spacing: .14em;
  line-height: 1;
}
.brand__sub {
  font-size: 9.5px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--brass-pale);
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  color: var(--ivory);
  font-size: 11px;
  letter-spacing: .19em;
  text-transform: uppercase;
  opacity: .8;
  position: relative;
  padding: 4px 0;
  transition: opacity .35s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--brass);
  transition: width .45s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after { width: 100%; }

.hdr .btn { padding: 13px 26px; font-size: 10.5px; }

.burger {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 0;
  position: relative;
}
.burger span {
  position: absolute; left: 10px; right: 10px; height: 1px;
  background: var(--ivory);
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-color: var(--ink-2);
  background-image: url("../assets/images/portside-samana-tower.webp");
  background-size: cover;
  background-position: center 42%;
  transform: scale(1.06);
  animation: heroDrift 26s var(--ease-out) forwards;
}
@keyframes heroDrift { to { transform: scale(1); } }

.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,19,31,.74) 0%, rgba(8,19,31,.22) 34%, rgba(8,19,31,.62) 72%, rgba(8,19,31,.95) 100%),
    linear-gradient(90deg, rgba(8,19,31,.62) 0%, rgba(8,19,31,.06) 62%);
}

.hero__body {
  max-width: var(--wrap);
  width: 100%;
  margin: 0 auto;
  padding: 152px var(--gut) clamp(64px, 9vh, 120px);
  color: var(--ivory);
}
.hero__body .eyebrow { color: var(--brass-pale); }

.hero h1 {
  color: var(--ivory);
  max-width: 15ch;
  margin-bottom: 26px;
}
.hero h1 em {
  font-style: italic;
  color: var(--brass-pale);
}
.hero__lede {
  max-width: 54ch;
  color: var(--on-dark);
  font-size: clamp(1.02rem, 1.25vw, 1.14rem);
  margin-bottom: 38px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }


/* ---------- Status strip ------------------------------------------------ */

.status { background: var(--sand); }
.status__grid {
  display: grid;
  /* Six items: a fixed 3-up keeps two even rows rather than 5 + 1 orphan. */
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(30px, 3.4vw, 50px) clamp(30px, 4vw, 70px);
}
.status__cell { padding: 0; }
.status__k {
  font-size: 9.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--brass-deep);
  display: block;
  margin-bottom: 10px;
}
.status__v {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--ink);
}
.status__note {
  font-size: 12.5px;
  color: var(--text-soft);
  margin-top: 7px;
  line-height: 1.55;
}

/* ---------- Split panels ------------------------------------------------ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}
.split--flip .split__media { order: 2; }

.split__copy > .h-lg { margin-bottom: 26px; }
.split__copy .lede { margin-bottom: 26px; }

.figure {
  position: relative;
  overflow: hidden;
  background: var(--ink-3);
}
.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}
.figure:hover img { transform: scale(1.045); }
/* Every supplied render is landscape (899x500 / 950x534 / 1700x690), so a
   portrait frame throws away most of the image. --tall stays only mildly
   upright on desktop and drops to the source ratio once the split stacks. */
.figure--tall { aspect-ratio: 1 / 1.1; }
.figure--wide { aspect-ratio: 16 / 10; }

.figure__cap {
  position: absolute;
  left: 0; bottom: 0;
  background: rgba(8,19,31,.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ivory);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 13px 22px;
}

/* Key-value list under copy */
.kv {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.on-dark .kv { border-top-color: var(--line-dark); }
.kv li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.on-dark .kv li { border-bottom-color: var(--line-dark); }
.kv dt, .kv b {
  font-weight: 400;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-size: 10.5px;
  color: var(--text-soft);
  padding-top: 3px;
}
.on-dark .kv b { color: var(--brass-pale); }
.kv span { text-align: right; color: var(--text); }
.on-dark .kv span { color: var(--ivory); }

/* ---------- Amenities --------------------------------------------------- */

.amen {
  display: grid;
  /* Exactly six items: a fixed 3-up keeps two even rows. */
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(38px, 4.5vw, 68px) clamp(32px, 4vw, 64px);
  margin-top: clamp(46px, 6vw, 76px);
}
.amen__card { padding: 0; }
.amen__icon {
  width: 32px; height: 32px;
  color: var(--brass);
  margin-bottom: 22px;
}
.amen__card h3 {
  font-size: 1.35rem;
  color: var(--ivory);
  margin-bottom: 11px;
}
.amen__card p {
  font-size: 14px;
  color: var(--on-dark);
  line-height: 1.7;
  margin: 0;
}

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

/* Nearby destinations — hairline rules only, no cells. */
.near {
  list-style: none;
  margin: clamp(38px, 5vw, 60px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(36px, 5vw, 80px);
}
.near li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line-dark);
}
.near b {
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brass-pale);
}
.near span {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--ivory);
  text-align: right;
}

/* ---------- Gallery ----------------------------------------------------- */

.gal {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(10px, 1.2vw, 18px);
  margin-top: clamp(40px, 5vw, 64px);
}
.gal__it {
  position: relative;
  overflow: hidden;
  background: var(--ink-3);
  border: 0; padding: 0;
  display: block;
  cursor: zoom-in;
}
.gal__it img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease-out); }
.gal__it:hover img { transform: scale(1.06); }
.gal__it::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8,19,31,.5));
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.gal__it:hover::after { opacity: 1; }
.gal__it:nth-child(1) { grid-column: span 7; aspect-ratio: 16/10; }
.gal__it:nth-child(2) { grid-column: span 5; aspect-ratio: 4/3.1; }
.gal__it:nth-child(3) { grid-column: span 5; aspect-ratio: 4/3.1; }
.gal__it:nth-child(4) { grid-column: span 7; aspect-ratio: 16/10; }

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 14, 23, .96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 60px);
}
.lb[open], .lb.is-on { display: flex; }
.lb img { max-width: 100%; max-height: 86vh; object-fit: contain; }
.lb__x {
  position: absolute; top: 20px; right: 24px;
  width: 48px; height: 48px;
  background: none; border: 1px solid var(--line-dark);
  color: var(--ivory); font-size: 20px; line-height: 1;
}
.lb__x:hover { border-color: var(--brass); color: var(--brass-pale); }
.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  background: none; border: 1px solid var(--line-dark);
  color: var(--ivory); font-size: 18px;
}
.lb__nav:hover { border-color: var(--brass); color: var(--brass-pale); }
.lb__nav--prev { left: 16px; }
.lb__nav--next { right: 16px; }
.lb__cap {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: var(--on-dark); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
}

/* ---------- FAQ --------------------------------------------------------- */

.faq { margin-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 26px 52px 26px 0;
  position: relative;
  font-family: var(--display);
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.35;
  color: var(--ink);
  transition: color .35s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brass-deep); }
.faq summary::after {
  content: "";
  position: absolute; right: 6px; top: 50%;
  width: 13px; height: 1px;
  background: var(--brass-deep);
  transform: translateY(-50%);
}
.faq summary::before {
  content: "";
  position: absolute; right: 12px; top: 50%;
  width: 1px; height: 13px;
  background: var(--brass-deep);
  transform: translateY(-50%);
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}
.faq details[open] summary::before { transform: translateY(-50%) rotate(90deg); opacity: 0; }
.faq__a { padding: 0 12% 30px 0; color: var(--text-soft); font-size: 15px; }

/* ---------- Form -------------------------------------------------------- */

.form-panel {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}
.form-panel::before {
  content: "";
  position: absolute; inset: 0;
  background-color: var(--ink-2);
  background-image:
    linear-gradient(100deg, rgba(8,19,31,.97) 0%, rgba(8,19,31,.85) 42%, rgba(8,19,31,.62) 100%),
    url("../assets/images/portside-samana-render-1.webp");
  background-size: cover;
  background-position: center;
}
.form-panel > * { position: relative; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.form { padding: 0; }
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass-pale);
  margin-bottom: 9px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: rgba(8, 19, 31, .45);
  border: 1px solid var(--line-dark);
  color: var(--ivory);
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 300;
  transition: border-color .35s var(--ease), background .35s var(--ease);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { min-height: 104px; resize: vertical; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c2a05c' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  padding-right: 42px;
}
.field select option { background: var(--ink-2); color: var(--ivory); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brass);
  background: rgba(8, 19, 31, .68);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(247,244,237,.36); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form__note {
  font-size: 11.5px;
  line-height: 1.65;
  color: rgba(247,244,237,.5);
  margin: 16px 0 0;
}
.form__msg {
  margin-top: 16px;
  font-size: 13.5px;
  padding: 13px 16px;
  display: none;
  border: 1px solid transparent;
}
.form__msg.is-on { display: block; }
.form__msg.is-ok { color: var(--brass-pale); border-color: rgba(194,160,92,.45); background: rgba(194,160,92,.09); }
.form__msg.is-err { color: #f0b4a8; border-color: rgba(240,180,168,.4); background: rgba(240,180,168,.08); }

.assure { list-style: none; margin: 34px 0 0; padding: 0; }
.assure li {
  position: relative;
  padding: 0 0 16px 30px;
  color: var(--on-dark);
  font-size: 14.5px;
}
.assure li::before {
  content: "";
  position: absolute; left: 0; top: 11px;
  width: 15px; height: 1px;
  background: var(--brass);
}

/* ---------- Sticky CTA -------------------------------------------------- */

.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 88;
  background: rgba(8, 19, 31, .95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-dark);
  padding: 12px var(--gut);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transform: translateY(100%);
  transition: transform .4s var(--ease);
}
.sticky-cta.show { transform: none; }
.sticky-cta .sc-txt {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--on-dark);
  white-space: nowrap;
}
.sticky-cta .sc-txt b { color: var(--brass-pale); font-weight: 400; }
.sticky-cta .btn { padding: 13px 24px; font-size: 10.5px; white-space: nowrap; }

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

.ftr { background: var(--ink-2); color: var(--on-dark); padding: clamp(52px, 6vw, 82px) 0 34px; }
.ftr__top {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line-dark);
}
.ftr__nav { display: flex; flex-wrap: wrap; gap: 26px; }
.ftr__nav a {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--on-dark);
  transition: color .35s var(--ease);
}
.ftr__nav a:hover { color: var(--brass-pale); }
.ftr__legal {
  margin-top: 30px;
  font-size: 11.5px;
  line-height: 1.75;
  color: rgba(247,244,237,.45);
  max-width: 96ch;
}
.ftr__legal p { margin-bottom: .9em; }

/* ---------- Phone row (dial code + number) ------------------------------ */

.phone-row {
  display: grid;
  /* Country and number always share one line. Names run long ("Palestinian
     Territory (+970)"), so the country column takes the larger share and
     min-width:0 lets both shrink rather than overflow; the native dropdown
     still shows each name in full when opened. */
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
}
.phone-row select,
.phone-row input { min-width: 0; }
.phone-row select {
  padding-right: 32px;
  background-position: right 11px center;
  text-overflow: ellipsis;
}

/* ---------- Modals ------------------------------------------------------ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(5, 11, 18, .82);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  /* visibility is stepped, not eased: delay it to the end of the fade-out on
     close, but flip it immediately on open — otherwise the card stays in a
     hidden subtree for the whole transition and focus() cannot land in it. */
  transition: opacity .42s var(--ease), visibility 0s linear .42s;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity .42s var(--ease), visibility 0s linear 0s;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 470px;
  max-height: calc(100vh - 2 * clamp(16px, 4vw, 40px));
  overflow-y: auto;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-top: 2px solid var(--brass);
  padding: clamp(30px, 4vw, 44px);
  color: var(--ivory);
  display: none;
  transform: translateY(16px);
  transition: transform .5s var(--ease-out);
}
.modal.active { display: block; }
.modal-overlay.open .modal.active { transform: none; }

.modal h3 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ivory);
  margin: 0 0 12px;
  padding-right: 34px;
}
.modal > p {
  color: var(--on-dark);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 0 26px;
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  background: none;
  border: 1px solid var(--line-dark);
  color: var(--ivory);
  font-size: 19px;
  line-height: 1;
  transition: border-color .35s var(--ease), color .35s var(--ease);
}
.modal-close:hover { border-color: var(--brass); color: var(--brass-pale); }

.modal .field label { color: var(--brass-pale); }
/* background-color, not the shorthand — `background` would wipe out the
   chevron background-image that .field select paints. */
.modal .field input,
.modal .field select { background-color: rgba(8, 19, 31, .6); }

.modal .form__msg { margin: 0 0 14px; }

/* Success state */
.modal-success { text-align: center; }
.modal-success .tick {
  width: 58px; height: 58px;
  margin: 4px auto 22px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  font-size: 25px;
  line-height: 1;
}
.modal-success h3 { padding-right: 0; }
.modal-success > p { margin-bottom: 28px; }

/* ---------- Reveal ------------------------------------------------------ */

.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.rv.is-in { opacity: 1; transform: none; }

/* ---------- Responsive -------------------------------------------------- */

@media (max-width: 1080px) {
  .amen,
  .status__grid { grid-template-columns: repeat(2, 1fr); }
  .near { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 900px) {
  .sticky-cta { display: flex; }
  .ftr { padding-bottom: 96px; }
  .nav { display: none; }
  .burger { display: block; }

  .nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(8, 19, 31, .98);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    padding: 22px var(--gut) 30px;
    border-bottom: 1px solid var(--line-dark);
  }
  .nav.is-open a { padding: 12px 0; font-size: 12px; width: 100%; }

  .hdr .btn { display: none; }

  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .figure--tall { aspect-ratio: 16 / 10; }
  .form-grid { grid-template-columns: 1fr; }

  .gal__it:nth-child(n) { grid-column: span 12; aspect-ratio: 16/10; }
  .faq__a { padding-right: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .sticky-cta { padding: 10px 16px; gap: 12px; }
  .sticky-cta .sc-txt { display: none; }
  .sticky-cta .btn { width: 100%; }
  .amen,
  .status__grid { grid-template-columns: 1fr; }
  .modal { padding: 28px 22px 32px; }
  .hero__body { padding-top: 116px; padding-bottom: 64px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .brand__sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .rv { opacity: 1; transform: none; }
}
