/*
  components.css
  Shared pieces used on every public page: base text, wordmark, buttons, cards,
  chips, forms, the phone action bar and the back-to-top button.
*/

/* ========== BASE ========== */
/* Safety net: nothing on a public page may add a sideways scroll bar. */
html {
  overflow-x: clip;
}

/* Young Serif has one weight and no italic. Never let the browser fake a bold or
   a slant when another stylesheet asks for font-weight 600 or an italic accent. */
:root {
  font-synthesis: none;
}

body {
  background: var(--color-paper);
  color: var(--color-text-dark);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
}

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

.container {
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: min(100%, var(--max-width));
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.section-link {
  color: var(--color-mid);
  display: inline-flex;
  font-size: 16px;
  font-weight: 600;
  transition: color var(--transition);
}

html:not(.motion-ready) .section-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.section-link:hover {
  color: var(--color-gold-ink);
}

.section-subtitle {
  color: var(--color-text-dark-secondary);
  font-size: var(--text-body-lg);
  line-height: 1.65;
  margin-top: var(--space-4);
  max-width: 62ch;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: var(--focus-width) solid var(--color-gold);
  outline-offset: var(--focus-width);
}

/* ========== WORDMARK ========== */
.brand {
  align-items: center;
  display: inline-flex;
}

.brand__name {
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  white-space: nowrap;
}

/* ========== BUTTONS ========== */
.button {
  align-items: center;
  border-radius: var(--radius-sm);
  display: inline-flex;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  gap: var(--space-2);
  justify-content: center;
  line-height: 1.2;
  min-height: 46px;
  padding: 11px 22px;
  text-align: center;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.button--primary {
  background: var(--color-gold);
  color: var(--color-deep);
}

.button--primary:hover {
  background: #D6B960;
}

.button--large {
  font-size: 17px;
  min-height: 52px;
  padding: 13px 28px;
}

.button--xl {
  font-size: 17px;
  min-height: 56px;
  padding: 15px 32px;
}

.button--secondary {
  background: transparent;
  border: 1px solid rgba(243, 239, 230, 0.4);
  color: var(--color-text-primary);
}

.button--secondary:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* ========== EYEBROW ========== */
.eyebrow {
  color: var(--color-gold);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

/* ========== SERVICE CARDS ========== */
.service-card,
.review-card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}

.service-card {
  overflow: hidden;
}

.service-card:hover,
.service-card:focus-within {
  box-shadow: 0 18px 36px -22px rgba(14, 28, 21, 0.35);
  transform: translateY(-4px);
}

/* The "See what's included" link stretches over the whole card. */
.service-card__link::after {
  content: "";
  inset: 0;
  position: absolute;
}

.service-card__link:focus-visible::after {
  outline: var(--focus-width) solid var(--color-gold);
  outline-offset: calc(var(--focus-width) * -1);
}

.service-card__media {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.service-card__image {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.service-card__body {
  padding: var(--space-5);
}

.service-card__title {
  color: var(--color-deep);
  font-size: 22px;
  line-height: 1.2;
}

.service-card__description {
  color: var(--color-text-dark-secondary);
  font-size: var(--text-body-sm);
  line-height: 1.6;
  margin-top: var(--space-2);
}

.service-card__link {
  color: var(--color-mid);
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  margin-top: var(--space-4);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--transition);
}

.service-card__link:hover {
  color: var(--color-gold-ink);
}

.icon {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  width: 20px;
}

.icon--small {
  height: 18px;
  width: 18px;
}

/* ========== NEIGHBORHOOD CHIPS ========== */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.neighborhood-pill {
  appearance: none;
  background: transparent;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  color: var(--color-deep);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  padding: 7px 14px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.neighborhood-pill:hover {
  border-color: var(--color-mid);
}

.neighborhood-pill.is-active {
  background: var(--color-mid);
  border-color: var(--color-mid);
  color: var(--color-text-primary);
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: var(--space-5);
}

.form-row {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(2, 1fr);
}

.form-label {
  color: var(--color-deep);
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  background: var(--color-white);
  border: 1px solid rgba(14, 28, 21, 0.24);
  border-radius: var(--radius-sm);
  color: var(--color-text-dark);
  font-size: 16px;
  outline: none;
  padding: 12px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-mid);
  box-shadow: 0 0 0 3px var(--color-gold-muted);
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--color-error);
}

.form-error {
  color: var(--color-error);
  font-size: 14px;
  margin-top: var(--space-1);
  min-height: var(--space-4);
}

.form-alert {
  background: rgba(179, 52, 42, 0.08);
  border-left: 3px solid var(--color-error);
  border-radius: var(--radius-sm);
  color: var(--color-error);
  font-size: 16px;
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
}

.form-success h2 {
  color: var(--color-deep);
  font-size: var(--text-h2);
  line-height: 1.1;
}

.form-success p {
  color: var(--color-text-dark-secondary);
  line-height: 1.7;
  margin-top: var(--space-3);
}

button[data-submitting="true"] {
  pointer-events: none;
}

/* ========== PHONE ACTION BAR ========== */
.mobile-sticky-bar {
  background: var(--color-deep);
  border-top: 1px solid var(--color-border-dark);
  bottom: 0;
  display: none;
  height: calc(var(--bar-height) + env(safe-area-inset-bottom, 0px));
  left: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  position: fixed;
  right: 0;
  z-index: 999;
}

.mobile-sticky-bar a {
  align-items: center;
  display: flex;
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  gap: var(--space-2);
  justify-content: center;
}

.mobile-sticky-bar__call {
  color: var(--color-text-primary);
}

.mobile-sticky-bar__book {
  background: var(--color-gold);
  color: var(--color-deep);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  align-items: center;
  background: var(--color-deep);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-sm);
  bottom: var(--space-5);
  color: var(--color-gold);
  display: grid;
  height: 44px;
  justify-items: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: var(--space-5);
  transition: opacity var(--transition), transform var(--transition);
  width: 44px;
  z-index: 998;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========== REVEAL DELAYS ========== */
/* js/motion.js decides what is hidden and when it shows. These only carry the stagger. */
.animate-in[data-delay="100"] { --animation-delay: 100ms; }
.animate-in[data-delay="200"] { --animation-delay: 200ms; }
.animate-in[data-delay="300"] { --animation-delay: 300ms; }
.animate-in[data-delay="400"] { --animation-delay: 400ms; }
.animate-in[data-delay="450"] { --animation-delay: 450ms; }

/* ========== PHONES ========== */
@media (max-width: 760px) {
  /* Anything marked data-mobile="hide" is left out of the phone layout. */
  [data-mobile="hide"] {
    display: none !important;
  }

  body {
    padding-bottom: calc(var(--bar-height) + env(safe-area-inset-bottom, 0px));
  }

  .form-row {
    gap: 0;
    grid-template-columns: 1fr;
  }

  .mobile-sticky-bar {
    display: flex;
  }

  .back-to-top {
    bottom: calc(var(--bar-height) + var(--space-4) + env(safe-area-inset-bottom, 0px));
    right: var(--space-4);
  }

  .button {
    white-space: normal;
  }
}

/* Anti-spam honeypot: invisible to people, tempting to bots. */
.hp-field {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}
