/* =========================================================================
   Villa Johannes - components.css
   One button system, links, media frames, reveal, forms, small UI pieces.
   ========================================================================= */

/* ---- Buttons (one system: solid primary + light variant for dark areas) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  background: var(--forest);
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--forest);
  border-radius: var(--r);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.btn:hover {
  background: var(--forest-deep);
  transform: translateY(-1px);
}
.btn--light {
  background: var(--on-dark);
  color: var(--forest);
  border-color: var(--on-dark);
}
.btn--light:hover {
  background: #fff;
}
/* Burgundy variant - homepage primary actions ("Send enquiry"). Uppercase,
   squared corners and a fine letter-spacing to match the reference. */
.btn--wine {
  background: var(--wine);
  color: #fff;
  border-color: var(--wine);
  border-radius: var(--r-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
}
.btn--wine:hover {
  background: var(--wine-deep);
  border-color: var(--wine-deep);
}

/* ---- Secondary action: quiet text link with arrow ---- */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--clay);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.25s var(--ease), gap 0.25s var(--ease);
}
.link::after {
  content: "\2192";
  transition: transform 0.25s var(--ease);
}
.link:hover {
  border-color: currentColor;
}
.link:hover::after {
  transform: translateX(3px);
}
.link--light {
  color: var(--on-dark);
}
/* Touch sizing: on phones the quiet arrow link needs a comfortable target. */
@media (max-width: 619px) {
  .link {
    min-height: 44px;
  }
}

/* ---- Media frame + aspect ratios (photo-led; object-fit keeps layout stable) --
   Every image sits in .media so swapping a placeholder for a real photo of any
   size never breaks the composition. */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-alt);
  /* .media is also used on <figure>, which carries a default 40px side margin. */
  margin: 0;
}
.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--zoom img {
  transition: transform 1.2s var(--ease);
}
.media--zoom:hover img {
  transform: scale(1.045);
}

.ratio-16x9 {
  aspect-ratio: 16 / 9;
}
.ratio-3x2 {
  aspect-ratio: 3 / 2;
}
.ratio-4x3 {
  aspect-ratio: 4 / 3;
}
.ratio-1x1 {
  aspect-ratio: 1 / 1;
}
.ratio-4x5 {
  aspect-ratio: 4 / 5;
}
.ratio-3x4 {
  aspect-ratio: 3 / 4;
}

/* ---- Reveal on scroll (restrained) ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .media--zoom img {
    transition: none;
  }
}

/* ---- Two-column image + text (used on secondary pages) ---- */
.two-col {
  display: grid;
  gap: var(--sp-8);
}
@media (min-width: 820px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(2.5rem, 5vw, 5rem);
  }
  .two-col--wide-media {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .two-col--reverse .two-col__media {
    order: -1;
  }
}
.two-col__text {
  max-width: 46ch;
}

/* ---- Chips (facilities) ---- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.chip {
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  background: var(--surface);
}

/* ---- Meta row (room facts, small inline info) ---- */
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.meta strong {
  color: var(--text);
  font-weight: 600;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}
.breadcrumb a:hover {
  color: var(--clay);
}
.breadcrumb span[aria-hidden] {
  opacity: 0.5;
}

/* ---- Flash messages ---- */
.flash {
  padding-top: calc(var(--header-h) + var(--sp-6));
  padding-bottom: var(--sp-2);
}
.messages {
  display: grid;
  gap: 0.6rem;
}
.message {
  padding: 0.9rem 1.2rem;
  border-radius: var(--r);
  font-size: 0.95rem;
  border: 1px solid var(--line);
}
.message.success {
  background: #e7efe7;
  color: #2c4a34;
  border-color: #bcd0ba;
}
.message.error {
  background: #f4e3dd;
  color: #7d3a28;
  border-color: #e0b6a8;
}

/* ---- Note / disclaimer block ---- */
.note {
  border-left: 3px solid var(--clay);
  background: rgba(160, 94, 69, 0.07);
  padding: 0.9rem 1.2rem;
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 0.92rem;
  color: var(--text);
}
/* ---- Forms ---- */
.form {
  display: grid;
  gap: 1.2rem;
}
.form-row {
  display: grid;
  gap: 1.2rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8rem 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea {
  resize: vertical;
  min-height: 150px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(38, 59, 48, 0.12);
}
.field .errorlist {
  list-style: none;
  color: #a5432c;
  font-size: 0.85rem;
}
.field-check {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.field-check input {
  width: auto;
  margin-top: 0.3rem;
}
.field-check a {
  color: var(--clay);
  border-bottom: 1px solid currentColor;
}
/* The privacy link moved out of the <label> so that clicking it no longer
   toggles the checkbox. It drops onto its own line and lines up with the label
   text rather than with the box. */
.field-check__note {
  flex-basis: 100%;
  padding-left: calc(1rem + 0.65rem);
  font-size: 0.85rem;
}
/* Honeypot: kept in the DOM, hidden from people. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 620px) {
  .form-row.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}
