/* xbPirate — layout & theme */
:root {
  --bg: #0a0b0d;
  --bg-elevated: #12141a;
  --surface: #161922;
  --surface-hover: #1c2030;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f0f2f7;
  --text-muted: #8b92a8;
  --accent: #3d9ee8;
  --accent-dim: #2a6fb0;
  --accent-glow: rgba(61, 158, 232, 0.25);
  --warning-bg: rgba(234, 179, 8, 0.12);
  --warning-border: rgba(234, 179, 8, 0.35);
  --warning-text: #fcd34d;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max: 960px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, var(--accent-glow), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(61, 158, 232, 0.08), transparent);
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #7ec4ff;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5.5rem 1.25rem 3rem;
}

/* Status banner */
.banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: rgba(10, 11, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.banner__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  color: var(--warning-text);
  font-size: 0.875rem;
  line-height: 1.5;
}

.banner__label {
  flex-shrink: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  opacity: 0.95;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero__subtitle {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.card h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  border: none;
  padding: 0;
}

.card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card--download {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card--download h2 {
  text-align: center;
}

.card--download .card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(165deg, var(--accent), var(--accent-dim));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--ghost {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  filter: none;
  background: var(--surface-hover);
}

.version {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.fineprint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 22rem;
}

.link-inline {
  font-weight: 500;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.modal.is-open {
  display: flex;
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  animation: modalIn 0.22s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.modal__close:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.modal__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.modal__panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  padding-right: 2rem;
}

.modal__panel p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.site-footer strong {
  color: var(--text);
  font-weight: 600;
}

.site-footer .copyright {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}
