/* =========================================================
   ADVANCED UGC
   White, black, and gold affiliate portal
   ========================================================= */

:root {
  color-scheme: light;

  --background: #fbfaf7;
  --surface: #ffffff;
  --surface-soft: #f6f3eb;
  --surface-dark: #111113;

  --text: #151515;
  --text-light: #ffffff;
  --muted: #67635c;
  --muted-dark: #c5c0b6;

  --gold: #9a711d;
  --gold-medium: #d6b15c;
  --gold-light: #f0d797;

  --border: #e2dccf;
  --border-dark: #333337;

  --danger: #a82424;
  --success: #246438;

  --shadow-small: 0 8px 24px rgba(29, 23, 10, 0.06);
  --shadow-large: 0 25px 70px rgba(0, 0, 0, 0.16);

  --radius-small: 9px;
  --radius-medium: 12px;
  --radius-large: 18px;
}

/* =========================================================
   RESET AND GLOBAL ELEMENTS
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      ellipse at 90% 0%,
      rgba(214, 177, 92, 0.17),
      transparent 42%
    ),
    var(--background);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button {
  -webkit-tap-highlight-color: transparent;
}

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

p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  line-height: 1.13;
  letter-spacing: -0.035em;
}

h1 {
  margin: 20px 0;
  font-size: clamp(40px, 6vw, 76px);
}

h1 span {
  color: var(--gold);
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 21px;
}

:focus-visible {
  outline: 3px solid var(--gold-medium);
  outline-offset: 4px;
}

/* =========================================================
   GENERAL LAYOUT
   ========================================================= */

.container {
  width: min(1150px, calc(100% - 40px));
  margin: 0 auto;
}

main {
  min-height: calc(100vh - 180px);
}

.section {
  padding: 48px 0;
}

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

.stack {
  display: grid;
  gap: 20px;
}

.space-top {
  margin-top: 28px;
}

.muted,
small {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.page-head {
  margin-bottom: 30px;
}

.page-head h1 {
  font-size: 40px;
}

.page-head p {
  color: var(--muted);
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.skip {
  position: absolute;
  top: -100px;
  left: 10px;
  z-index: 100;
  padding: 12px;
  background: var(--gold-light);
  color: #111111;
  font-weight: 750;
  text-decoration: none;
}

.skip:focus {
  top: 10px;
}

/* =========================================================
   HEADER AND NAVIGATION
   ========================================================= */

header {
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

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

.brand {
  color: #111111;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 2px;
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.nav-links a {
  color: #444444;
  font-size: 14px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

/* =========================================================
   BUTTONS AND ACTIONS
   ========================================================= */

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(
    120deg,
    var(--gold-light),
    var(--gold-medium)
  );
  color: #171309;
  border: 1px solid #c9a34e;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(145, 108, 31, 0.1);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition:
    filter 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.button:hover,
button:hover {
  filter: brightness(1.04);
  box-shadow: 0 6px 18px rgba(145, 108, 31, 0.16);
}

.button:active,
button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.secondary {
  background: var(--surface);
  color: #171717;
  border-color: #d5cfc2;
  box-shadow: none;
}

.secondary:hover {
  background: var(--surface-soft);
}

.compact {
  padding: 7px 12px;
  font-size: 13px;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 65px;
  padding: 100px 0 70px;
}

.showcase {
  padding: 34px;
  background: var(--surface-dark);
  color: var(--text-light);
  border: 1px solid var(--border-dark);
  border-top: 3px solid var(--gold-medium);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-large);
}

.showcase h2 {
  color: #ffffff;
}

.showcase .muted {
  color: var(--muted-dark);
}

.showcase-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-dark);
}

/* =========================================================
   CARDS, BADGES, AND STATS
   ========================================================= */

.card {
  min-width: 0;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-small);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: #fbf3df;
  color: #765315;
  border: 1px solid #e8d5a8;
  border-radius: 999px;
  font-size: 12px;
}

.showcase .badge {
  background: rgba(214, 177, 92, 0.12);
  color: #f0d390;
  border-color: rgba(214, 177, 92, 0.35);
}

.stats {
  margin: 28px 0;
}

.stat-value {
  display: block;
  margin-top: 10px;
  color: #171717;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
}

/* =========================================================
   AUTHENTICATION AND FORMS
   ========================================================= */

.auth-wrap {
  max-width: 510px;
  margin: auto;
  padding: 60px 0;
}

.auth-wrap h1 {
  font-size: 36px;
}

.auth-wrap .card {
  padding: 34px;
}

label {
  display: block;
  margin: 17px 0 7px;
  color: #292929;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  background: var(--surface);
  color: #161616;
  border: 1px solid #cec8bd;
  border-radius: var(--radius-small);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aaa294;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
}

input::placeholder,
textarea::placeholder {
  color: #76716a;
}

input[readonly] {
  background: #faf8f2;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

form button[type="submit"] {
  margin-top: 23px;
}

.auth-wrap form button {
  width: 100%;
}

.message {
  min-height: 24px;
  color: var(--danger);
}

.success {
  color: var(--success);
}

/* =========================================================
   PRODUCTS AND NOTICES
   ========================================================= */

.product {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product h3,
.product p {
  margin: 0;
}

.product .actions {
  margin-top: auto;
  padding-top: 14px;
}

.price {
  font-size: 27px;
  font-weight: 800;
}

.notice {
  margin: 22px 0;
  padding: 16px 20px;
  background: #fff8e9;
  color: #604a20;
  border: 1px solid #ead8ac;
  border-radius: var(--radius-medium);
}

/* =========================================================
   TABLES
   ========================================================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f4f1e9;
  color: #555047;
  font-size: 12px;
}

td {
  background: var(--surface);
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

/* =========================================================
   CODE AND PRIVATE CREDENTIAL DISPLAY
   ========================================================= */

code {
  color: #77561b;
  font-size: 12px;
  word-break: break-all;
}

.secret {
  display: block;
  padding: 16px;
  background: #f5f1e7;
  color: #171717;
  border: 1px solid var(--border);
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  margin-top: 45px;
  background: var(--surface-dark);
  color: #c9c5bb;
  border-top: 1px solid #29292c;
  font-size: 12px;
}

footer strong {
  color: var(--gold-light);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 25px 0;
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 35px;
    padding-top: 55px;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 0;
  }

  .nav-links {
    gap: 14px;
  }
}

@media (max-width: 560px) {
  .container {
    width: calc(100% - 28px);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card,
  .auth-wrap .card {
    padding: 22px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .page-head h1 {
    font-size: 33px;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links .button,
  .nav-links button {
    width: 100%;
  }
}

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

  * {
    transition: none !important;
  }
}
