/*design spec base for every page*/

:root {
  /* Brand colours*/
  --primary: #5c0018;
  --primary-dark: #570013;
  --primary-light: #70172a;
  --gradient-end: #a8003a;
  --accent: #d4af37;
  --accent-muted: #755b00;
  --accent-light: #fef9f1;
  --accent-soft: #c9a84c;
  --tertiary-muted: #7a5c5c;

  --bg-light: #fef9f1;
  --bg-dark: #1d1c17;
  --bg-cream: #f2ede5;
  --surface-light: #f8f3eb;
  --surface-dark: #1a1a1a;
  --surface-white: #ffffff;
  --surface-muted: #f8f3eb;
  --input-border: #e0bfbf;

  --text-light: #0e0d0b;
  --text-dark: #ffffff;
  --text-muted: #6b7280;
  --success: #4caf50;
  --error: #dc2626;
  --warning: #f97316;
  --divider: #e5e2e1;

  /* Typography*/
  --font-display: "Newsreader", "CMU Serif", Georgia, serif;
  --font-body: "Plus Jakarta Sans", Inter, Arial, sans-serif;
  --font-code: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 18px 45px rgba(29, 28, 23, 0.14);
  --shadow-crisp: 0 7px 0 rgba(92, 0, 24, 0.14);
  --brand-gradient: linear-gradient(135deg, #570013 0%, #76001f 42%, #a8003a 100%);
  --brand-gradient-soft:
    radial-gradient(circle at 82% 8%, rgba(212, 175, 55, 0.16), transparent 20rem),
    linear-gradient(135deg, #570013 0%, #70001f 48%, #a8003a 100%);
  --max: clamp(1040px, 78vw, 1480px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--accent-light);
  background: var(--primary-dark);
  font-family: var(--font-body);
  line-height: 1.55;
  animation: page-enter 520ms ease both;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(212, 175, 55, 0.18), transparent 18rem),
    radial-gradient(circle at 88% 0%, rgba(248, 243, 235, 0.11), transparent 22rem),
    var(--brand-gradient-soft);
  z-index: -1;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(87, 0, 19, 0.9);
  backdrop-filter: blur(18px);
}

.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 4px;
  pointer-events: none;
  background: transparent;
}

.scroll-meter span {
  display: block;
  width: var(--scroll-progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--tertiary-muted));
  box-shadow: 0 0 22px rgba(255, 212, 175, 0.7);
  transition: width 120ms linear;
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-light);
}

.brand-mark:hover .monogram {
  transform: rotate(-4deg) scale(1.08);
}

.brand-mark:hover .nav-logo {
  transform: rotate(-4deg) scale(1.08);
}

.nav-logo {
  width: 42px;
  height: 42px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  object-fit: cover;
  transition: transform 200ms ease, filter 200ms ease;
}

.monogram {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: var(--primary);
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a {
  position: relative;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 13px;
  color: var(--accent-light);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--primary-dark);
  background: var(--accent);
  transform: translateY(-2px);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: 68vh;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 74% 10%, rgba(212, 175, 55, 0.18), transparent 15rem),
    var(--brand-gradient);
  color: var(--accent-light);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 46vw;
  height: 46vw;
  right: -13vw;
  top: -18vw;
  border: 1px solid rgba(212, 175, 55, 0.28);
  animation: orbital-drift 16s linear infinite;
}

.hero::after {
  width: 18vw;
  height: 18vw;
  left: 8vw;
  bottom: -8vw;
  border: 1px solid rgba(248, 243, 235, 0.18);
  animation: orbital-drift 12s linear infinite reverse;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 54px;
}

.home-hero {
  min-height: 62vh;
}

.home-hero .hero-inner {
  display: grid;
  place-items: center;
  text-align: center;
}

.home-logo .logo-box {
  width: clamp(96px, 15vw, 150px);
  height: clamp(96px, 15vw, 150px);
  margin-bottom: 24px;
}

.home-logo .wordmark {
  font-size: clamp(3.2rem, 9vw, 8rem);
}

.home-logo-img {
  width: min(460px, 76vw);
  height: auto;
  padding: clamp(18px, 4vw, 42px);
  background: var(--primary-dark);
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(29, 28, 23, 0.26);
}

.home-tagline {
  margin: 18px 0 0;
  color: rgba(248, 243, 235, 0.84);
  font-weight: 700;
}

.hero-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  margin-top: 26px;
  border-radius: 999px;
  padding: 0 22px;
  color: var(--primary-dark);
  background: var(--accent);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(29, 28, 23, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(29, 28, 23, 0.3);
}

.overview-section {
  padding-top: 24px;
}

.content-link {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  color: inherit;
  text-decoration: none;
}

.content-link span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: rgba(92, 0, 24, 0.08);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.content-link p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 212, 175, 0.48);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.02;
}

h1 {
  max-width: 760px;
  margin-top: 20px;
  font-size: clamp(2.4rem, 4.1vw, 4.85rem);
  margin-bottom: 18px;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.8rem, 2.55vw, 3rem);
  margin-bottom: 22px;
}

h3 {
  font-size: 1.38rem;
}

.hero p,
.section-lede {
  max-width: 680px;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.section-lede {
  margin-top: 0;
  color: rgba(248, 243, 235, 0.82);
  font-weight: 700;
}

.hero p {
  color: rgba(255, 248, 235, 0.84);
}

.page {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.section {
  padding: 62px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.section:first-child {
  padding-top: 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 40px;
  align-items: center;
  margin-bottom: 32px;
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.component-card {
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(254, 249, 241, 0.98), rgba(248, 243, 235, 0.94));
  color: var(--text-light);
  box-shadow: 0 18px 54px rgba(29, 28, 23, 0.16);
}

.card {
  padding: 24px;
}

.card.interactive,
.component-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card.interactive:hover,
.component-card:hover {
  transform: translateY(-4px);
  border-color: rgba(92, 0, 24, 0.38);
  box-shadow: 0 24px 58px rgba(29, 28, 23, 0.2);
}

.button-row,
.filter-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0 20px;
  font-family: var(--font-body);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.btn-primary {
  color: var(--text-dark);
  background: linear-gradient(90deg, var(--primary), var(--gradient-end));
  box-shadow: var(--shadow-crisp);
}

.btn-secondary {
  color: var(--primary);
  background: var(--accent);
}

.btn-ghost {
  color: var(--primary);
  background: transparent;
  border: 1px solid rgba(92, 0, 24, 0.28);
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 800;
}

.filter-tag:first-child {
  border-color: var(--primary);
  color: var(--text-dark);
  background: var(--primary);
}


pre {
  overflow: auto;
  padding: 18px;
  font-family: var(--font-code);
  font-size: 0.86rem;
  color: var(--accent-light);
}

.token-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(248, 243, 235, 0.96);
  color: var(--text-light);
}

.token-table th,
.token-table td {
  padding: 14px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.token-table th {
  background: rgba(92, 0, 24, 0.06);
  color: var(--primary);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.pass {
  color: #0b2810;
  background: rgba(76, 175, 80, 0.55);
}

.warn {
  color: #5c2e00;
  background: rgba(255, 151, 54, 0.24);
}

.figma-source {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 20px 0 28px;
  padding: 18px 22px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: var(--radius-md);
  background: rgba(87, 0, 19, 0.55);
  color: var(--accent-light);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.figma-source:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(87, 0, 19, 0.72);
  box-shadow: 0 18px 42px rgba(29, 28, 23, 0.28);
}

.figma-source-label {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.figma-source strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.2;
}

.figma-source-hint {
  color: rgba(248, 243, 235, 0.78);
  font-size: 0.88rem;
}

.site-footer {
  background: var(--bg-dark);
  color: var(--text-dark);
}

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-inner span {
  margin-left: 18px;
}

@media (max-width: 980px) {
  .nav-shell {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .nav-links a {
    flex: 0 0 auto;
  }

  .section-heading,
  .grid.two {
    grid-template-columns: 1fr;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 380ms ease forwards;
}

.page-exit {
  animation: page-exit 95ms ease forwards;
}

.page-exit-left {
  animation: page-swipe-left 120ms ease forwards;
}

.page-exit-right {
  animation: page-swipe-right 120ms ease forwards;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-exit {
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@keyframes page-swipe-left {
  to {
    opacity: 0;
    transform: translateX(-28px);
  }
}

@keyframes page-swipe-right {
  to {
    opacity: 0;
    transform: translateX(28px);
  }
}

@keyframes orbital-drift {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1440px) {
  :root {
    --max: 1060px;
  }

  .nav-shell {
    min-height: 62px;
    gap: 18px;
  }

  .brand-mark {
    font-size: 1.12rem;
  }

  .nav-logo,
  .monogram {
    width: 36px;
    height: 36px;
  }

  .nav-links a {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .hero-inner {
    padding: 52px 0 42px;
  }

  .home-hero {
    min-height: 50vh;
  }

  h1 {
    max-width: 640px;
    font-size: clamp(2.2rem, 3.7vw, 4rem);
  }

  h2 {
    font-size: clamp(1.65rem, 2.35vw, 2.55rem);
  }

  h3 {
    font-size: 1.22rem;
  }

  .page {
    padding: 46px 0;
  }

  .section {
    padding: 42px 0;
  }

  .section-heading {
    grid-template-columns: minmax(0, 0.78fr) minmax(300px, 1.22fr);
    gap: 32px;
    margin-bottom: 22px;
  }

  .hero p,
  .section-lede {
    max-width: 610px;
    font-size: 0.98rem;
  }

  .card,
  .component-card {
    box-shadow: 0 18px 48px rgba(29, 28, 23, 0.16);
  }

  .card {
    padding: 18px;
  }
}

@media (max-width: 1180px) {
  :root {
    --max: calc(100vw - 48px);
  }

  .section-heading {
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  }
}

@media (max-width: 860px) {
  .nav-shell,
  .section-heading,
  .footer-inner {
    display: block;
  }

  .nav-links {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

