/* Agdotel page CSS: only what the taste-skill kit (assets/system.css, layout.css) does not already do.
   Every value comes from DESIGN.md; the palette is the :root block in Home.astro. */

/* ---------- Hero, waiver W1: the h1 over the photograph on a bottom scrim (desktop only;
   under 1024px the kit puts the photograph above and the words under it on the ground) ---------- */
@media (min-width: 1024px) {
  .ag-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(to top, rgb(0 0 0 / .62) 0%, rgb(0 0 0 / .42) 38%, rgb(0 0 0 / 0) 72%);
  }
  .ag-hero > .wrap { position: relative; z-index: 1; }
  .ag-hero .hero__text { width: 100%; }
  .ag-hero h1 { max-width: 16ch; }
  .ag-hero__cta { display: none; }
}

/* ---------- Hero booking bar, waiver W2: the one dark band, at the hero's foot (desktop only) ---------- */
.ag-book--bar {
  --ink: var(--p-inv-ink); --muted: var(--p-inv-muted); --bg: var(--p-inv-bg);
  --line: rgb(244 242 236 / .3); --line-strong: #8d8c87;
  --action: var(--p-inv-ink);
  margin-top: var(--s-7);
  margin-bottom: calc(-1 * var(--hpadb));
  padding: var(--s-6) 0;
  /* the band runs edge to edge while its fields stay on the page's left and right lines */
  box-shadow: 0 0 0 100vmax var(--p-inv-bg);
  clip-path: inset(0 -100vmax);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  column-gap: var(--gutter);
  row-gap: var(--s-4);
  width: 100%;
  background: var(--p-inv-bg);
  color: var(--p-inv-ink);
}
.ag-book--bar .field { margin: 0; grid-column: span 3; }
.ag-book--bar :is(input, select) { background: transparent; color: var(--p-inv-ink); border-color: #8d8c87; color-scheme: dark; }
.ag-book--bar :is(input, select)::placeholder { color: var(--p-inv-muted); }
.ag-book--bar select option { color: var(--p-ink); background: var(--p-bg); }
.ag-book--bar > .btn-row { grid-column: span 3; margin: 0; }
.ag-book--bar > .btn-row > .btn { width: 100%; }
.ag-book--bar .btn--primary { background: var(--p-inv-action); color: var(--p-inv-action-ink); }
.ag-book--bar .field__error { color: var(--p-inv-ink); }
.ag-book--bar .form__status { grid-column: 1 / -1; margin: 0; }
.ag-book .form__status:empty { display: none; }
.ag-book--bar :focus-visible { outline-color: var(--p-inv-ink); }
@media (max-width: 1023px) {
  .ag-book--bar { display: none; }
}

/* ---------- Visit: the h2, then the street set large (the page's one type moment) ---------- */
.ag-visit-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); }
.ag-visit-head h2 { margin: 0; }
.type-moment {
  margin: 0;
  font: var(--display-weight) clamp(40px, 5vw, 72px)/1.02 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
#visit .type-moment a {
  color: inherit;
  text-decoration: underline 2px transparent;
  text-underline-offset: .12em;
  transition: text-decoration-color 150ms var(--ease);
}
#visit .type-moment a:hover { text-decoration-color: currentColor; }
.ag-contact { margin: 0; }
.develop { --pl-r: 1.3333; }

/* ---------- Rooms ---------- */
.ag-rooms { row-gap: var(--s-7); }
.ag-side-head { display: grid; gap: var(--s-4); align-content: start; }
.ag-side-head > * { margin: 0; }
.ag-room { display: grid; gap: var(--s-2); align-content: start; }
.ag-room > p, .ag-room > h3 { margin: 0; }
.ag-room__photo { display: block; aspect-ratio: 4 / 3; margin-bottom: var(--s-3); }
.ag-room__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ag-room > .link { justify-self: start; margin-top: var(--s-2); }
.ag-facts { margin-top: var(--s-7); }
.ag-facts .t-label { margin: 0; }
@media (min-width: 640px) {
  .ag-facts .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
  .ag-facts .rows > li { padding-top: var(--s-4); }
}

/* ---------- The house: the dealt trio, tops on one line ---------- */
.ag-trio__a { --pl-r: .8; }
.ag-trio__b { --pl-r: 1; }
.ag-trio__c { --pl-r: 1.3333; }
@media (max-width: 1023px) {
  .ag-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-trio > .ag-trio__a { grid-column: 1 / -1; }
  .ag-trio > .ag-trio__b, .ag-trio > .ag-trio__c { grid-column: auto; --pl-r: 1; }
}

/* ---------- Booking, row 1 of the closing footer: the form on the surface, the photograph beside it ---------- */
.ag-book--panel {
  --bg: var(--p-surface);
  padding: var(--s-6);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4) var(--s-5);
  align-content: start;
  background: var(--p-surface);
}
.ag-book--panel .field { margin: 0; }
.ag-book--panel :is(.btn-row, .form__status, > .t-small) { grid-column: 1 / -1; margin: 0; }
.ag-booking__photo { --pl-r: 1.3333; --pos: 50% 70%; }
@media (max-width: 639px) {
  .ag-book--panel { grid-template-columns: minmax(0, 1fr); padding: var(--s-5); }
}

/* ---------- Phone and tablet hero: a taller photograph so the first screen ends near the button ---------- */
@media (max-width: 1023px) {
  .ag-hero { --photo: min(50svh, 100vw); }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .ag-hero { --photo: min(52svh, 64vw); }
}

/* ---------- Head rows: the h2 on the left line, the side line from the split line ---------- */
.ag-head { margin-bottom: var(--head-gap); align-items: start; row-gap: var(--s-4); }

.ag-head > h2, .ag-head > p { margin: 0; }

/* ---------- Rooms on a phone: two-up cards so the section stays two screens ---------- */
@media (max-width: 639px) {
  .ag-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-3); row-gap: var(--s-5); }
  .ag-rooms > .ag-room { grid-column: auto; gap: var(--s-1); }
  .ag-rooms > .ag-side-head { grid-column: 1 / -1; }
  .ag-room > .ag-room__photo { margin-bottom: var(--s-2); }
  .ag-room > .t-card { font-size: 18px; line-height: 24px; }
  .ag-room > .link { margin-top: var(--s-1); }
  .ag-facts { margin-top: var(--s-6); }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .ag-rooms > .ag-room.span-3 { grid-column: auto / span 6; }
  .ag-rooms--side > .ag-side-head { grid-column: 1 / -1; }
  .ag-rooms--side > .ag-room { grid-column: auto / span 6; }
}
@media (max-width: 639px) {
  .ag-facts .rows > li { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); column-gap: var(--s-4); }
  .ag-facts .rows__value { text-align: right; }
}

/* ======================================================================================
   Scrolling and transitions (owner's request, 2026-12-02; DESIGN.md section 13).
   Everything here rests under prefers-reduced-motion and the page reads fully without scroll.js.
   ====================================================================================== */

/* Smooth scrolling for the nav and in-page links (the kit's reduced-motion rule turns it back off). */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Nav marker: a bronze line draws under the word of the section on screen. */
.nav__links .nav__link { position: relative; }
.nav__links .nav__link::after {
  content: "";
  position: absolute;
  left: var(--s-3);
  right: var(--s-3);
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--p-action);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease);
}
.nav--split .nav__links > .nav__item:nth-child(1 of .nav__item) > .nav__link::after { left: 0; }
.nav__links .nav__link.is-current::after { transform: scaleX(1); }

/* Reveals: blocks below the first screen rise 16px and fade in once (scroll.js adds .rv, then .rv-in). */
.rv { opacity: 0; transform: translateY(16px); }
.rv.rv-in {
  opacity: 1;
  transform: none;
  transition: opacity 700ms var(--m-ease-enter, cubic-bezier(.22, 1, .36, 1)) var(--rv-delay, 0ms),
              transform 700ms var(--m-ease-enter, cubic-bezier(.22, 1, .36, 1)) var(--rv-delay, 0ms);
}

/* Scroll cue on the first screen: a short line with a bronze tick that runs down it, and one word.
   Desktop: in the right margin above the booking bar. Tablet and phone: centred at the foot of the screen. */
.ag-cue {
  position: absolute;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: var(--s-2);
  padding: var(--s-2);
  color: inherit;
  text-decoration: none;
  font: 500 var(--t-label, 13px)/1 var(--font-text);
  transition: opacity 300ms var(--ease);
}
.ag-cue__line {
  position: relative;
  width: 1px;
  height: 48px;
  overflow: hidden;
  background: currentColor;
  opacity: .45;
}
.ag-cue__line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -16px;
  width: 1px;
  height: 16px;
  background: var(--p-on-photo, #fff);
}
@media (prefers-reduced-motion: no-preference) {
  .ag-cue__line::after { animation: ag-cue 2.4s cubic-bezier(.65, 0, .35, 1) infinite; }
}
@keyframes ag-cue { 0% { top: -16px; } 70%, 100% { top: 48px; } }
.is-scrolled .ag-cue { opacity: 0; pointer-events: none; }
@media (min-width: 1024px) {
  .ag-cue { right: calc(var(--gut) / 2 - 24px); bottom: 180px; color: var(--p-on-photo, #fff); }
  .ag-cue__label { writing-mode: vertical-rl; letter-spacing: .02em; }
}
@media (max-width: 1023px) {
  .ag-cue { left: 50%; transform: translateX(-50%); bottom: calc(var(--s-6) + var(--bar, 0px)); color: var(--p-muted); grid-auto-flow: row; }
  .ag-cue__line::after { background: var(--p-action); }
}
/* On a short screen the first screen has no free space under the words, so the cue would sit on them: leave it out. */
@media (max-width: 1023px) and (max-height: 739px), (min-width: 1024px) and (max-height: 699px) {
  .ag-cue { display: none; }
}

/* Scroll snapping: every section settles at the top of the screen after a scroll.
   Desktop (every section is exactly one screen tall): mandatory, so the page always rests on a section.
   Phone and tablet (sections can be taller than the screen): proximity, so it only snaps when you stop near
   a section's start and never jumps over content. */
main > section { scroll-snap-align: start; }
.ag-footer { scroll-snap-align: end; }
html { scroll-snap-type: y proximity; }
@media (min-width: 1024px) and (min-height: 700px) {
  html { scroll-snap-type: y mandatory; }
  main > section { scroll-snap-stop: always; }
}

/* The kit's hero entrance scales the photograph slightly; keep that scale inside the hero so it never makes the
   page scroll sideways (seen at 820px wide: the photograph ran 20px past each edge). */
.ag-hero { overflow-x: clip; }

/* Guests on a room card: one person pictogram per guest, then the number in words. */
.ag-room__guests { display: flex; align-items: center; gap: var(--s-2); margin: 0; }
.ag-room__people { display: inline-flex; gap: 2px; color: var(--p-action); }
.ag-room__people svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Footer: plain (not a full screen), the column titles are the links. */
.ag-footer { padding-block: var(--s-9) var(--s-7); border-top: 1px solid var(--line, #d7d5d0); }
.ag-footer .footer__col { display: grid; gap: var(--s-2); align-content: start; }
.ag-footer .footer__col h3 { margin: 0 0 var(--s-2); font: 500 16px/24px var(--font-text); color: var(--p-ink); }
.ag-footer .footer__col h3 a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat; transition: background-size 150ms var(--ease); }
.ag-footer .footer__col h3 a:hover { background-size: 100% 1px; }
.ag-footer .footer__col p { margin: 0; color: var(--p-muted); }
.ag-footer .footer__legal { margin-top: var(--s-8); }
/* The four columns as two pairs: Studios et suites | Services et réception, then Accès | Contact. */
.ag-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); align-content: start; }
.ag-footer .ag-footer__cols > .footer__col { grid-column: auto; }
@media (max-width: 1023px) {
  .ag-footer .grid > .ag-footer__brand, .ag-footer .grid > .ag-footer__cols { grid-column: 1 / -1; }
  .ag-footer .grid > .ag-footer__cols { margin-top: var(--s-6); }
}
@media (max-width: 639px) {
  .ag-footer { padding-block: var(--s-8) calc(var(--s-7) + var(--bar, 0px)); }
  .ag-footer__cols { column-gap: var(--s-4); row-gap: var(--s-6); }
}
.ag-nowrap { white-space: nowrap; }
