/* Riverside Chalets IBE — v2 design tokens from chalet-gapa.com (website/site-v2/assets/v2.css).
   White cards on an Apple-gray ground, one soft diffuse shadow, teal for every
   action, system display face for headings, Open Sans for body. */
:root {
  --teal: #00758F;
  --teal-dark: #005E73;
  --teal-tint: rgba(0, 117, 143, .10);
  --ring: rgba(0, 117, 143, .18);
  --ink: #1D1D1F;
  --ink-2: #6E6E73;
  --ink-3: #86868B;
  --ground: #F5F5F7;
  --surface: #FFFFFF;
  --hair: #D2D2D7;
  --hair-2: #E8E8ED;
  --slate: #314B5C;
  --gold: #E5A50A;
  --green: #2E7D4F;
  --green-tint: rgba(46, 125, 79, .10);
  --red: #C8321E;
  --shadow: 2px 4px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 2px 4px 16px rgba(0, 0, 0, .12);
  --r-card: 16px;
  --r-ctl: 12px;
  --r-sm: 8px;
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---- type scale ---- */
h1, h2, h3, .brand, .total, #sb-total, .p-total {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.022em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.125rem); line-height: 1.1; margin-bottom: .5rem; }
h2 { font-size: 1.375rem; line-height: 1.2; margin-bottom: .75rem; }
h3 { font-size: 1.25rem; line-height: 1.2; }
.sub { color: var(--ink-2); margin-bottom: 1.25rem; max-width: 52ch; }
.hint { color: var(--ink-2); font-size: .8125rem; margin-top: .75rem; }
.error { color: var(--red); font-size: .9rem; margin-top: .75rem; }
.center { text-align: center; }

/* ---- top bar: translucent material, content scrolls under ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  padding: .75rem 1.25rem .6rem;
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--hair-2);
}
.topbar-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; max-width: 640px; margin: 0 auto; }
.brand { font-size: 1.375rem; color: var(--ink); text-decoration: none; transition: color .15s; }
.brand:hover { color: var(--teal); }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.lang {
  display: inline-flex; align-items: center; height: 1.75rem; padding: 0 .6rem;
  border: 1px solid var(--hair); border-radius: var(--r-sm);
  color: var(--ink); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-decoration: none;
  transition: color .15s, border-color .15s, transform .1s;
}
.lang:hover { color: var(--teal); border-color: var(--teal); }
.lang:active { transform: scale(.96); }
.trust-inline { color: var(--ink-2); font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.trust-inline .star { color: var(--gold); }
.steps { display: flex; align-items: center; gap: 1.1rem; max-width: 640px; margin: .55rem auto 0; }
.step { color: var(--ink-3); font-size: .75rem; font-weight: 600; letter-spacing: .01em; display: flex; align-items: center; gap: .4rem; transition: color .2s; }
.step i {
  font-style: normal; display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  border: 1.5px solid var(--hair); font-size: .65rem;
  transition: background .2s, border-color .2s, color .2s;
}
.step.done { color: var(--ink); }
.step.done i { background: var(--teal); border-color: var(--teal); color: #fff; }
.total { margin-left: auto; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }

/* ---- page + cards ---- */
.wrap { max-width: 640px; margin: 0 auto; padding: 1.5rem 1rem 7rem; display: flex; flex-direction: column; gap: 1.25rem; }
.card { background: var(--surface); border-radius: var(--r-card); padding: 1.5rem; box-shadow: var(--shadow); }
@media (min-width: 600px) { .card { padding: 2rem; } }

/* ---- chalet picker ---- */
.chalet-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chalet-card {
  position: relative; text-align: left; overflow: hidden;
  background: var(--surface); border-radius: var(--r-card);
  box-shadow: var(--shadow), 0 0 0 1px var(--hair-2);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.chalet-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--hair); }
.chalet-card:active { transform: scale(.985); transition-duration: .1s; }
.chalet-card.selected { box-shadow: var(--shadow), 0 0 0 2px var(--teal); }
.chalet-card.selected:hover { box-shadow: var(--shadow-lg), 0 0 0 2px var(--teal); }
.chalet-card::before {
  content: "✓"; position: absolute; top: .75rem; right: .75rem; z-index: 1;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--teal); color: #fff; font-size: .9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  opacity: 0; transform: scale(.6); transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.chalet-card.selected::before { opacity: 1; transform: scale(1); }
.ch-photo { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.ch-body { padding: .9rem 1rem 1.1rem; }
.ch-name { display: block; font-family: var(--display); font-size: 1.0625rem; font-weight: 600; letter-spacing: -.02em; }
.ch-meta { display: block; color: var(--ink-2); font-size: .78rem; margin-top: .25rem; }
.ch-rating { display: block; color: var(--ink); font-size: .78rem; font-weight: 600; margin-top: .5rem; }
.ch-rating::first-letter { color: var(--gold); }
.ch-details { margin-top: .6rem; background: none; border: none; padding: 0; color: var(--teal); font-size: .8125rem; font-weight: 600; }
.ch-details:hover { color: var(--teal-dark); text-decoration: underline; }

/* ---- details modal: dim to focus, materialize in ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  animation: fade-in .2s ease-out;
}
.modal {
  position: relative; background: var(--surface); border-radius: var(--r-card);
  max-width: 34rem; width: 100%; max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: materialize .32s var(--ease);
}
.modal-close {
  position: absolute; top: .75rem; right: .75rem; z-index: 2;
  width: 2rem; height: 2rem; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 1.25rem; line-height: 1; color: var(--ink);
  transition: transform .1s;
}
.modal-close:active { transform: scale(.92); }
.modal-photo { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.modal-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px; }
.modal-thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.modal-thumbs img.active { border-color: var(--teal); }
.modal-body { padding: 1.25rem 1.5rem 1.5rem; }
.md-rating { color: var(--ink-2); font-size: .8125rem; font-weight: 500; margin: .25rem 0 1rem; }
.md-rating::first-letter { color: var(--gold); }
.md-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.md-cols h4 { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: .4rem; }
.md-cols ul { list-style: none; }
.md-cols li { font-size: .875rem; padding: .18rem 0; }
.modal .cta { margin-top: .25rem; }

/* ---- calendar ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .25rem; }
.cal-head h2 { margin: 0; }
.nav-btn {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  border: 1px solid var(--hair); background: var(--surface); color: var(--ink);
  font-size: 1rem; transition: background .15s, transform .1s;
}
.nav-btn:hover { background: var(--ground); }
.nav-btn:active { transform: scale(.92); }
.nav-btn:disabled { opacity: .3; cursor: default; }
.scarcity { display: inline-block; background: rgba(49, 75, 92, .08); color: var(--slate); font-size: .78rem; font-weight: 600; border-radius: 999px; padding: .28rem .8rem; margin: .5rem 0 .25rem; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: .75rem; }
.dow { text-align: center; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: .25rem 0; }
.day {
  position: relative; min-height: 3.4rem; padding: .35rem .2rem;
  border: 1px solid var(--hair-2); border-radius: var(--r-sm);
  background: var(--surface); text-align: center; font-size: .875rem; font-weight: 500;
  display: flex; flex-direction: column; justify-content: space-between;
  font-variant-numeric: tabular-nums;
  transition: background .15s, border-color .15s, transform .1s;
}
.day .price { font-size: .62rem; font-weight: 400; color: var(--ink-2); }
.day:hover:not(:disabled) { border-color: var(--teal); }
.day:active:not(:disabled) { transform: scale(.94); }
.day:disabled { background: var(--ground); border-color: transparent; color: var(--ink-3); cursor: default; }
.day:disabled .price { visibility: hidden; }
.day.empty { border: none; background: transparent; cursor: default; }
.day.inrange { background: var(--teal-tint); border-color: transparent; color: var(--teal-dark); }
.day.inrange .price { color: var(--teal-dark); }
.day.edge { background: var(--teal); border-color: var(--teal); color: #fff; }
.day.edge .price { color: rgba(255, 255, 255, .85); }
.legend { display: flex; gap: 1.25rem; margin-top: 1rem; font-size: .75rem; color: var(--ink-2); }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .4rem; vertical-align: -1px; }
.dot.free { background: var(--surface); border: 1px solid var(--hair); }
.dot.taken { background: var(--hair-2); }
.dot.sel { background: var(--teal); }

/* ---- quote ---- */
.stay-line { font-size: .95rem; margin-bottom: 1rem; color: var(--ink-2); }
.stay-line strong { color: var(--ink); font-weight: 600; }
.field-label { display: block; font-size: .8125rem; font-weight: 600; margin: 1rem 0 .4rem; }
select, input {
  width: 100%; padding: 14px 16px; font-size: 1.0625rem; line-height: 1.3;
  border: 1px solid var(--hair); border-radius: var(--r-ctl); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--ink-3); opacity: 1; }
select:hover, input:hover { border-color: var(--ink-3); }
select:focus, input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--ring); }
select {
  -webkit-appearance: none; appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2386868B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.value-strip { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.chip { background: var(--teal-tint); color: var(--teal-dark); font-size: .74rem; font-weight: 600; border-radius: 999px; padding: .3rem .75rem; }
.review-quote { border-left: 3px solid var(--teal); margin: 1rem 0 0; padding: .25rem 0 .25rem 1rem; color: var(--ink-2); font-size: .875rem; font-style: italic; }
.review-quote cite { display: block; font-style: normal; font-size: .72rem; margin-top: .3rem; }
.review-quote cite::first-letter { color: var(--gold); }


.plans { display: grid; gap: .75rem; margin-top: 1.25rem; }
.plan {
  position: relative; text-align: left; padding: 1rem 1.1rem;
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-ctl);
  transition: box-shadow .2s var(--ease), border-color .2s, background .2s, transform .1s;
}
.plan:hover { border-color: var(--ink-3); }
.plan:active { transform: scale(.985); }
.plan.selected { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); background: rgba(0, 117, 143, .04); }
.plan .p-name { font-weight: 600; }
.plan .p-note { color: var(--ink-2); font-size: .78rem; margin-top: .15rem; }
.plan .p-total { font-size: 1.375rem; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.plan .p-break { color: var(--ink-2); font-size: .75rem; }
.plan .p-badge { display: inline-block; background: var(--teal); color: #fff; font-size: .66rem; font-weight: 600; letter-spacing: .02em; padding: .12rem .5rem; border-radius: 999px; margin-left: .45rem; vertical-align: 2px; }

/* ---- why book direct (sits where the price is decided) ---- */
.direct { background: var(--ground); border-radius: var(--r-ctl); padding: 1rem 1.25rem; margin-top: 1.25rem; }
.direct-title { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: .5rem; }
.perks { list-style: none; }
.perks li { font-size: .875rem; color: var(--ink-2); padding: .3rem 0 .3rem 1.6rem; position: relative; }
.perks li strong { color: var(--ink); font-weight: 600; }
.perks li::before { content: "✓"; position: absolute; left: .1rem; color: var(--teal); font-weight: 700; }

/* ---- form ---- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.cta {
  width: 100%; height: 3.25rem; margin-top: 1.25rem;
  background: var(--teal); color: #fff; border: none; border-radius: var(--r-ctl);
  font-size: 1rem; font-weight: 600;
  transition: background .15s, transform .1s ease-out;
}
.cta:hover { background: var(--teal-dark); }
.cta:active { transform: scale(.98); }
.cta:disabled { opacity: .5; cursor: default; transform: none; }

/* ---- confirmation: the arrival moment ---- */
.confirm { animation: rise-in .45s var(--ease); }
.cf-photo {
  display: block; width: calc(100% + 3rem); margin: -1.5rem -1.5rem 1.5rem;
  aspect-ratio: 21/9; object-fit: cover;
  border-radius: var(--r-card) var(--r-card) 0 0;
}
@media (min-width: 600px) { .cf-photo { width: calc(100% + 4rem); margin: -2rem -2rem 1.75rem; } }
.cf-eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); margin-bottom: .4rem; }
.cf-title { font-size: clamp(1.5rem, 4vw, 1.875rem); line-height: 1.15; margin-bottom: .5rem; text-wrap: balance; }
.cf-lede { color: var(--ink-2); max-width: 48ch; margin-bottom: 1.25rem; }
.cf-lede strong { color: var(--ink); font-weight: 600; }
.cf-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hair-2); border-radius: var(--r-ctl); overflow: hidden;
  margin-bottom: 1.75rem;
}
.cf-facts > div { background: var(--ground); padding: .8rem .9rem; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.cf-facts dt { font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cf-facts dd { font-size: .9375rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-sub { font-size: .72rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-next { font-size: 1.0625rem; margin-bottom: .75rem; }
.next { list-style: none; display: flex; flex-direction: column; }
.next li { position: relative; display: flex; gap: 1rem; align-items: flex-start; padding-bottom: 1.25rem; animation: rise-in .45s var(--ease) both; }
.next li:nth-child(2) { animation-delay: .08s; }
.next li:nth-child(3) { animation-delay: .16s; }
.next li:last-child { padding-bottom: .25rem; }
.next li::before {
  content: ""; position: absolute; left: calc(1.375rem - 1px); top: 2.75rem; bottom: 0;
  width: 2px; background: var(--hair-2); border-radius: 1px;
}
.next li:last-child::before { display: none; }
.next li.done::before { background: var(--teal-tint); }
.nx-icon {
  flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal-tint); color: var(--teal);
}
.nx-icon svg { width: 1.375rem; height: 1.375rem; }
.next li.done .nx-icon { background: var(--teal); color: #fff; box-shadow: 0 4px 12px rgba(0, 117, 143, .28); }
.nx-check { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .5s var(--ease) .25s forwards; }
.next strong { display: block; font-weight: 600; margin: .55rem 0 .15rem; }
.next p { color: var(--ink-2); font-size: .9rem; max-width: 52ch; }
.cf-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.btn-secondary {
  display: inline-flex; align-items: center; height: 2.75rem; padding: 0 1.1rem;
  border: 1px solid var(--hair); border-radius: var(--r-ctl); background: var(--surface);
  color: var(--teal); font-size: .925rem; font-weight: 600; text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn-secondary:hover { background: var(--ground); border-color: var(--ink-3); }
.btn-secondary:active { transform: scale(.98); }
@media (max-width: 599px) { .cf-facts { grid-template-columns: 1fr 1fr; } }

/* ---- sticky bar: translucent, rises from where the form is ---- */
.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1rem; padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--hair);
  animation: rise .3s var(--ease);
}
.sb-info { display: flex; flex-direction: column; min-width: 0; }
#sb-total { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.sb-sub { color: var(--ink-2); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-btn { width: auto; height: 2.75rem; margin: 0; padding: 0 1.25rem; font-size: .925rem; flex: none; }
@media (min-width: 640px) {
  .stickybar > * { max-width: 640px; }
  .stickybar { padding-left: max(1rem, calc((100% - 640px) / 2 + 1rem)); padding-right: max(1rem, calc((100% - 640px) / 2 + 1rem)); }
}

.consent { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1.25rem; font-size: .875rem; color: var(--ink-2); cursor: pointer; }
.consent input { flex: none; width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; accent-color: var(--teal); cursor: pointer; }
.consent a { color: var(--teal); font-weight: 600; text-decoration: none; }
.consent a:hover { text-decoration: underline; }
.consent.invalid { color: var(--red); }
.modal-text { max-width: 38rem; }
.terms h3 { margin-bottom: .25rem; }
.terms .terms-meta { color: var(--ink-2); font-size: .8125rem; margin-bottom: 1rem; }
.terms h4 { font-family: var(--display); font-size: .95rem; font-weight: 600; letter-spacing: -.01em; margin: 1rem 0 .25rem; }
.terms p { color: var(--ink-2); font-size: .9rem; }
.terms a { color: var(--teal); }
.foot { display: flex; flex-direction: column; gap: .5rem; align-items: center; text-align: center; color: var(--ink-2); font-size: .8rem; padding: 1rem 1rem 2rem; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.foot-links a { color: var(--ink-2); font-weight: 500; }
.foot a { color: var(--teal); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.loading { opacity: .5; pointer-events: none; }

/* ---- motion ---- */
@keyframes fade-in { from { opacity: 0; } }
@keyframes materialize { from { opacity: 0; transform: scale(.96) translateY(8px); filter: blur(6px); } }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .modal-overlay, .modal, .stickybar, .confirm, .next li { animation: fade-in .2s ease !important; }
  .nx-check { stroke-dashoffset: 0; animation: none; }
  .chalet-card:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .stickybar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .modal-overlay { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(0, 0, 0, .55); }
}

@media (max-width: 520px) {
  .chalet-picker, .grid2 { grid-template-columns: 1fr; }
  .day { min-height: 3rem; font-size: .8125rem; }
  .day .price { font-size: .55rem; }
  .trust-inline { display: none; }
}
