/*
 * Theme Name:  Vantage Interlink
 * Theme URI:   https://vantageinterlink.com
 * Description: Custom theme for the Vantage Interlink B2B marketplace.
 * Version:     0.1.0
 * Author:      Vantage Interlink
 * Author URI:  https://vantageinterlink.com
 * Text Domain: vantage-interlink-theme
 * Requires at least: 6.0
 * Requires PHP: 8.1
 *
 * Design follows the Vantage Interlink Brand Guidelines (December 2024).
 * See docs/Branding/ for colours, typography, and logo usage rules.
 */

/* ── Reset / base ─────────────────────────────────────────────────────────── */

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a2e;
  background: #f7f8fa;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ── Layout shell ─────────────────────────────────────────────────────────── */

.vi-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.vi-main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.vi-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.vi-header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: #1a1a2e;
  flex-shrink: 0;
}

.vi-header__logo-text { color: #1a1a2e; }
.vi-header__logo img { max-height: 36px; width: auto; }

.vi-header__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
}

.vi-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  color: #374151;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.vi-nav-link:hover { background: #f3f4f6; color: #1a1a2e; }

.vi-nav-link--muted { color: #6b7280; }
.vi-nav-link--muted:hover { color: #1a1a2e; }

.vi-nav-link--cta {
  background: #1a1a2e;
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-weight: 600;
}

.vi-nav-link--cta:hover { background: #2d2d4e; color: #fff; }

.vi-nav-link--outline {
  background: transparent;
  color: #1a1a2e;
  border: 1.5px solid #d1d5db;
}

.vi-nav-link--outline:hover {
  border-color: #1a1a2e;
  background: #f7f8fa;
  color: #1a1a2e;
}

.vi-nav-spacer { flex: 1; }

/* ── Hamburger (mobile) ──────────────────────────────────────────────────── */

.vi-header__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}

.vi-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a1a2e;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.vi-header__toggle--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.vi-header__toggle--open span:nth-child(2) { opacity: 0; }
.vi-header__toggle--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .vi-header { padding: 0 1rem; }

  .vi-header__toggle { display: flex; }

  .vi-header__nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    gap: 0.125rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .vi-header__nav--open { display: flex; }
  .vi-nav-spacer { display: none; }

  .vi-nav-link {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    width: 100%;
  }

  .vi-nav-link--cta,
  .vi-nav-link--outline {
    text-align: center;
    justify-content: center;
    margin-top: 0.25rem;
  }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.vi-footer {
  background: #1a1a2e;
  color: #9ca3af;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
}

/* ── Shared buttons ───────────────────────────────────────────────────────── */

.vi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.vi-btn--primary {
  background: #1a1a2e;
  color: #ffffff;
  border-color: #1a1a2e;
}

.vi-btn--primary:hover {
  background: #2d2d4e;
  border-color: #2d2d4e;
  color: #ffffff;
}

.vi-btn--outline {
  background: transparent;
  color: #1a1a2e;
  border-color: #d1d5db;
}

.vi-btn--outline:hover {
  border-color: #1a1a2e;
  background: #f7f8fa;
  color: #1a1a2e;
}

.vi-btn--full {
  width: 100%;
}

.vi-btn--sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

.vi-btn--ghost {
  background: transparent;
  color: #4b5563;
  border-color: transparent;
}

.vi-btn--ghost:hover {
  background: #f3f4f6;
  color: #1a1a2e;
  border-color: transparent;
}

/* ── Login page ───────────────────────────────────────────────────────────── */

.vi-login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: #f7f8fa;
}

.vi-login-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(26, 26, 46, 0.07);
}

.vi-login-card__brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.vi-login-card__brand img {
  margin: 0 auto 0.5rem;
  max-height: 48px;
  width: auto;
}

.vi-login-card__logo-text {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}

.vi-login-card__tagline {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
}

.vi-login-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 1.25rem;
}

/* Error banner */
.vi-login-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* Form */
.vi-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vi-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.vi-form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vi-form-group__forgot {
  font-size: 0.8rem;
  font-weight: 400;
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vi-form-group__forgot:hover {
  color: #1a1a2e;
}

.vi-form-group input[type="text"],
.vi-form-group input[type="password"],
.vi-form-group input[type="email"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #1a1a2e;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.vi-form-group input:focus {
  border-color: #1a1a2e;
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.08);
}

/* Remember me */
.vi-login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #4b5563;
  cursor: pointer;
}

.vi-login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1a1a2e;
  cursor: pointer;
}

/* Divider */
.vi-login-card__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
  color: #9ca3af;
  font-size: 0.8rem;
}

.vi-login-card__divider::before,
.vi-login-card__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* CTA links */
.vi-login-card__ctas {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* ── Responsive login ─────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .vi-login-card {
    padding: 2rem 1.25rem;
    border-radius: 12px;
  }
}

