/* ==========================================================================
   Components: header, buttons, hero, waves, steps, cards, carousel,
   listings, FAQ, forms, footer, banners
   ========================================================================== */

/* ---------- Header ---------- */
.site-header { background: var(--deep-teal); color: var(--white); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-block: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--white); text-decoration: none; font-family: var(--font-heading); font-weight: 800; font-size: 1.3rem; }
.brand:hover { color: var(--white); }
.brand svg { width: 42px; height: 34px; flex: none; }
.site-header :focus-visible { outline-color: var(--lime); }

.site-nav { order: 3; width: 100%; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0 0 0 -0.7rem; padding: 0; white-space: nowrap; }
.site-nav a { display: block; padding: 0.5rem 0.7rem; color: var(--sea-glass); text-decoration: none; font-weight: 600; font-size: 0.95rem; border-radius: var(--radius-pill); }
.site-nav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.site-nav a[aria-current="page"] { color: var(--white); box-shadow: inset 0 -3px 0 var(--lime); border-radius: 0; }
@media (min-width: 960px) { .site-nav { order: 0; width: auto; } .site-nav ul { margin: 0; } }

.lang-switch { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--sea-glass); font-weight: 700; font-size: 0.9rem; text-decoration: none; border: 2px solid var(--sea-glass); border-radius: var(--radius-pill); padding: 0.35rem 0.9rem; min-height: 44px; }
.lang-switch:hover { background: var(--sea-glass); color: var(--deep-teal); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.75rem 1.5rem; border-radius: var(--radius-pill); border: 2px solid transparent; font-family: var(--font-body); font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background-color 0.15s, color 0.15s, transform 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--turquoise); color: var(--dark-text); }
.btn--primary:hover { background: var(--sea-glass); color: var(--dark-text); }
.btn--secondary { background: var(--deep-teal); color: var(--white); }
.btn--secondary:hover { background: var(--dark-text); color: var(--white); }
.btn--outline { background: transparent; color: var(--deep-teal); border-color: var(--deep-teal); }
.btn--outline:hover { background: var(--deep-teal); color: var(--white); }
.btn--coral { background: var(--coral); color: var(--dark-text); }
.btn--coral:hover { background: var(--sand); color: var(--dark-text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Hero ---------- */
.hero { display: flow-root; background: var(--sea-glass); padding-block: clamp(2.5rem, 7vw, 5rem) 0; }
.hero__grid { display: grid; gap: 2rem; align-items: center; }
.hero__lead { font-size: 1.15rem; max-width: 34rem; }
.hero__media img { border-radius: calc(var(--radius) * 1.5); box-shadow: var(--shadow); width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hero__tagline { font-family: var(--font-heading); font-weight: 700; color: var(--deep-teal); font-size: 1.1rem; margin-bottom: 0.5rem; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 3rem; } }

.page-hero { display: flow-root; background: var(--sea-glass); padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
.page-hero p { max-width: 44rem; font-size: 1.1rem; }

/* ---------- Wave dividers ---------- */
.wave { display: block; width: 100%; height: clamp(36px, 6vw, 72px); }
.wave--sea-to-sand { background: var(--sea-glass); color: var(--sand); }
.wave--sand-to-sea { background: var(--sand); color: var(--sea-glass); }
.wave--sand-to-teal { background: var(--sand); color: var(--deep-teal); }
.wave--sea-to-teal { background: var(--sea-glass); color: var(--deep-teal); }

/* ---------- Icons ---------- */
.icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--lg { width: 40px; height: 40px; }
.icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sea-glass); color: var(--deep-teal); }
.section--sea .icon-badge { background: var(--white); }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; counter-reset: step; }
.step { position: relative; background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); counter-increment: step; }
.step h3 { margin-top: 1rem; }
.step p { margin: 0; }
.step__num { position: absolute; top: 1.25rem; right: 1.25rem; font-family: var(--font-heading); font-weight: 800; font-size: 0.85rem; color: var(--deep-teal); background: var(--sand); border-radius: var(--radius-pill); padding: 0.15rem 0.6rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps--4 { grid-template-columns: repeat(4, 1fr); } .steps--5 { grid-template-columns: repeat(5, 1fr); } }

.timeline { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; }
.timeline li { display: grid; gap: 1rem; background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
@media (min-width: 640px) { .timeline li { grid-template-columns: auto 1fr; } }
.timeline h2 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.timeline p { margin: 0 0 0.5rem; }
.timeline p:last-child { margin: 0; }

/* ---------- Feature cards ---------- */
.cards { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 768px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card h3 { margin-top: 1rem; }
.card p:last-child { margin-bottom: 0; }

.note { background: var(--white); border-left: 6px solid var(--coral); border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 2rem; font-weight: 600; }

/* ---------- Lifestyle strip ---------- */
.lifestyle { display: grid; gap: 1rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.lifestyle__item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; background: var(--white); border-radius: var(--radius); padding: 1.5rem 1rem; }
.lifestyle__item span { font-family: var(--font-heading); font-weight: 700; color: var(--deep-teal); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band p { max-width: 38rem; margin-inline: auto; color: var(--sea-glass); font-size: 1.1rem; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Carousel ---------- */
.carousel { position: relative; margin-top: 2rem; }
/* Reserve roughly one card's height while listings.json loads, to avoid layout shift. */
.carousel__track:empty { min-height: 34rem; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 0.25rem; padding: 0.25rem 0.25rem 1rem; margin: 0; list-style: none; scrollbar-width: thin; overscroll-behavior-x: contain; }
.carousel__track:focus-visible { outline-offset: 0; }
.carousel__slide, .carousel__slide-inner { scroll-snap-align: start; display: flex; }
.carousel__slide-inner { width: 100%; scroll-snap-align: none; }
@media (min-width: 768px) { .carousel__track { grid-auto-columns: calc((100% - 1rem) / 2); } }
@media (min-width: 1100px) { .carousel__track { grid-auto-columns: calc((100% - 2rem) / 3); } }
@media (prefers-reduced-motion: no-preference) { .carousel__track { scroll-behavior: smooth; } }

.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.5rem; }
.carousel__btn { display: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--deep-teal); background: var(--white); color: var(--deep-teal); cursor: pointer; }
.carousel__btn:hover:not(:disabled) { background: var(--deep-teal); color: var(--white); }
.carousel__btn:disabled { opacity: 0.4; cursor: default; }
@media (min-width: 768px) { .carousel__btn { display: inline-flex; } }
.carousel__dots { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.carousel__dot { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.carousel__dot::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--deep-teal); background: transparent; }
.carousel__dot[aria-current="true"]::before { background: var(--deep-teal); }
.carousel__status { text-align: center; padding: 2rem 1rem; background: var(--white); border-radius: var(--radius); }

/* ---------- Listing card ---------- */
.listing-grid { display: grid; gap: 1rem; margin-top: 2rem; list-style: none; padding: 0; }
@media (min-width: 768px) { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .listing-grid { grid-template-columns: repeat(3, 1fr); } }

.listing-card { position: relative; display: flex; flex-direction: column; width: 100%; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.listing-card__media { position: relative; aspect-ratio: 3 / 2; background: var(--sea-glass); }
.listing-card__media img { width: 100%; height: 100%; object-fit: cover; }
.listing-card__body { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem; flex: 1; }
.listing-card__title { font-size: 1.2rem; margin: 0; }
.listing-card__location { display: flex; align-items: center; gap: 0.35rem; margin: 0; font-size: var(--fs-small); }
.listing-card__location .icon { width: 18px; height: 18px; color: var(--deep-teal); }
.listing-card__type { margin: 0; font-size: var(--fs-small); font-weight: 600; color: var(--deep-teal); }
.listing-card__facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr)); gap: 0.25rem 1rem; margin: 0.5rem 0; font-size: var(--fs-small); }
.listing-card__facts div { display: flex; flex-direction: column; }
.listing-card__facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.listing-card__facts dd { margin: 0; font-weight: 700; }
.listing-card__price { margin: auto 0 0.75rem; font-family: var(--font-heading); font-weight: 800; font-size: 1.15rem; color: var(--deep-teal); }
.listing-card .btn { align-self: flex-start; }

.badge { position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2; background: var(--coral); color: var(--dark-text); font-weight: 700; font-size: 0.8rem; border-radius: var(--radius-pill); padding: 0.25rem 0.75rem; }
.badge--available { background: var(--white); color: var(--dark-text); box-shadow: inset 0 0 0 2px var(--palm-green); }
.ribbon { position: absolute; top: 1rem; right: -2.5rem; z-index: 2; transform: rotate(35deg); background: var(--dark-text); color: var(--white); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.15em; padding: 0.3rem 3rem; }

/* ---------- Filter chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.chip { min-height: 44px; padding: 0.5rem 1.1rem; border-radius: var(--radius-pill); border: 2px solid var(--deep-teal); background: var(--white); color: var(--deep-teal); font: inherit; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--deep-teal); color: var(--white); }

/* ---------- FAQ ---------- */
.faq { margin-top: 2rem; display: grid; gap: 0.75rem; max-width: 52rem; }
.faq details { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 1.25rem; position: relative; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: var(--deep-teal); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq .faq__answer { padding: 0 1.25rem 1.25rem; }
.faq .faq__answer p:last-child { margin-bottom: 0; }

/* ---------- Forms ---------- */
.contact-grid { display: grid; gap: 2rem; margin-top: 2rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.6fr 1fr; } }
.form { background: var(--white); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.1rem; }
.field label, .field legend { font-weight: 600; }
.field .hint { font-size: var(--fs-small); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  font: inherit; color: var(--dark-text); background: var(--white); border: 2px solid #5E7A80; border-radius: 10px; padding: 0.65rem 0.8rem; min-height: 48px; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: var(--focus-ring); outline-offset: 1px; border-color: var(--deep-teal); }
.field [aria-invalid="true"] { border-color: #B3261E; }
.field__error { color: #B3261E; font-size: var(--fs-small); font-weight: 600; min-height: 0; }
.field__error:empty { display: none; }
fieldset.field { border: 0; padding: 0; margin: 0 0 1.1rem; }
.choice { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 0.4rem; }
.choice input { width: 22px; height: 22px; margin: 0.15rem 0 0; accent-color: var(--deep-teal); flex: none; }
.form__row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__status { border-radius: 10px; padding: 0.9rem 1rem; margin-top: 1rem; font-weight: 600; }
.form__status:empty { display: none; }
.form__status--success { background: var(--sea-glass); color: var(--deep-teal); }
.form__status--error { background: #FDE7E4; color: #8A1C14; }
.turnstile-slot { margin: 0.5rem 0 1rem; min-height: 65px; }

.contact-aside { display: grid; gap: 1rem; align-content: start; }
.contact-aside .card { display: flex; gap: 1rem; align-items: flex-start; }
.contact-aside h2 { font-size: 1.1rem; margin: 0 0 0.25rem; }
.contact-aside p { margin: 0; }

/* ---------- Prose (privacy policy) ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }

/* ---------- Banners ---------- */
.draft-banner { background: var(--coral); color: var(--dark-text); text-align: center; font-weight: 800; letter-spacing: 0.04em; padding: 0.75rem var(--gutter); }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep-teal); color: var(--sea-glass); font-size: var(--fs-small); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--sea-glass); }
.site-footer :focus-visible { outline-color: var(--lime); }
.footer__grid { display: grid; gap: 1.5rem; padding-block: 3rem 2rem; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer__brand { color: var(--white); font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; margin-bottom: 0.5rem; }
.footer__heading { color: var(--white); font-family: var(--font-heading); font-weight: 700; font-size: 1rem; margin: 0 0 0.5rem; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.footer__links a { display: inline-block; padding-block: 0.2rem; }
.footer__legal { border-top: 1px solid rgba(191, 237, 230, 0.3); padding-block: 1.5rem 2rem; }
.footer__legal p { max-width: 60rem; }
.site-footer .verify { color: var(--dark-text); }
