/* WeSports Secrets — shares the WeSports Arena design identity.
   Tokens, type and components mirror ../wesports-arena/apps/web/src/styles/arena.css
   (ink + warm-sand editorial palette, Bebas Neue display, Source Sans 3 body).
   Light-only, to match Arena. No framework. */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Source+Sans+3:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Brand palette (from Arena) */
  --ws-ink:      #223845;
  --ws-sand:     #f5e9dc;
  --ws-blush:    #eccfca;
  --ws-sage:     #8d9d99;

  --ws-ink-900:  #0e1922;
  --ws-ink-700:  #2e4654;
  --ws-ink-500:  #506773;
  --ws-ink-300:  #aab5bb;
  --ws-ink-200:  #d4dade;
  --ws-ink-100:  #eceef0;
  --ws-ink-50:   #f4f6f7;
  --ws-white:    #ffffff;

  /* Semantic surfaces */
  --bg:        var(--ws-white);
  --bg-alt:    #f4f6f8;   /* cool functional ground */
  --bg-warm:   #f7f5f1;   /* warm brand ground — page background */
  --bg-sunken: #edf0f3;

  /* Foreground */
  --fg-1: var(--ws-ink-900);
  --fg-2: var(--ws-ink-700);
  --fg-3: var(--ws-ink-500);
  --fg-mute: var(--ws-ink-300);

  /* Rules */
  --rule:        #c7cfd5;
  --rule-soft:   #e2e7ea;
  --rule-strong: var(--ws-ink-500);

  /* Status / signal — ink-led, low-chroma (from Arena) */
  --ok:     #3f7a5e;  --ok-bg:     #e8efe9;
  --warn:   #8f6c2f;  --warn-bg:   #f4ecdb;
  --danger: #a85341;  --danger-bg: #f2e2dd;
  --info:   #2e4654;  --info-bg:   #eceef0;

  /* Type */
  --font-display: 'Bebas Neue','Oswald','Arial Narrow',sans-serif;
  --font-body: 'Source Sans 3','IBM Plex Sans',Arial,'Helvetica Neue',Helvetica,sans-serif;
  --font-mono: 'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  /* Radii — sharp identity */
  --r1: 3px;
  --r2: 6px;
  --r-pill: 999px;

  /* Shadow */
  --sh-1: 0 1px 0 rgba(14,25,34,0.04), 0 1px 2px rgba(14,25,34,0.05);
  --sh-2: 0 2px 10px rgba(14,25,34,0.07);
  --sh-3: 0 18px 50px -16px rgba(14,25,34,0.30);

  /* Motion */
  --ease: cubic-bezier(.2,0,.2,1);
  --d-fast: 130ms;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px;
  background: var(--bg-warm);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  /* Normalise x-height so Source Sans 3 renders at Arena's readable size */
  font-size-adjust: 0.525;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Display + mono keep their intended proportions */
.head h1, .result h2, .state h2, textarea, input, .mono { font-size-adjust: none; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ============ CARD ============ */
.card {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r2);
  padding: 32px;
  box-shadow: var(--sh-2);
  overflow: hidden;
}
/* Slim sand accent — the WeSports editorial signature */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ws-sand);
}

/* ============ HEAD ============ */
.head { margin-bottom: 24px; }
.head h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  font-size: 34px;
  color: var(--fg-1);
}
.sub { margin: 0; color: var(--fg-3); font-size: 14.5px; line-height: 1.6; }

/* ============ FORM ============ */
form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--fg-2); }
.field em { font-weight: 400; color: var(--fg-3); font-style: normal; }
.row { display: flex; gap: 16px; }
.row .field { flex: 1; }
#pass-wrap { margin-bottom: 16px; }

textarea, input, select {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--fg-1);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r1);
  outline: none;
  transition: border-color var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease);
}
textarea {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.5;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--ws-ink-500);
  box-shadow: 0 0 0 3px rgba(34,56,69,0.10);
}

/* ============ BUTTONS ============ */
/* Base = primary filled ink (Arena .btn-primary) */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ws-ink);
  border: 1px solid transparent;
  border-radius: var(--r1);
  white-space: nowrap;
  transition: background var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease),
              color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
button:hover { background: #1a2c37; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: default; transform: none; }

/* Primary CTAs stretch full width */
#submit, #reveal, #copy { width: 100%; }

/* Secondary / ghost (Arena .btn-ghost) — copy chips + "Create another" */
.copybox button, #another {
  background: transparent;
  color: var(--fg-1);
  border-color: var(--rule);
}
.copybox button:hover, #another:hover {
  background: rgba(14,25,34,0.04);
  border-color: var(--rule-strong);
}

/* Danger (Arena .btn-danger) — outline until hover */
button.danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(168,83,65,0.40);
}
button.danger:hover { background: var(--danger-bg); border-color: rgba(168,83,65,0.40); }

/* ============ RESULT / STATE ============ */
.result, .state { display: block; }
.result h2, .state h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
  font-size: 24px;
  color: var(--fg-1);
}
.hint { color: var(--fg-3); font-size: 13px; margin: 6px 0; }
.warn {
  background: var(--warn-bg);
  color: #6f5320;
  border: 1px solid rgba(143,108,47,0.28);
  padding: 11px 13px;
  border-radius: var(--r2);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.error { color: var(--danger); font-size: 14px; margin: 8px 0 0; }
.meta { color: var(--fg-3); font-size: 13px; font-variant-numeric: tabular-nums; }

.copybox { display: flex; gap: 8px; align-items: stretch; }
.copybox input, .copybox textarea { flex: 1; }
.copybox button { flex: 0 0 auto; }

.result > button, .state > button { margin-top: 10px; }

details.burn {
  margin: 18px 0;
  border-top: 1px solid var(--rule-soft);
  padding-top: 14px;
}
details.burn summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-3);
}
details.burn summary:hover { color: var(--fg-1); }
details.burn > * { margin-top: 12px; }

/* ============ FOOT ============ */
.foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
  color: var(--fg-mute);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 440px) {
  .card { padding: 24px 20px; }
  .head h1 { font-size: 30px; }
  .row { flex-direction: column; gap: 16px; }
}
