/* ============================================================
   Clan Directory — "Midnight Guild" design system
   Display: Cormorant (serif)  ·  UI/body: Be Vietnam Pro
   Deep ink & obsidian, blue primary #3F89BD, jade secondary.
   ============================================================ */

:root {
  /* Obsidian depths */
  --void:        #050608;
  --bg-deep:     #0a0c10;
  --bg-surface:  #11141a;
  --bg-raised:   #181c26;
  --bg-elevated: #1e2330;

  /* Ink & light */
  --ink:         #f0e6d3;
  --ink-2:       #a89f91;
  --ink-3:       #6b6560;
  --ink-4:       #3d3a36;

  /* Blue primary */
  --primary:     #3F89BD;
  --primary-700: #2C6A96;
  --primary-900: #1E4C6E;
  --primary-100: rgba(63,137,189,0.12);
  --primary-050: rgba(63,137,189,0.06);

  /* Jade accent */
  --accent:      #34d399;
  --accent-700:  #059669;
  --accent-100:  rgba(52,211,153,0.12);

  /* Coral accent */
  --coral:       #ff6b6b;
  --coral-700:   #c0392b;
  --coral-100:   rgba(255,107,107,0.12);

  /* Utility */
  --ok:   #34d399;
  --bad:  #ff6b6b;
  --warn: #f59e0b;

  /* Borders */
  --line:       rgba(240,230,211,0.08);
  --line-soft:  rgba(240,230,211,0.05);
  --line-primary: rgba(63,137,189,0.25);

  /* Type */
  --font-display: 'Cormorant', 'Times New Roman', serif;
  --font-sans:    'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', monospace;

  /* Shape & depth */
  --r-sm: 6px;
  --r:    12px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.2);
  --shadow:    0 8px 24px rgba(0,0,0,.4), 0 24px 56px rgba(0,0,0,.25);
  --shadow-lg: 0 32px 80px rgba(0,0,0,.5);
  --ring: 0 0 0 3px rgba(63,137,189,.18);
  --glow-primary: 0 0 20px rgba(63,137,189,.15);
  --glow-jade: 0 0 20px rgba(52,211,153,.12);

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Atmospheric background ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(100% 60% at 20% -10%, rgba(63,137,189,.08), transparent 55%),
    radial-gradient(80% 50% at 85% 10%, rgba(52,211,153,.05), transparent 50%),
    radial-gradient(60% 40% at 50% 100%, rgba(255,107,107,.04), transparent 50%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
}

#app { position: relative; z-index: 1; }

/* ── Vuetify overrides ── */
.v-application { font-family: var(--font-sans) !important; }
.v-application,
.v-application__wrap { background: transparent !important; }
.v-overlay__scrim { background: rgba(5,6,8,.65) !important; }

.v-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--line) !important;
  color: var(--ink) !important;
}

/* ── Typography primitives ── */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--ink);
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--primary-700);
}

/* ── Buttons ── */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: 12px 20px;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: var(--void);
  box-shadow: 0 2px 0 var(--primary-900), var(--glow-primary);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
  box-shadow: 0 4px 0 var(--primary-900), 0 0 30px rgba(63,137,189,.25);
}
.btn--primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-050);
  box-shadow: var(--glow-primary);
}

/* ── Form controls ── */
.field { margin-bottom: 18px; }
.field__label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.field__label .req { color: var(--coral); }
.input,
.textarea,
.select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}
.textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.select { appearance: none; background-image:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6560' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; cursor: pointer; }

/* Tag / chip input */
.taginput {
  display: flex; flex-wrap: wrap; gap: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 10px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.taginput:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.taginput input {
  flex: 1; min-width: 90px; border: none; outline: none; background: transparent;
  font-family: var(--font-sans); font-size: 14px; color: var(--ink); padding: 4px 2px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-100); color: var(--primary);
  font-size: 12.5px; font-weight: 600;
  padding: 4px 6px 4px 11px; border-radius: 999px;
}
.chip button {
  border: none; background: rgba(63,137,189,.15); color: var(--primary);
  width: 17px; height: 17px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.chip button:hover { background: var(--primary); color: var(--void); }

/* hairline divider */
.rule { height: 1px; background: var(--line); border: 0; }

::selection { background: var(--primary-100); color: var(--primary); }

/* Vuetify form polish */
.v-field__input { color: var(--ink) !important; }
.v-field__input::placeholder { color: var(--ink-3) !important; opacity: 1 !important; }

/* ── Clan card / button helpers (used by /join) ── */
.cd-card {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-raised)) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease) !important;
}
.cd-card:hover {
  border-color: var(--line-primary) !important;
  box-shadow: var(--shadow) !important;
}
.cd-btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: 12px 20px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: var(--void);
  box-shadow: 0 2px 0 var(--primary-900), var(--glow-primary);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.cd-btn:hover {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
  box-shadow: 0 4px 0 var(--primary-900), 0 0 30px rgba(63,137,189,.25);
}
.cd-btn:active { transform: translateY(1px); }
.cd-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.cd-section-label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: .01em;
}
.cd-subhead {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 14px 0 8px;
}
