/* ==========================================================================
   Nexus TCG — storefront stylesheet
   Design system: premium minimalism derived from the brand mark —
   off-white ground, near-black ink, single blue accent (#036FB8 sampled
   from the logo diamond), Montserrat display type, Inter body type,
   sharp geometry, 8px spacing rhythm.
   ========================================================================== */

:root {
  --c-bg: #FAFAF8;
  --c-surface: #FFFFFF;
  --c-surface-alt: #F2F2EF;
  --c-ink: #101013;
  --c-ink-2: #55555E;
  --c-line: #E4E4DF;
  --c-accent: #036FB8;
  --c-accent-dark: #02598F;
  --c-whatsapp: #1DA851;   /* WhatsApp brand green, used for the button glyph */
  --c-discord: #5865F2;

  --font-display: "Montserrat", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --radius: 4px;
  --shadow-card: 0 1px 2px rgba(16, 16, 19, 0.06);
  --shadow-lift: 0 12px 32px rgba(16, 16, 19, 0.10);
  --container: 1200px;
  --speed: 200ms;
}

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

/* The hidden attribute must always win, even over display rules on classes. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon--lg { width: 32px; height: 32px; }

.overline {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 12px;
}

.accent { color: var(--c-accent); }

/* --- Accessibility helpers ------------------------------------------------ */

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  background: var(--c-ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top var(--speed) ease-out;
}

.skip-link:focus { top: 16px; }

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

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--speed) ease-out, border-color var(--speed) ease-out,
              color var(--speed) ease-out, transform var(--speed) ease-out;
}

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

.btn--primary { background: var(--c-ink); color: #fff; }
.btn--primary:hover { background: var(--c-accent-dark); }

.btn--ghost { border-color: var(--c-ink); color: var(--c-ink); background: transparent; }
.btn--ghost:hover { background: var(--c-ink); color: #fff; }

.btn--buy { background: var(--c-accent); color: #fff; width: 100%; }
.btn--buy:hover { background: var(--c-accent-dark); }

.btn--soon {
  background: var(--c-surface-alt);
  color: var(--c-ink-2);
  border-color: var(--c-line);
  width: 100%;
  cursor: default;
}

/* Contact buttons stay neutral (retail is the core business); only the
   channel glyph carries the brand colour for recognition. */
.btn--whatsapp,
.btn--discord {
  background: var(--c-surface);
  border-color: var(--c-line);
  color: var(--c-ink);
}

.btn--whatsapp:hover,
.btn--discord:hover { border-color: var(--c-ink); }

.btn--whatsapp .icon { color: var(--c-whatsapp); }
.btn--discord .icon { color: var(--c-discord); }

/* --- Announcement bar ----------------------------------------------------- */

.announcement {
  background: var(--c-ink);
  color: #EDEDEA;
  font-size: 0.875rem;
}

.announcement__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-block: 10px;
  text-align: center;
}

.announcement .icon { width: 14px; height: 14px; stroke: #7FB8E3; }

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

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* Icon-only mark, sized to match the two lines of brand text beside it. */
.brand__mark { width: auto; height: 52px; }

.brand__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

/* Allows the text block to shrink inside the flex row on narrow screens. */
.brand__text { min-width: 0; }

.brand__tag {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--c-ink-2);
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--c-ink);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav__menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--c-ink-2);
  transition: color var(--speed) ease-out, background-color var(--speed) ease-out;
}

.nav__menu a:hover { color: var(--c-ink); background: var(--c-surface-alt); }

/* --- Hero ----------------------------------------------------------------- */

.hero { padding-block: clamp(56px, 9vw, 112px) clamp(32px, 4vw, 48px); }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero__lead {
  margin-top: 20px;
  max-width: 34rem;
  font-size: 1.0625rem;
  color: var(--c-ink-2);
}

/* Grid (not flex) so both CTA buttons always share the same width. */
.hero__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
  max-width: 30rem;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 32px;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-ink-2);
}

.hero__trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Diamond bullet echoes the blue diamond in the logomark. */
.hero__trust li::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--c-accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.hero__visual {
  position: relative;
  min-height: 340px;
}

.hero__card {
  position: absolute;
  width: 78%;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 12px;
}

.hero__card img { border-radius: 2px; }

.hero__card--back {
  top: 0;
  right: 0;
  transform: rotate(3deg);
}

.hero__card--front {
  bottom: 0;
  left: 0;
  transform: rotate(-2deg);
}

/* --- Sections ------------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.section-head__note {
  font-size: 0.875rem;
  color: var(--c-ink-2);
  max-width: 22rem;
}

/* Shorter top padding keeps the hero and catalogue visually connected. */
.releases { padding-block: clamp(24px, 3vw, 40px) clamp(48px, 7vw, 96px); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--speed) ease-out, border-color var(--speed) ease-out,
              box-shadow var(--speed) ease-out;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-ink);
  box-shadow: var(--shadow-lift);
}

.product-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--c-surface-alt);
  border-bottom: 1px solid var(--c-line);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 2px;
  background: var(--c-ink);
  color: #fff;
}

.product-card__badge--available { background: var(--c-accent); }

.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
  gap: 10px;
}

.product-card__category {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.product-card__name { font-size: 1.0625rem; }

.product-card__date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-ink-2);
}

.product-card__date .icon { width: 15px; height: 15px; }

.product-card__desc {
  font-size: 0.875rem;
  color: var(--c-ink-2);
}

.product-card__footer { margin-top: auto; padding-top: 16px; }

.product-card__enquire {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-accent);
  text-decoration: none;
}

.product-card__enquire:hover { text-decoration: underline; }

.product-skeleton {
  min-height: 420px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--c-surface-alt) 40%, #fff 50%, var(--c-surface-alt) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.product-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--c-line);
  border-radius: var(--radius);
  color: var(--c-ink-2);
}

.releases__more {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-ink-2);
}

/* Same diamond bullet as the hero trust row. */
.releases__more::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--c-accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* --- Why Nexus ------------------------------------------------------------ */

.why {
  padding-block: clamp(48px, 7vw, 96px);
  background: var(--c-surface);
  border-block: 1px solid var(--c-line);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.why__item {
  padding: 28px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-bg);
}

.why__item .icon--lg { stroke: var(--c-accent); margin-bottom: 16px; }

.why__item h3 { margin-bottom: 8px; }

.why__item p { font-size: 0.9375rem; color: var(--c-ink-2); }

/* --- B2B section (deliberately low-key: retail is the core business) ------ */

.b2b {
  padding-block: clamp(40px, 6vw, 72px);
}

.b2b__inner {
  max-width: 720px;
  text-align: center;
}

.b2b__text {
  margin-top: 16px;
  color: var(--c-ink-2);
  font-size: 0.9688rem;
}

.b2b__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.b2b__pending { width: 100%; font-size: 0.875rem; color: var(--c-ink-2); }

.b2b__email {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--c-ink-2);
}

.b2b__email a { color: var(--c-accent); text-decoration: none; }
.b2b__email a:hover { text-decoration: underline; }

/* --- Footer --------------------------------------------------------------- */

.footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-line);
  padding-top: clamp(40px, 6vw, 64px);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

/* The full logo lockup carries the wordmark and tagline itself. */
.footer__brand img { width: 180px; height: auto; }

.footer__col h3 {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer__col ul { list-style: none; display: grid; gap: 4px; }

.footer__col a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.9375rem;
  color: var(--c-ink-2);
  text-decoration: none;
}

.footer__col a:hover { color: var(--c-ink); }

/* Non-link contact entries (e.g. a Discord username shown as text). */
.footer__plain {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.9375rem;
  color: var(--c-ink-2);
}

.footer__fine {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding-block: 24px;
  border-top: 1px solid var(--c-line);
  font-size: 0.8125rem;
  color: var(--c-ink-2);
}

.footer__fine p:nth-child(2) { flex: 1; min-width: 260px; }

.footer__admin { color: var(--c-ink-2); }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { min-height: 300px; max-width: 480px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle { display: inline-flex; }

  .nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
    padding: 16px clamp(20px, 4vw, 40px) 20px;
    box-shadow: var(--shadow-lift);
  }

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

  /* Phones: smaller mark and tagline so the full brand block still fits. */
  .brand__mark { height: 44px; }
  .brand__name { font-size: 0.9375rem; }
  .brand__tag { font-size: 0.625rem; }

  /* Phones: stack the two hero CTAs full-width instead of side by side. */
  .hero__actions { grid-template-columns: 1fr; }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
