/* ============================================================
   SeaRendipity — Base reset & typography
   Depends on css/tokens.css. Built for the Tropical Vivid redesign.

   NOTE (phased rollout): This file applies a global reset and base
   typography that intentionally supersede the legacy template look.
   It is linked on a page only once that page's body has been
   converted to the new design, so it never fights the old float
   layout on not-yet-converted pages. Legacy CSS is fully removed
   in the final cleanup phase.
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p {
  margin: 0 0 var(--space-4);
  max-width: var(--content-max);
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--color-link-hover); }

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
li { margin-bottom: var(--space-2); }

hr {
  border: 0;
  border-top: 1px solid var(--color-line);
  margin: var(--space-6) 0;
}

:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
  border-radius: 4px;
}

main[tabindex="-1"]:focus,
main[tabindex="-1"]:focus-visible {
  outline: none;
}

/* ---- Shared helpers ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  color: var(--color-teal-deep);
  margin: 0 0 var(--space-3);
}

/* Bad Script signature accent — brand wordmark + special moments only */
.brand-script {
  font-family: var(--font-brand);
  font-weight: var(--fw-regular);
  letter-spacing: 0;
  line-height: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body);
  line-height: 1;
  padding: 0.95rem 1.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-cta);
  color: var(--color-cta-text);
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover { background: var(--color-cta-hover); color: #fff; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }

.btn-outline {
  background: transparent;
  border-color: var(--color-teal-deep);
  color: var(--color-teal-deep);
}
.btn-outline:hover { background: var(--color-teal-deep); color: #fff; }

.pill {
  display: inline-block;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: #fff;
  background: var(--color-palm);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  z-index: 1000;
  background: var(--color-cta);
  color: var(--color-cta-text);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-cta);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus {
  top: var(--space-4);
  color: var(--color-cta-text);
}
