/* ==========================================================================
   E&A THANGKA ARTWORK — Reset, typography and shared components
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overscroll-behavior-y: none;          /* no white flash on rubber-band */
  background: var(--c-ink);
}

body {
  margin: 0;
  background: var(--c-ink);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }     /* whilst the drawer is open */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .01em;
  margin: 0 0 var(--sp-4);
  color: var(--c-text);
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--c-gold); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--c-gold-lt); }

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--c-gold-40); color: var(--c-ink); }

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* --- Skip link ------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: calc(env(safe-area-inset-top) + var(--sp-2));
  transform: translateY(-200%);
  z-index: var(--z-toast);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-gold);
  color: var(--c-ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--radius);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--c-ink); }

/* --- Layout helpers --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--c-ink-2); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* --- Section heading with rule ---------------------------------------- */
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head--centred { text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--f-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-4);
}
.eyebrow::before,
.eyebrow::after { content: ''; width: 34px; height: 1px; background: var(--c-gold-40); }
.section-head:not(.section-head--centred) .eyebrow::before { display: none; }
.section-head:not(.section-head--centred) .eyebrow::after { width: 56px; }

.section-head p {
  max-width: 62ch;
  color: var(--c-text-mute);
  font-size: var(--fs-lead);
  font-weight: 300;
}
.section-head--centred p { margin-inline: auto; }

/* --- Mandala rule (divider) -------------------------------------------- */
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  color: var(--c-gold-dp);
}
.rule::before, .rule::after {
  content: '';
  flex: 1 1 auto;
  max-width: 220px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold-40), transparent);
}

/* --- Buttons ----------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--c-gold);
  --btn-bd: var(--c-gold-40);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: .95em 2.1em;
  min-height: 48px;                      /* comfortable touch target */
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn::after {                            /* gold wash on hover */
  content: '';
  position: absolute; inset: 0;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.btn:hover { color: var(--c-ink); border-color: var(--c-gold); }
.btn:hover::after { transform: scaleX(1); }
.btn:active { transform: translateY(1px); }
.btn > * { position: relative; z-index: 1; }

.btn--solid { --btn-bg: var(--c-gold); --btn-fg: var(--c-ink); --btn-bd: var(--c-gold); }
.btn--solid::after { background: var(--c-gold-lt); }
.btn--solid:hover { color: var(--c-ink); }

.btn--ghost { --btn-bd: rgba(232, 224, 210, .22); --btn-fg: var(--c-text); }
.btn--ghost:hover { color: var(--c-ink); }

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Text link with arrow */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.link-more svg { transition: transform var(--dur-fast) var(--ease); }
.link-more:hover svg { transform: translateX(5px); }

/* --- Reveal on scroll ----------------------------------------------------
   Content is visible by default. The entrance animation is pure progressive
   enhancement via the CSS scroll timeline, so a browser without it — or a
   page where JavaScript never ran — still shows everything. Nothing here can
   leave a section blank.
   -------------------------------------------------------------------------- */
.reveal { opacity: 1; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 22%;
    }
  }
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* --- Motion and pointer preferences ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; animation: none; }
}
