/* ==========================================================================
   Global stylesheet — design tokens, reset, base elements, shared patterns.
   Plain hand-written CSS; no utility framework.
   ========================================================================== */

/* ----- Design tokens ----- */
/* "Living Legacy" system: ink navy + heritage gold on a paper ground */
:root {
  /* Palette */
  --ink-navy: #092b5c;
  --ink-navy-deep: #061f47;
  --gold-heritage: #bd6d06;
  --gold-warm: #d29a42;
  --paper: #fffaf1;
  --paper-shade: #f8ecda;
  --brown-ink: #4c321c;

  --background: var(--paper);
  --foreground: var(--ink-navy);
  --muted-foreground: var(--brown-ink);
  --card: #fbf8f3;
  --card-light: var(--paper-shade);
  --border-color: #e8d3a8;
  --border-color-light: #f0e2c4;
  --gold: var(--gold-warm);
  --gold-dark: var(--gold-heritage);
  /* Gold dark enough to clear 4.5:1 as text on the paper grounds. */
  --gold-text: #8a4f04;
  --gold-light: var(--paper-shade);
  --secondary: var(--paper-shade);
  --ring: var(--gold-warm);
  --footer-bg: var(--paper-shade);

  /* Typography - single family site-wide */
  --font-body: "Noto Sans Thai", "Leelawadee UI", sans-serif;
  --font-heading: "Noto Sans Thai", "Leelawadee UI", sans-serif;
  --font-alt: "Noto Sans Thai", "Leelawadee UI", sans-serif;

  /* Shape */
  --radius-sm: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Motion */
  --motion-fast: 0.14s;
  --motion-base: 0.22s;
  --motion-slow: 0.52s;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: color var(--motion-base) var(--ease-out-quart),
    background-color var(--motion-base) var(--ease-out-quart),
    border-color var(--motion-base) var(--ease-out-quart),
    box-shadow var(--motion-base) var(--ease-out-quart),
    opacity var(--motion-base) var(--ease-out-quart),
    transform var(--motion-base) var(--ease-out-quart);

  /* Elevation */
  --shadow-card: 0 4px 20px rgba(189, 109, 6, 0.08);
  --shadow-hover: 0 10px 26px rgba(189, 109, 6, 0.2);
}

/* ----- Reset ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

/* ----- Layout container ----- */
.container {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  padding-inline: clamp(24px, 4.5vw, 84px);
}

@media (max-width: 640px) {
  .container {
    padding-inline: 16px;
  }
}

/* ----- Shared button patterns ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 25px;
  font-family: var(--font-heading);
  transition: var(--transition-smooth);
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.btn--gold {
  min-height: 48px;
  padding: 0 28px;
  background: var(--gold-dark);
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 8px 14px rgba(189, 109, 6, 0.22);
}

.btn--gold:hover {
  background: var(--ink-navy);
}

.btn--outline-gold {
  padding: 12px 24px;
  border: 2px solid var(--gold);
  background: transparent;
  color: var(--gold-dark);
  font-size: 16px;
  font-weight: 600;
}

.btn--outline-gold:hover {
  background: var(--gold-light);
}

.btn--sm {
  min-height: 36px;
  padding: 7px 18px;
  font-size: 14.5px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(138, 79, 12, 0.22);
}

/* Split label/arrow link-button used across narrative sections */
.link-btn {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--gold);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--gold-dark);
  transition: var(--transition-smooth);
}

.link-btn:hover {
  background: var(--gold-light);
}

.link-btn__label {
  padding: 10px 24px;
}

.link-btn__arrow {
  display: grid;
  place-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--gold);
}

/* Inline highlighted phrases */
.hl {
  font-family: var(--font-heading);
  font-size: 1.08em;
  font-weight: 600;
  color: var(--gold-dark);
}

.hl-lg {
  font-family: var(--font-heading);
  font-size: 1.12em;
  font-weight: 600;
  color: var(--gold-dark);
}

/* ----- Micro interactions ----- */
.motion-press {
  transition: var(--transition-smooth);
}

.motion-press:hover {
  transform: translateY(-1px);
}

.motion-press:active {
  transition-duration: var(--motion-fast);
  transform: translateY(0) scale(0.98);
}

/* Heartbeat pulse for the Heart icon inside primary "donate" CTAs. */
.heart-pulse {
  transform: scale(1);
}

@media (hover: hover) {
  a:hover > .heart-pulse,
  button:hover > .heart-pulse {
    animation: heart-beat 0.7s var(--ease-out-quart);
  }
}

@keyframes heart-beat {
  0%,
  100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.28);
  }
  45% {
    transform: scale(0.96);
  }
  65% {
    transform: scale(1.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  a:hover > .heart-pulse,
  button:hover > .heart-pulse {
    animation: none;
  }
}

/* ----- Utilities ----- */
.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;
}
