/* ==========================================================================
   Exactplay Spin — public site styles
   Direction A ("Signal"), mirrored from exactplay-site's globals.css: flat
   amber + cyan on near-black, hairline borders, solid (non-glass) surfaces,
   sharp corners. No glows, no backdrop blur behind content.
   ========================================================================== */

:root {
  /* Brand */
  --color-brand-primary: #ffb020;
  --color-brand-primary-hover: #e59a12;
  --color-brand-primary-weak: rgba(255, 176, 32, 0.1);
  --color-brand-accent: #38bdf8;
  --color-brand-accent-weak: rgba(56, 189, 248, 0.12);
  --color-text-on-brand: #1a1305;

  /* Text */
  --color-text-primary: #f4f6f8;
  --color-text-secondary: #c7ccd3;
  --color-text-muted: #9aa4b0;
  --color-text-subtle: #7c8894;

  /* Surfaces */
  --color-bg-dark: #05070a;
  --color-bg-grey: #0a0d12;
  --color-surface-card: #0d1117;
  --color-surface-card-hover: #12161d;
  --color-surface-raised: #161b22;

  /* Lines */
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.14);
  --color-border-hover: rgba(255, 176, 32, 0.5);

  /* Status (kept outside the brand palette) */
  --color-success: #4ade80;
  --color-success-weak: rgba(74, 222, 128, 0.1);
  --color-warning: #fbbf24;
  --color-warning-weak: rgba(245, 158, 11, 0.12);
  --color-danger: #ef4444;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;

  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --site-margin: 8vw;
  --section-padding-v: 7rem;
  --section-padding-v-mobile: 4rem;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  background: var(--color-bg-dark);
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background: rgba(255, 176, 32, 0.25);
  color: var(--color-text-primary);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--color-brand-primary);
  color: var(--color-text-on-brand);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   Page shell: 1440px column with hairline side rules (exactplay-site)
   -------------------------------------------------------------------------- */

.site-wrapper {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-grey);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

main {
  flex: 1;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-bg-dark);
  border-bottom: 1px solid var(--color-border-subtle);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 var(--site-margin);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.brand img {
  display: block;
  height: 40px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-link[aria-current="page"] {
  color: var(--color-brand-primary);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  cursor: pointer;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(var(--header-height) - 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem var(--site-margin) 1.5rem;
    background: var(--color-surface-card);
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    padding: 0.7rem 0.75rem;
    font-size: 1.05rem;
  }

  .brand img {
    height: 34px;
  }
}

/* --------------------------------------------------------------------------
   Buttons (exactplay-site Button: amber, uppercase Space Mono)
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--color-brand-primary);
  border-radius: var(--radius-sm);
  background: var(--color-brand-primary);
  color: var(--color-bg-dark);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--color-brand-primary-hover);
  border-color: var(--color-brand-primary-hover);
  transform: translateY(-1.5px);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   Section scaffolding (ShowcaseSection / ProviderStrip vocabulary)
   -------------------------------------------------------------------------- */

.section {
  position: relative;
  padding: var(--section-padding-v) var(--site-margin);
}

.section-alt {
  background: var(--color-bg-dark);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

@media (max-width: 768px) {
  .section {
    padding: var(--section-padding-v-mobile) var(--site-margin);
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  color: var(--color-brand-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.kicker::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--color-brand-primary);
}

.kicker-center {
  justify-content: center;
}

.display {
  margin: 0;
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.section-title {
  margin: 0 0 1.25rem;
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.section-lede {
  margin: 0 0 2rem;
  max-width: 640px;
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
}

.accent {
  color: var(--color-brand-primary);
}

.bullet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.bullet-list li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  background: var(--color-brand-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.bullet-list strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* Hairline-grid backdrop with a faint amber wash from the top */
.grid-backdrop {
  background-image:
    radial-gradient(circle at 30% 0%, rgba(255, 176, 32, 0.08), transparent 55%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* --------------------------------------------------------------------------
   Terminal / browser frames (exactplay-site BrowserFrame)
   -------------------------------------------------------------------------- */

.frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.frame-terminal {
  background: var(--color-bg-dark);
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 32px;
  padding: 0 12px;
  flex-shrink: 0;
  background: #16171b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
}

.frame-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.frame-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f56;
}

.frame-dots span:nth-child(2) {
  background: #ffbd2e;
}

.frame-dots span:nth-child(3) {
  background: #27c93f;
}

.frame-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #888;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: center;
}

.frame-body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.code {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  color: #c9d1d9;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.code .c-prompt { color: var(--color-brand-primary); }
.code .c-cmd { color: var(--color-text-primary); }
.code .c-comment { color: #6e7681; }
.code .c-key { color: var(--color-brand-accent); }
.code .c-str { color: #a5d6a7; }
.code .c-punct { color: #8b949e; }

/* --------------------------------------------------------------------------
   Footer (exactplay-site Footer)
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  padding: 5rem var(--site-margin) 2.5rem;
  background: var(--color-bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--color-text-subtle);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 3fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand img {
  display: block;
  height: 38px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand p {
  margin: 0;
  max-width: 280px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  line-height: 1.55;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}

.footer-col h3 {
  margin: 0 0 1.1rem;
  color: var(--color-brand-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-col a {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--color-text-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
