/* ==========================================================================
   ride2.biz — contact.html (trip & event inquiry)
   Builds on css/styles.css tokens, buttons and form system.
   ========================================================================== */

.page-contact { background: var(--surface); }

/* ---------- Page hero ---------- */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--navy-900); color: var(--white);
}
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 64% 34%; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 32, 63, .94) 0%, rgba(4, 32, 63, .82) 34%, rgba(4, 32, 63, .38) 66%, rgba(4, 32, 63, .16) 100%),
    linear-gradient(180deg, rgba(4, 32, 63, .45) 0%, rgba(4, 32, 63, 0) 34%, rgba(4, 32, 63, .5) 100%);
}
.page-hero-inner {
  padding-top: max(128px, calc(113 * var(--u) + 48px));
  padding-bottom: clamp(150px, 15vw, 200px);
}
.page-hero .eyebrow { font-size: clamp(12px, 1.15vw, 14.5px); line-height: 1.5; letter-spacing: .2em; }
.page-title {
  font-family: var(--fdisp); font-weight: 760;
  font-size: clamp(44px, 6.2vw, 84px); line-height: .96; letter-spacing: -.03em;
  margin-top: 18px; max-width: 11.5ch;
}
.page-hero .rule { width: 72px; height: 4px; margin-top: clamp(22px, 2.6vw, 30px); }
.page-lead {
  margin-top: clamp(18px, 2vw, 24px);
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: #d9e5f2; max-width: 48ch;
}

/* ---------- Layout ---------- */
.inquiry { padding-bottom: clamp(64px, 8vw, 112px); }
.inquiry-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(20px, 2.6vw, 32px); align-items: start;
  margin-top: calc(-1 * clamp(104px, 11vw, 140px));
}
.inquiry-card {
  background: var(--white); color: var(--ink);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(4, 32, 63, .05), 0 34px 70px -30px rgba(4, 32, 63, .38);
  padding: clamp(22px, 3.8vw, 48px);
  --focus: var(--ocean-600);
}

/* ---------- Form header & sections ---------- */
.form-head { padding-bottom: clamp(20px, 2.4vw, 26px); border-bottom: 1px solid var(--line); }
.form-title { font-family: var(--fdisp); font-weight: 800; font-size: clamp(22px, 2.2vw, 26px); line-height: 1.2; letter-spacing: -.02em; color: var(--ink); }
.form-intro { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.form-intro .req, .label .req { color: var(--danger); font-weight: 700; }

.fsec { padding-block: clamp(26px, 3.2vw, 36px); border-bottom: 1px solid var(--line); }
.fsec-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.fsec-head .num { margin-top: 0; }
.fsec-title { font-size: 18.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; color: var(--ink); }
.fsec-hint { margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.fsec-body { padding-left: 44px; }

.field-meta { display: flex; justify-content: flex-end; font-size: 12.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.field-meta.is-near { color: var(--danger-ink); }

/* ---------- Error summary ---------- */
.error-summary {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 22px; padding: 16px 18px;
  border: 1px solid #f6c8c3; border-left: 4px solid var(--danger);
  border-radius: var(--radius); background: var(--danger-soft);
  animation: r2b-error-in .24s var(--ease);
}
.error-summary[hidden] { display: none; }
.error-summary > .i { width: 22px; height: 22px; color: var(--danger); margin-top: 1px; }
.error-summary-title { font-size: 15px; font-weight: 700; color: var(--danger-ink); }
.error-summary-list { list-style: none; margin-top: 6px; display: grid; gap: 4px; }
.error-summary-list a { font-size: 14px; color: var(--danger-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.error-summary-list a:hover { text-decoration-thickness: 2px; }

/* ==========================================================================
   Segmented control (Exact number | I'm not sure yet)
   ========================================================================== */
.segmented {
  position: relative;
  display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 4px; border-radius: 14px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  min-width: min(100%, 380px);
}
.seg-option {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  border-radius: 10px; cursor: pointer; user-select: none; white-space: nowrap;
  transition: color .22s;
}
.seg-option .i { width: 17px; height: 17px; stroke-width: 1.9; }
.seg-option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg-option:hover { color: var(--ink); }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 10px; background: var(--navy-900);
  box-shadow: 0 1px 2px rgba(4, 32, 63, .2), 0 6px 14px -6px rgba(4, 32, 63, .5);
  transition: transform .32s var(--ease);
}
.segmented[data-mode="range"] .seg-thumb { transform: translateX(100%); }
.segmented[data-mode="exact"] .seg-option:nth-child(1),
.segmented[data-mode="range"] .seg-option:nth-child(2) { color: var(--white); }
.segmented[data-mode="exact"] .seg-option:nth-child(1) .i,
.segmented[data-mode="range"] .seg-option:nth-child(2) .i { color: var(--yellow); }
.seg-option:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
@supports selector(:has(*)) {
  .seg-option:focus-within { outline: none; }
  .seg-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
}

/* ---------- Group-size panels (stacked so switching never jumps) ---------- */
.gs-panels { display: grid; margin-top: 20px; }
.gs-panel {
  grid-area: 1 / 1; min-width: 0;
  transition: opacity .24s ease, transform .32s var(--ease), visibility 0s linear 0s;
}
.gs-panel:not(.is-active) {
  opacity: 0; transform: translateY(8px); visibility: hidden; pointer-events: none;
  transition: opacity .16s ease, transform .2s var(--ease), visibility 0s linear .2s;
}

/* Stepper: [ − ][ 12 people ][ + ] */
.stepper {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) 58px;
  width: min(100%, 340px); height: 58px;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: #fbfcfe; box-shadow: 0 1px 2px rgba(4, 32, 63, .04);
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.stepper:hover { border-color: #9fb0c4; }
.stepper:focus-within { border-color: var(--ocean-600); background: var(--white); box-shadow: 0 0 0 4px rgba(23, 105, 176, .16); }
.stepper-btn {
  display: grid; place-items: center;
  border: 0; background: transparent; color: var(--ink); cursor: pointer;
  border-radius: 13px;
}
.stepper-btn:focus-visible { outline: none; }
.stepper-circle {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface-2); transition: background-color .18s, color .18s, transform .12s;
}
.stepper-circle .i { width: 18px; height: 18px; stroke-width: 2.2; }
.stepper-btn:hover:not(:disabled) .stepper-circle { background: var(--navy-900); color: var(--yellow); }
.stepper-btn:active:not(:disabled) .stepper-circle { transform: scale(.94); }
.stepper-btn:focus-visible .stepper-circle { box-shadow: 0 0 0 3px var(--ocean-600); }
.stepper-btn:disabled { cursor: not-allowed; color: #a9b6c6; }
.stepper-btn:disabled .stepper-circle { background: var(--surface); }
.stepper-value {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  cursor: text; border-inline: 1px solid var(--line);
}
.stepper-input {
  width: 3ch; min-width: 2ch; padding: 0; border: 0; outline: none; background: transparent;
  font-size: 20px; font-weight: 700; color: var(--ink); text-align: right;
  font-variant-numeric: tabular-nums; caret-color: var(--ocean-600);
}
.stepper-input::placeholder { color: #a3b0c1; opacity: 1; }
.stepper-suffix { font-size: 15px; font-weight: 500; color: var(--muted); }
.is-invalid .stepper { border-color: var(--danger); background: #fffbfa; }
.is-invalid .stepper:focus-within { box-shadow: 0 0 0 4px rgba(217, 45, 32, .14); }

/* Range: [ 8 people ] to [ 15 people ] */
.range-fields {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end; gap: 12px; max-width: 460px;
}
.range-sep { height: 58px; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.affix-control { position: relative; }
.input-count {
  height: 58px; padding-right: 74px;
  font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.input-count::placeholder { font-weight: 600; }
.affix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--muted); pointer-events: none; }
.gs-panel .field-error { margin-top: 10px; }

/* ==========================================================================
   Destinations (1–3 autocomplete comboboxes)
   ========================================================================== */
.dest-list { list-style: none; }
.dest-row + .dest-row { margin-top: 20px; }
.dest-row.is-entering { animation: r2b-row-in .34s var(--ease); }
@keyframes r2b-row-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.dest-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; margin-bottom: 8px; }
.dest-remove {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 10px 0 7px; margin-right: -6px;
  border: 0; border-radius: 8px; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: background-color .18s, color .18s;
}
.dest-remove .i { width: 16px; height: 16px; stroke-width: 2; }
.dest-remove:hover { background: var(--danger-soft); color: var(--danger-ink); }
.dest-remove[hidden] { display: none; }

.combo { position: relative; }
.combo-field { position: relative; display: flex; align-items: center; scroll-margin-top: 20px; }
.combo-input { padding-left: 50px; padding-right: 92px; font-weight: 500; text-overflow: ellipsis; }
.combo.has-value .combo-input { font-weight: 600; }
.combo-lead {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; min-width: 24px; height: 24px;
  color: var(--muted-2); pointer-events: none; transition: color .18s;
}
.combo-lead .i { width: 19px; height: 19px; }
.combo-code, .combo-other-icon { display: none; }
.combo-code {
  height: 22px; min-width: 28px; padding: 0 5px; border-radius: 6px;
  background: var(--navy-900); color: var(--yellow);
  font-size: 11px; font-weight: 700; line-height: 22px; letter-spacing: .06em; text-align: center;
}
.combo.has-value .combo-search { display: none; }
.combo.has-value:not(.is-other-value) .combo-code { display: block; }
.combo.is-other-value .combo-other-icon { display: block; color: var(--ocean-600); }
.combo-field:focus-within .combo-search { color: var(--ocean-600); }

.combo-clear, .combo-toggle {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color .18s, color .18s;
}
.combo-clear { right: 48px; width: 32px; height: 32px; border-radius: 8px; }
.combo-clear .i { width: 16px; height: 16px; stroke-width: 2.1; }
.combo-clear:hover { background: var(--surface-2); color: var(--ink); }
.combo-clear[hidden] { display: none; }
.combo-toggle { right: 8px; width: 38px; height: 38px; border-radius: 9px; }
.combo-toggle .i { width: 20px; height: 20px; stroke-width: 2; transition: transform .24s var(--ease); }
.combo-toggle:hover { color: var(--ink); background: var(--surface); }
.combo.is-open .combo-toggle .i { transform: rotate(180deg); }
.combo-toggle::before { content: ""; position: absolute; left: -5px; top: 9px; bottom: 9px; width: 1px; background: var(--line); }

.combo.is-open .combo-input { border-color: var(--ocean-600); background: var(--white); box-shadow: 0 0 0 4px rgba(23, 105, 176, .16); }

.combo-popup {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40;
  padding: 6px; border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(4, 32, 63, .06), 0 28px 56px -16px rgba(4, 32, 63, .32);
  transform-origin: top center;
  animation: r2b-pop-in .16s var(--ease);
}
.combo.is-above .combo-popup { top: auto; bottom: calc(100% + 8px); transform-origin: bottom center; }
.combo-popup[hidden] { display: none; }
@keyframes r2b-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }

.combo-list {
  position: relative; list-style: none;
  max-height: var(--popup-max, 320px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.combo-option {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 7px 10px; border-radius: 10px;
  font-size: 15px; color: var(--ink); cursor: pointer; user-select: none;
  transition: background-color .12s;
}
.opt-code {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  min-width: 32px; height: 22px; padding: 0 5px; border-radius: 6px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  transition: background-color .12s, color .12s;
}
.opt-code .i { width: 14px; height: 14px; stroke-width: 2; }
.opt-name { flex: 1 1 auto; min-width: 0; }
.opt-name mark { background: rgba(254, 241, 38, .6); color: inherit; border-radius: 3px; padding: 0 1px; font-weight: 600; }
.opt-hint { font-size: 12.5px; color: var(--muted-2); }
.opt-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); padding: 3px 8px; border-radius: 999px;
}
.opt-check { width: 18px; height: 18px; color: var(--ocean-600); stroke-width: 2.4; }
.combo-option.is-active { background: var(--sky-100); }
.combo-option.is-active .opt-code { background: var(--navy-900); color: var(--yellow); }
.combo-option.is-chosen .opt-name { font-weight: 600; }
.combo-option.is-taken { color: var(--muted-2); cursor: not-allowed; }
.combo-option.is-taken .opt-code { opacity: .55; }
.combo-option.is-other { position: relative; margin-top: 7px; }
.combo-option.is-other::before { content: ""; position: absolute; left: 6px; right: 6px; top: -4px; height: 1px; background: var(--line); }
.combo-option.is-other:first-child { margin-top: 0; }
.combo-option.is-other:first-child::before { display: none; }

.combo-empty {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 10px 10px; font-size: 14px; color: var(--muted); line-height: 1.45;
}
.combo-empty[hidden] { display: none; }
.combo-empty .i { width: 20px; height: 20px; color: var(--muted-2); margin-top: 1px; }
.combo-empty strong { display: block; color: var(--ink); font-weight: 600; word-break: break-word; }
.combo-empty em { font-style: normal; font-weight: 600; color: var(--ink-2); }

.dest-error { margin-top: 8px; }

/* "Other" reveal */
.dest-other {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .3s var(--ease), opacity .22s ease, margin-top .3s var(--ease);
}
.dest-other.is-open { grid-template-rows: 1fr; opacity: 1; margin-top: 14px; }
.dest-other[hidden] { display: none; }
.dest-other-inner { min-height: 0; overflow: hidden; padding: 4px; margin: -4px; }
.dest-other .field { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line-2); }

/* Add-destination action */
.dest-actions { margin-top: 18px; }
.dest-add {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px 0 7px;
  border: 1px dashed var(--line-2); border-radius: 12px; background: transparent;
  font-size: 14.5px; font-weight: 600; color: var(--ocean-600); cursor: pointer;
  transition: border-color .18s, background-color .18s, color .18s;
}
.dest-add-icon {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--sky-100); color: var(--ocean-600);
  transition: background-color .2s, color .2s, transform .3s var(--ease);
}
.dest-add-icon .i { width: 17px; height: 17px; stroke-width: 2.3; }
.dest-add-meta {
  margin-left: 2px; padding-left: 10px; border-left: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--muted-2);
}
.dest-add:hover { border-color: var(--ocean-600); background: #f6faff; color: var(--navy-900); }
.dest-add:hover .dest-add-icon { background: var(--navy-900); color: var(--yellow); transform: rotate(90deg); }
.dest-add[hidden] { display: none; }
.dest-limit { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.dest-limit .i { width: 18px; height: 18px; color: #12805c; stroke-width: 2.4; }
.dest-limit[hidden] { display: none; }

/* ---------- Form footer ---------- */
.form-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap;
  padding-top: clamp(24px, 3vw, 32px);
}
.form-consent { font-size: 13px; color: var(--muted); max-width: 40ch; line-height: 1.5; }
.btn-submit { min-height: 60px; padding: 0 32px; font-size: 15px; font-weight: 800; letter-spacing: .1em; gap: 14px; box-shadow: 0 10px 24px -12px rgba(186, 170, 0, .9); }
.btn-submit .arrow { width: 20px; height: 20px; }
.btn-submit:focus-visible { outline-color: var(--navy-900); }

/* ==========================================================================
   Aside
   ========================================================================== */
.inquiry-aside { position: sticky; top: 24px; display: grid; gap: 16px; }
.aside-card {
  background: var(--white); border-radius: 20px; padding: 24px;
  box-shadow: 0 1px 2px rgba(4, 32, 63, .05), 0 20px 44px -28px rgba(4, 32, 63, .35);
}
.aside-title { font-family: var(--fdisp); font-weight: 800; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); margin-bottom: 18px; }
.next-steps { list-style: none; display: grid; gap: 18px; }
.next-steps li { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 14px; }
.next-steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 14px; top: 36px; bottom: -14px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--line-2) 0 4px, transparent 4px 8px);
}
.next-steps h3 { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.next-steps p { margin-top: 2px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.tips { list-style: none; display: grid; gap: 14px; }
.tips li { display: flex; gap: 12px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.tips .i { width: 20px; height: 20px; color: var(--ocean-600); margin-top: 1px; }
.tips strong { font-weight: 700; color: var(--ink); }
.aside-dark { background: var(--navy-900); color: #c9d6e6; --focus: var(--yellow); }
.aside-dark .aside-title { color: var(--white); margin-bottom: 10px; }
.aside-dark p { font-size: 14px; line-height: 1.6; }
.aside-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.aside-link .i { width: 16px; height: 16px; stroke-width: 2.2; transition: transform .18s var(--ease); }
.aside-link:hover .i { transform: translateX(3px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .inquiry-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); }
  .fsec-body { padding-left: 0; }
}

@media (max-width: 960px) {
  .inquiry-grid { grid-template-columns: 1fr; margin-top: calc(-1 * clamp(72px, 12vw, 104px)); }
  .inquiry-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inquiry-aside .aside-dark { grid-column: 1 / -1; }
  .page-hero-inner { padding-top: 120px; padding-bottom: clamp(108px, 18vw, 150px); }
  .page-hero-media img { object-position: 70% 30%; }
  .page-hero::before {
    background:
      linear-gradient(90deg, rgba(4, 32, 63, .92) 0%, rgba(4, 32, 63, .7) 60%, rgba(4, 32, 63, .45) 100%),
      linear-gradient(180deg, rgba(4, 32, 63, .5) 0%, rgba(4, 32, 63, .1) 40%, rgba(4, 32, 63, .6) 100%);
  }
}

@media (max-width: 640px) {
  .inquiry-card { border-radius: 20px; padding: 22px 18px 24px; }
  .inquiry-grid { gap: 16px; }
  .inquiry-aside { grid-template-columns: 1fr; }
  .page-title { font-size: clamp(42px, 12.5vw, 56px); }
  .fsec-head { gap: 12px; margin-bottom: 18px; }
  .fsec-title { font-size: 17.5px; }
  .segmented { display: grid; width: 100%; min-width: 0; }
  .seg-option { padding: 0 10px; font-size: 14px; gap: 7px; min-height: 48px; }
  .stepper { width: 100%; height: 60px; }
  .range-fields { max-width: none; gap: 10px; }
  .input-count { padding-right: 66px; padding-left: 14px; }
  .affix { right: 13px; font-size: 14px; }
  .combo-option { min-height: 48px; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; }
  .btn-submit { width: 100%; }
  .form-consent { max-width: none; text-align: center; }
  .dest-add { width: 100%; justify-content: flex-start; height: 48px; }
  .dest-add-meta { margin-left: auto; }
}

@media (max-width: 380px) {
  .seg-option .i { display: none; }
  .range-sep { width: 14px; }
}
