/* ===========================================================================
   dusk-cta.css  --  "Dusk over Bakkhali", the closing section above the
   footer on every page (markup: include/dusk-cta.php).

   Self-contained: own tokens, every selector `.dk`-scoped. Selectors are
   doubled (.dk.dk / .dk .dk-x) where needed because the legacy theme styles
   bare elements (default.css `section`, `section:nth-child(2n)`, `h2`, `p`,
   `a`, `input`, `button`) and would otherwise repaint or re-space them.
   =========================================================================== */

.dk.dk {
  --ivory: #fbf9f5;
  --gold: #ca9e4e;
  --gold-rgb: 202, 158, 78;
  --charcoal: #14171a;
  --hair: #e6ded0;
  --foot: #030405;               /* include/footer.php .amr-foot */
  --horizon: 62%;
  --display: "Sora", "Jost", sans-serif;
  --body: "DM Sans", "Inter", sans-serif;

  position: relative; isolation: isolate; overflow: hidden;
  display: block; margin: 0;
  padding: clamp(40px, 5vw, 72px) 0 clamp(64px, 7vw, 104px);
  min-height: clamp(700px, 60vw, 820px);
  font-family: var(--body);
  text-align: center;
  background: linear-gradient(180deg,
    #ffffff 0%, #f8eedc 14%, #f5d9b0 30%, #eeb47c 44%,
    #d9865a var(--horizon), var(--foot) var(--horizon));
}
.dk *, .dk *::before, .dk *::after { box-sizing: border-box; }

/* ---- the drawing ---- */
.dk .dk-scene { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dk .dk-sun {
  position: absolute; left: 50%; top: var(--horizon);
  width: clamp(200px, 20vw, 300px); aspect-ratio: 1; margin-left: calc(clamp(200px, 20vw, 300px) / -2);
  transform: translateY(var(--dk-sun, -80%));
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff3c8 0%, #ffd27a 38%, #f0a24e 70%, #e3844a 100%);
  box-shadow: 0 0 80px 30px rgba(255, 190, 110, .45), 0 0 200px 80px rgba(240, 150, 80, .25);
  will-change: transform;
}
.dk .dk-sea {
  position: absolute; left: 0; right: 0; top: var(--horizon); bottom: 0;
  background: linear-gradient(180deg, #3a2a35 0%, #2c2129 18%, #141013 46%, var(--foot) 78%);
}
.dk .dk-waves { position: absolute; left: 0; top: -30px; width: 100%; height: 32px; display: block; }
.dk .dk-waves path { fill: #3a2a35; }
.dk .dk-glow {
  position: absolute; z-index: 1; left: 50%; top: -24px; width: clamp(160px, 16vw, 240px); height: 55%;
  transform: translateX(-50%);
  background: radial-gradient(50% 100% at 50% 0%, rgba(255, 196, 120, .45), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 45%);
  mask-image: linear-gradient(180deg, transparent 0, #000 45%);
}
.dk .dk-streak {
  position: absolute; z-index: 1; left: 50%; top: var(--t); width: var(--w); height: 3px; border-radius: 3px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 206, 140, .8), transparent);
  animation: dkShimmer 3.6s ease-in-out var(--d) infinite;
}
@keyframes dkShimmer {
  0%, 100% { opacity: .35; transform: translateX(-50%) scaleX(.8); }
  50%      { opacity: 1;   transform: translateX(-50%) scaleX(1.1); }
}

/* ---- content ---- */
.dk .dk-inner {
  position: relative; min-height: inherit;
  max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 80px);
  display: flex; flex-direction: column; align-items: center;
}
.dk .dk-meta {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 .75rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
}
.dk .dk-meta::before, .dk .dk-meta::after { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--gold); }
.dk .dk-title {
  margin: 16px 0 0; padding: 0; max-width: 16ch;
  font-family: var(--display); font-weight: 300;
  font-size: clamp(2.6rem, 1.2rem + 4.2vw, 5.4rem); line-height: 1; letter-spacing: -.04em;
  color: var(--charcoal); text-transform: none;
}
.dk .dk-title em { font-style: normal; font-weight: 700; color: #b5652f; }
.dk .dk-sub {
  margin: 16px 0 0; max-width: 46ch;
  font-size: clamp(.9375rem, .89rem + .22vw, 1.0625rem); line-height: 1.7; color: #5a4a3e;
}

.dk .dk-lower {
  margin-top: auto; padding-top: clamp(240px, 22vw, 300px); width: 100%;
  display: flex; flex-direction: column; align-items: center;
}

/* ---- booking bar ---- */
.dk .dk-bar {
  position: relative;
  display: inline-flex; align-items: center; max-width: 100%; margin: 0;
  padding: 10px 10px 10px clamp(22px, 2.4vw, 30px);
  border-radius: 999px;
  background: #fff; color: var(--charcoal); text-align: left;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7), 0 0 0 6px rgba(255, 255, 255, .06);
}
.dk .dk-field {
  display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0;
  padding: 4px clamp(16px, 1.8vw, 24px); border-right: 1px solid var(--hair); cursor: pointer;
  font-weight: 400;
  transition: background .2s ease;
}
.dk .dk-field--in { padding-left: 0; }
.dk .dk-field--guests { border-right: 0; cursor: default; }
.dk .dk-label {
  display: block; margin: 0;
  font: 700 .66rem/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.dk .dk-input-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.dk .dk-cal-icon {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
  pointer-events: none;
  opacity: 0.85;
}
.dk .dk-input {
  display: block; width: auto; min-width: 110px; height: auto; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0;
  font: 500 1rem/1.3 var(--display); color: var(--charcoal); cursor: pointer;
}
.dk .dk-field:focus-within,
.dk .dk-field.is-active {
  border-radius: 14px;
  background: rgba(202, 158, 78, 0.08);
}

.dk .dk-step { display: inline-flex; align-items: center; gap: 10px; }
.dk .dk-step-btn {
  display: grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0;
  border: 1px solid var(--hair); border-radius: 50%; background: #fff;
  font: 500 1rem/1 var(--display); color: var(--charcoal); cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.dk .dk-step-btn:hover { border-color: var(--gold); background: var(--gold); color: #fff; }
.dk .dk-step-btn:disabled { opacity: .35; cursor: not-allowed; background: #fff; color: var(--charcoal); border-color: var(--hair); }
.dk .dk-step-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.dk .dk-step-val { min-width: 1.4em; text-align: center; font: 500 1rem/1.3 var(--display); color: var(--charcoal); }

.dk .dk-go {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  min-height: 54px; margin: 0 0 0 8px; padding: 0 28px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #edaa1f 0%, var(--gold) 100%); color: #fff;
  font: 700 .95rem/1 var(--body); letter-spacing: 0; text-transform: none; white-space: nowrap; cursor: pointer;
  transition: transform .36s cubic-bezier(.16, 1, .3, 1), box-shadow .36s cubic-bezier(.16, 1, .3, 1);
}
.dk .dk-go:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(var(--gold-rgb), .8); color: #fff; }
.dk .dk-go:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 3px; }

.dk .dk-alt {
  margin: 16px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 24px;
  font-size: .9rem; color: rgba(251, 249, 245, .7);
}
.dk .dk-alt a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; color: #fff; text-decoration: none;
}
.dk .dk-alt a i { color: #f0cf8e; }
.dk .dk-alt a:hover, .dk .dk-alt a:focus { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* ---- phone: bar becomes a card ---- */
@media (max-width: 767px) {
  .dk.dk { --horizon: 52%; min-height: 0; }
  .dk .dk-sun { width: 170px; margin-left: -85px; }
  .dk .dk-lower { padding-top: 250px; }
  .dk .dk-bar {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%;
    padding: 16px; border-radius: 22px;
  }
  .dk .dk-field { padding: 16px; border-right: 0; border-bottom: 1px solid var(--hair); }
  .dk .dk-field--in { padding-left: 16px; border-right: 1px solid var(--hair); }
  .dk .dk-field--out { border-right: 0; }
  .dk .dk-field--guests { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; }
  .dk .dk-input { min-width: 0; width: 100%; }
  .dk .dk-go { grid-column: 1 / -1; justify-content: center; margin: 16px 0 0; }
}

/* ---- Unique Scoped Datepicker Popup ---- */
.dk .dk-cal-pop {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 20px;
  width: 320px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(202, 158, 78, 0.28);
  box-shadow: 0 26px 60px -12px rgba(14, 17, 19, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 18px 20px;
  z-index: 100;
  color: var(--charcoal);
  font-family: var(--body);
  user-select: none;
  animation: dkCalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dkCalPopIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dk .dk-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dk .dk-cal-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}
.dk .dk-cal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dk .dk-cal-nav-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: #fff;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.18s ease;
}
.dk .dk-cal-nav-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.dk .dk-cal-nav-btn svg {
  width: 14px;
  height: 14px;
}
.dk .dk-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}
.dk .dk-cal-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9c9282;
}
.dk .dk-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px 0;
}
.dk .dk-cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--charcoal);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.14s ease;
  position: relative;
}
.dk .dk-cal-day:hover:not(.is-disabled):not(.is-selected) {
  background: #fbf5eb;
  color: var(--gold);
  border-radius: 50%;
}
.dk .dk-cal-day.is-disabled {
  color: #ddd4c5;
  cursor: not-allowed;
  opacity: 0.45;
}
.dk .dk-cal-day.is-selected {
  background: linear-gradient(135deg, #edaa1f 0%, var(--gold) 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 50% !important;
  box-shadow: 0 4px 12px rgba(202, 158, 78, 0.4);
}
.dk .dk-cal-day.is-in-range {
  background: rgba(202, 158, 78, 0.15);
  color: #88621d;
  font-weight: 600;
  border-radius: 0;
}
.dk .dk-cal-day.is-range-start {
  border-top-left-radius: 50% !important;
  border-bottom-left-radius: 50% !important;
}
.dk .dk-cal-day.is-range-end {
  border-top-right-radius: 50% !important;
  border-bottom-right-radius: 50% !important;
}
.dk .dk-cal-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dk .dk-cal-info {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal);
}
.dk .dk-cal-info span {
  color: var(--gold);
}
.dk .dk-cal-done {
  padding: 6px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.dk .dk-cal-done:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Phones: opening upward from the bar ran the calendar under the fixed
   header and off the top of the screen whenever the bar sat high in the
   viewport. Show it as a centred dialog over a dimmed page instead. */
@media (max-width: 767px) {
  .dk .dk-cal-pop {
    position: fixed;
    top: 50%;
    left: 50% !important;
    bottom: auto;
    transform: translate(-50%, -50%) !important;
    width: calc(100vw - 32px);
    max-width: 340px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    z-index: 1000010;
    box-shadow:
      0 0 0 100vmax rgba(0, 0, 0, 0.55),
      0 26px 60px -12px rgba(14, 17, 19, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dk .dk-streak { animation: none; }
  .dk .dk-sun { transform: translateY(-80%) !important; }
}
