/* ==========================================================================
   Royalty Technology — Base: reset, typography, primitives
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  color: var(--text);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
}

body.menu-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; margin-block: 0; }
ul, ol { margin-block: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

::selection { background: var(--brand-200); color: var(--ink-900); }

/* ---- Layout primitives --------------------------------------------------- */

.container {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container));
  margin-inline: auto;
}

.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-tight); }
.section--subtle { background: var(--surface-subtle); }
.section--inverse { color: var(--text-on-inverse); background: var(--surface-inverse); }
.section--inverse p { color: var(--text-on-inverse-muted); }

.icon { width: 20px; height: 20px; flex: none; }

.skip-link {
  position: fixed;
  z-index: var(--z-skip);
  top: 12px;
  left: 16px;
  padding: 12px 18px;
  color: var(--ink-950);
  background: var(--n-000);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  transform: translateY(-180%);
  transition: transform var(--dur-base) var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---- Eyebrow ------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--space-5);
  color: var(--brand-on-light);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.eyebrow::before {
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: var(--radius-pill);
  content: "";
}
.eyebrow--on-dark { color: var(--brand-on-dark); }

/* ---- Section heading ----------------------------------------------------- */

.section-head { margin-bottom: var(--space-16); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head > p {
  max-width: 58ch;
  margin-top: var(--space-5);
  color: var(--text-muted);
  font-size: var(--fs-lead);
  line-height: var(--lh-snug);
}
.section--inverse .section-head > p { color: var(--text-on-inverse-muted); }

.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: var(--space-16);
  align-items: end;
}
.section-head--split > p { margin-top: 0; padding-bottom: 6px; }

/* ---- Buttons ------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding-inline: var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.button .icon { width: 17px; height: 17px; transition: transform var(--dur-base) var(--ease-out); }
.button:hover .icon { transform: translateX(3px); }
.button:active { transform: translateY(1px); }

.button--primary {
  color: var(--text-on-brand);
  background: var(--brand-strong);
  box-shadow: var(--shadow-sm);
}
.button--primary:hover { background: var(--brand-700); box-shadow: var(--shadow-brand); }

.button--ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}
.button--ghost:hover { background: var(--surface-subtle); border-color: var(--n-400); }

.button--on-dark {
  color: var(--text-on-inverse);
  background: rgba(255, 255, 255, .06);
  border-color: var(--border-inverse-strong);
  backdrop-filter: blur(6px);
}
.button--on-dark:hover { color: var(--ink-950); background: var(--n-000); border-color: var(--n-000); }

.button--block { width: 100%; }

/* ---- Text link ----------------------------------------------------------- */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-on-light);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: gap var(--dur-base) var(--ease-out);
}
.text-link .icon { width: 16px; height: 16px; }
.text-link:hover { gap: 12px; }
.text-link--on-dark { color: var(--brand-on-dark); }

/* ---- Brand --------------------------------------------------------------- */

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 11px;
}
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand__name {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand__accent { color: var(--brand-on-light); }

/* ---- Checklist ---------------------------------------------------------- */

.checklist {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-8) 0;
  padding: 0;
  list-style: none;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}
.checklist .icon {
  width: 20px;
  height: 20px;
  padding: 3px;
  margin-top: 1px;
  color: var(--brand-on-light);
  background: var(--brand-050);
  border-radius: var(--radius-pill);
}

/* ---- Pill / tag ---------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.3;
}
.pill--light { color: var(--text-muted); background: var(--surface-subtle); border: 1px solid var(--border); }
.pill--brand { color: var(--brand-on-light); background: var(--brand-050); border: 1px solid var(--brand-200); }
.pill--dark { color: var(--text-on-inverse-muted); background: rgba(255, 255, 255, .05); border: 1px solid var(--border-inverse); }

/* ---- Scroll reveal ------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* No-JS / reduced-motion safety net: never leave content invisible. */
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Utility ------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Page CTA ------------------------------------------------------------ */

.page-cta {
  padding-block: var(--section-y-tight);
  color: var(--text-on-inverse);
  background: var(--ink-950);
}
.page-cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  gap: var(--space-12);
  align-items: center;
}
.page-cta h2 { font-size: var(--fs-h2); }
.page-cta__inner > div:first-child > p:last-child {
  max-width: 52ch;
  margin-top: var(--space-4);
  color: var(--text-on-inverse-muted);
}
.page-cta__actions { display: grid; gap: var(--space-3); }
.page-cta__actions .button { width: 100%; }

/* ---- Illustration motion -------------------------------------------------- */

.art-motion {
  opacity: 0;
  transform: translateY(18px) scale(.98);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
}
.art-motion.is-in { opacity: 1; transform: none; }

/* Parallax offset written by art-motion.js; the inner img carries it so the
   container's entrance transform is not overwritten. */
.art-motion img {
  transform: translate3d(var(--art-x, 0), var(--art-y, 0), 0);
  transition: transform var(--dur-slow) var(--ease-out);
  will-change: transform;
}

.no-js .art-motion { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .art-motion { opacity: 1; transform: none; transition: none; }
  .art-motion img { transform: none; transition: none; }
}
