/*
 * base.css: design tokens, local fonts, reset, typography, shared scrollbar
 * and small helpers. Loaded first on every page.
 * Class prefix: tr- (BEM). States use is-/has-, JS hooks use data-tr-*.
 */

/* ---------- Fonts (local files, see docs/CREDITS.md) ---------- */
@font-face {
  font-family: "Libre Caslon Display";
  src: url("../fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Colours */
  --tr-ink: #1b1b1b;          /* headings, dark sections */
  --tr-text: #7d7e7c;         /* body text */
  --tr-accent: #aa8453;       /* gold: buttons, prices, highlights */
  --tr-accent-dark: #8f6d42;  /* gold hover */
  --tr-line: #d8d8d7;         /* light lines, light text on dark */
  --tr-surface: #f7f7f5;      /* light grey section background */
  --tr-border: #eaeaea;       /* card borders */
  --tr-white: #fff;
  --tr-ink-deep: #171717;     /* footer bottom bar */
  --tr-overlay: rgba(27, 27, 27, 0.6);
  --tr-shade: rgba(27, 27, 27, 0.45); /* darkens bright photos behind white headings (hero, page banners) */

  /* Fonts */
  --tr-font-heading: "Libre Caslon Display", Georgia, serif;
  --tr-font-body: "Poppins", Arial, sans-serif;

  /* Type scale (desktop values; smaller screens below) */
  --tr-fs-display: 89px;  --tr-lh-display: 1.124;
  --tr-fs-h1: 67px;       --tr-lh-h1: 1.12;
  --tr-fs-h2: 50px;       --tr-lh-h2: 1.3;
  --tr-fs-h3: 38px;       --tr-lh-h3: 1.316;
  --tr-fs-h4: 28px;       --tr-lh-h4: 1.25;
  --tr-fs-body: 16px;     --tr-lh-body: 1.875;
  --tr-fs-small: 15px;

  /* Spacing */
  --tr-section-space: 140px;
  --tr-gutter: 24px;
  --tr-radius: 5px;
  --tr-radius-pill: 20px;
  --tr-header-height: 100px;

  /* Motion */
  --tr-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --tr-speed: 0.3s;
}

@media (max-width: 1199px) {
  :root {
    --tr-fs-display: 78px;
    --tr-fs-h1: 60px;
    --tr-fs-h3: 34px;
    --tr-section-space: 100px;
    --tr-header-height: 80px;
  }
}

@media (max-width: 767px) {
  :root {
    --tr-fs-display: 50px;
    --tr-fs-h1: 46px;
    --tr-fs-h2: 40px;
    --tr-fs-h3: 30px;
    --tr-section-space: 75px;
  }
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--tr-font-body);
  font-size: var(--tr-fs-body);
  line-height: var(--tr-lh-body);
  color: var(--tr-text);
  background: var(--tr-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--tr-font-heading);
  font-weight: 400;
  color: var(--tr-ink);
}

p, ul, ol, figure, blockquote {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--tr-speed) var(--tr-ease);
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

/* Visible keyboard focus everywhere (mouse clicks don't show it). */
:focus-visible {
  outline: 2px solid var(--tr-accent);
  outline-offset: 3px;
}

/* ---------- Scrollbar (one shared block, thin, on-palette) ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--tr-accent) transparent;
}
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--tr-accent);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--tr-accent-dark);
}

/* ---------- Helpers ---------- */
.tr-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tr-skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 20px;
  background: var(--tr-ink);
  color: var(--tr-white);
  border-radius: var(--tr-radius);
}
.tr-skip-link:focus {
  top: 16px;
}

.tr-text-accent {
  color: var(--tr-accent);
}

.tr-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* ---------- Scroll-in animation (assets/js/reveal.js + Animate.css) ---------- */
/* Hidden only when JS is running, so content never stays invisible without it. */
.has-js [data-tr-reveal] {
  visibility: hidden;
}
.has-js [data-tr-reveal].is-revealed {
  visibility: visible;
  animation-duration: 0.8s;
  animation-delay: var(--tr-reveal-delay, 0.2s);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .has-js [data-tr-reveal] {
    visibility: visible;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
