/* =========================================================
   MENSMINDHUB THEME SYSTEM
   Main Website Theme File
   Version: 1.0

   RULE:
   All colours, spacing, typography, cards, buttons, inputs,
   layouts and repeated UI styling should come through here.
   ========================================================= */


/* =========================================================
   1. GLOBAL BRAND TOKENS
   ========================================================= */

:root {
  /* Brand */
  --mmh-brand-name: "MensMindHub";

  /* Primary colours */
  --mmh-blue: #1e88e5;
  --mmh-blue-dark: #0d47a1;
  --mmh-blue-light: #29b6f6;

  /* Backgrounds */
  --mmh-bg-main: #000000;
  --mmh-bg-deep: #04101c;
  --mmh-bg-card: #0b1a2a;
  --mmh-bg-card-soft: #102235;
  --mmh-bg-hover: #132b44;

  /* Text */
  --mmh-text-main: #ffffff;
  --mmh-text-soft: #b0bec5;
  --mmh-text-muted: #6c7a89;

  /* Status / accents */
  --mmh-success: #00c853;
  --mmh-warning: #ffb300;
  --mmh-danger: #e53935;

  /* Borders */
  --mmh-border: rgba(255, 255, 255, 0.12);
  --mmh-border-strong: rgba(255, 255, 255, 0.22);

  /* Shadows / glow */
  --mmh-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.45);
  --mmh-glow-blue: 0 0 18px rgba(30, 136, 229, 0.45);

  /* Fonts */
  --mmh-font-heading: "Oswald", "Bebas Neue", Arial, sans-serif;
  --mmh-font-body: "Inter", "Roboto", Arial, sans-serif;

  /* Sizing */
  --mmh-radius-small: 8px;
  --mmh-radius: 12px;
  --mmh-radius-large: 18px;
  --mmh-radius-pill: 999px;

  /* Spacing */
  --mmh-space-xs: 4px;
  --mmh-space-sm: 8px;
  --mmh-space-md: 16px;
  --mmh-space-lg: 24px;
  --mmh-space-xl: 32px;
  --mmh-space-xxl: 48px;

  /* Layout */
  --mmh-page-max: 1200px;
  --mmh-sidebar-width: 260px;
  --mmh-header-height: 72px;

  /* Animation */
  --mmh-transition-fast: 0.15s ease;
  --mmh-transition: 0.25s ease;
}


/* =========================================================
   2. RESET / BASE
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  background: var(--mmh-bg-main);
  color: var(--mmh-text-main);
  font-family: var(--mmh-font-body);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(30, 136, 229, 0.18), transparent 32%),
    linear-gradient(180deg, var(--mmh-bg-deep), var(--mmh-bg-main));
  color: var(--mmh-text-main);
  font-family: var(--mmh-font-body);
}

a {
  color: var(--mmh-blue-light);
  text-decoration: none;
}

a:hover {
  color: var(--mmh-text-main);
}

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


/* =========================================================
   3. TYPOGRAPHY
   ========================================================= */

.mmh-heading,
h1,
h2,
h3,
h4 {
  font-family: var(--mmh-font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 var(--mmh-space-md);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
  font-size: 1.45rem;
}

p {
  color: var(--mmh-text-soft);
  line-height: 1.65;
}

.mmh-text-muted {
  color: var(--mmh-text-muted);
}

.mmh-tagline {
  color: var(--mmh-text-main);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* =========================================================
   4. LAYOUT
   ========================================================= */

.mmh-page {
  width: min(100% - 32px, var(--mmh-page-max));
  margin: 0 auto;
}

.mmh-section {
  padding: var(--mmh-space-xxl) 0;
}

.mmh-section--tight {
  padding-top: 0;
}

.mmh-grid {
  display: grid;
  gap: var(--mmh-space-lg);
}

.mmh-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mmh-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 800px) {
  .mmh-grid-2,
  .mmh-grid-3 {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   5. CARDS
   ========================================================= */

.mmh-card {
  background: linear-gradient(180deg, var(--mmh-bg-card-soft), var(--mmh-bg-card));
  border: 1px solid var(--mmh-border);
  border-radius: var(--mmh-radius-large);
  box-shadow: var(--mmh-shadow-card);
  padding: var(--mmh-space-lg);
}

.mmh-card:hover {
  border-color: rgba(30, 136, 229, 0.45);
  box-shadow: var(--mmh-shadow-card), var(--mmh-glow-blue);
  transition: var(--mmh-transition);
}

.mmh-card-sub {
  margin: 0 0 var(--mmh-space-sm);
}

.mmh-card-blurb {
  margin: 0;
  color: var(--mmh-text-soft);
}


/* =========================================================
   6. BUTTONS
   ========================================================= */

.mmh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mmh-space-sm);
  min-height: 44px;
  padding: 0 var(--mmh-space-lg);
  border-radius: var(--mmh-radius-pill);
  border: 1px solid transparent;
  font-family: var(--mmh-font-body);
  font-weight: 800;
  cursor: pointer;
  transition: var(--mmh-transition-fast);
}

.mmh-btn-primary {
  background: var(--mmh-blue);
  color: #ffffff;
}

.mmh-btn-primary:hover {
  background: var(--mmh-blue-light);
  box-shadow: var(--mmh-glow-blue);
}

.mmh-btn-secondary {
  background: transparent;
  color: var(--mmh-text-main);
  border-color: var(--mmh-border-strong);
}

.mmh-btn-secondary:hover {
  background: var(--mmh-bg-hover);
  border-color: var(--mmh-blue);
}

.mmh-btn-danger {
  background: var(--mmh-danger);
  color: #ffffff;
}


/* =========================================================
   7. FORMS / INPUTS
   ========================================================= */

.mmh-label {
  display: block;
  margin-bottom: var(--mmh-space-sm);
  color: var(--mmh-text-soft);
  font-weight: 700;
}

.mmh-input,
.mmh-textarea,
.mmh-select {
  width: 100%;
  min-height: 44px;
  background: var(--mmh-bg-deep);
  border: 1px solid var(--mmh-border);
  border-radius: var(--mmh-radius);
  color: var(--mmh-text-main);
  padding: 0 var(--mmh-space-md);
  font-family: var(--mmh-font-body);
}

.mmh-textarea {
  min-height: 120px;
  padding-top: var(--mmh-space-md);
  resize: vertical;
}

.mmh-input:focus,
.mmh-textarea:focus,
.mmh-select:focus {
  outline: none;
  border-color: var(--mmh-blue);
  box-shadow: var(--mmh-glow-blue);
}

.mmh-checkbox {
  width: auto;
  min-height: auto;
  accent-color: var(--mmh-blue);
}


/* =========================================================
   8. NAVIGATION
   ========================================================= */

.mmh-header {
  min-height: var(--mmh-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--mmh-space-md) var(--mmh-space-lg);
  background: rgba(4, 16, 28, 0.88);
  border-bottom: 1px solid var(--mmh-border);
  backdrop-filter: blur(12px);
}

.mmh-logo {
  font-family: var(--mmh-font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--mmh-text-main);
  text-transform: uppercase;
}

.mmh-logo span {
  color: var(--mmh-blue);
}

.mmh-nav {
  display: flex;
  gap: var(--mmh-space-md);
}

.mmh-nav a {
  color: var(--mmh-text-soft);
  font-weight: 700;
}

.mmh-nav a:hover,
.mmh-nav a.active {
  color: var(--mmh-text-main);
}


/* =========================================================
   9. SOCIAL / COMMUNITY COMPONENTS
   ========================================================= */

.mmh-post {
  background: var(--mmh-bg-card);
  border: 1px solid var(--mmh-border);
  border-radius: var(--mmh-radius-large);
  padding: var(--mmh-space-lg);
}

.mmh-post-author {
  display: flex;
  align-items: center;
  gap: var(--mmh-space-md);
  margin-bottom: var(--mmh-space-md);
}

.mmh-post-name {
  margin: 0;
  font-weight: 800;
  color: var(--mmh-text-main);
}

.mmh-post-meta {
  margin: 0;
  font-size: 0.85rem;
}

.mmh-post-body {
  margin: 0;
  color: var(--mmh-text-soft);
}

.mmh-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mmh-blue);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.mmh-reactions {
  display: flex;
  gap: var(--mmh-space-sm);
  margin-top: var(--mmh-space-md);
}

.mmh-reaction {
  border: 1px solid var(--mmh-border);
  background: var(--mmh-bg-deep);
  color: var(--mmh-text-soft);
  border-radius: var(--mmh-radius-pill);
  padding: 6px 12px;
}

.mmh-reaction:hover {
  color: var(--mmh-text-main);
  border-color: var(--mmh-blue);
}


/* =========================================================
   10. SPECIAL FEATURE STYLES
   ========================================================= */

.mmh-vent-mode {
  border-left: 4px solid var(--mmh-warning);
}

.mmh-anonymous {
  border-left: 4px solid var(--mmh-blue-light);
}

.mmh-not-alone {
  border-left: 4px solid var(--mmh-success);
}

.mmh-danger-zone {
  border-left: 4px solid var(--mmh-danger);
}


/* =========================================================
   11. BADGES
   ========================================================= */

.mmh-badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--mmh-radius-pill);
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(30, 136, 229, 0.18);
  color: var(--mmh-blue-light);
}

.mmh-badge-success {
  background: rgba(0, 200, 83, 0.16);
  color: var(--mmh-success);
}

.mmh-badge-danger {
  background: rgba(229, 57, 53, 0.16);
  color: var(--mmh-danger);
}


/* =========================================================
   12. UTILITY CLASSES
   ========================================================= */

.mmh-hidden {
  display: none !important;
}

.mmh-center {
  text-align: center;
}

.mmh-flex {
  display: flex;
}

.mmh-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mmh-gap-sm {
  gap: var(--mmh-space-sm);
}

.mmh-gap-md {
  gap: var(--mmh-space-md);
}

.mmh-gap-lg {
  gap: var(--mmh-space-lg);
}

.mmh-mt-md {
  margin-top: var(--mmh-space-md);
}

.mmh-mt-lg {
  margin-top: var(--mmh-space-lg);
}

.mmh-mb-md {
  margin-bottom: var(--mmh-space-md);
}

.mmh-mb-lg {
  margin-bottom: var(--mmh-space-lg);
}


/* =========================================================
   13. MOBILE RULES
   ========================================================= */

@media (max-width: 700px) {
  .mmh-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--mmh-space-md);
  }

  .mmh-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: var(--mmh-space-sm);
  }

  .mmh-card,
  .mmh-post {
    padding: var(--mmh-space-md);
  }
}


/* =========================================================
   14. LOCKED THEME RULES
   ========================================================= */

/*
   DO NOT:
   - Add random colours outside :root
   - Use light theme as default
   - Use decorative fonts for normal UI text
   - Style repeated buttons/cards directly in page files

   DO:
   - Add new reusable styles here
   - Use mmh-* class names
   - Keep the site dark, raw, clean and readable
*/
/* =========================================================
   15. PROFILE SYSTEM
   ========================================================= */

.mmh-profile-card {
  display: flex;
  flex-direction: column;
  gap: var(--mmh-space-md);
}

.mmh-profile-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mmh-space-lg);
  align-items: flex-start;
}

.mmh-profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--mmh-blue);
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 900;
  border: 2px solid var(--mmh-border-strong);
  box-shadow: var(--mmh-glow-blue);
  flex-shrink: 0;
}

.mmh-profile-meta h2,
.mmh-profile-meta-name {
  margin-bottom: var(--mmh-space-sm);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-family: var(--mmh-font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mmh-text-main);
}

.mmh-profile-mood {
  color: var(--mmh-text-soft);
  font-weight: 600;
  margin: 0 0 var(--mmh-space-sm);
}

.mmh-connections {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mmh-space-md);
}

.mmh-connection-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--mmh-space-sm);
  padding: var(--mmh-space-sm) var(--mmh-space-md);
  background: var(--mmh-bg-deep);
  border: 1px solid var(--mmh-border);
  border-radius: var(--mmh-radius-pill);
  color: var(--mmh-text-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

/* =========================================================
   16. CHAT SYSTEM
   ========================================================= */

.mmh-chat-layout {
  display: grid;
  grid-template-columns: var(--mmh-sidebar-width) minmax(0, 1fr);
  gap: 0;
  min-height: 480px;
  border: 1px solid var(--mmh-border);
  border-radius: var(--mmh-radius-large);
  overflow: hidden;
  background: var(--mmh-bg-card);
}

@media (max-width: 800px) {
  .mmh-chat-layout {
    grid-template-columns: 1fr;
  }
}

.mmh-chat-list {
  border-right: 1px solid var(--mmh-border);
  background: var(--mmh-bg-deep);
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  overflow-y: auto;
}

@media (max-width: 800px) {
  .mmh-chat-list {
    border-right: none;
    border-bottom: 1px solid var(--mmh-border);
    max-height: 200px;
  }
}

.mmh-chat-thread {
  padding: var(--mmh-space-md);
  border-bottom: 1px solid var(--mmh-border);
  cursor: pointer;
  color: var(--mmh-text-soft);
  font-weight: 600;
  transition: var(--mmh-transition-fast);
}

.mmh-chat-thread:hover,
.mmh-chat-thread.mmh-active {
  background: var(--mmh-bg-hover);
  color: var(--mmh-text-main);
}

.mmh-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, var(--mmh-bg-card-soft), var(--mmh-bg-card));
}

.mmh-chat-messages {
  flex: 1;
  padding: var(--mmh-space-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--mmh-space-md);
}

.mmh-message {
  max-width: 80%;
  padding: var(--mmh-space-sm) var(--mmh-space-md);
  border-radius: var(--mmh-radius);
  border: 1px solid var(--mmh-border);
  line-height: 1.5;
  color: var(--mmh-text-soft);
}

.mmh-message--them {
  align-self: flex-start;
  background: var(--mmh-bg-deep);
}

.mmh-message--me {
  align-self: flex-end;
  background: rgba(30, 136, 229, 0.15);
  border-color: rgba(30, 136, 229, 0.35);
  color: var(--mmh-text-main);
}

.mmh-chat-composer {
  display: flex;
  gap: var(--mmh-space-sm);
  padding: var(--mmh-space-md);
  border-top: 1px solid var(--mmh-border);
  background: rgba(4, 16, 28, 0.6);
}

/* =========================================================
   17. SUPPORT DIRECTORY
   ========================================================= */

.mmh-support-section {
  margin-bottom: var(--mmh-space-xl);
}

.mmh-emergency {
  background: linear-gradient(180deg, rgba(229, 57, 53, 0.12), var(--mmh-bg-card));
  border: 1px solid rgba(229, 57, 53, 0.35);
  border-radius: var(--mmh-radius-large);
  padding: var(--mmh-space-lg);
}

.mmh-emergency h3 {
  color: var(--mmh-text-main);
}

.mmh-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--mmh-space-sm);
}

.mmh-link-list a {
  display: block;
  padding: var(--mmh-space-sm) 0;
  border-bottom: 1px solid var(--mmh-border);
  font-weight: 600;
}

.mmh-link-list a:last-child {
  border-bottom: none;
}

.mmh-placeholder-line {
  height: 12px;
  background: var(--mmh-bg-hover);
  border-radius: var(--mmh-radius-small);
  margin-bottom: var(--mmh-space-sm);
  max-width: 100%;
}

.mmh-placeholder-line--short {
  max-width: 40%;
}

.mmh-placeholder-line--mid {
  max-width: 60%;
}

/* =========================================================
   18. HOMEPAGE HERO
   ========================================================= */

.mmh-hero {
  padding: var(--mmh-space-xxl) 0;
}

.mmh-hero__title {
  margin-bottom: var(--mmh-space-md);
}

.mmh-hero__lead {
  max-width: 40rem;
  font-size: 1.1rem;
  color: var(--mmh-text-soft);
  margin: 0 0 var(--mmh-space-lg);
}

.mmh-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mmh-space-md);
}

.mmh-feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mmh-safety {
  background: var(--mmh-bg-deep);
  border: 1px solid var(--mmh-border);
  border-radius: var(--mmh-radius-large);
  padding: var(--mmh-space-lg);
  border-left: 4px solid var(--mmh-blue);
}

.mmh-safety p:last-child {
  margin-bottom: 0;
}

.mmh-safety-kicker {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.mmh-cta__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: var(--mmh-space-md);
}

.mmh-cta__lead {
  margin: 0 auto var(--mmh-space-md);
  text-align: center;
  max-width: 36rem;
}

.mmh-feed-preview {
  display: flex;
  flex-direction: column;
  gap: var(--mmh-space-md);
}

.mmh-cta {
  text-align: center;
  padding: var(--mmh-space-xxl) 0;
}

/* =========================================================
   19. SITE SHELL, FOOTER, AUTH, COMPOSER
   ========================================================= */

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

.mmh-main {
  flex: 1 0 auto;
}

.mmh-footer {
  border-top: 1px solid var(--mmh-border);
  background: rgba(4, 16, 28, 0.92);
  padding: var(--mmh-space-lg) var(--mmh-space-md);
  margin-top: var(--mmh-space-xl);
}

.mmh-footer-inner {
  width: min(100% - 32px, var(--mmh-page-max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--mmh-space-md);
  justify-content: space-between;
  align-items: center;
}

.mmh-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mmh-space-md);
}

.mmh-footer-links a {
  color: var(--mmh-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.mmh-footer-links a:hover {
  color: var(--mmh-text-main);
}

.mmh-footer-note {
  margin: 0;
  font-size: 0.9rem;
  max-width: 42rem;
}

.mmh-page-header {
  margin-bottom: var(--mmh-space-lg);
}

.mmh-page-header p {
  margin: 0;
  max-width: 40rem;
}

.mmh-auth-wrap {
  max-width: 420px;
  margin: 0 auto;
}

.mmh-auth-foot {
  margin-bottom: 0;
  margin-top: var(--mmh-space-md);
  font-size: 0.9rem;
}

.mmh-composer {
  display: flex;
  flex-direction: column;
  gap: var(--mmh-space-md);
}

.mmh-composer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--mmh-space-md);
}

.mmh-toggle-row {
  display: flex;
  align-items: center;
  gap: var(--mmh-space-sm);
  color: var(--mmh-text-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

.mmh-header-brand {
  display: flex;
  align-items: center;
  gap: var(--mmh-space-sm);
  text-decoration: none;
}

.mmh-logo-mark {
  width: 40px;
  height: auto;
  border-radius: var(--mmh-radius-small);
}

/* =========================================================
   20. MOBILE (extended)
   ========================================================= */

@media (max-width: 700px) {
  .mmh-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mmh-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
