/* ===========================================================
   UGO TRIP — base.css
   Design tokens, reset, typography, shared UI components
   =========================================================== */
:root {
  /* Visual system — screenshot spec: deep sea blue + champagne gold,
     cloud-white canvas (~70%), white cards, graphite text, orange CTA (~10%). */
  --ink: #2f3437;          /* 石墨灰 / graphite */
  --ink-2: #565e63;
  --muted: #858d92;
  --brand: #0d3b66;        /* 深海蓝 / deep sea blue */
  --brand-dark: #082a4a;
  --brand-deep: #06243f;
  --brand-soft: #eaf1f7;
  --brand-line: #cddbe7;
  --gold: #c5a572;         /* 香槟金 / champagne gold */
  --gold-light: #e3cda5;
  --gold-soft: #f7f1e5;
  --green: #c5a572;        /* legacy token kept for accents -> gold */
  --yellow: #dfb66a;
  --accent: #f2682a;       /* 活力橙 / vibrant orange booking CTA */
  --accent-dark: #d45317;
  --accent-soft: #fff0e8;
  --bg: #f7f9fa;           /* 云雾白 / cloud white */
  --tint: #f7f9fa;
  --sand: #f7f1e5;
  --line: #e6eaed;
  --white: #fff;
  --card: #ffffff;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow-sm: 0 2px 10px rgba(30, 44, 56, .05);
  --shadow: 0 10px 32px rgba(30, 44, 56, .09);
  --shadow-lg: 0 24px 60px rgba(30, 44, 56, .14);
  --maxw: 1240px;
  --header-h: 76px;
  --font: "Inter", "Source Han Sans SC", "Source Han Sans CN",
          "Noto Sans SC", "Noto Sans CJK SC", "思源黑体", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.18; letter-spacing: -.025em; font-weight: 750; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.25rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
strong { font-weight: 700; }
[hidden] { display: none !important; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 3px solid rgba(13, 59, 102, .35); outline-offset: 2px; }

.container { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0 88px; }
.section--tint { background: var(--tint); }
.section--sand { background: var(--sand); }
.section--dark { background: var(--brand); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  margin: 0 0 14px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow--light { color: var(--gold-light); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 40px;
}
.section-head__desc { color: var(--muted); max-width: 620px; margin: 0; }
.section-head--light .section-head__desc { color: #c6d5e2; }
.section-foot { display: flex; justify-content: center; margin-top: 40px; }
.link-arrow {
  flex: none; font-weight: 700; font-size: .92rem; color: var(--brand);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding-bottom: 3px; border-bottom: 1px solid currentColor;
}
.link-arrow::after { content: "→"; transition: transform .2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  font-weight: 700; font-size: .93rem; line-height: 1.2; white-space: nowrap;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(13, 59, 102, .18); }
.btn--primary:hover { background: var(--brand-dark); box-shadow: 0 12px 26px rgba(13, 59, 102, .26); }
.btn--booking { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(242, 104, 42, .22); }
.btn--booking:hover { background: var(--accent-dark); box-shadow: 0 12px 26px rgba(242, 104, 42, .3); }
.btn--outline { background: transparent; border-color: var(--brand-line); color: var(--ink); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand); }
.btn--light { background: #fff; color: var(--brand); }
.btn--ghost-light { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost-light:hover { background: rgba(255,255,255,.12); }
.btn--block { width: 100%; }
.btn--sm { padding: 9px 16px; font-size: .84rem; }
.btn--green { background: var(--gold); color: #fff; }
.btn--gold { background: var(--gold); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Grid & cards */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--brand-line); }
.card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--tint); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 22px 22px 24px; }
.card__tag {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  background: rgba(255,255,255,.94); color: var(--ink);
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  padding: 6px 12px; border-radius: var(--r-pill);
}
.card__tag--brand { background: var(--brand); color: #fff; }
.card__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.card__title { font-size: 1.14rem; margin: 0 0 8px; }
.card__title a:hover { color: var(--brand); }
.card__desc { color: var(--muted); font-size: .89rem; margin: 0 0 16px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 15px; border-top: 1px solid var(--line); }
.price { display: flex; flex-direction: column; line-height: 1.25; }
.price__amount { font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em; }
.price__note { font-size: .72rem; color: var(--muted); }
.card__link { font-size: .85rem; font-weight: 750; color: var(--brand); white-space: nowrap; }
.card__link:hover { text-decoration: underline; }
.badge { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand); }
.badge--green { background: var(--gold-soft); color: #8a6c33; }
.badge--sand { background: var(--gold-soft); color: #8a6c33; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .filter-group label, .search-bar__label, fieldset legend {
  font-size: .79rem; font-weight: 750; color: var(--ink-2);
  letter-spacing: .01em;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="month"], input[type="search"], select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: var(--r-sm); background: #fff; font-size: .91rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,59,102,.1); }
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23858d92' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: #d63b3b; background: #fff7f7; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 34px; }
.form-card__head { margin-bottom: 26px; }
.form-card__head h2 { font-size: 1.55rem; margin-bottom: 4px; }
.form-card__head p { color: var(--muted); font-size: .88rem; margin: 0; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.form-hint { font-size: .82rem; color: var(--muted); margin: 12px 0 0; min-height: 1.2em; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: var(--muted); margin-top: 22px; cursor: pointer; }
.checkbox-row input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
fieldset { border: 0; padding: 0; margin: 0; }
fieldset legend { margin-bottom: 10px; padding: 0; }
.check-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.check-chips label {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-pill);
  font-size: .83rem; font-weight: 650; cursor: pointer; transition: all .18s ease;
}
.check-chips label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.check-chips input { accent-color: var(--brand); width: 15px; height: 15px; }
.form-success { padding: 28px; border-radius: var(--r); background: #f0fff0; border: 1px solid #bdebbd; }
.form-success h3 { color: #1c6b1c; }
.form-success p { color: #3c6040; font-size: .9rem; }
.form-success .btn { margin-top: 12px; }

/* Utility blocks */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.chip {
  padding: 9px 18px; border-radius: var(--r-pill); border: 1.5px solid var(--line);
  background: #fff; font-size: .85rem; font-weight: 700; transition: all .18s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.results-bar__count { margin: 0; color: var(--muted); font-size: .9rem; }
.results-bar__right { display: flex; align-items: center; gap: 12px; }
.sort-select { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); }
.sort-select select { width: auto; min-width: 170px; padding: 8px 32px 8px 12px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.active-filters:empty { display: none; }
.active-filters button { border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand); font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: var(--r-pill); }
.active-filters button:hover { background: #dbe8f2; }
.empty-state { text-align: center; padding: 64px 24px; border: 1.5px dashed var(--line); border-radius: var(--r-lg); }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); }
.info-card { padding: 22px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 var(--r) var(--r) 0; margin-top: 22px; }
.info-card h3 { font-size: .98rem; }
.info-card p { font-size: .85rem; color: var(--ink-2); margin: 0; }
.info-card--soft { background: var(--tint); border-left-color: var(--brand-line); }
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg); font-size: .9rem; max-width: 340px;
  animation: toast-in .25s ease;
}
.toast--ok { background: #135c34; }
.toast--err { background: #9a2b2b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 68px 0; }
}
@media (max-width: 720px) {
  .container { width: min(100% - 32px, var(--maxw)); }
  .section { padding: 54px 0; }
  .section--tight { padding: 40px 0 62px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===========================================================
   Release pass — accessibility & form feedback
   =========================================================== */
.field-error { display: block; min-height: 1em; margin-top: 4px; color: #b3261e; font-size: .76rem; font-weight: 650; }
.checkbox-row .field-error { margin-left: 2px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.booking-form .field { margin-bottom: 12px; }
.section--dark :focus-visible, .cta-band :focus-visible, .site-footer :focus-visible { outline-color: rgba(255, 255, 255, .85); }
.section--dark input:focus, .cta-band input:focus, .site-footer input:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
@media (max-width: 900px) {
  .filters-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(9, 24, 40, .5); }
  body.filters-open { overflow: hidden; }
}
@media (max-width: 720px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .switch, .hamburger, .btn--sm, .card__link, .mode-tab { min-height: 44px; }
  .card__link { display: inline-flex; align-items: center; }
  .checkbox-row, .check-chips label { min-height: 44px; align-items: center; }
  .checkbox-row input, .check-chips input { width: 18px; height: 18px; }
  .search-bar__field select, .search-bar__field input { min-height: 44px; }
}
