/* =========================================================
   Bux Center - Global Variables & Reset
   ========================================================= */

:root {
  /* Site palette */
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --card: #191919;
  --card-input: #0f0f0f;
  --accent: #00b06f;
  --accent-hover: #00c87d;
  --text: #ffffff;
  --text-muted: #afafaf;
  --text-subtle: #6b6b6b;
  --border: #3a3a3a;
  --border-light: #4a4a4a;

  /* Roblox generator button */
  --btn-primary-bg: #d1d1d1;
  --btn-primary-text: #333333;
  --btn-primary-hover: #e8e8e8;

  /* Typography */
  --font-display: "Montserrat", "Source Sans 3", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;

  /* Spacing & shape */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.6);

  /* Layout */
  --container-max: 1200px;
  --content-max: 68ch;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: #6ea8fe;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

a:hover {
  color: #9ec5fe;
}

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

/* =========================================================
   Layout Utilities
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* =========================================================
   Header & Navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 1rem clamp(1rem, 4vw, 2rem);
}

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

.nav__logo-image {
  display: block;
  width: auto;
  height: clamp(28px, 5vw, 38px);
}

.nav__links {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  list-style: none;
}

.nav__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--text);
}

/* =========================================================
   Hero - Generator + Article Side by Side
   ========================================================= */

main {
  position: relative;
  isolation: isolate;
}

.hero {
  position: relative;
  min-height: calc(100vh - 60px);
  padding-block: clamp(2rem, 5vw, 4rem);
  z-index: 0;
}

.hero__bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg);
  background-image: url("../assets/roblox-background.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero__bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Generator column */
.hero__generator-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-align: center;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* =========================================================
   Roblox-Style Generator Card
   ========================================================= */

.generator-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.generator-card__title {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  text-align: center;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.generator-form__field {
  margin-bottom: 1rem;
}

.generator-form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.generator-form__input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--card-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.generator-form__input::placeholder {
  color: var(--text-subtle);
}

.generator-form__input:hover {
  border-color: var(--border-light);
}

.generator-form__input:focus {
  border-color: var(--border-light);
  outline: none;
  box-shadow: 0 0 0 1px var(--border-light);
}

.generator-form__input[aria-invalid="true"] {
  border-color: #e74c3c;
}

.generator-form__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.generator-form__error {
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 0.35rem;
}

.generator-form__terms {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 1rem;
  text-align: center;
}

.generator-form__terms a {
  font-size: inherit;
}

.generator-form__submit {
  display: block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.generator-form__submit:hover {
  background: var(--btn-primary-hover);
}

.generator-form__submit:active {
  transform: scale(0.98);
}

.generator-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Status overlay */
.generator-status {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--card-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.generator-status__spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 0.75rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.generator-status__text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Final step panel */
.generator-offers__user {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  margin-bottom: 0.25rem;
}

.generator-offers__subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.25rem;
}

.generator-offers__subtitle--error {
  color: #e88;
}

.generator-offers__back {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: color 0.2s ease;
}

.generator-offers__back:hover {
  color: var(--text);
}

.generator-card--final-step {
  max-width: 420px;
}

.final-step-panel {
  margin-bottom: 0.5rem;
}

.final-step-btn {
  display: block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.final-step-btn:hover {
  background: var(--btn-primary-hover);
}

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

/* =========================================================
   Guide Card - matches generator box style
   ========================================================= */

.hero__content-col {
  width: 100%;
}

.guide-card {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text);
  text-align: center;
}

.guide-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.guide-card h3 {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.guide-card p {
  color: var(--text-muted);
  margin-bottom: 0.875rem;
  font-size: 0.925rem;
  line-height: 1.6;
}

.guide-card .lead {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.guide-card ul {
  margin: 0 0 0.5rem 1.15rem;
  color: var(--text-muted);
}

.guide-card li {
  margin-bottom: 0.45rem;
  font-size: 0.925rem;
  line-height: 1.55;
}

.guide-card strong {
  color: var(--text);
  font-weight: 600;
}

.guide-card .info-box {
  background: rgba(0, 176, 111, 0.08);
  border: 1px solid rgba(0, 176, 111, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  margin: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.guide-card .info-box strong {
  color: var(--accent);
}

/* =========================================================
   FAQ Section
   ========================================================= */

.faq {
  position: relative;
  z-index: 1;
  padding-block: clamp(3rem, 8vw, 5rem);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.faq h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
}

.faq__list {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq__item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq__item[open] {
  border-color: rgba(0, 176, 111, 0.35);
}

.faq__item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  transition: background 0.2s ease;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s ease;
}

.faq__item[open] summary::after {
  content: "−";
}

.faq__item summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.faq__item p {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =========================================================
   CTA Section
   ========================================================= */

.cta {
  position: relative;
  z-index: 1;
  padding-block: clamp(3rem, 8vw, 5rem);
  background: linear-gradient(180deg, var(--bg) 0%, #0d1a14 100%);
  border-top: 1px solid var(--border);
}

.cta__inner {
  text-align: center;
  max-width: 640px;
}

.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.65;
}

.cta__button {
  display: inline-block;
  padding: 0.875rem 2.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--bg);
  background: var(--accent);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.cta__button:hover {
  background: var(--accent-hover);
  color: var(--bg);
  transform: translateY(-1px);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  position: relative;
  z-index: 1;
  padding-block: 2.5rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  text-align: center;
}

.site-footer__brand {
  margin-bottom: 0.75rem;
}

.site-footer__logo {
  display: block;
  width: auto;
  height: clamp(24px, 4vw, 32px);
  margin-inline: auto;
}

.site-footer__disclaimer {
  font-size: 0.8rem;
  color: var(--text-subtle);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.site-footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.site-footer__links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--text);
}

.site-footer__copy {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* =========================================================
   Legal Pages
   ========================================================= */

.legal {
  position: relative;
  z-index: 1;
  padding-block: clamp(2rem, 5vw, 4rem);
  min-height: calc(100vh - 280px);
}

.legal .guide-card {
  max-width: 760px;
  margin-inline: auto;
}

.legal .guide-card h1 {
  text-align: left;
}

.legal .guide-card .legal-updated {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 1.5rem;
}

.legal .guide-card h2:first-of-type {
  margin-top: 0.5rem;
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */

/* 768px - side-by-side layout begins */
@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: minmax(280px, 420px) 1fr;
    align-items: start;
    gap: 2.5rem;
  }

  .hero__generator-col {
    position: sticky;
    top: 5rem;
  }
}

/* 1024px */
@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 420px 1fr;
    gap: 4rem;
  }
}

/* 1440px */
@media (min-width: 1440px) {
  :root {
    --container-max: 1320px;
  }

  .hero__inner {
    gap: 5rem;
  }
}

/* 320px - smallest phones */
@media (max-width: 359px) {
  .nav__links {
    gap: 0.75rem;
  }

  .nav__links a {
    font-size: 0.8rem;
  }

  .generator-card {
    padding: 1.25rem;
  }
}
