/* Tour Ceylon +94 — Shared Styles
   Global resets WordPress does not ship, plus the partials every section
   reuses (container, eyebrow, buttons, icons, utilities).
   Every value references a theme.json token. */

/* --------------------------------------------------------------------------
   1. Box-sizing — scoped to the tc94 prefix, never a global * reset
   -------------------------------------------------------------------------- */
[class*="tc94-"],
[class*="tc94-"]::before,
[class*="tc94-"]::after,
[class*="tc94-"] *,
[class*="tc94-"] *::before,
[class*="tc94-"] *::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   2. Document
   -------------------------------------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--60));
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* clip, not hidden: `overflow-x: hidden` on body makes body a scroll container
     and silently kills `position: sticky` on the header. `clip` crops without
     creating one. */
  overflow-x: clip;
}

/* --------------------------------------------------------------------------
   3. Element primitives the ported components assume
   -------------------------------------------------------------------------- */
[class*="tc94-"] h1,
[class*="tc94-"] h2,
[class*="tc94-"] h3,
[class*="tc94-"] h4,
[class*="tc94-"] h5,
[class*="tc94-"] h6,
[class*="tc94-"] p,
[class*="tc94-"] figure,
[class*="tc94-"] blockquote,
[class*="tc94-"] dl,
[class*="tc94-"] dd,
[class*="tc94-"] ol,
[class*="tc94-"] ul {
  margin: 0;
}

[class*="tc94-"] ul[class],
[class*="tc94-"] ol[class] {
  padding: 0;
  list-style: none;
}

[class*="tc94-"] img,
[class*="tc94-"] svg,
[class*="tc94-"] video {
  display: block;
  max-width: 100%;
}

[class*="tc94-"] img { height: auto; }

/* <picture> only wraps the <source> negotiation; it carries no design of its
   own. Left as a box it has auto height, so height:100% on the <img> inside
   resolves against nothing and the photograph renders at its natural ratio —
   leaving a gap inside every frame that sets its own aspect ratio. Taking the
   box away makes the <img> a direct child of the frame again, so the
   cover-crop rules used throughout the site work as written. */
[class*="tc94-"] picture { display: contents; }

[class*="tc94-"] button,
[class*="tc94-"] input,
[class*="tc94-"] select,
[class*="tc94-"] textarea {
  font: inherit;
  color: inherit;
}

[class*="tc94-"] button {
  background: none;
  border: 0;
}

[class*="tc94-"] address { font-style: normal; }

[class*="tc94-"] p { text-wrap: pretty; }
[class*="tc94-"] strong,
[class*="tc94-"] b { font-weight: var(--wp--custom--weight--semibold); }
[class*="tc94-"] em { font-style: italic; }

[class*="tc94-"] h1,
[class*="tc94-"] h2,
[class*="tc94-"] h3,
[class*="tc94-"] h4,
[class*="tc94-"] h5,
[class*="tc94-"] h6 { text-wrap: balance; }

/* --------------------------------------------------------------------------
   4. Focus — keyboard only, on brand tokens
   -------------------------------------------------------------------------- */
:focus:not(:focus-visible) { outline: none; }

:focus-visible {
  outline: 2px solid var(--wp--custom--color--focus-ring);
  outline-offset: 3px;
  border-radius: var(--wp--custom--radius--xs);
}

.tc94-header :focus-visible,
.tc94-hero :focus-visible,
.tc94-cta :focus-visible,
.tc94-footer :focus-visible,
.tc94-section--dark :focus-visible {
  outline-color: var(--wp--custom--color--focus-ring-on-dark);
}

.tc94-skip-link {
  position: absolute;
  top: var(--wp--preset--spacing--20);
  left: var(--wp--preset--spacing--20);
  z-index: var(--wp--custom--zindex--skip);
  padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
  background: var(--wp--preset--color--base);
  color: var(--wp--preset--color--ocean-deep);
  font-weight: var(--wp--custom--weight--semibold);
  font-size: var(--wp--preset--font-size--sm);
  border-radius: var(--wp--custom--radius--md);
  box-shadow: var(--wp--custom--shadow--lg);
  text-decoration: none;
  transform: translateY(calc(-100% - var(--wp--preset--spacing--60)));
  transition: transform var(--wp--custom--duration--normal) var(--wp--custom--ease--out);
}

.tc94-skip-link:focus-visible { transform: translateY(0); }

/* --------------------------------------------------------------------------
   5. Layout primitives
   -------------------------------------------------------------------------- */
.tc94-container {
  width: 100%;
  max-width: calc(var(--wp--custom--layout--container-max) + var(--wp--custom--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--wp--custom--gutter);
}

.tc94-container--wide {
  max-width: calc(var(--wp--custom--layout--container-wide) + var(--wp--custom--gutter) * 2);
}

.tc94-container--prose {
  max-width: calc(var(--wp--custom--layout--container-prose) + var(--wp--custom--gutter) * 2);
}

/* Sections carry their own vertical rhythm, so the core blockGap margin must
   not add a stripe of page background between them. Two-class specificity
   beats the core rule, which prints after snippet CSS. */
.wp-site-blocks > [class*="tc94-"],
.entry-content > [class*="tc94-"],
.wp-block-post-content > [class*="tc94-"] {
  margin-block-start: 0;
}

/* --------------------------------------------------------------------------
   6. Eyebrow
   -------------------------------------------------------------------------- */
.tc94-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--20);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: var(--wp--custom--weight--bold);
  letter-spacing: var(--wp--custom--tracking--caps);
  text-transform: uppercase;
  color: var(--wp--preset--color--ocean-deep);
  margin: 0;
}

.tc94-eyebrow::before {
  content: "";
  width: var(--wp--preset--spacing--60);
  height: 2px;
  background-color: var(--wp--custom--color--rule-accent);
  border-radius: var(--wp--custom--radius--pill);
  flex: none;
}

.tc94-eyebrow--on-dark { color: var(--wp--preset--color--highlight); }

.tc94-eyebrow--center { justify-content: center; }

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.tc94-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wp--preset--spacing--20);
  min-height: var(--wp--custom--control--height);
  padding: 0 var(--wp--custom--control--padding-x);
  border-radius: var(--wp--custom--radius--sm);
  font-size: var(--wp--preset--font-size--sm);
  font-weight: var(--wp--custom--weight--semibold);
  letter-spacing: var(--wp--custom--tracking--normal);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color var(--wp--custom--duration--normal) var(--wp--custom--ease--out),
              border-color var(--wp--custom--duration--normal) var(--wp--custom--ease--out),
              color var(--wp--custom--duration--normal) var(--wp--custom--ease--out),
              transform var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
              box-shadow var(--wp--custom--duration--normal) var(--wp--custom--ease--out);
}

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

.tc94-btn--sm {
  min-height: var(--wp--custom--control--height-sm);
  padding: 0 var(--wp--preset--spacing--40);
  font-size: var(--wp--preset--font-size--xs);
}

.tc94-btn--lg {
  min-height: var(--wp--custom--control--height-lg);
  padding: 0 var(--wp--preset--spacing--70);
  font-size: var(--wp--preset--font-size--base);
}

.tc94-btn--block { width: 100%; }

/* The longest label on the site wants 341px on one unbreakable line, wider
   than a 320px screen was ever going to give it. Below 30rem a label may wrap
   instead, which needs the vertical padding the single-line version did
   without. */
@media (max-width: 29.999rem) {
  .tc94-btn {
    white-space: normal;
    padding-block: var(--wp--preset--spacing--30);
    line-height: var(--wp--custom--leading--snug);
  }
}

/* Primary call to action — the single accent */
.tc94-btn--accent {
  background-color: var(--wp--preset--color--accent);
  color: var(--wp--custom--color--on-accent);
  box-shadow: var(--wp--custom--shadow--sm);
}

.tc94-btn--accent:hover {
  background-color: var(--wp--preset--color--accent-deep);
  color: var(--wp--custom--color--on-accent);
  box-shadow: var(--wp--custom--shadow--md);
}

/* Secondary — ocean blue solid */
.tc94-btn--primary {
  background-color: var(--wp--preset--color--ocean-deep);
  color: var(--wp--custom--color--on-dark);
}

.tc94-btn--primary:hover {
  background-color: var(--wp--preset--color--ocean-dark);
  color: var(--wp--custom--color--on-dark);
}

/* Outline on dark backgrounds */
.tc94-btn--outline-light {
  border-color: var(--wp--custom--alpha--white-20);
  color: var(--wp--custom--color--on-dark);
  background-color: var(--wp--custom--alpha--white-08);
}

.tc94-btn--outline-light:hover {
  border-color: var(--wp--custom--alpha--white-70);
  background-color: var(--wp--custom--alpha--white-12);
  color: var(--wp--custom--color--on-dark);
}

/* Outline on light backgrounds */
.tc94-btn--outline {
  border-color: var(--wp--preset--color--line-strong);
  color: var(--wp--preset--color--contrast);
  background-color: var(--wp--preset--color--base);
}

.tc94-btn--outline:hover {
  border-color: var(--wp--preset--color--ocean-deep);
  color: var(--wp--preset--color--ocean-deep);
}

/* Quiet text button on dark */
.tc94-btn--quiet-light {
  color: var(--wp--custom--color--on-dark);
  padding: 0 var(--wp--preset--spacing--30);
}

.tc94-btn--quiet-light:hover { color: var(--wp--preset--color--highlight); }

.tc94-btn .tc94-icon {
  width: var(--wp--custom--icon--size);
  height: var(--wp--custom--icon--size);
}

.tc94-btn--sm .tc94-icon {
  width: var(--wp--custom--icon--size-sm);
  height: var(--wp--custom--icon--size-sm);
}

/* --------------------------------------------------------------------------
   8. Icons and utilities
   -------------------------------------------------------------------------- */
.tc94-sprite { display: none; }

.tc94-icon {
  width: var(--wp--custom--icon--size);
  height: var(--wp--custom--icon--size);
  flex: none;
  fill: none;
}

.tc94-icon--sm { width: var(--wp--custom--icon--size-sm); height: var(--wp--custom--icon--size-sm); }
.tc94-icon--lg { width: var(--wp--custom--icon--size-lg); height: var(--wp--custom--icon--size-lg); }
.tc94-icon--xl { width: var(--wp--custom--icon--size-xl); height: var(--wp--custom--icon--size-xl); }

.tc94-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tc94-lede {
  font-size: var(--wp--preset--font-size--lg);
  line-height: var(--wp--custom--leading--relaxed);
  color: var(--wp--preset--color--muted);
  max-width: var(--wp--custom--measure--lede);
}

.tc94-text-highlight { color: var(--wp--custom--color--highlight-ink); }

.tc94-hero .tc94-text-highlight,
.tc94-cta .tc94-text-highlight,
.tc94-section--dark .tc94-text-highlight {
  color: var(--wp--preset--color--highlight);
}

.tc94-hero .tc94-lede,
.tc94-cta .tc94-lede,
.tc94-section--dark .tc94-lede {
  color: var(--wp--custom--color--on-dark-muted);
}

.tc94-flow > * + * { margin-top: var(--wp--preset--spacing--50); }

/* --------------------------------------------------------------------------
   9. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  [class*="tc94-"],
  [class*="tc94-"]::before,
  [class*="tc94-"]::after,
  [class*="tc94-"] *,
  [class*="tc94-"] *::before,
  [class*="tc94-"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   10. Print
   -------------------------------------------------------------------------- */
@media print {
  .tc94-header,
  .tc94-footer,
  .tc94-nav-toggle { display: none !important; }

  body { color: #000; background: #fff; }
}
