/* Agentic Arcade resource page, styled to match pathfinder.automationanywhere.com/summit */

@font-face {
  font-family: "Museo Sans";
  src: url("./fonts/MuseoSans_300-webfont.woff2") format("woff2"),
       url("./fonts/MuseoSans_300-webfont.woff") format("woff");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Museo Sans";
  src: url("./fonts/MuseoSans_500-webfont.woff2") format("woff2"),
       url("./fonts/MuseoSans_500-webfont.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Museo Sans";
  src: url("./fonts/MuseoSans_700-webfont.woff2") format("woff2"),
       url("./fonts/MuseoSans_700-webfont.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Press Start 2P";
  src: url("./fonts/PressStart2P-Regular.woff2") format("woff2"),
       url("./fonts/PressStart2P-Regular.woff") format("woff");
  font-weight: 400;
  font-display: block;
}

:root {
  --color-orange: #ff5a10;
  --color-orange-dark: #a83a08;
  --color-orange-light: #ff6e2e;
  --color-violet: #a060ff;
  --color-violet-light: #a78bfa;
  --color-bg: #0d0b1e;
  --color-text: #fff;
  --font-body: "Museo Sans", system-ui, sans-serif;
  --font-pixel: "Press Start 2P", monospace;
  --content-width: 1200px;
}

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

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
}

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

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(13, 11, 30, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: calc(100% - 40px);
  max-width: var(--content-width);
  height: 73px;
  margin: 0 auto;
}

.site-nav__logo img {
  width: auto;
  height: 50px;
}

.site-nav__link {
  display: flex;
  padding: 10px 16px;
  border: 1px solid var(--color-violet);
  color: var(--color-violet);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  opacity: 0.8;
}

/* Hero */
.hero {
  background-image:
    linear-gradient(rgba(160, 96, 255, 0.04) 1px, transparent 0),
    linear-gradient(90deg, rgba(160, 96, 255, 0.04) 1px, transparent 0),
    url("./Images/pathfinder-summit/hero-summit.png");
  background-size: 32px 32px, 32px 32px, 100% 100%;
  background-position: 0 0, 0 0, bottom;
  background-repeat: repeat, repeat, no-repeat;
}

.hero__inner {
  width: calc(100% - 40px);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 64px 0 80px;
  text-align: center;
}

.hero__tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--color-orange);
  color: var(--color-orange);
  font-family: var(--font-pixel);
  font-size: 7px;
}

.hero__heading {
  margin: 0 0 16px;
  font-family: var(--font-pixel);
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.5;
}

.hero__heading-orange {
  display: block;
  color: var(--color-orange);
}

.hero__heading-purple {
  display: block;
  color: var(--color-violet-light);
}

.hero__subtitle {
  margin: 0 0 48px;
  font-size: 1.125rem;
}

/* Game cards */
.arcade-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2.5rem 2rem;
}

/* Each card spans two of six columns; the second row is centered under the first */
.arcade-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.arcade-card:nth-child(3n + 1):nth-last-child(2) {
  grid-column: 2 / span 2;
}

.arcade-card img {
  width: 100%;
  margin-bottom: 0.4rem;
  border-radius: 0.5rem;
}

/* Buttons share the "Get Your Ticket" shape: notched corners, darker left edge, pixel font */
.arcade-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 12px 30px;
  border-left: 8px solid var(--color-orange-dark);
  background-color: var(--color-orange);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  color: var(--color-text);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.5px;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.1s;
}

/* Session title under the difficulty label, in a lighter, readable font */
.arcade-btn__subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.25;
  text-align: center;
  text-transform: none;
  white-space: normal;
}

/* Two half-width buttons sharing one row */
.arcade-btn-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.arcade-btn-row .arcade-btn {
  padding-right: 12px;
  padding-left: 8px;
}

.arcade-btn-row .arcade-btn__subtitle {
  font-size: 12px;
}

.arcade-btn:hover,
.arcade-btn:focus-visible {
  transform: translate(-1px, -1px);
}

.arcade-btn:active {
  transform: translate(2px, 2px);
}

@media (max-width: 900px) {
  .arcade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .arcade-card,
  .arcade-card:nth-child(3n + 1):nth-last-child(2) {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .arcade-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .arcade-btn {
    transition: none;
  }
}

/* Resource (how-to) pages */
.resource-page {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(160, 96, 255, 0.04) 1px, transparent 0),
    linear-gradient(90deg, rgba(160, 96, 255, 0.04) 1px, transparent 0),
    url("./Images/pathfinder-summit/hero-summit.png");
  background-size: 32px 32px, 32px 32px, cover;
  background-position: 0 0, 0 0, bottom;
  background-repeat: repeat, repeat, no-repeat;
  background-attachment: scroll, scroll, fixed;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  padding: 40px;
  color: #172b4d;
  font-size: 14px;
}

.document-header {
  margin: 0 auto 48px;
  padding-bottom: 24px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.document-header h1 {
  margin: 0 0 8px;
  color: var(--color-text);
  font-size: 2.81rem;
  font-weight: 700;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .document-header h1 {
    font-size: 3.56rem;
  }
}

.strategy-section {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 32px;
  padding: 32px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow-wrap: break-word;
}

.strategy-section h2 {
  position: relative;
  margin: 0;
  padding: 8px 40px 8px 0;
  border-bottom: 2px solid #dfe1e6;
  color: #172b4d;
  font-size: 21px;
  cursor: pointer;
  user-select: none;
}

.strategy-section h2::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 4px;
  width: 0;
  height: 0;
  margin-top: -3px;
  border-top: 8px solid currentColor;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
  transition: transform 0.3s ease;
}

.strategy-section.collapsed h2::after {
  transform: rotate(-90deg);
}

.strategy-section .section-content {
  max-height: 10000px;
  padding-top: 16px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.strategy-section.collapsed .section-content {
  max-height: 0;
  padding-top: 0;
  opacity: 0;
}

.strategy-section h3 {
  margin: 24px 0 12px;
  color: #172b4d;
  font-size: 15px;
}

.strategy-section p,
.strategy-section li {
  color: #172b4d;
}

.strategy-section p {
  margin: 12px 0;
}

.strategy-section ul,
.strategy-section ol {
  margin: 12px 0;
  padding-left: 24px;
}

.strategy-section li {
  margin: 8px 0;
}

.strategy-section pre,
.strategy-section code {
  font-family: "Courier New", Courier, monospace;
  background-color: #f4f5f7;
}

.strategy-section pre {
  padding: 16px;
  border: 1px solid #dfe1e6;
  border-radius: 3px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.strategy-section code {
  padding: 2px 4px;
  border-radius: 3px;
}

.content-link {
  color: var(--color-orange);
  text-decoration: underline;
}

.content-link:hover,
.content-link:focus-visible {
  color: var(--color-orange-dark);
}

.click-to-copy {
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.click-to-copy:hover {
  background-color: #f0f0f0;
}

.click-to-copy:active {
  background-color: #e0e0e0;
}

/* Marks a block once its value has been copied, so users can see where they left off */
.click-to-copy.copied {
  background-color: #e3f6ea;
}

.click-to-copy.copied pre {
  border-color: #2e9e5b;
  background-color: #e3f6ea;
}

/* Earlier copied blocks say "Done"; the most recent one says "Copied to clipboard" */
.click-to-copy.copied pre::after {
  content: "  - Done";
  color: #1d7a43;
  font-weight: 700;
}

.click-to-copy.copied-latest pre::after {
  content: "  - Copied to clipboard";
  color: #1d7a43;
  font-weight: 700;
}

.notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 1000;
  padding: 10px 20px;
  border-radius: 5px;
  background-color: #333;
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.5s ease-in-out;
}

.notification.show {
  opacity: 1;
}

/* Variable tables: opt-in via .var-table, so existing pages are unaffected.
   Cells may hold .click-to-copy blocks. The wrapper div lets translated list items keep the table. */
.var-table-wrap {
  margin: 12px 0;
  overflow-x: auto;
}

.var-table {
  width: 100%;
  border-collapse: collapse;
}

.var-table th,
.var-table td {
  padding: 8px;
  border: 1px solid #dfe1e6;
  text-align: left;
  vertical-align: middle;
}

.var-table th {
  background-color: #f4f5f7;
  color: #172b4d;
  font-weight: 700;
}

.var-table .click-to-copy {
  padding: 0;
}

.var-table .click-to-copy pre {
  margin: 0;
  padding: 8px;
}
