:root {
  --ink: #172033;
  --muted: #667085;
  --paper: #ffffff;
  --soft: #f5f6fa;
  --line: #e4e7ec;

  --primary: #9d2342;
  --primary-dark: #76172f;
  --primary-soft: #f8e8ed;

  --accent: #f6c85f;
  --success: #117a55;
  --danger: #b42318;

  --radius: 16px;
  --shadow: 0 12px 35px rgba(16, 24, 40, 0.09);
}

/* ========================================
   GLOBAL
======================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1140px, calc(100% - 32px));
  margin-inline: auto;
}

/* ========================================
   HEADER AND NAVIGATION
======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-wrap {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.site-logo {
    display: block;
    width: auto;
    height: 66px;
    max-width: 430px;
    object-fit: contain;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  line-height: 1;
}

/*
  The logo is deliberately constrained here.
  This prevents the image from stretching the header.
*/
.site-logo {
  display: block;
  width: auto;
  height: 66px;
  max-width: 390px;
  max-height: 66px;
  object-fit: contain;
}

/*
  Keep these old classes in case any page still uses
  the original music-note brand.
*/
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.35rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-left: auto;
}

.main-nav > a:not(.button) {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.main-nav > a:not(.button):hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.65rem;
  cursor: pointer;
}

/* ========================================
   BUTTONS
======================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  padding: 12px 18px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.button-outline {
  color: var(--primary);
  background: transparent;
}

.button-outline:hover {
  color: #ffffff;
}

.button-light {
  color: var(--primary);
  background: #ffffff;
  border-color: #ffffff;
}

.button-light:hover {
  color: #ffffff;
}

.button-danger {
  background: var(--danger);
  border-color: var(--danger);
}

.button-small {
  padding: 9px 14px;
  font-size: 0.9rem;
}

/* ========================================
   TYPOGRAPHY
======================================== */

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.15;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.45rem, 6vw, 4.8rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.025em;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.15rem;
}

/* ========================================
   HERO
======================================== */

.hero {
  padding: 88px 0 72px;
  background:
    radial-gradient(
      circle at 80% 20%,
      rgba(246, 200, 95, 0.35),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      #ffffff 0%,
      #f9e9ee 100%
    );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-card,
.card,
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  transform: rotate(1deg);
}

/* ========================================
   PROFILE ELEMENTS
======================================== */

.profile-preview {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 76px;
  height: 76px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: #eceff3;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.avatar-large {
  width: 145px;
  height: 145px;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 2rem;
}

.badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 750;
}

.member-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f3f7;
  color: #475467;
  font-size: 0.78rem;
}

/* ========================================
   GENERAL SECTIONS
======================================== */

.section {
  padding: 72px 0;
}

.section-white {
  background: #ffffff;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  padding: 24px;
}

.card p {
  color: var(--muted);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.35rem;
}

/* ========================================
   DIRECTORY
======================================== */

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.member-card {
  overflow: hidden;
  padding: 0;
}

.member-card-cover {
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary),
    #d45b78
  );
}

.member-card-body {
  padding: 0 22px 22px;
}

.member-card .avatar {
  margin-top: -38px;
}

/* ========================================
   FORMS
======================================== */

.form-card {
  max-width: 720px;
  margin: 48px auto;
  padding: 30px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cfd4dc;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(157, 35, 66, 0.14);
}

.help {
  color: var(--muted);
  font-size: 0.86rem;
}

/* ========================================
   ALERTS
======================================== */

.alert {
  margin: 16px 0;
  padding: 13px 15px;
  border-radius: 10px;
}

.alert-success {
  background: #e8f7f0;
  color: var(--success);
}

.alert-error {
  background: #fff0ee;
  color: var(--danger);
}

/* ========================================
   DASHBOARD
======================================== */

.dashboard-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 40px 0 70px;
}

.sidebar {
  height: fit-content;
  padding: 18px;
}

.sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 650;
}

.sidebar a:hover {
  background: #f6eef1;
  color: var(--primary);
}

.panel {
  margin-bottom: 22px;
  padding: 26px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.stat strong {
  display: block;
  font-size: 1.7rem;
}

/* ========================================
   TABLES
======================================== */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ========================================
   SEARCH
======================================== */

.searchbar {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 10px;
  margin: 25px 0;
}

/* ========================================
   PUBLIC PROFILES
======================================== */

.profile-hero {
  padding: 58px 0 36px;
  background: linear-gradient(
    135deg,
    #f9e8ed,
    #ffffff
  );
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 28px;
}

.profile-columns {
  display: grid;
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(280px, 0.7fr);
  gap: 28px;
  padding: 36px 0 70px;
}

.song {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.song:last-child {
  border-bottom: 0;
}

.song-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* ========================================
   PRICING
======================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 22px;
}

.price-card {
  position: relative;
  padding: 28px;
}

.price-card.featured {
  border: 2px solid var(--primary);
  transform: translateY(-8px);
}

.price {
  margin: 12px 0;
  font-size: 2.5rem;
  font-weight: 850;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

.feature-list {
  padding-left: 20px;
  color: var(--muted);
}

/* ========================================
   FREE TOOLS PREVIEW
======================================== */

.tools-preview-section {
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(246, 200, 95, 0.2),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      #fffaf7 0%,
      #fdf3f5 100%
    );
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tool-preview-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.tool-preview-card:hover {
  transform: translateY(-5px);
  border-color: #d9a5b4;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
}

.tool-preview-card p {
  color: var(--muted);
}

.tool-link {
  color: var(--primary);
  font-weight: 750;
}

/* ========================================
   FOOTER
======================================== */

.site-footer {
  padding: 48px 0 20px;
  background: #121827;
  color: #d0d5dd;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.footer-grid a {
  display: block;
  margin-bottom: 7px;
  color: #eaecf0;
}

.footer-grid a:hover {
  color: #ffffff;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #344054;
  font-size: 0.9rem;
}

.empty {
  padding: 45px 20px;
  color: var(--muted);
  text-align: center;
}

.flash-wrap {
  min-height: 1px;
}

/* ========================================
   TABLET AND MOBILE
======================================== */

@media (max-width: 960px) {
  .site-logo {
    height: 58px;
    max-width: 320px;
    max-height: 58px;
  }

  .main-nav {
    gap: 15px;
  }

  .main-nav > a:not(.button) {
    font-size: 0.9rem;
  }
}

@media (max-width: 850px) {
  .nav-wrap {
    position: relative;
    min-height: 78px;
  }

  .site-logo {
    height: 54px;
    max-width: 275px;
    max-height: 54px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    z-index: 30;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    background: #ffffff;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
  }

  .main-nav .button {
    justify-content: center;
  }

  .hero-grid,
  .dashboard-layout,
  .profile-columns,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .directory-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .searchbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .container {
    width: min(100% - 24px, 1140px);
  }

  .nav-wrap {
    min-height: 72px;
  }

  .site-logo {
    height: 46px;
    max-width: 230px;
    max-height: 46px;
  }

  .grid-3,
  .directory-grid,
  .pricing-grid,
  .form-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .profile-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    padding: 52px 0;
  }

  .hero {
    padding: 60px 0;
  }

  .hero-card {
    transform: none;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-card.featured {
    transform: none;
  }
}