/* =============================================================================
   Tours Booking — Components
   Every colour here resolves through the semantic tokens, so components
   re-theme automatically inside any .theme-* section.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   LOGO
   The SVGs carry no fill, so they inherit currentColor when inlined.
   Single-colour only, in an approved core colour (style guide p.8).
   Clear space: 1× the height of the lowercase "o"; 25% of height for the
   monogram. The padding below reserves it.
   -------------------------------------------------------------------------- */

.logo {
  display: inline-block;
  color: var(--text-primary);
  line-height: 0;
  padding: 0.22em;
}

.logo svg { fill: currentColor; }

.logo--horizontal svg { width: clamp(132px, 12vw, 176px); height: auto; }
.logo--stacked    svg { width: clamp(96px, 9vw, 128px);   height: auto; }
.logo--monogram   svg { width: 40px; height: auto; padding: 0.25em; }

/* Approved single-colour treatments */
.logo--ocean  { color: var(--tb-ble-losean); }
.logo--lagoon { color: var(--tb-lagon-moris); }
.logo--navy   { color: var(--tb-ble-aswar); }
.logo--foam   { color: var(--tb-blan-lekim-vag); }
.logo--cream  { color: var(--tb-krem-vakwa); }

a.logo:focus-visible { border-radius: var(--radius-sm); }


/* -----------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85em 1.6em;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color     var(--duration-fast) var(--ease-out),
    color            var(--duration-fast) var(--ease-out),
    transform        var(--duration-fast) var(--ease-out);
}

.btn:active { transform: translateY(1px); }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* Primary — the deepened brand blue, so white labels clear 4.5:1 */
.btn--primary {
  background: var(--tb-ble-losean-deep);
  color: var(--tb-blan-blan);
}
.btn--primary:hover {
  background: var(--tb-ble-losean-deeper);
  color: var(--tb-blan-blan);
}

/* Secondary — Lagon Moris carries dark labels only (white is 1.99:1 on it) */
.btn--secondary {
  background: var(--tb-lagon-moris);
  color: var(--tb-ble-aswar);
}
.btn--secondary:hover {
  background: var(--tb-lagon-moris-75);
  color: var(--tb-ble-aswar);
}

/* Solid dark */
.btn--dark {
  background: var(--tb-ble-aswar);
  color: var(--tb-blan-lekim-vag);
}
.btn--dark:hover {
  background: var(--tb-nwar-volkan);
  color: var(--tb-blan-lekim-vag);
}

/* Warm accent — Koray Moris needs a dark label (white is only 3.38:1) */
.btn--accent {
  background: var(--tb-koray-moris);
  color: var(--tb-nwar-bazalt);
}
.btn--accent:hover {
  background: #E63F14;
  color: var(--tb-nwar-bazalt);
}

/* Outline — follows the section's text colour */
.btn--outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn--outline:hover {
  border-color: var(--text-primary);
  background: color-mix(in srgb, var(--text-primary) 8%, transparent);
  color: var(--text-primary);
}

/* Quiet text button */
.btn--quiet {
  background: transparent;
  color: var(--text-link);
  padding-inline: var(--space-2);
}
.btn--quiet:hover {
  color: var(--text-link-hover);
  background: color-mix(in srgb, var(--text-link) 8%, transparent);
}

.btn--sm { padding: 0.6em 1.15em; font-size: var(--text-2xs); }
.btn--lg { padding: 1em 2em;      font-size: var(--text-base); }
.btn--block { display: flex; width: 100%; }

/* On dark surfaces the primary flips to Lagon Moris: the deep blue only
   reaches 2.9:1 against navy, so its edge would disappear. */
.theme-navy .btn--primary,
.theme-volcanic .btn--primary,
.theme-basalt .btn--primary,
.theme-media .btn--primary {
  background: var(--tb-lagon-moris);
  color: var(--tb-ble-aswar);
}
.theme-navy .btn--primary:hover,
.theme-volcanic .btn--primary:hover,
.theme-basalt .btn--primary:hover,
.theme-media .btn--primary:hover {
  background: var(--tb-lagon-moris-75);
}

/* On saturated bases the primary becomes a light solid */
.theme-ocean .btn--primary,
.theme-ocean-display .btn--primary,
.theme-bougainvillea .btn--primary,
.theme-lagoon .btn--primary {
  background: var(--tb-blan-blan);
  color: var(--tb-ble-aswar);
}
.theme-ocean .btn--primary:hover,
.theme-ocean-display .btn--primary:hover,
.theme-bougainvillea .btn--primary:hover,
.theme-lagoon .btn--primary:hover {
  background: var(--tb-blan-lekim-vag);
  color: var(--tb-ble-aswar);
}


/* -----------------------------------------------------------------------------
   BADGE / PILL
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4em 0.9em;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.badge--live { color: var(--text-primary); }

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tb-lagon-moris);
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .badge__dot { animation: tb-pulse 2.8s var(--ease-in-out) infinite; }
}

@keyframes tb-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tb-lagon-moris) 60%, transparent); }
  70%      { box-shadow: 0 0 0 9px transparent; }
}


/* -----------------------------------------------------------------------------
   CARD
   -------------------------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition:
    transform  var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

a.card { text-decoration: none; color: inherit; }

a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--tb-gri-la-pli);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

a.card:hover .card__media img { transform: scale(1.045); }

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  flex: 1;
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-display);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  font-variation-settings: "opsz" var(--opsz-heading);
}

.card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-block-start: auto;
}

.card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-5) var(--space-5);
}

/* Media card — full-bleed image with copy over it.
   The scrim is what makes the text legible; do not remove it. */
/* The `a.card { color: inherit }` rule above outranks a plain `.card--media`,
   so the anchor form is named explicitly here. */
.card--media,
a.card--media {
  position: relative;
  min-height: 340px;
  justify-content: flex-end;
  border: 0;
  isolation: isolate;
  color: var(--tb-blan-blan);
}

/* Copy sits at the bottom edge, inside the scrim. Without this the body
   stretches to fill the card and pushes the title up over the bare image. */
.card--media .card__body {
  flex: 0 0 auto;
  gap: var(--space-2);
}

.card--media .card__text { margin-block-start: 0; }

/* Descendant, not direct child — the img sits inside a <picture> so the
   browser can pick WebP over JPEG. */
.card--media img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card--media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(16, 38, 58, 0.92) 0%,
    rgba(16, 38, 58, 0.72) 32%,
    rgba(16, 38, 58, 0.18) 68%,
    rgba(16, 38, 58, 0.05) 100%
  );
}

a.card--media:hover img { transform: scale(1.045); }

.card--media .card__text { color: rgba(255, 255, 255, 0.88); }

/* Flat card — no image, for CTAs and stats */
.card--flat {
  background: color-mix(in srgb, var(--text-primary) 4%, transparent);
  border-color: var(--border-subtle);
}

.card--invert {
  background: var(--tb-ble-aswar);
  border-color: transparent;
  color: var(--tb-blan-lekim-vag);
}

.card--invert .card__text { color: var(--tb-blan-lekim-vag); opacity: 0.82; }


/* -----------------------------------------------------------------------------
   SITE HEADER & NAV
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 10;
  padding-block: var(--space-5);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav a {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-decoration: none;
  padding-block: var(--space-1);
  border-block-end: 1.5px solid transparent;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.nav a:hover,
.nav a[aria-current="page"] { border-block-end-color: currentColor; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  color: inherit;
}


/* -----------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */

.field { display: grid; gap: var(--space-2); }

.field__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.field__hint { font-size: var(--text-2xs); color: var(--text-muted); }

.field__error {
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  color: var(--state-error);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.8em 1em;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--text-primary);
  font-size: var(--text-base);
  line-height: 1.4;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow   var(--duration-fast) var(--ease-out);
}

.input::placeholder,
.textarea::placeholder { color: var(--text-muted); }

.input:hover,
.textarea:hover,
.select:hover { border-color: var(--text-secondary); }

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 28%, transparent);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] { border-color: var(--state-error); }

.textarea { min-height: 8.5rem; resize: vertical; }

.select {
  appearance: none;
  padding-inline-end: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%2310263A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  background-size: 12px 8px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-block-start: 0.18rem;
  accent-color: var(--tb-ble-losean-deep);
}


/* -----------------------------------------------------------------------------
   INFO LIST — contact details, facts, specifications
   -------------------------------------------------------------------------- */

.info-list { display: grid; gap: var(--space-5); }

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.info-list svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-block-start: 0.2rem;
  color: var(--accent-secondary);
}

.theme-cream .info-list svg,
.theme-foam .info-list svg,
.theme-white .info-list svg,
.theme-sand .info-list svg,
.theme-blush .info-list svg,
.theme-rain .info-list svg { color: var(--tb-ble-losean-deep); }

.info-list__label {
  display: block;
  font-size: var(--text-3xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-block-end: 2px;
}

.info-list__value {
  font-size: var(--text-base);
  color: var(--text-primary);
  text-decoration: none;
}

a.info-list__value:hover { color: var(--text-link-hover); }


/* -----------------------------------------------------------------------------
   HERO — image or video behind, copy anchored to the lower left
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

/* The <picture> has to be sized explicitly. It is display:block from the
   reset but its height stays auto, and a percentage height on the <img>
   inside resolves against that — so without this the image falls back to its
   intrinsic height and only covers a band across the top of the hero. */
.hero__media picture {
  width: 100%;
  height: 100%;
}

.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Directional scrim — heaviest where the copy sits, so the photograph
   still reads on the opposite side. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg,
      rgba(16, 38, 58, 0.92) 0%,
      rgba(16, 38, 58, 0.68) 40%,
      rgba(16, 38, 58, 0.24) 74%,
      rgba(16, 38, 58, 0.12) 100%),
    linear-gradient(to top,
      rgba(16, 38, 58, 0.85) 0%,
      rgba(16, 38, 58, 0) 48%);
}

.hero__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: var(--space-8) clamp(var(--space-7), 8vh, var(--space-9));
}

/* Up to 600px, and never more than half the container — the photograph keeps
   the other half. The 28rem floor stops the "50%" from strangling the column
   on narrow screens, where half a viewport is unreadable; below roughly 900px
   the floor wins and the copy simply fills the container. No media query, to
   match how the grids here size themselves. */
.hero__copy { max-width: min(600px, max(28rem, 50%)); }

.hero__copy > * + * { margin-block-start: var(--space-5); }

.hero__copy .t-lead { max-width: min(46ch, 100%); }

/* Signature line — the brand tagline, set in Fraunces italic */
.signature {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  font-variation-settings: "opsz" var(--opsz-heading);
  color: var(--text-primary);
}

.signature::before {
  content: "";
  flex: none;
  width: 34px;
  height: 1.5px;
  background: var(--tb-lagon-moris);
}


/* -----------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: var(--space-8) var(--space-6);
  background: var(--surface-page);
  color: var(--text-primary);
}

.site-footer__top {
  display: grid;
  gap: var(--space-7);
  padding-block-end: var(--space-6);
  border-block-end: 1px solid var(--border-subtle);
}

@media (min-width: 48rem) {
  .site-footer__top { grid-template-columns: 1.6fr 1fr 1fr; }
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  justify-content: space-between;
  align-items: center;
  padding-block-start: var(--space-5);
  font-size: var(--text-2xs);
  color: var(--text-secondary);
}

.footer-heading {
  font-family: var(--font-body);
  font-size: var(--text-3xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-block-end: var(--space-4);
}

.link-list { display: grid; gap: var(--space-3); font-size: var(--text-sm); }

.link-list a {
  color: var(--text-secondary);
  text-decoration: none;
}

.link-list a:hover {
  color: var(--text-link-hover);
  text-decoration: underline;
}


/* -----------------------------------------------------------------------------
   SOCIAL ICONS
   -------------------------------------------------------------------------- */

.social { display: flex; gap: var(--space-2); }

.social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color     var(--duration-fast) var(--ease-out),
    color            var(--duration-fast) var(--ease-out);
}

.social a:hover {
  background: var(--tb-lagon-moris);
  border-color: var(--tb-lagon-moris);
  color: var(--tb-ble-aswar);
}

.social svg { width: 19px; height: 19px; }


/* -----------------------------------------------------------------------------
   SCROLL REVEAL
   Opt-in via [data-reveal]. Without JavaScript the element stays visible,
   so content never depends on the script running.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity   var(--duration-slow) var(--ease-out),
      transform var(--duration-slow) var(--ease-out);
  }

  html.js [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
  }
}
